wxTB_NOALIGN,
wxTB_HORZ_LAYOUT,
wxTB_HORZ_TEXT,
+ wxTB_NO_TOOLTIPS,
};
%# For consistency with the backwards compatible methods above, here are
%# some non-'Label' versions of the Check and Radio methods
+
def AddCheckTool(self, id, bitmap,
bmpDisabled = wx.NullBitmap,
shortHelp = '', longHelp = '',
shortHelp, longHelp, clientData)
}
- %name(AddToolItem) wxToolBarToolBase *AddTool (wxToolBarToolBase *tool);
- %name(InsertToolItem) wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool);
+ %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);
void SetToolLongHelp(int id, const wxString& helpString);
wxString GetToolLongHelp(int id);
- %name(SetMarginsXY) void SetMargins(int x, int y);
+ %Rename(SetMarginsXY, void, SetMargins(int x, int y));
void SetMargins(const wxSize& size);
void SetToolPacking(int packing);
void SetToolSeparation(int separation);
// return True if this is a vertical toolbar, otherwise False
bool IsVertical();
+
+ size_t GetToolsCount() const;
};
+MustHaveApp(wxToolBar);
+
class wxToolBar : public wxToolBarBase {
public:
- %addtofunc wxToolBar "self._setOORInfo(self)"
- %addtofunc wxToolBar() ""
-
+ %pythonAppend wxToolBar "self._setOORInfo(self)"
+ %pythonAppend wxToolBar() ""
+ %typemap(out) wxToolBar*; // turn off this typemap
+
wxToolBar(wxWindow *parent,
- wxWindowID id,
+ wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxPyToolBarNameStr);
- %name(PreToolBar)wxToolBar();
+ %RenameCtor(PreToolBar, wxToolBar());
+
+ // Turn it back on again
+ %typemap(out) wxToolBar* { $result = wxPyMake_wxObject($1, $owner); }
bool Create(wxWindow *parent,
- wxWindowID id,
+ wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxPyToolBarNameStr);
- wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y);
+ static wxVisualAttributes
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+};
+
+//---------------------------------------------------------------------------
+
+#if 0
+%{
+#include <wx/generic/buttonbar.h>
+%}
+
+MustHaveApp(wxToolBar);
+class wxButtonToolBar : public wxToolBarBase
+{
+public:
+ %pythonAppend wxButtonToolBar "self._setOORInfo(self)"
+ %pythonAppend wxButtonToolBar() ""
+
+ wxButtonToolBar(wxWindow *parent,
+ wxWindowID id=-1,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxPyToolBarNameStr);
+ %RenameCtor(PreButtonToolBar, wxButtonToolBar());
+
+
+ bool Create(wxWindow *parent,
+ wxWindowID id=-1,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxPyToolBarNameStr);
};
+#endif
//---------------------------------------------------------------------------