#include <ToolBar.h>
Public Member Functions | |
ToolBar (const String &title, Frame *parent, Style toolSetStyle=ToolSetStyle, Style style=ToolBarStyle) | |
virtual | ~ToolBar () |
virtual Size | getDockedSize (Side side) |
Returns the size of the ToolBar when it should be docked in the specified side. | |
virtual Size | getFloatingSize () |
int | getButtonCount () |
int | getRows () |
Rect | setRows (int rows, bool expand) |
void | setImageList (ImageList &imageList) |
void | loadStandardImageList (int imageListId=IDB_STD_SMALL_COLOR) |
void | addButton (ToolButton *button) |
void | addSeparator (int width=6) |
void | updateButton (ToolButton *button) |
ToolButton * | getButtonById (CommandId id) |
ToolButton * | getButtonByIndex (int index) |
int | hitTest (const Point &pt) |
Protected Member Functions | |
virtual bool | onCommand (CommandId id) |
Called when a command by ID is activated by the user, this can be a menu item or an accelerator. | |
virtual void | onUpdateIndicators () |
Event called to update the state of indicators. | |
virtual void | onDocking () |
When the ToolBar is docked in the top or bottom side, we must to set the rows to 1, if it's docked in the left or right side we must to make it vertical (set the rows to the maximum number). | |
virtual void | onFloating () |
Event called when the DockBar was docked and now is floating in some DockFrame. | |
virtual void | onResizingFrame (DockFrame *frame, CardinalDirection dir, Rect &rc) |
When the DockBar is floating, and its DockFrame container is resized (DockFrame::onResizing), this event is fired. | |
Private Attributes | |
ToolSet | m_set |
int | m_rowsWhenFloating |
ToolBar::ToolBar | ( | const String & | title, | |
Frame * | parent, | |||
Style | toolSetStyle = ToolSetStyle , |
|||
Style | style = ToolBarStyle | |||
) |
ToolBar::~ToolBar | ( | ) | [virtual] |
Returns the size of the ToolBar when it should be docked in the specified side.
Reimplemented from Vaca::DockBar.
Size ToolBar::getFloatingSize | ( | ) | [virtual] |
Reimplemented from Vaca::DockBar.
bool ToolBar::onCommand | ( | CommandId | id | ) | [protected, virtual] |
Called when a command by ID is activated by the user, this can be a menu item or an accelerator.
commandId | Identifier of the command that was activated. |
Reimplemented from Vaca::Widget.
void ToolBar::onUpdateIndicators | ( | ) | [protected, virtual] |
Event called to update the state of indicators.
Reimplemented from Vaca::Widget.
void ToolBar::onDocking | ( | ) | [protected, virtual] |
When the ToolBar is docked in the top or bottom side, we must to set the rows to 1, if it's docked in the left or right side we must to make it vertical (set the rows to the maximum number).
Reimplemented from Vaca::DockBar.
void ToolBar::onFloating | ( | ) | [protected, virtual] |
Event called when the DockBar was docked and now is floating in some DockFrame.
Reimplemented from Vaca::DockBar.
void ToolBar::onResizingFrame | ( | DockFrame * | frame, | |
CardinalDirection | dir, | |||
Rect & | rc | |||
) | [protected, virtual] |
When the DockBar is floating, and its DockFrame container is resized (DockFrame::onResizing), this event is fired.
Reimplemented from Vaca::DockBar.
int Vaca::ToolBar::getButtonCount | ( | ) | [inline] |
int Vaca::ToolBar::getRows | ( | ) | [inline] |
Rect Vaca::ToolBar::setRows | ( | int | rows, | |
bool | expand | |||
) | [inline] |
void Vaca::ToolBar::setImageList | ( | ImageList & | imageList | ) | [inline] |
void Vaca::ToolBar::loadStandardImageList | ( | int | imageListId = IDB_STD_SMALL_COLOR |
) | [inline] |
void Vaca::ToolBar::addButton | ( | ToolButton * | button | ) | [inline] |
void Vaca::ToolBar::addSeparator | ( | int | width = 6 |
) | [inline] |
void Vaca::ToolBar::updateButton | ( | ToolButton * | button | ) | [inline] |
ToolButton* Vaca::ToolBar::getButtonById | ( | CommandId | id | ) | [inline] |
ToolButton* Vaca::ToolBar::getButtonByIndex | ( | int | index | ) | [inline] |
int Vaca::ToolBar::hitTest | ( | const Point & | pt | ) | [inline] |
ToolSet Vaca::ToolBar::m_set [private] |
int Vaca::ToolBar::m_rowsWhenFloating [private] |