os::ToolBar Class Reference
[The Syllable Graphical User Interface API]

ToolBar. More...

Inheritance diagram for os::ToolBar:

os::LayoutView os::View os::Handler List of all members.

Public Types

enum  ToolBarObjectMode {
  TB_FIXED_WIDTH = 0,
  TB_FREE_WIDTH = 1,
  TB_FIXED_MINIMUM = 2
}

Public Member Functions

 ToolBar (const Rect &cFrame, const String &cTitle, uint32 nResizeMask=CF_FOLLOW_LEFT|CF_FOLLOW_TOP, uint32 nFlags=WID_WILL_DRAW|WID_FULL_UPDATE_ON_RESIZE)
 Constructor.
virtual ~ToolBar ()
LayoutNodeAddButton (const String &cName, const String &cText, Image *pcIcon, Message *pcMsg)
 Add button to ToolBar.
LayoutNodeAddPopupMenu (const String &cName, const String &cText, Image *pcIcon, Menu *pcMenu)
 Add PopupMenu to ToolBar.
LayoutNodeAddSeparator (const String &cName)
 Add Separator to ToolBar.
LayoutNodeAddChild (View *pcPanel, ToolBarObjectMode eMode, float vWeight=100.0f)
 Add View to ToolBar.

Classes

class  Private

Detailed Description

Description:
Example:
        ToolBar* pcToolBar = new ToolBar( GetBounds(), "pcToolbar", CF_FOLLOW_ALL );

        pcToolBar->AddButton( "", "New", pcNewIcon, NULL );
        pcToolBar->AddButton( "", "Open", pcOpenIcon, NULL );
        pcToolBar->AddSeparator( "" );
        pcToolBar->AddButton( "", "Test", pcTestIcon, NULL );

        AddChild( pcToolBar );
See also:
Author:
Henrik Isaksson ([email protected])


Member Enumeration Documentation

enum os::ToolBar::ToolBarObjectMode

Enumerator:
TB_FIXED_WIDTH 
TB_FREE_WIDTH  Fixed size, equal to all other objects with fixed size.
TB_FIXED_MINIMUM  Free size, fill remaining space.


Constructor & Destructor Documentation

ToolBar::ToolBar ( const Rect cFrame,
const String cName,
uint32  nResizeMask = CF_FOLLOW_LEFT | CF_FOLLOW_TOP,
uint32  nFlags = WID_WILL_DRAW | WID_FULL_UPDATE_ON_RESIZE 
)

Description:
Parameters:
cFrame The frame rectangle in the parents coordinate system.
pzName The logical name of the view. This parameter is newer rendered anywhere, but is passed to the Handler::Handler() constructor to identify the view.
nResizeMask Flags defining how the view's frame rectangle is affected if the parent view is resized.
nFlags Various flags to control the view's behaviour.
See also:
Author:
Henrik Isaksson ([email protected])

ToolBar::~ToolBar (  )  [virtual]


Member Function Documentation

LayoutNode * ToolBar::AddButton ( const String cName,
const String cText,
Image pcIcon,
Message pcMsg 
)

Description:
Parameters:
cName A name that can be used to find this object.
cText The text to display in the button.
pcIcon Icon to show above the text (or null for no icon).
pcMsg Message to be sent upon activation (clicking the button).
See also:
AddChild(), AddSeparator(), AddPopupMenu()
Author:
Henrik Isaksson ([email protected])

LayoutNode * ToolBar::AddPopupMenu ( const String cName,
const String cText,
Image pcIcon,
Menu pcMenu 
)

Description:
Parameters:
cName A name that can be used to find this object.
cText The text to display in the button.
pcIcon Icon to show above the text (or null for no icon).
pcMenu Menu to display.
pcMsg Message to be sent upon activation (clicking the button).
See also:
AddButton(), AddSeparator(), AddChild()
Author:
Henrik Isaksson ([email protected])

LayoutNode * ToolBar::AddSeparator ( const String cName  ) 

Description:
Parameters:
cName A name that can be used to find this object.
See also:
AddButton(), AddChild(), AddPopupMenu()
Author:
Henrik Isaksson ([email protected])

LayoutNode * ToolBar::AddChild ( View pcView,
ToolBarObjectMode  eMode,
float  vWeight = 100.0f 
)

Description:
AddChild() can be used to add any kind of View object to the ToolBar.
Parameters:
pcView View to add.
eMode TB_FIXED_WIDTH or TB_FREE_WIDTH
vWeight Weight
See also:
AddButton(), AddSeparator(), AddPopupMenu()
Author:
Henrik Isaksson ([email protected])


Generated on Sat May 9 22:51:49 2009 for Syllable higlevel API by  doxygen 1.5.1