X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dce2bd223c2370f001f9ca93e04cbd437ff3f988..015fd9ef4833ec3d8b0043a1c7e448c8be4f734a:/wxPython/src/_button.i?ds=sidebyside diff --git a/wxPython/src/_button.i b/wxPython/src/_button.i index be6ec069cc..de03872ce9 100644 --- a/wxPython/src/_button.i +++ b/wxPython/src/_button.i @@ -33,7 +33,7 @@ enum { DocStr(wxButton, "A button is a control that contains a text string, and is one of the most common elements of a GUI. It may be placed on a dialog box or panel, or -indeed almost any other window. +indeed almost any other window.", " Window Styles ------------- @@ -58,6 +58,8 @@ Events :see: `wx.BitmapButton` "); +MustHaveApp(wxButton); + class wxButton : public wxControl { public: @@ -65,40 +67,44 @@ public: %pythonAppend wxButton() "" - RefDoc(wxButton, ""); DocCtorStr( - wxButton(wxWindow* parent, wxWindowID id, const wxString& label, + 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."); + "Create and show a button.", ""); DocCtorStrName( wxButton(), - "Precreate a Button for 2-phase creation.", + "Precreate a Button for 2-phase creation.", "", PreButton); DocDeclStr( - bool , Create(wxWindow* parent, wxWindowID id, const wxString& label, + 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."); + "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."); + "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."); + "Returns the default button size for this platform.", ""); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; @@ -110,7 +116,7 @@ DocStr(wxBitmapButton, "A Button that contains a bitmap. A bitmap button can be supplied with a single bitmap, and wxWidgets will draw all button states using this bitmap. If the application needs more control, additional bitmaps for the selected state, -unpressed focused state, and greyed-out state may be supplied. +unpressed focused state, and greyed-out state may be supplied.", " Window Styles ------------- @@ -141,75 +147,77 @@ Events :see: `wx.Button`, `wx.Bitmap` "); +MustHaveApp(wxBitmapButton); + class wxBitmapButton : public wxButton { public: %pythonAppend wxBitmapButton "self._setOORInfo(self)" %pythonAppend wxBitmapButton() "" - RefDoc(wxBitmapButton, ""); // turn it off for the ctors - DocCtorStr( - wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, + wxBitmapButton(wxWindow* parent, wxWindowID id=-1, + const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyButtonNameStr), - "Create and show a button with a bitmap for the label."); + "Create and show a button with a bitmap for the label.", ""); DocCtorStrName( wxBitmapButton(), - "Precreate a BitmapButton for 2-phase creation.", + "Precreate a BitmapButton for 2-phase creation.", "", PreBitmapButton); DocDeclStr( - bool , Create(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxBU_AUTODRAW, - const wxValidator& validator = wxDefaultValidator, + bool , Create(wxWindow* parent, wxWindowID id=-1, + const wxBitmap& bitmap = wxNullBitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBU_AUTODRAW, + const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyButtonNameStr), - "Acutally create the GUI BitmapButton for 2-phase creation."); + "Acutally create the GUI BitmapButton for 2-phase creation.", ""); DocDeclStr( wxBitmap , GetBitmapLabel(), - "Returns the label bitmap (the one passed to the constructor)."); + "Returns the label bitmap (the one passed to the constructor).", ""); DocDeclStr( wxBitmap , GetBitmapDisabled(), - "Returns the bitmap for the disabled state."); + "Returns the bitmap for the disabled state.", ""); DocDeclStr( wxBitmap , GetBitmapFocus(), - "Returns the bitmap for the focused state."); + "Returns the bitmap for the focused state.", ""); DocDeclStr( wxBitmap , GetBitmapSelected(), - "Returns the bitmap for the selected state."); + "Returns the bitmap for the selected state.", ""); DocDeclStr( void , SetBitmapDisabled(const wxBitmap& bitmap), - "Sets the bitmap for the disabled button appearance."); + "Sets the bitmap for the disabled button appearance.", ""); DocDeclStr( void , SetBitmapFocus(const wxBitmap& bitmap), - "Sets the bitmap for the button appearance when it has the keyboard focus."); + "Sets the bitmap for the button appearance when it has the keyboard focus.", ""); DocDeclStr( void , SetBitmapSelected(const wxBitmap& bitmap), - "Sets the bitmap for the selected (depressed) button appearance."); + "Sets the bitmap for the selected (depressed) button appearance.", ""); DocDeclStr( void , SetBitmapLabel(const wxBitmap& bitmap), "Sets the bitmap label for the button. This is the bitmap used for the -unselected state, and for all other states if no other bitmaps are provided."); +unselected state, and for all other states if no other bitmaps are provided.", ""); void SetMargins(int x, int y);