Home » Community » Newbie corner » Derived Layouts Show/Hide & Run/Close in the Same Window
Derived Layouts Show/Hide & Run/Close in the Same Window [message #37712] |
Sun, 04 November 2012 21:41 |
nejnadusho
Messages: 60 Registered: October 2012
|
Member |
|
|
Hi,
I am trying to achieve to be able to Show/Hide and Run/Execute/Close derived layouts(!not windows!) in the same window.
I need the Show/Hide option because I would want to be able to keep the state of the layouts while working on another layout.
Currently I am trying the following:
.h File
class Base : public WithBaseLayout<TopWindow> {
public:
typedef Base CLASSNAME;
Base();
void DisplayDerived1();
private:
};
class Derived1 : public WithDerived1Layout<Base>{
public:
Derived1();
typedef Derived1 CLASSNAME;
};
main.cpp File
Base::Base()
{
CtrlLayout(*this, "Window title");
push1 <<= THISBACK(DisplayDerived1);
}
void Base::DisplayDerived1(){
Derived1 der1;
der1.Execute();
}
Derived1::Derived1(){
SetLayout_Derived1Layout(*this, true);
}
GUI_APP_MAIN
{
Base().Run();
}
With the code above I achieve every time I run the derived class a new window pops up.
The only thing I can do is to close the old window and kill whatever is going on that layout(window in the current case).
This is not efficient for my application.
However, I need derived layouts because I would allays need the base layout's features together with one at a time of any of the derived layouts.
Having said that I also find difficult to figure out how to Run/Execute all the classes so they can keep parallel separate states at the same time.
Any help is greatly appreciated.
If clarification needed please let me know.
Best,
nejnio
|
|
|
Goto Forum:
Current Time: Tue May 21 21:29:47 CEST 2024
Total time taken to generate the page: 0.02110 seconds
|