BVB Source Codes

CRYENGINE Show FlashUIEventSystem.h Source code

Return Download CRYENGINE: download FlashUIEventSystem.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  File name:   FlashUIEventSystem.h
  5. //  Version:     v1.00
  6. //  Created:     10/9/2010 by Paul Reindell.
  7. //  Description:
  8. // -------------------------------------------------------------------------
  9. //  History:
  10. //
  11. ////////////////////////////////////////////////////////////////////////////
  12. #ifndef __FlashUIEventSystem_H__
  13. #define __FlashUIEventSystem_H__
  14.  
  15. #include <CrySystem/Scaleform/IFlashUI.h>
  16. #include <CryCore/Containers/CryListenerSet.h>
  17.  
  18. class CFlashUIEventSystem
  19.         : public IUIEventSystem
  20. {
  21. public:
  22.         CFlashUIEventSystem(const char* sName, EEventSystemType eType) : m_sName(sName), m_eType(eType), m_listener(2) {};
  23.         virtual ~CFlashUIEventSystem();
  24.  
  25.         virtual const char*                      GetName() const { return m_sName.c_str(); }
  26.         virtual IUIEventSystem::EEventSystemType GetType() const { return m_eType; }
  27.  
  28.         virtual uint                             RegisterEvent(const SUIEventDesc& sEventDesc);
  29.  
  30.         virtual void                             RegisterListener(IUIEventListener* pListener, const char* name);
  31.         virtual void                             UnregisterListener(IUIEventListener* pListener);
  32.  
  33.         virtual SUIArgumentsRet                  SendEvent(const SUIEvent& event);
  34.  
  35.         virtual const SUIEventDesc*              GetEventDesc(int index) const              { return index < m_eventDescriptions.size() ? m_eventDescriptions[index] : NULL; }
  36.         virtual const SUIEventDesc*              GetEventDesc(const char* sEventName) const { return m_eventDescriptions(sEventName); }
  37.         virtual int                              GetEventCount()  const                     { return m_eventDescriptions.size(); }
  38.  
  39.         virtual uint                             GetEventId(const char* sEventName);
  40.  
  41.         virtual void                             GetMemoryUsage(ICrySizer* s) const;
  42.  
  43. private:
  44.         string           m_sName;
  45.         EEventSystemType m_eType;
  46.         TUIEventsLookup  m_eventDescriptions;
  47.  
  48.         typedef CListenerSet<IUIEventListener*> TEventListener;
  49.         TEventListener m_listener;
  50. };
  51.  
  52. typedef std::map<string, CFlashUIEventSystem*> TUIEventSystemMap;
  53.  
  54. struct CUIEventSystemIterator : public IUIEventSystemIterator
  55. {
  56.         CUIEventSystemIterator(TUIEventSystemMap* pMap);
  57.         virtual void            AddRef();
  58.         virtual void            Release();
  59.         virtual IUIEventSystem* Next(string& sName);
  60.  
  61. private:
  62.         int                         m_iRefs;
  63.         TUIEventSystemMap::iterator m_currIter;
  64.         TUIEventSystemMap::iterator m_endIter;
  65. };
  66.  
  67. #endif // #ifndef __FlashUIEventSystem_H__
  68.  
downloadFlashUIEventSystem.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top