CActionEvent.hpp

Go to the documentation of this file.
00001 #ifndef __CActionEvent__
00002 #define __CActionEvent__
00003 
00004 #include <Basics/CCountedObject.hpp>
00005 #include "CMouseEvent.hpp"
00006 
00007 //  ===========================================================================
00008 
00009 using Exponent::Basics::CCountedObject;
00010 using Exponent::GUI::Events::CMouseEvent;
00011 
00012 //  ===========================================================================
00013 
00014 #ifndef __ICONTROL_GUARD__
00015 #define __ICONTROL_GUARD__
00016     namespace Exponent { namespace GUI { namespace Controls { interface IControl; } } }
00017     using Exponent::GUI::Controls::IControl;
00018 #endif
00019 
00020 //  ===========================================================================
00021 
00022 namespace Exponent
00023 {
00024     namespace GUI
00025     {
00026         namespace Events
00027         {
00045             class CActionEvent : public CCountedObject
00046             {
00048                 EXPONENT_CLASS_DECLARATION;
00051 //  ===========================================================================
00052 
00053             public:
00054 
00055 //  ===========================================================================
00056 
00061                 enum EActionEventType
00062                 {
00063                     e_controlChanged = 0,           
00064                     e_scroll,                       
00065                     e_menuChanged,                  
00066                     e_otherEvent                    
00067                 };
00068 
00069 //  ===========================================================================
00070 
00075                 CActionEvent(IControl *control);
00076 
00082                 CActionEvent(IControl *control, const CMouseEvent &mouseEvent);
00083 
00087                 virtual ~CActionEvent();
00088 
00089 //  ===========================================================================
00090 
00095                 virtual IControl *getControl() const;
00096 
00101                 virtual EActionEventType getEventType() const;
00102 
00103 //  ===========================================================================
00104 
00109                 virtual void setControl(IControl *control);
00110 
00115                 virtual void setEventType(EActionEventType eventType);
00116 
00117 //  ===========================================================================
00118 
00125                 virtual void setModifiers(const bool shift, const bool alt, const bool ctrl);
00126 
00131                 virtual bool isCtrlDown() const;
00132 
00137                 virtual bool isShiftDown() const;
00138 
00143                 virtual bool isAltDown() const;
00144 
00145 //  ===========================================================================
00146 
00147             protected:
00148 
00149 //  ===========================================================================
00150 
00151                 IControl *m_control;                    
00152                 EActionEventType m_eventType;           
00154                 bool m_shiftIsDown;                     
00155                 bool m_altIsDown;                       
00156                 bool m_ctrlIsDown;                      
00158             };
00159         }
00160     }
00161 }
00162 #endif  // End of CActionEvent.hpp

Infinity API - CActionEvent.hpp Source File generated on 7 Mar 2007