src/widget/window_events.hpp
branchcpp_gui
changeset 6264 9fc3b5467396
child 6271 0ad100a98853
equal deleted inserted replaced
6263:19dab6a68886 6264:9fc3b5467396
       
     1 /* $Id$ */
       
     2 
       
     3 #ifndef WINDOW_EVENT_H
       
     4 #define WINDOW_EVENT_H
       
     5 
       
     6 namespace gui {
       
     7 
       
     8 
       
     9 template <> struct EventT<EVT_CREATE> : public EventBaseT<EVT_CREATE, &Widget::OnCreate> {
       
    10 };
       
    11 
       
    12 template <> struct EventT<EVT_DESTROY> : public EventBaseT<EVT_DESTROY, &Widget::OnDestroy> {
       
    13 };
       
    14 
       
    15 template <> struct EventT<EVT_PAINT> : public EventBaseT<EVT_PAINT, &Widget::OnPaint> {
       
    16 };
       
    17 
       
    18 template <> struct EventT<EVT_KEYPRESS> : public EventBaseT<EVT_KEYPRESS, &Widget::OnKeyPress> {
       
    19 	bool   m_cont;     // continue the search? (default true)
       
    20 	uint16 m_key;      // 16-bit Unicode value of the key
       
    21 	uint16 m_keycode;  // untranslated key (including shift-state)
       
    22 
       
    23 	EventT(bool cont, uint16 key, uint16 keycode)
       
    24 		: m_cont(cont)
       
    25 		, m_key(key)
       
    26 		, m_keycode(keycode)
       
    27 	{}
       
    28 };
       
    29 
       
    30 template <> struct EventT<EVT_CLICK> : public EventBaseT<EVT_CLICK, &Widget::OnLeftClick> {
       
    31 	Point m_pt;
       
    32 
       
    33 	EventT(const PointRaw &pt)
       
    34 		: m_pt(pt)
       
    35 	{}
       
    36 };
       
    37 
       
    38 template <> struct EventT<EVT_RCLICK> : public EventBaseT<EVT_RCLICK, &Widget::OnRightClick> {
       
    39 	Point m_pt;
       
    40 
       
    41 	EventT(const PointRaw &pt)
       
    42 		: m_pt(pt)
       
    43 	{}
       
    44 };
       
    45 
       
    46 
       
    47 
       
    48 
       
    49 }; // namespace gui
       
    50 
       
    51 #endif /* WINDOW_EVENT_H */