Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUITitlebar.h

Go to the documentation of this file.
00001 /************************************************************************
00002         filename:       CEGUITitlebar.h
00003         created:        25/4/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Interface for a Titlebar Widget
00007 *************************************************************************/
00008 /*************************************************************************
00009     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00010     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00011 
00012     This library is free software; you can redistribute it and/or
00013     modify it under the terms of the GNU Lesser General Public
00014     License as published by the Free Software Foundation; either
00015     version 2.1 of the License, or (at your option) any later version.
00016 
00017     This library is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020     Lesser General Public License for more details.
00021 
00022     You should have received a copy of the GNU Lesser General Public
00023     License along with this library; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 *************************************************************************/
00026 #ifndef _CEGUITitlebar_h_
00027 #define _CEGUITitlebar_h_
00028 
00029 #include "CEGUIWindow.h"
00030 #include "elements/CEGUITitlebarProperties.h"
00031 
00032 
00033 #if defined(_MSC_VER)
00034 #       pragma warning(push)
00035 #       pragma warning(disable : 4251)
00036 #endif
00037 
00038 
00039 // Start of CEGUI namespace section
00040 namespace CEGUI
00041 {
00042 
00048 class CEGUIBASE_API Titlebar : public Window
00049 {
00050 public:
00051         static const String EventNamespace;                             
00052 
00053 
00061         bool    isDraggingEnabled(void) const;
00062 
00063 
00074         void    setDraggingEnabled(bool setting);
00075 
00076 
00084         colour  getCaptionColour(void) const;
00085 
00086 
00097         void    setCaptionColour(const colour& col);
00098 
00099 
00100         /*************************************************************************
00101                 Construction / Destruction
00102         *************************************************************************/
00107         Titlebar(const String& type, const String& name);
00108 
00109 
00114         virtual ~Titlebar(void);
00115 
00116 
00117 protected:
00118         /*************************************************************************
00119                 Overridden event handler functions
00120         *************************************************************************/
00121         virtual void    onMouseMove(MouseEventArgs& e);
00122         virtual void    onMouseButtonDown(MouseEventArgs& e);
00123         virtual void    onMouseButtonUp(MouseEventArgs& e);
00124         virtual void    onMouseDoubleClicked(MouseEventArgs& e);
00125         virtual void    onCaptureLost(WindowEventArgs& e);
00126 
00127 
00128         /*************************************************************************
00129                 New event handlers for title bar
00130         *************************************************************************/
00138         virtual void    onDraggingModeChanged(WindowEventArgs& e) {}
00139 
00140 
00141         /*************************************************************************
00142                 Implementation Data
00143         *************************************************************************/
00144         bool    d_dragging;                     
00145         Point   d_dragPoint;            
00146         bool    d_dragEnabled;          
00147 
00148         Rect    d_oldCursorArea;        
00149 
00150         colour  d_captionColour;        
00151 
00152 
00153 private:
00154         /*************************************************************************
00155                 Static Properties for this class
00156         *************************************************************************/
00157         static TitlebarProperties::DraggingEnabled      d_dragEnabledProperty;
00158         static TitlebarProperties::CaptionColour        d_captionColourProperty;
00159 
00160 
00161         /*************************************************************************
00162                 Private methods
00163         *************************************************************************/
00164         void    addTitlebarProperties(void);
00165 };
00166 
00167 } // End of  CEGUI namespace section
00168 
00169 #if defined(_MSC_VER)
00170 #       pragma warning(pop)
00171 #endif
00172 
00173 #endif  // end of guard _CEGUITitlebar_h_

Generated on Wed Feb 16 12:41:07 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1