00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _CEGUIEventSet_h_
00027 #define _CEGUIEventSet_h_
00028
00029 #include "CEGUIBase.h"
00030 #include "CEGUIString.h"
00031 #include "CEGUIEvent.h"
00032 #include "CEGUIIteratorBase.h"
00033 #include <map>
00034
00035 #if defined (_MSC_VER)
00036 # pragma warning(push)
00037 # pragma warning(disable : 4251)
00038 #endif
00039
00040
00041
00042 namespace CEGUI
00043 {
00051 class CEGUIEXPORT EventSet
00052 {
00053 public:
00058 EventSet();
00059
00060
00065 virtual ~EventSet(void);
00066
00067
00080 void addEvent(const String& name);
00081
00082
00093 void removeEvent(const String& name);
00094
00095
00103 void removeAllEvents(void);
00104
00105
00113 bool isEventPresent(const String& name);
00114
00115
00131 virtual Event::Connection subscribeEvent(const String& name, Event::Subscriber subscriber);
00132
00133
00152 virtual Event::Connection subscribeEvent(const String& name, Event::Group group, Event::Subscriber subscriber);
00153
00154
00170 virtual Event::Connection subscribeScriptedEvent(const String& name, const String& subscriber_name);
00171
00172
00191 virtual Event::Connection subscribeScriptedEvent(const String& name, Event::Group group, const String& subscriber_name);
00192
00193
00213 virtual void fireEvent(const String& name, EventArgs& args, const String& eventNamespace = "");
00214
00215
00224 bool isMuted(void) const;
00225
00226
00238 void setMutedState(bool setting);
00239
00240
00241 protected:
00242
00243 EventSet(EventSet& e) {}
00244 EventSet& operator=(EventSet& e) {return *this;}
00245
00246 typedef std::map<String, Event*> EventMap;
00247 EventMap d_events;
00248
00249 bool d_muted;
00250
00251 public:
00252
00253
00254
00255 typedef ConstBaseIterator<EventMap> EventIterator;
00256
00261 EventIterator getIterator(void) const;
00262 };
00263
00264 }
00265
00266
00267 #if defined(_MSC_VER)
00268 # pragma warning(pop)
00269 #endif
00270
00271 #endif // end of guard _CEGUIEventSet_h_