X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d0e2ede057148772415ee526344f1a1597db3ae7..fe45b493dcc42fea4ad4f781a4fb7844d2e95fd0:/wxPython/src/_toolbar.i diff --git a/wxPython/src/_toolbar.i b/wxPython/src/_toolbar.i index 70191aaa59..f027e49a7c 100644 --- a/wxPython/src/_toolbar.i +++ b/wxPython/src/_toolbar.i @@ -34,6 +34,11 @@ enum wxToolBarToolStyle enum { wxTB_HORIZONTAL, wxTB_VERTICAL, + wxTB_TOP, + wxTB_LEFT, + wxTB_BOTTOM, + wxTB_RIGHT, + wxTB_3DBUTTONS, wxTB_FLAT, wxTB_DOCKABLE, @@ -43,7 +48,7 @@ enum { wxTB_NOALIGN, wxTB_HORZ_LAYOUT, wxTB_HORZ_TEXT, - wxTB_NO_TOOLTIPS, + wxTB_NO_TOOLTIPS }; @@ -97,6 +102,11 @@ public: 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 @@ -122,6 +132,19 @@ public: SetBitmap1 = SetNormalBitmap SetBitmap2 = SetDisabledBitmap } + + %property(Bitmap, GetBitmap, doc="See `GetBitmap`"); + %property(ClientData, GetClientData, SetClientData, doc="See `GetClientData` and `SetClientData`"); + %property(Control, GetControl, doc="See `GetControl`"); + %property(DisabledBitmap, GetDisabledBitmap, SetDisabledBitmap, doc="See `GetDisabledBitmap` and `SetDisabledBitmap`"); + %property(Id, GetId, doc="See `GetId`"); + %property(Kind, GetKind, doc="See `GetKind`"); + %property(Label, GetLabel, SetLabel, doc="See `GetLabel` and `SetLabel`"); + %property(LongHelp, GetLongHelp, SetLongHelp, doc="See `GetLongHelp` and `SetLongHelp`"); + %property(NormalBitmap, GetNormalBitmap, SetNormalBitmap, doc="See `GetNormalBitmap` and `SetNormalBitmap`"); + %property(ShortHelp, GetShortHelp, SetShortHelp, doc="See `GetShortHelp` and `SetShortHelp`"); + %property(Style, GetStyle, doc="See `GetStyle`"); + %property(ToolBar, GetToolBar, doc="See `GetToolBar`"); }; @@ -307,8 +330,10 @@ public: %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(); @@ -383,6 +408,20 @@ public: bool IsVertical(); 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`"); + %property(ToolBitmapSize, GetToolBitmapSize, SetToolBitmapSize, doc="See `GetToolBitmapSize` and `SetToolBitmapSize`"); + %property(ToolMargins, GetToolMargins, doc="See `GetToolMargins`"); + %property(ToolPacking, GetToolPacking, SetToolPacking, doc="See `GetToolPacking` and `SetToolPacking`"); + %property(ToolSeparation, GetToolSeparation, SetToolSeparation, doc="See `GetToolSeparation` and `SetToolSeparation`"); + %property(ToolSize, GetToolSize, doc="See `GetToolSize`"); + %property(ToolsCount, GetToolsCount, doc="See `GetToolsCount`"); }; @@ -414,6 +453,10 @@ public: 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); };