event-id.h

Go to the documentation of this file.
00001 
00007 /*
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Lesser General Public
00010     License as published by the Free Software Foundation; either
00011     version 2.1 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public
00019     License along with this library; if not, write to the Free Software
00020     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 */
00022 
00023 #ifndef OMGUI_EVENT_ID_H
00024 #define OMGUI_EVENT_ID_H
00025 
00026 #include <omgui/types.h>
00027 
00028 namespace omgui {
00029     class Widget;
00030     class Notebook;
00031     class Window;
00032     class Button;
00033     class TextWidget;
00034     class Menu;
00035 
00040 event_id get_unique_event_id();
00041 
00045 template<typename T> class event_traits;
00046 
00050 template<> class OMGUI_API event_traits<Widget>
00051 {
00052 public:
00054     static const event_id CREATE;
00056     static const event_id DESTROY;
00058     static const event_id SIZECHANGE;
00060     static const event_id MOUSE_ENTER;
00062     static const event_id MOUSE_LEAVE;
00064     static const event_id MOUSE_MOVE;
00066     static const event_id MOUSE_HOVER;
00068     static const event_id MOUSE_LEFT_DOWN;
00070     static const event_id MOUSE_LEFT_UP;
00072     static const event_id MOUSE_LEFT_DOUBLECLICK;
00074     static const event_id MOUSE_RIGHT_DOWN;
00076     static const event_id MOUSE_RIGHT_UP;
00078     static const event_id MOUSE_RIGHT_DOUBLECLICK;
00080     static const event_id MOUSE_MIDDLE_DOWN;
00082     static const event_id MOUSE_MIDDLE_UP;
00084     static const event_id MOUSE_MIDDLE_DOUBLECLICK;
00085 };
00086 
00087 template<> class OMGUI_API event_traits<Window> : public event_traits<Widget>
00088 {
00089 public:
00091     static const event_id CLOSE;
00092 };
00093 
00094 template<> class OMGUI_API event_traits<Notebook> : public event_traits<Widget>
00095 {
00096 public:
00098     static const event_id PAGE_CHANGED;
00100     static const event_id PAGE_CHANGING;
00101 };
00102 
00103 template<> class OMGUI_API event_traits<Button> : public event_traits<Widget>
00104 {
00105 public:
00107     static const event_id ACTIVATE;
00108 };
00109 
00110 template<> class OMGUI_API event_traits<TextWidget> : public event_traits<Widget>
00111 {
00112 public:
00114     static const event_id TEXT_CHANGED;
00115 };
00116 
00117 template<> class OMGUI_API event_traits<Menu>
00118 {
00119 public:
00121     static const event_id ITEM_SELECTED;
00122 };
00123 
00124 } // omgui
00125 
00126 #endif

doxygen SourceForge.net Logo