class DisplayPopup : public Pte { private: struct Pop : Pte { struct PopCtrl : public Ctrl { virtual void Paint(Draw& w); struct Pop *p; }; Ptr 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& all(); Pop(); ~Pop(); }; One 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(); };