Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » U++ GUI over existing code
U++ GUI over existing code [message #37349] Tue, 25 September 2012 14:22 Go to next message
Nossica is currently offline  Nossica
Messages: 2
Registered: September 2012
Location: GB
Junior Member
Hi,

I am looking at updating the GUI for our very large program. I need the GUI to link to the SDK that we have written as we are not able to rewrite all of that code (several thousand files).

For example a button press on the GUI would need to call a function in a DLL and then use the data passed back to fill a table.

Will U++ be able to do this or would we need to convert the DLLs too?
Re: U++ GUI over existing code [message #37350 is a reply to message #37349] Tue, 25 September 2012 15:03 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Nossica,

Welcome to the forum Cool

If your business logic is reasonably separated from the GUI code, than it should be relatively easy. From what you describe it sounds like it is the case. For the example you describe it would look somewhat like this:
struct App : public WithSomeLayout<TopWindow> {
	typedef App CLASSNAME;

	void ButtonClick(){
		<sometype> data = FunctionFromDll();
		for(int i = 0; i < data.GetCount(); i++)
			array.Add(i, data[0], ...);
	}

	App() {
		button <<= THISBACK(ButtonClick);
		//some other setup goes here
	};
};

GUI_APP_MAIN
{
	App().Run();
}


It is very simplistic example, but it should demonstrate that writing GUI is fast and simple in U++ Wink

Best regards,
Honza
Re: U++ GUI over existing code [message #37351 is a reply to message #37349] Tue, 25 September 2012 15:26 Go to previous messageGo to next message
Nossica is currently offline  Nossica
Messages: 2
Registered: September 2012
Location: GB
Junior Member
That looks good, thanks!

I think I read that there was an issue with U++ not supporting STL, is this still the case?

If so, will it cause any issues with our own code using STL?
Re: U++ GUI over existing code [message #37352 is a reply to message #37351] Tue, 25 September 2012 16:30 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

There is some basic support for STL. E.g. Upp::Vector<> can be made compatible with std::vector<>. Many of the std:: types are not covered, but it shouldn't really be a problem, as you can (although it is not really recommended Smile ) mix STL and U++, for example use STL for data containers and U++ only for GUI.

Honza
Previous Topic: Some questions about witz
Next Topic: [contribution request] Linux multimonitor XRANDR support
Goto Forum:
  


Current Time: Thu Mar 28 19:32:09 CET 2024

Total time taken to generate the page: 0.01503 seconds