15 #ifndef ActiveWindow_h
16 #define ActiveWindow_h
82 static const char*
TYPENAME() {
return "AWEvent"; }
121 static const char*
TYPENAME() {
return "ActiveWindow"; }
130 virtual void Paint();
135 virtual void UseLayout(
const std::vector<DWORD>& min_x,
136 const std::vector<DWORD>& min_y,
137 const std::vector<float>& weight_x,
138 const std::vector<float>& weight_y);
139 virtual void UseLayout(
const std::vector<float>& min_x,
140 const std::vector<float>& min_y,
141 const std::vector<float>& weight_x,
142 const std::vector<float>& weight_y);
163 virtual int OnKeyDown(
int vk,
int flags);
211 void SetCells(
int cx,
int cy,
int cw=1,
int ch=1);
239 void DrawText(
const char* txt,
int count,
Rect& txt_rect, DWORD flags);
249 virtual void ClientEvent(
int EID,
int x=0,
int y=0);
314 #define DEF_MAP_CLIENT(cname, fname)\
315 void Map##cname##fname(ActiveWindow* client, AWEvent* event) \
316 { cname* c = (cname*) client; c->fname(event); }
318 #define REGISTER_CLIENT(eid, ctrl, cname, fname)\
319 if (ctrl) ctrl->RegisterClient(eid, this, Map##cname##fname);
321 #define UNREGISTER_CLIENT(eid, ctrl, cname)\
322 if (ctrl) ctrl->UnregisterClient(eid, this);
324 #endif ActiveWindow_h