Contents Up Previous Next

wxDynamicToolBar

wxDynamicToolBar manages containment and layout of tool windows.

Derived from

wxToolBarBase

Include files

<wx/fl/dyntbar.h>

Data structures

Members

wxDynamicToolBar::wxDynamicToolBar
wxDynamicToolBar::~wxDynamicToolBar
wxDynamicToolBar::AddSeparator
wxDynamicToolBar::AddTool
wxDynamicToolBar::Create
wxDynamicToolBar::CreateDefaultLayout
wxDynamicToolBar::CreateTool
wxDynamicToolBar::DoDeleteTool
wxDynamicToolBar::DoEnableTool
wxDynamicToolBar::DoInsertTool
wxDynamicToolBar::DoSetToggle
wxDynamicToolBar::DoToggleTool
wxDynamicToolBar::DrawSeparator
wxDynamicToolBar::EnableTool
wxDynamicToolBar::FindToolForPosition
wxDynamicToolBar::GetPreferredDim
wxDynamicToolBar::GetToolInfo
wxDynamicToolBar::Layout
wxDynamicToolBar::OnEraseBackground
wxDynamicToolBar::OnPaint
wxDynamicToolBar::OnSize
wxDynamicToolBar::Realize
wxDynamicToolBar::RemveTool
wxDynamicToolBar::SetLayout
wxDynamicToolBar::SizeToolWindows


wxDynamicToolBar::wxDynamicToolBar

wxDynamicToolBar()

Default constructor.

wxDynamicToolBar(wxWindow* parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const long style = wxNO_BORDER, const int orientation = wxVERTICAL, const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr)

Constructor: see the documentation for wxToolBar for details.


wxDynamicToolBar::~wxDynamicToolBar

~wxDynamicToolBar()

Destructor.


wxDynamicToolBar::AddSeparator

void AddSeparator(wxWindow* pSepartorWnd = NULL)

Adds a separator. See the documentation for wxToolBar for details.


wxDynamicToolBar::AddTool

void AddTool(int toolIndex, wxWindow* pToolWindow, const wxSize& size = wxDefaultSize)

Adds a tool. See the documentation for wxToolBar for details.

void AddTool(int toolIndex, const wxString& imageFileName, wxBitmapType imageFileType = wxBITMAP_TYPE_BMP, const wxString& labelText = "", bool alignTextRight = FALSE, bool isFlat = TRUE)

Adds a tool. See the documentation for wxToolBar for details.

void AddTool(int toolIndex, wxBitmap labelBmp, const wxString& labelText = "", bool alignTextRight = FALSE, bool isFlat = TRUE)

Adds a tool. See the documentation for wxToolBar for details.

wxToolBarToolBase* AddTool(const int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, wxObject* clientData = NULL, const wxString& helpString1 = "", const wxString& helpString2 = "")

Method from wxToolBarBase (for compatibility), only the first two arguments are valid. See the documentation for wxToolBar for details.


wxDynamicToolBar::Create

bool Create(wxWindow* parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const long style = wxNO_BORDER, const int orientation = wxVERTICAL, const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr)

Creation function: see the documentation for wxToolBar for details.


wxDynamicToolBar::CreateDefaultLayout

LayoutManagerBase* CreateDefaultLayout()

Creates the default layout (BagLayout).


wxDynamicToolBar::CreateTool

wxToolBarToolBase* CreateTool(wxControl* control)

Creates a toolbar tool.

wxToolBarToolBase* CreateTool(int id, const wxBitmap& bitmap1, const wxBitmap& bitmap2, bool toggle, wxObject* clientData, const wxString& shortHelpString, const wxString& longHelpString)

Creates a toolbar tool.


wxDynamicToolBar::DoDeleteTool

bool DoDeleteTool(size_t pos, wxToolBarToolBase* tool)

Deletes a tool. The tool is still in m_tools list when this function is called, and it will only be deleted from it if it succeeds.


wxDynamicToolBar::DoEnableTool

void DoEnableTool(wxToolBarToolBase* tool, bool enable)

Called when the tools enabled flag changes.


wxDynamicToolBar::DoInsertTool

bool DoInsertTool(size_t pos, wxToolBarToolBase* tool)

Inserts a tool at the given position.


wxDynamicToolBar::DoSetToggle

void DoSetToggle(wxToolBarToolBase* tool, bool toggle)

Called when the tools 'can be toggled' flag changes.


wxDynamicToolBar::DoToggleTool

void DoToggleTool(wxToolBarToolBase* tool, bool toggle)

Called when the tool is toggled.


wxDynamicToolBar::DrawSeparator

void DrawSeparator(wxDynToolInfo& info, wxDC& dc)

Draws a separator. The default implementation draws a shaded line.


wxDynamicToolBar::EnableTool

void EnableTool(const int toolIndex, const bool enable = TRUE)

Enables or disables the given tool.


wxDynamicToolBar::FindToolForPosition

wxToolBarToolBase* FindToolForPosition(wxCoord x, wxCoord y) const

Finds a tool for the given position.


wxDynamicToolBar::GetPreferredDim

void GetPreferredDim(const wxSize& givenDim, wxSize& prefDim)

Returns the preferred dimension, taking the given dimension and a reference to the result.


wxDynamicToolBar::GetToolInfo

wxDynToolInfo* GetToolInfo(int toolIndex)

Returns tool information for the given tool index.


wxDynamicToolBar::Layout

bool Layout()

Performs layout. See definitions of orientation types.


wxDynamicToolBar::OnEraseBackground

void OnEraseBackground(wxEraseEvent& event)

Responds to background erase events. Currently does nothing.


wxDynamicToolBar::OnPaint

void OnPaint(wxPaintEvent& event)

Responds to paint events, drawing separators.


wxDynamicToolBar::OnSize

void OnSize(wxSizeEvent& event)

Responds to size events, calling Layout.


wxDynamicToolBar::Realize

bool Realize()

Overriden from wxToolBarBase; does nothing.


wxDynamicToolBar::RemveTool

void RemveTool(int toolIndex)

Removes the given tool. Misspelt in order not to clash with a similar function in the base class.


wxDynamicToolBar::SetLayout

void SetLayout(LayoutManagerBase* pLayout)

Sets the layout for this toolbar.


wxDynamicToolBar::SizeToolWindows

void SizeToolWindows()

Internal function for sizing tool windows.