Google
Web alhem.net
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

GuiEvent.h

Go to the documentation of this file.
00001 00006 /* 00007 Copyright (C) 2004 Anders Hedstrom 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 #ifndef _GUIEVENT_H 00024 #define _GUIEVENT_H 00025 00026 00027 namespace gui 00028 { 00029 class Surface; 00030 00031 class GuiEvent; 00032 //typedef void (GuiEvent::*UICOMMAND)(Surface *,long); 00033 typedef void (*UICOMMAND)(Surface *,long); 00034 typedef std::map<long,UICOMMAND> uicmdmap_t; 00035 00036 class GuiEvent 00037 { 00038 public: 00039 GuiEvent(); 00040 virtual ~GuiEvent(); 00041 00042 void SetRootSurface(Surface *); 00043 void SetSDLControl(SDLControl *); 00044 void SetDefaultFocus(Surface *); 00045 void SetQuit(bool); 00046 void RegUICmdMethod(long,UICOMMAND); 00047 00048 bool RightMouseButtonDown(); 00049 00050 virtual void KeyboardEvent(SDL_KeyboardEvent &); 00051 virtual void MouseMotionEvent(SDL_MouseMotionEvent &); 00052 virtual void MouseButtonEvent(SDL_MouseButtonEvent &); 00053 virtual void UserEvent(SDL_UserEvent &); 00054 virtual void EventLoop(); 00055 00056 private: 00057 static Surface *m_mouse; 00058 static Surface *m_selected; 00059 static Surface *m_focus; 00060 static Surface *m_moving; 00061 static Surface *m_sizing; 00062 static Surface *m_trackbutton; 00063 static Surface *m_default_focus; 00064 void SetFocus(Surface *); 00065 void SetSelected(Surface *); 00066 Surface *m_pclRootSurface; 00067 SDLControl *m_pclControl; 00068 bool m_bLeftButtonPressed; 00069 coord_t m_leftx; 00070 coord_t m_lefty; 00071 bool m_bMiddleButtonPressed; 00072 coord_t m_middlex; 00073 coord_t m_middley; 00074 bool m_bRightButtonPressed; 00075 coord_t m_rightx; 00076 coord_t m_righty; 00077 bool m_bQuit; 00078 rectvector_t m_vecInvalidRects; 00079 rectvector_t m_vecFillRects; 00080 int m_sizing_w; 00081 int m_sizing_h; 00082 uicmdmap_t m_uicmdmap; 00083 }; 00084 } // namespace 00085 00086 00087 #endif // _GUIEVENT_H

Generated for My SDL C++ Gui by doxygen 1.3.6

www.TV-friendship.com
The matchmaking service with an all new twist.

Quantum 'Teleportation'
Some thoughts
Page, code, and content Copyright (C) 2004 by Anders Hedström