-
-
- DocStr(wxButton, "Create and show a button.");
- RefDoc(wxButton, "");
- wxButton(wxWindow* parent, wxWindowID id, const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxPyButtonNameStr);
-
- DocStr(wxButton(), "Precreate a Button for 2-phase creation.");
- %name(PreButton)wxButton();
-
- DocStr(Create, "Acutally create the GUI Button for 2-phase creation.");
- bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxPyButtonNameStr);
-
-
- DocStr(SetDefault, "This sets the button to be the default item for the panel or dialog box.");
- void SetDefault();
-
-
-#ifdef __WXMSW__
- // show the image in the button in addition to the label
- void SetImageLabel(const wxBitmap& bitmap);
-
- // set the margins around the image
- void SetImageMargins(wxCoord x, wxCoord y);
-#endif
-
- DocStr(GetDefaultButtonSize, "Returns the default button size for this platform.");
- static wxSize GetDefaultSize();
+ %typemap(out) wxButton*; // turn off this typemap
+
+
+ DocCtorStr(
+ wxButton(wxWindow* parent, wxWindowID id=-1,
+ const wxString& label=wxPyEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxPyButtonNameStr),
+ "Create and show a button.", "");
+
+ DocCtorStrName(
+ wxButton(),
+ "Precreate a Button for 2-phase creation.", "",
+ PreButton);
+
+// DocCtorStrName(
+// wxButton(wxWindow *parent, wxWindowID id,
+// wxStockItemID stock,
+// const wxString& descriptiveLabel = wxPyEmptyString,
+// const wxPoint& pos = wxDefaultPosition,
+// long style = 0,
+// const wxValidator& validator = wxDefaultValidator,
+// const wxString& name = wxButtonNameStr),
+// "Used to create a stock `wx.Button`. Stock buttons are commonly used
+// buttons such as OK or Cancel. They have standard label and dimensions
+// and may have different appearance on some platforms (e.g. GTK+ 2
+// decorates them with icons). Using this from is the preferred way of
+// creating standard buttons.", "
+
+// :param stock: The stock ID of the button to create. One of the following:
+
+// ============================
+// ``wx.STOCK_NONE``
+// ``wx.STOCK_ADD``
+// ``wx.STOCK_APPLY``
+// ``wx.STOCK_BOLD``
+// ``wx.STOCK_CANCEL``
+// ``wx.STOCK_CLEAR``
+// ``wx.STOCK_CLOSE``
+// ``wx.STOCK_COPY``
+// ``wx.STOCK_CUT``
+// ``wx.STOCK_DELETE``
+// ``wx.STOCK_FIND``
+// ``wx.STOCK_FIND_AND_REPLACE``
+// ``wx.STOCK_GO_BACK``
+// ``wx.STOCK_GO_DOWN``
+// ``wx.STOCK_GO_FORWARD``
+// ``wx.STOCK_GO_UP``
+// ``wx.STOCK_HELP``
+// ``wx.STOCK_HOME``
+// ``wx.STOCK_INDENT``
+// ``wx.STOCK_INDEX``
+// ``wx.STOCK_ITALIC``
+// ``wx.STOCK_JUSTIFY_CENTER``
+// ``wx.STOCK_JUSTIFY_FILL``
+// ``wx.STOCK_JUSTIFY_LEFT``
+// ``wx.STOCK_JUSTIFY_RIGHT``
+// ``wx.STOCK_NEW``
+// ``wx.STOCK_NO``
+// ``wx.STOCK_OK``
+// ``wx.STOCK_OPEN``
+// ``wx.STOCK_PASTE``
+// ``wx.STOCK_PREFERENCES``
+// ``wx.STOCK_PRINT``
+// ``wx.STOCK_PRINT_PREVIEW``
+// ``wx.STOCK_PROPERTIES``
+// ``wx.STOCK_QUIT``
+// ``wx.STOCK_REDO``
+// ``wx.STOCK_REFRESH``
+// ``wx.STOCK_REMOVE``
+// ``wx.STOCK_REVERT_TO_SAVED``
+// ``wx.STOCK_SAVE``
+// ``wx.STOCK_SAVE_AS``
+// ``wx.STOCK_STOP``
+// ``wx.STOCK_UNDELETE``
+// ``wx.STOCK_UNDERLINE``
+// ``wx.STOCK_UNDO``
+// ``wx.STOCK_UNINDENT``
+// ``wx.STOCK_YES``
+// ``wx.STOCK_ZOOM_100``
+// ``wx.STOCK_ZOOM_FIT``
+// ``wx.STOCK_ZOOM_IN``
+// ``wx.STOCK_ZOOM_OUT``
+// ============================
+
+
+// :param descriptiveLabel: Optional label to be used on platforms
+// where standard buttons have descriptive rather than generic
+// labels. Mac is one such platforms, well-behaved Mac apps should use
+// descriptive labels (e.g. \"Save\" and \"Don't Save\" instead of \"OK\"
+// and \"Cancel\"). This argument is ignored on other platforms.",
+// StockButton);
+
+
+ // Turn it back on again
+ %typemap(out) wxButton* { $result = wxPyMake_wxObject($1, $owner); }
+
+
+ DocDeclStr(
+ bool , Create(wxWindow* parent, wxWindowID id=-1,
+ const wxString& label=wxPyEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxPyButtonNameStr),
+ "Acutally create the GUI Button for 2-phase creation.", "");
+
+
+
+ DocDeclStr(
+ void , SetDefault(),
+ "This sets the button to be the default item for the panel or dialog box.", "");
+
+
+ DocDeclStr(
+ static wxSize , GetDefaultSize(),
+ "Returns the default button size for this platform.", "");
+
+ static wxVisualAttributes
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);