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

FX::FXSwitcher Class Reference

#include <FXSwitcher.h>

Inheritance diagram for FX::FXSwitcher:

FX::FXPacker FX::FXComposite FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject List of all members.

Public Methods

 FXSwitcher (FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_SPACING, FXint pr=DEFAULT_SPACING, FXint pt=DEFAULT_SPACING, FXint pb=DEFAULT_SPACING)
 Construct a switcher layout manager.

virtual FXint getDefaultWidth ()
 Return default width.

virtual FXint getDefaultHeight ()
 Return default height.

void setCurrent (FXint index, FXbool notify=FALSE)
 Bring the child window at index to the top.

FXint getCurrent () const
 Return the index of the child window currently on top.

void setSwitcherStyle (FXuint style)
 Set the switcher style flags.

FXuint getSwitcherStyle () const
 Get the switcher style flags.

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

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


Detailed Description

The Switcher layout manager automatically arranges its child windows such that one of them is placed on top; all other child windows are hidden. Switcher provides a convenient method to conserve screen real-estate by arranging several GUI panels to appear in the same space, depending on context. Switcher ignores all layout hints from its children:- all children are stretched according to the switcher layout managers own size. When the SWITCHER_HCOLLAPSE or SWITCHER_VCOLLAPSE options are used, Switcher's default size is based on the width or height of the current child, instead of the maximum width or height of all of the children.

See also: