mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 14:16:09 -06:00
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
|
|
class DisplayPopup : public Ctrl, public Link<DisplayPopup> {
|
|
virtual void Paint(Draw& w);
|
|
virtual void LeftDown(Point p, dword);
|
|
virtual void LeftDrag(Point p, dword);
|
|
virtual void LeftDouble(Point p, dword);
|
|
virtual void RightDown(Point p, dword);
|
|
virtual void LeftUp(Point p, dword);
|
|
virtual void MouseWheel(Point p, int zdelta, dword keyflags);
|
|
virtual void MouseLeave();
|
|
virtual void MouseMove(Point p, dword);
|
|
|
|
private:
|
|
Ptr<Ctrl> ctrl;
|
|
Rect item;
|
|
Rect slim;
|
|
|
|
Value value;
|
|
Color paper, ink;
|
|
dword style;
|
|
const Display *display;
|
|
int margin;
|
|
|
|
Point Op(Point p);
|
|
void Sync();
|
|
|
|
static Link<DisplayPopup> *all();
|
|
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();
|
|
|
|
DisplayPopup();
|
|
~DisplayPopup();
|
|
};
|