CControlPanel.hpp

Go to the documentation of this file.
00001 #ifndef __CControlPanel__
00002 #define __CControlPanel__
00003 
00004 #include "CControlRoot.hpp"
00005 #include "CControl.hpp"
00006 
00007 //  ===========================================================================
00008 
00009 using Exponent::GUI::Controls::CControlRoot;
00010 using Exponent::GUI::Controls::CControl;
00011 
00012 //  ===========================================================================
00013 
00014 namespace Exponent
00015 {
00016     namespace GUI
00017     {
00018         namespace Controls
00019         {
00037             class CControlPanel : public CControlRoot, public CControl
00038             {
00040                 EXPONENT_CLASS_DECLARATION;
00043 //  ===========================================================================
00044         
00045             public:
00046 
00047 //  ===========================================================================
00048 
00075                 CControlPanel(IWindow *parent, IControlRoot *root, const long uniqueId, const CRect &area, IActionListener *listener = NULL);
00076 
00080                 virtual ~CControlPanel();
00081 
00082 //  ===========================================================================
00083 
00088                 virtual void addControl(IControl *control);
00089 
00094                 virtual void lockControl(IControl *control);
00095 
00100                 virtual void unlockControl();
00101                 
00106                 virtual CPoint getWindowOffset();
00107 
00112                 virtual bool isContainer() const { return true; }
00113 
00114 //  ===========================================================================
00115 
00121                 virtual void getGlobalCoordinatesOfControl(IControl *control, CPoint &point);
00122 
00127                 virtual void setArea(const CRect &area);
00128 
00129 //  ===========================================================================
00130 
00135                 virtual void drawRootControl(CGraphics &graphics);
00136 
00137 //  ===========================================================================
00138 
00143                 virtual void handleLeftButtonDown(CMouseEvent &event);
00144 
00149                 virtual void handleLeftButtonUp(CMouseEvent &event);
00150 
00155                 virtual void handleRightButtonDown(CMouseEvent &event);
00156 
00161                 virtual void handleRightButtonUp(CMouseEvent &event);
00162 
00167                 virtual void handleDoubleClick(CMouseEvent &event);
00168 
00173                 virtual void handleMouseScroll(CMouseEvent &event);
00174 
00179                 virtual void handleMouseMovement(CMouseEvent &event);
00180 
00185                 virtual void handleMouseLeavingArea(CMouseEvent &event);
00186 
00187 //  ===========================================================================
00188 
00193                 virtual bool handleKeyDown(const CKeyboardEvent &event);
00194                 
00199                 virtual bool handleKeyUp(const CKeyboardEvent &event);
00200 
00201 //  ===========================================================================
00202 
00207                 virtual void handleFileDrop(const CDropEvent &event);
00208 
00209 //  ===========================================================================
00210 
00215                 virtual void setControlRoot(IControlRoot *controlRoot);
00216 
00221                 virtual void drawControl(CGraphics &graphics);
00222 
00227                 virtual void updateControl(IControl *control);
00228 
00233                 virtual void updateArea(const CRect &area);
00234                 
00238                 virtual void enableControl() ;
00239 
00243                 virtual void disableControl();
00244 
00249                 virtual void onDrawDrawThePanelBounds(const bool draw = true) { m_drawPanelBounds = draw; }
00250 
00255                 void shouldClip(const bool clip = true);
00256 
00261                 virtual void setBoundsColour(const CAlphaColour &boundsColour) { m_boundsColour = boundsColour; }
00262 
00263 //  ===========================================================================
00264 
00269                 virtual void referenced()
00270                 {
00271                     CControl::referenced();
00272                 }
00273 
00278                 virtual void dereference()
00279                 {
00280                     CControl::dereference();
00281                 }
00282 
00283 //  ===========================================================================
00284 
00290                 virtual void getWindowCoordinatesOfControl(IControl *control, CPoint &point);
00291 
00292 //  ===========================================================================
00293 
00294             protected:
00295 
00296 //  ===========================================================================
00297 
00303                 virtual bool drawEnabledControl(CGraphics &graphics);
00304 
00308                 void flushSizeChange();
00309 
00310 //  ===========================================================================
00311 
00312                 bool m_drawPanelBounds;                 
00313                 CAlphaColour m_boundsColour;            
00314             };
00315         }
00316     }
00317 }
00318 #endif  // End of CControlPanel.hpp

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