enum {
wxTB_HORIZONTAL,
wxTB_VERTICAL,
+ wxTB_TOP,
+ wxTB_LEFT,
+ wxTB_BOTTOM,
+ wxTB_RIGHT,
+
wxTB_3DBUTTONS,
wxTB_FLAT,
wxTB_DOCKABLE,
wxTB_NOALIGN,
wxTB_HORZ_LAYOUT,
wxTB_HORZ_TEXT,
- wxTB_NO_TOOLTIPS,
+ wxTB_NO_TOOLTIPS
};
void Detach();
void Attach(wxToolBarBase *tbar);
+ // these methods are only for tools of wxITEM_DROPDOWN kind (but even such
+ // tools can have a NULL associated menu)
+ void SetDropdownMenu(wxMenu *menu);
+ wxMenu *GetDropdownMenu() const;
+
//wxObject *GetClientData();
%extend {
// convert the ClientData back to a PyObject
%Rename(AddToolItem, wxToolBarToolBase*, AddTool (wxToolBarToolBase *tool));
%Rename(InsertToolItem, wxToolBarToolBase*, InsertTool (size_t pos, wxToolBarToolBase *tool));
- wxToolBarToolBase *AddControl(wxControl *control);
- wxToolBarToolBase *InsertControl(size_t pos, wxControl *control);
+ wxToolBarToolBase *AddControl(wxControl *control,
+ const wxString& label = wxEmptyString);
+ wxToolBarToolBase *InsertControl(size_t pos, wxControl *control,
+ const wxString& label = wxEmptyString);
wxControl *FindControl( int id );
wxToolBarToolBase *AddSeparator();
size_t GetToolsCount() const;
+ // Set dropdown menu
+ bool SetDropdownMenu(int toolid, wxMenu *menu);
+
+
%property(Margins, GetMargins, SetMargins, doc="See `GetMargins` and `SetMargins`");
%property(MaxCols, GetMaxCols, doc="See `GetMaxCols`");
%property(MaxRows, GetMaxRows, doc="See `GetMaxRows`");
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxPyToolBarNameStr);
+ // TODO: In 2.9 move these to the base class...
+ void SetToolNormalBitmap(int id, const wxBitmap& bitmap);
+ void SetToolDisabledBitmap(int id, const wxBitmap& bitmap);
+
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};