Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXToolBarShell.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                    T o o l   B a r   S h e l l   W i d g e t                  *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2000,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: FXToolBarShell.h,v 1.8 2006/01/22 17:58:11 fox Exp $                     *
00023 ********************************************************************************/
00024 #ifndef FXTOOLBARSHELL_H
00025 #define FXTOOLBARSHELL_H
00026 
00027 #ifndef FXTOPWINDOW_H
00028 #include "FXTopWindow.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 
00034 /**
00035 * A Tool bar shell is a widget floating around over the Main Window.
00036 * It typically contains an undocked tool bar.
00037 */
00038 class FXAPI FXToolBarShell : public FXTopWindow {
00039   FXDECLARE(FXToolBarShell)
00040 protected:
00041   FXColor   baseColor;
00042   FXColor   hiliteColor;
00043   FXColor   shadowColor;
00044   FXColor   borderColor;
00045   FXint     border;
00046 protected:
00047   FXToolBarShell(){}
00048   void drawBorderRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00049   void drawRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00050   void drawSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00051   void drawRidgeRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00052   void drawGrooveRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00053   void drawDoubleRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00054   void drawDoubleSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00055   void drawFrame(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
00056 private:
00057   FXToolBarShell(const FXToolBarShell&);
00058   FXToolBarShell &operator=(const FXToolBarShell&);
00059 public:
00060   long onPaint(FXObject*,FXSelector,void*);
00061 public:
00062 
00063   /// Construct a toolbar shell
00064   FXToolBarShell(FXWindow* owner,FXuint opts=FRAME_RAISED|FRAME_THICK,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint hs=4,FXint vs=4);
00065 
00066   /// Create server-side resources
00067   virtual void create();
00068 
00069   /// Perform layout
00070   virtual void layout();
00071 
00072   /// Return the default width of this window
00073   virtual FXint getDefaultWidth();
00074 
00075   /// Return the default height of this window
00076   virtual FXint getDefaultHeight();
00077 
00078   /// Change frame style
00079   void setFrameStyle(FXuint style);
00080 
00081   /// Get current frame style
00082   FXuint getFrameStyle() const;
00083 
00084   /// Get border width
00085   FXint getBorderWidth() const { return border; }
00086 
00087   /// Change highlight color
00088   void setHiliteColor(FXColor clr);
00089 
00090   /// Get highlight color
00091   FXColor getHiliteColor() const { return hiliteColor; }
00092 
00093   /// Change shadow color
00094   void setShadowColor(FXColor clr);
00095 
00096   /// Get shadow color
00097   FXColor getShadowColor() const { return shadowColor; }
00098 
00099   /// Change border color
00100   void setBorderColor(FXColor clr);
00101 
00102   /// Get border color
00103   FXColor getBorderColor() const { return borderColor; }
00104 
00105   /// Change base gui color
00106   void setBaseColor(FXColor clr);
00107 
00108   /// Get base gui color
00109   FXColor getBaseColor() const { return baseColor; }
00110 
00111   /// Save to stream
00112   virtual void save(FXStream& store) const;
00113 
00114   /// Load from stream
00115   virtual void load(FXStream& store);
00116   };
00117 
00118 }
00119 
00120 #endif

Copyright © 1997-2005 Jeroen van der Zijp