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

FXToolBar.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * T o o l B a r W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2004,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: FXToolBar.h,v 1.24 2006/01/22 17:58:11 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXTOOLBAR_H
25 #define FXTOOLBAR_H
26 
27 #ifndef FXDOCKBAR_H
28 #include "FXDockBar.h"
29 #endif
30 
31 namespace FX {
32 
33 class FXDockSite;
34 
35 
36 /**
37 * A tool bar widget can be docked in a dock site; it automatically
38 * adjusts its orientation based on the orientation of the dock site,
39 * and adjusts the layout options accordingly.
40 * See dock bar widget for more information on the docking behavior.
41 */
42 class FXAPI FXToolBar : public FXDockBar {
44 protected:
45  FXToolBar(){}
46 private:
47  FXToolBar(const FXToolBar&);
48  FXToolBar &operator=(const FXToolBar&);
49 public:
50  long onCmdDockFlip(FXObject*,FXSelector,void*);
51  long onUpdDockFlip(FXObject*,FXSelector,void*);
52 public:
53 
54  /// Construct floatable toolbar, initially docked under parent p
56 
57  /// Construct a non-floatable toolbar
58  FXToolBar(FXComposite* p,FXuint opts,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=2,FXint pr=3,FXint pt=3,FXint pb=2,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING);
59 
60  /// Perform layout
61  virtual void layout();
62 
63  /// Return default width
64  virtual FXint getDefaultWidth();
65 
66  /// Return default height
67  virtual FXint getDefaultHeight();
68 
69  /// Dock and optionally flip orientation of toolbar
70  virtual void dock(FXDockSite* docksite,FXWindow* before=NULL,FXbool notify=FALSE);
71 
72  /// Dock and optionally flip orientation of toolbar
73  virtual void dock(FXDockSite* docksite,FXint localx,FXint localy,FXbool notify);
74 
75  /// Set docking side
76  void setDockingSide(FXuint side=LAYOUT_SIDE_TOP);
77 
78  /// Return docking side
79  FXuint getDockingSide() const;
80  };
81 
82 }
83 
84 #endif
Pack on top side (default)
Definition: FXWindow.h:41
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
FXuchar FXbool
Definition: fxdefs.h:393
Stretch or shrink horizontally.
Definition: FXWindow.h:62
Base composite.
Definition: FXComposite.h:35
#define NULL
Definition: fxdefs.h:41
Stick on top (default)
Definition: FXWindow.h:51
The dock site widget is a widget where dock bars can be docked.
Definition: FXDockSite.h:72
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:397
Stick on left (default)
Definition: FXWindow.h:47
A tool bar widget can be docked in a dock site; it automatically adjusts its orientation based on the...
Definition: FXToolBar.h:42
#define FALSE
Definition: fxdefs.h:35
Definition: FXPacker.h:38
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92
A dock bar widget can be docked inside a dock site widget, or floated around freely.
Definition: FXDockBar.h:44

Copyright © 1997-2005 Jeroen van der Zijp