bitmaps will inadvertently be mapped to system colours.
To do this, set the msw.remap system option before creating the toolbar:
@code
- wxSystemOptions::SetOption(wxT("msw.remap"), 0);
+ wxSystemOptions::SetOption("msw.remap", 0);
@endcode
If you wish to use 32-bit images (which include an alpha channel for
transparency) use:
@code
- wxSystemOptions::SetOption(wxT("msw.remap"), 2);
+ wxSystemOptions::SetOption("msw.remap", 2);
@endcode
Then colour remapping is switched off, and a transparent background
used. But only use this option under Windows XP with true colour:
ignores @c wxTB_NOICONS style. Also, toggling the @c wxTB_TEXT works only
if the style was initially on.
- @beginEventTable{wxCommandEvent}
+ @beginEventEmissionTable{wxCommandEvent}
@event{EVT_TOOL(id, func)}
Process a @c wxEVT_COMMAND_TOOL_CLICKED event (a synonym for @c
wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool.
wxToolBar(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxTB_HORIZONTAL | wxBORDER_NONE,
+ long style = wxTB_HORIZONTAL,
const wxString& name = wxToolBarNameStr);
/**
*/
virtual wxToolBarToolBase* AddSeparator();
+ //@{
/**
Adds a tool to the toolbar.
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString,
wxObject* clientData = NULL);
+ //@}
/**
Deletes all the tools in the toolbar.
wxSize GetMargins() const;
/**
- Returns the size of bitmap that the toolbar expects to have. The default
- bitmap size is 16 by 15 pixels.
+ Returns the size of bitmap that the toolbar expects to have.
+
+ The default bitmap size is platform-dependent: for example, it is 16*15
+ for MSW and 24*24 for GTK. This size does @em not necessarily indicate
+ the best size to use for the toolbars on the given platform, for this
+ you should use @c wxArtProvider::GetNativeSizeHint(wxART_TOOLBAR) but
+ in any case, as the bitmap size is deduced automatically from the size
+ of the bitmaps associated with the tools added to the toolbar, it is
+ usually unnecessary to call SetToolBitmapSize() explicitly.
@remarks Note that this is the size of the bitmap you pass to AddTool(),
and not the eventual size of the tool button.
const wxBitmap& bitmap2 = wxNullBitmap,
bool isToggle = false,
wxObject* clientData = NULL,
- const wxString& shortHelpString = "",
- const wxString& longHelpString = "");
+ const wxString& shortHelpString = wxEmptyString,
+ const wxString& longHelpString = wxEmptyString);
wxToolBarToolBase* InsertTool(size_t pos,
wxToolBarToolBase* tool);
//@}
*/
bool SetDropdownMenu(int id, wxMenu* menu);
+ //@{
/**
Set the values to be used as margins for the toolbar.
@see GetMargins(), wxSize
*/
void SetMargins(const wxSize& size);
+ //@}
/**
Sets the default size of each tool bitmap. The default bitmap size is 16