- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

uevent.hpp

00001 /*************************************************************************** 00002 LibUFO - UI For OpenGL 00003 copyright : (C) 2001-2005 by Johannes Schmidt 00004 email : schmidtjf at users.sourceforge.net 00005 ------------------- 00006 00007 file : include/ufo/events/uevent.hpp 00008 begin : Tue May 8 2001 00009 $Id: uevent.hpp,v 1.13 2005/06/21 09:26:40 schmidtjf Exp $ 00010 ***************************************************************************/ 00011 00012 /*************************************************************************** 00013 * This library is free software; you can redistribute it and/or * 00014 * modify it under the terms of the GNU Lesser General Public * 00015 * License as published by the Free Software Foundation; either * 00016 * version 2.1 of the License, or (at your option) any later version. * 00017 * * 00018 * This library is distributed in the hope that it will be useful, * 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00021 * Lesser General Public License for more details. * 00022 * * 00023 * You should have received a copy of the GNU Lesser General Public * 00024 * License along with this library; if not, write to the Free Software * 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 00026 ***************************************************************************/ 00027 00028 #ifndef UEVENT_HPP 00029 #define UEVENT_HPP 00030 00031 #include "../uobject.hpp" 00032 00033 namespace ufo { 00034 00041 class UFO_EXPORT UEvent : public UObject { 00042 UFO_DECLARE_DYNAMIC_CLASS(UEvent) 00043 public: 00044 enum Type { 00045 NoEvent = 0, 00047 Timer = 1, 00049 Action = 2, 00051 RunnableEvent = 3, 00053 QuitEvent = 4, 00055 Repaint = 5, 00057 Refresh = 6, 00058 00059 MousePressed = 10, // mouse event 00060 MouseReleased = 11, 00061 MouseClicked = 12, 00062 MouseMoved = 13, 00063 MouseDragged = 14, 00065 MouseEntered = 15, 00067 MouseExited = 16, 00068 00069 MouseWheel = 19, 00070 00071 KeyPressed = 20, 00072 KeyReleased = 21, 00074 KeyTyped = 22, 00075 Shortcut = 23, 00076 00078 FocusGained = 25, 00080 FocusLost = 26, 00081 00082 WidgetMoved = 30, 00083 WidgetResized = 31, 00084 00085 WidgetShown = 32, 00086 WidgetHidden = 33, 00087 00089 WidgetAdded = 34, 00091 WidgetRemoved = 35, 00093 WidgetZOrderChanged = 36, 00094 00096 PropertyChanged = 40 00097 }; 00098 00099 public: 00100 UEvent(UObject * sourceA, Type idA); 00101 00103 UObject * getSource() const; 00105 void setSource(UObject * newSourceA); 00106 00108 Type getType() const; 00109 00113 virtual void consume(); 00114 00119 virtual bool isConsumed() const; 00120 00121 protected: // Protected methods 00122 virtual std::ostream & paramString(std::ostream & os) const; 00123 00124 protected: // Protected attributes 00126 UObject * m_source; 00128 Type m_type; 00132 bool m_isConsumed; 00133 }; 00134 00135 } // namespace ufo 00136 00137 #endif // UEVENT_HPP

The libUFO Project - written by Johannes Schmidt