mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 14:16:09 -06:00
34 lines
512 B
C++
34 lines
512 B
C++
#include <CtrlLib/CtrlLib.h>
|
|
|
|
struct PopUp2 : StaticRect {
|
|
PopUp2() { Color(SRed); }
|
|
};
|
|
|
|
struct PopUp1 : StaticRect
|
|
{
|
|
PopUp2 p2;
|
|
|
|
virtual void LeftDown(Point, dword) {
|
|
p2.SetRect(100, 100, 100, 100);
|
|
if(!p2.IsOpen())
|
|
p2.PopUp(this);
|
|
}
|
|
|
|
PopUp1() { Color(SBlue); }
|
|
};
|
|
|
|
struct MyCtrl : TopWindow
|
|
{
|
|
PopUp1 p1;
|
|
|
|
virtual void LeftDown(Point, dword) {
|
|
p1.SetRect(150, 150, 100, 100);
|
|
if(!p1.IsOpen())
|
|
p1.PopUp(this);
|
|
}
|
|
};
|
|
|
|
GUI_APP_MAIN
|
|
{
|
|
MyCtrl().Run();
|
|
}
|