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

FXToolbarShell.h

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,2002 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.13 2002/01/18 22:42:55 jeroen Exp $                 *
00023 ********************************************************************************/
00024 #ifndef FXTOOLBARSHELL_H
00025 #define FXTOOLBARSHELL_H
00026 
00027 #ifndef FXTOPWINDOW_H
00028 #include "FXTopWindow.h"
00029 #endif
00030 
00031 
00032 
00033 /**
00034 * A Tool bar shell is a widget floating around over the Main Window.
00035 * It typically contains an undocked tool bar.
00036 */
00037 class FXAPI FXToolbarShell : public FXTopWindow {
00038   FXDECLARE(FXToolbarShell)
00039 protected:
00040   FXColor   baseColor;
00041   FXColor   hiliteColor;
00042   FXColor   shadowColor;
00043   FXColor   borderColor;
00044   FXint     border;
00045 protected:
00046   FXToolbarShell(){}
00047   virtual void layout();
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   /// Return the default width of this window
00070   virtual FXint getDefaultWidth();
00071 
00072   /// Return the default height of this window
00073   virtual FXint getDefaultHeight();
00074 
00075   /// Change frame style
00076   void setFrameStyle(FXuint style);
00077 
00078   /// Get current frame style
00079   FXuint getFrameStyle() const;
00080 
00081   /// Get border width
00082   FXint getBorderWidth() const { return border; }
00083 
00084   /// Change highlight color
00085   void setHiliteColor(FXColor clr);
00086 
00087   /// Get highlight color
00088   FXColor getHiliteColor() const { return hiliteColor; }
00089 
00090   /// Change shadow color
00091   void setShadowColor(FXColor clr);
00092 
00093   /// Get shadow color
00094   FXColor getShadowColor() const { return shadowColor; }
00095 
00096   /// Change border color
00097   void setBorderColor(FXColor clr);
00098 
00099   /// Get border color
00100   FXColor getBorderColor() const { return borderColor; }
00101 
00102   /// Change base gui color
00103   void setBaseColor(FXColor clr);
00104 
00105   /// Get base gui color
00106   FXColor getBaseColor() const { return baseColor; }
00107 
00108   /// Save to stream
00109   virtual void save(FXStream& store) const;
00110 
00111   /// Load from stream
00112   virtual void load(FXStream& store);
00113   };
00114 
00115 
00116 
00117 #endif