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

FXToolBarShell.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * T o o l B a r S h e l l W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2000,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXToolBarShell.h,v 1.8 2006/01/22 17:58:11 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXTOOLBARSHELL_H
25 #define FXTOOLBARSHELL_H
26 
27 #ifndef FXTOPWINDOW_H
28 #include "FXTopWindow.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /**
35 * A Tool bar shell is a widget floating around over the Main Window.
36 * It typically contains an undocked tool bar.
37 */
40 protected:
41  FXColor baseColor;
42  FXColor hiliteColor;
43  FXColor shadowColor;
44  FXColor borderColor;
45  FXint border;
46 protected:
47  FXToolBarShell(){}
48  void drawBorderRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
49  void drawRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
50  void drawSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
51  void drawRidgeRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
52  void drawGrooveRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
53  void drawDoubleRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
54  void drawDoubleSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
55  void drawFrame(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
56 private:
58  FXToolBarShell &operator=(const FXToolBarShell&);
59 public:
60  long onPaint(FXObject*,FXSelector,void*);
61 public:
62 
63  /// Construct a toolbar shell
64  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);
65 
66  /// Create server-side resources
67  virtual void create();
68 
69  /// Perform layout
70  virtual void layout();
71 
72  /// Return the default width of this window
73  virtual FXint getDefaultWidth();
74 
75  /// Return the default height of this window
76  virtual FXint getDefaultHeight();
77 
78  /// Change frame style
79  void setFrameStyle(FXuint style);
80 
81  /// Get current frame style
82  FXuint getFrameStyle() const;
83 
84  /// Get border width
85  FXint getBorderWidth() const { return border; }
86 
87  /// Change highlight color
88  void setHiliteColor(FXColor clr);
89 
90  /// Get highlight color
91  FXColor getHiliteColor() const { return hiliteColor; }
92 
93  /// Change shadow color
94  void setShadowColor(FXColor clr);
95 
96  /// Get shadow color
97  FXColor getShadowColor() const { return shadowColor; }
98 
99  /// Change border color
100  void setBorderColor(FXColor clr);
101 
102  /// Get border color
103  FXColor getBorderColor() const { return borderColor; }
104 
105  /// Change base gui color
106  void setBaseColor(FXColor clr);
107 
108  /// Get base gui color
109  FXColor getBaseColor() const { return baseColor; }
110 
111  /// Save to stream
112  virtual void save(FXStream& store) const;
113 
114  /// Load from stream
115  virtual void load(FXStream& store);
116  };
117 
118 }
119 
120 #endif
Base class for all windows.
Definition: FXWindow.h:115
unsigned int FXuint
Definition: fxdefs.h:396
FXuint FXSelector
Association key.
Definition: FXObject.h:53
#define FXAPI
Definition: fxdefs.h:122
FXuint FXColor
Definition: fxdefs.h:454
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:397
Raised border.
Definition: FXWindow.h:77
Abstract base class for all top-level windows.
Definition: FXTopWindow.h:106
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
Window Device Context.
Definition: FXDCWindow.h:52
Thick border.
Definition: FXWindow.h:78
A Tool bar shell is a widget floating around over the Main Window.
Definition: FXToolBarShell.h:38
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92

Copyright © 1997-2005 Jeroen van der Zijp