mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
class DisplayPopup : public Pte<DisplayPopup> {
|
|
private:
|
|
struct Pop : Pte<Pop> {
|
|
struct PopCtrl : public Ctrl {
|
|
virtual void Paint(Draw& w);
|
|
|
|
struct Pop *p;
|
|
};
|
|
|
|
Ptr<Ctrl> ctrl;
|
|
Rect item;
|
|
|
|
Value value;
|
|
Color paper, ink;
|
|
dword style;
|
|
const Display *display;
|
|
int margin;
|
|
bool usedisplaystdsize = false;
|
|
|
|
PopCtrl view;
|
|
PopCtrl frame;
|
|
|
|
Callback WhenClose;
|
|
|
|
void Set(Ctrl *ctrl, const Rect& item, const Value& v, const Display *display,
|
|
Color ink, Color paper, dword style, int margin = 0);
|
|
void Sync();
|
|
|
|
static Vector<Pop *>& all();
|
|
|
|
Pop();
|
|
~Pop();
|
|
};
|
|
|
|
One<Pop> popup;
|
|
bool usedisplaystdsize = false;
|
|
|
|
static bool StateHook(Ctrl *, int reason);
|
|
static bool MouseHook(Ctrl *, bool, int, Point, int, dword);
|
|
static void SyncAll();
|
|
|
|
typedef DisplayPopup CLASSNAME;
|
|
|
|
public:
|
|
void Set(Ctrl *ctrl, const Rect& item, const Value& v, const Display *display,
|
|
Color ink, Color paper, dword style, int margin = 0);
|
|
void Cancel();
|
|
bool IsOpen();
|
|
bool HasMouse();
|
|
void UseDisplayStdSize();
|
|
|
|
DisplayPopup();
|
|
~DisplayPopup();
|
|
};
|