Home » Developing U++ » U++ Developers corner » U++ GUI over existing code
U++ GUI over existing code [message #37349] |
Tue, 25 September 2012 14:22 |
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 |
|
Hi Nossica,
Welcome to the forum
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++
Best regards,
Honza
|
|
|
|
Re: U++ GUI over existing code [message #37352 is a reply to message #37351] |
Tue, 25 September 2012 16:30 |
|
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 ) mix STL and U++, for example use STL for data containers and U++ only for GUI.
Honza
|
|
|
Goto Forum:
Current Time: Thu Mar 28 19:32:09 CET 2024
Total time taken to generate the page: 0.01503 seconds
|