IControlRoot.hpp

Go to the documentation of this file.
00001 #ifndef __IControlRoot__
00002 #define __IControlRoot__
00003 
00004 #include <Basics/CSystemString.hpp>
00005 #include <Basics/CCountedObject.hpp>
00006 #include <MathTools/CDimension.hpp>
00007 #include "../Windowing/IWindow.hpp"
00008 #include "../Graphics/IImage.hpp"
00009 #include "../Graphics/CGraphics.hpp"
00010 #include "../Listeners/IDropFileListener.hpp"
00011 #include "../Listeners/IMouseListener.hpp"
00012 #include "../Listeners/IKeyboardListener.hpp"
00013 
00014 //  ===========================================================================
00015 
00016 using Exponent::Basics::CSystemString;
00017 using Exponent::MathTools::CDimension;
00018 using Exponent::GUI::Windowing::IWindow;
00019 using Exponent::GUI::Graphics::IImage;
00020 using Exponent::GUI::Graphics::CGraphics;
00021 using Exponent::Basics::CCountedObject;
00022 using Exponent::GUI::Listeners::IDropFileListener;
00023 using Exponent::GUI::Listeners::IKeyboardListener;
00024 using Exponent::GUI::Listeners::IMouseListener;
00025 
00026 //  ===========================================================================
00027 
00031 #ifndef __ICONTROL_GUARD__
00032 #define __ICONTROL_GUARD__
00033     namespace Exponent { namespace GUI { namespace Controls { interface IControl; } } }
00034     using Exponent::GUI::Controls::IControl;
00035 #endif
00036 
00040 //  ===========================================================================
00041 
00042 namespace Exponent
00043 {
00044     namespace GUI
00045     {
00046         namespace Controls
00047         {
00065             interface IControlRoot : public IMouseListener, public IDropFileListener, public IKeyboardListener
00066             {
00067             public:
00068 
00069 //  ===========================================================================
00070 
00075                 enum EControlRootSerialiseOption
00076                 {
00077                     e_serialiseToDisk = 0,      
00078                     e_serialiseFromDisk         
00079                 };
00080 
00081 //  ===========================================================================
00082 
00086                 IControlRoot() { }
00087 
00091                 virtual ~IControlRoot() { }
00092 
00093 //  ===========================================================================
00094 
00099                 virtual void lockControl(IControl *control) = 0;
00100 
00104                 virtual void unlockControl() = 0;
00105 
00110                 virtual bool controlIsLocked() const = 0;
00111 
00116                 virtual IControl *getLockedControl() const = 0;
00117 
00118 //  ===========================================================================
00119 
00123                 virtual void setParentWindow(IWindow *parent) = 0;
00124 
00128                 virtual IWindow *getParentWindow() const = 0;
00129 
00133                 virtual CPoint getWindowOffset() = 0;
00134 
00135 //  ===========================================================================
00136 
00142                 virtual IControl *getControlAtPoint(const CPoint &point) = 0;
00143 
00149                 virtual IControl *getMouseEnabledControlAtPoint(const CPoint &point) = 0;
00150 
00156                 virtual IControl *getDropEnabledControlAtPoint(const CPoint &point) = 0;
00157 
00163                 virtual IControl *getKeyEnabledControlAtPoint(const CPoint &point) = 0;
00164 
00165 //  ===========================================================================
00166 
00171                 virtual void addControl(IControl *control) = 0;
00172 
00177                 virtual void removeControl(IControl *control) = 0;
00178 
00182                 virtual void clearControls() = 0;
00183 
00190                 virtual IControl *getControlAtIndex(const long index, bool isIndex) = 0;
00191 
00197                 virtual long getControlIndex(IControl *control) = 0;
00198 
00203                 virtual long getNumberOfControls() = 0;
00204 
00209                 virtual long getNumberOfInsertedControls() = 0;
00210 
00211 //  ===========================================================================
00212 
00217                 virtual void drawRootControl(CGraphics &graphics) = 0;
00218 
00223                 virtual void updateControl(IControl *control) = 0;
00224 
00230                 virtual void updateControl(const long index, bool isIndex) = 0;
00231 
00236                 virtual void updateArea(const CRect &area) = 0;
00237 
00243                 virtual void getGlobalCoordinatesOfControl(IControl *control, CPoint &point) = 0;
00244 
00250                 virtual void getWindowCoordinatesOfControl(IControl *control, CPoint &point) = 0;
00251 
00252 //  ===========================================================================
00253 
00258                 virtual void setBackgroundImage(IImage *image) = 0;
00259 
00260 //  ===========================================================================
00261 
00265                 virtual void startToolTipTimer() = 0;
00266 
00270                 virtual void stopToolTipTimer()  = 0;
00271 
00272 //  ===========================================================================
00273 
00274                 // Save or load a layout of this panel..
00275                 //virtual void serialise(const EControlRootSerialiseOption option);
00276 
00277 //  ===========================================================================
00278 
00279             };
00280         }
00281     }
00282 }
00283 #endif  // End of IControlRoot.hpp

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