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

FXToolbar Class Reference

#include <FXToolbar.h>

Inheritance diagram for FXToolbar:

FXPacker FXComposite FXWindow FXDrawable FXId FXObject FXMenubar List of all members.

Public Types

enum  {
  ID_UNDOCK = FXPacker::ID_LAST,
  ID_DOCK_TOP,
  ID_DOCK_BOTTOM,
  ID_DOCK_LEFT,
  ID_DOCK_RIGHT,
  ID_TOOLBARGRIP,
  ID_LAST
}

Public Methods

 FXToolbar (FXComposite *p, FXComposite *q, FXuint opts=LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=3, FXint pr=3, FXint pt=2, FXint pb=2, FXint hs=DEFAULT_SPACING, FXint vs=DEFAULT_SPACING)
 FXToolbar (FXComposite *p, FXuint opts=LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, 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)
void setDryDock (FXComposite *dry)
void setWetDock (FXComposite *wet)
FXCompositegetDryDock () const
 Return parent when docked.

FXCompositegetWetDock () const
 Return parent when floating.

FXbool isDocked () const
 Return true if toolbar is docked.

virtual void dock (FXuint side=LAYOUT_SIDE_TOP, FXWindow *after=(FXWindow *)-1)
virtual void undock ()
virtual FXint getDefaultWidth ()
 Return default width.

virtual FXint getDefaultHeight ()
 Return default height.

virtual FXint getWidthForHeight (FXint h)
 Return width for given height.

virtual FXint getHeightForWidth (FXint w)
 Return height for given width.

void setDockingSide (FXuint side=LAYOUT_SIDE_TOP)
 Set docking side.

FXuint getDockingSide () const
 Return docking side.

virtual void save (FXStream &store) const
 Save toolbar to a stream.

virtual void load (FXStream &store)
 Load toolbar from a stream.

virtual ~FXToolbar ()
 Destroy.


Detailed Description

Toolbar control.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
ID_UNDOCK  Undock the toolbar.
ID_DOCK_TOP  Dock on the top.
ID_DOCK_BOTTOM  Dock on the bottom.
ID_DOCK_LEFT  Dock on the left.
ID_DOCK_RIGHT  Dock on the right.
ID_TOOLBARGRIP  Notifications from toolbar grip.


Constructor & Destructor Documentation

FXToolbar::FXToolbar FXComposite   p,
FXComposite   q,
FXuint    opts = LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X,
FXint    x = 0,
FXint    y = 0,
FXint    w = 0,
FXint    h = 0,
FXint    pl = 3,
FXint    pr = 3,
FXint    pt = 2,
FXint    pb = 2,
FXint    hs = DEFAULT_SPACING,
FXint    vs = DEFAULT_SPACING
 

Construct a floatable toolbar Normally, the toolbar is docked under window p. When floated, the toolbar can be docked under window q, which is typically an FXToolbarShell window.

FXToolbar::FXToolbar FXComposite   p,
FXuint    opts = LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X,
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
 

Construct a non-floatable toolbar. The toolbar can not be undocked.


Member Function Documentation

void FXToolbar::setDryDock FXComposite   dry
 

Set parent when docked. If it was docked, reparent under the new docking window.

void FXToolbar::setWetDock FXComposite   wet
 

Set parent when floating. If it was undocked, then reparent under the new floating window.

void FXToolbar::dock FXuint    side = LAYOUT_SIDE_TOP,
FXWindow   after = (FXWindow *)-1
[virtual]
 

Dock the bar against the given side, after some other widget. However, if after is -1, it will be docked as the innermost bar just before the work-area, while if after is 0, if will be docked as the outermost bar.

void FXToolbar::undock   [virtual]
 

Undock or float the bar. The initial position of the wet dock is a few pixels below and to the right of the original docked position.