![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
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.4 2002/03/12 07:11:31 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 virtual void layout(); 00049 void drawBorderRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00050 void drawRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00051 void drawSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00052 void drawRidgeRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00053 void drawGrooveRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00054 void drawDoubleRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00055 void drawDoubleSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00056 void drawFrame(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h); 00057 private: 00058 FXToolBarShell(const FXToolBarShell&); 00059 FXToolBarShell &operator=(const FXToolBarShell&); 00060 public: 00061 long onPaint(FXObject*,FXSelector,void*); 00062 public: 00063 00064 /// Construct a toolbar shell 00065 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); 00066 00067 /// Create server-side resources 00068 virtual void create(); 00069 00070 /// Return the default width of this window 00071 virtual FXint getDefaultWidth(); 00072 00073 /// Return the default height of this window 00074 virtual FXint getDefaultHeight(); 00075 00076 /// Change frame style 00077 void setFrameStyle(FXuint style); 00078 00079 /// Get current frame style 00080 FXuint getFrameStyle() const; 00081 00082 /// Get border width 00083 FXint getBorderWidth() const { return border; } 00084 00085 /// Change highlight color 00086 void setHiliteColor(FXColor clr); 00087 00088 /// Get highlight color 00089 FXColor getHiliteColor() const { return hiliteColor; } 00090 00091 /// Change shadow color 00092 void setShadowColor(FXColor clr); 00093 00094 /// Get shadow color 00095 FXColor getShadowColor() const { return shadowColor; } 00096 00097 /// Change border color 00098 void setBorderColor(FXColor clr); 00099 00100 /// Get border color 00101 FXColor getBorderColor() const { return borderColor; } 00102 00103 /// Change base gui color 00104 void setBaseColor(FXColor clr); 00105 00106 /// Get base gui color 00107 FXColor getBaseColor() const { return baseColor; } 00108 00109 /// Save to stream 00110 virtual void save(FXStream& store) const; 00111 00112 /// Load from stream 00113 virtual void load(FXStream& store); 00114 }; 00115 00116 } 00117 00118 #endif