X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d55734102e25f5d11bcb4bbac39083320afd3699..260c9c7df3a2968f93a4c474024c60b425fdea12:/wxPython/src/_button.i?ds=sidebyside diff --git a/wxPython/src/_button.i b/wxPython/src/_button.i index de03872ce9..07d48438ca 100644 --- a/wxPython/src/_button.i +++ b/wxPython/src/_button.i @@ -24,6 +24,8 @@ enum { wxBU_RIGHT, wxBU_BOTTOM, + wxBU_ALIGN_MASK, + wxBU_EXACTFIT, wxBU_AUTODRAW, }; @@ -38,12 +40,12 @@ indeed almost any other window.", " Window Styles ------------- ============== ========================================== - wx.BU_LEFT Left-justifies the label. WIN32 only. + wx.BU_LEFT Left-justifies the label. Windows and GTK+ only. wx.BU_TOP Aligns the label to the top of the button. - WIN32 only. - wx.BU_RIGHT Right-justifies the bitmap label. WIN32 only. + Windows and GTK+ only. + wx.BU_RIGHT Right-justifies the bitmap label. Windows and GTK+ only. wx.BU_BOTTOM Aligns the label to the bottom of the button. - WIN32 only. + Windows and GTK+ only. wx.BU_EXACTFIT Creates the button as small as possible instead of making it of the standard size (which is the default behaviour.) @@ -58,6 +60,7 @@ Events :see: `wx.BitmapButton` "); + MustHaveApp(wxButton); class wxButton : public wxControl @@ -65,6 +68,7 @@ class wxButton : public wxControl public: %pythonAppend wxButton "self._setOORInfo(self)" %pythonAppend wxButton() "" + %typemap(out) wxButton*; // turn off this typemap DocCtorStr( @@ -75,13 +79,77 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyButtonNameStr), - "Create and show a button.", ""); + "Create and show a button. The preferred way to create standard +buttons is to use a standard ID and an empty label. In this case +wxWigets will automatically use a stock label that coresponds to the +ID given. In additon, the button will be decorated with stock icons +under GTK+ 2.", " + +The stock IDs and coresponding labels are + + ===================== ====================== + wx.ID_ADD 'Add' + wx.ID_APPLY '\&Apply' + wx.ID_BOLD '\&Bold' + wx.ID_CANCEL '\&Cancel' + wx.ID_CLEAR '\&Clear' + wx.ID_CLOSE '\&Close' + wx.ID_COPY '\&Copy' + wx.ID_CUT 'Cu\&t' + wx.ID_DELETE '\&Delete' + wx.ID_FIND '\&Find' + wx.ID_REPLACE 'Find and rep\&lace' + wx.ID_BACKWARD '\&Back' + wx.ID_DOWN '\&Down' + wx.ID_FORWARD '\&Forward' + wx.ID_UP '\&Up' + wx.ID_HELP '\&Help' + wx.ID_HOME '\&Home' + wx.ID_INDENT 'Indent' + wx.ID_INDEX '\&Index' + wx.ID_ITALIC '\&Italic' + wx.ID_JUSTIFY_CENTER 'Centered' + wx.ID_JUSTIFY_FILL 'Justified' + wx.ID_JUSTIFY_LEFT 'Align Left' + wx.ID_JUSTIFY_RIGHT 'Align Right' + wx.ID_NEW '\&New' + wx.ID_NO '\&No' + wx.ID_OK '\&OK' + wx.ID_OPEN '\&Open' + wx.ID_PASTE '\&Paste' + wx.ID_PREFERENCES '\&Preferences' + wx.ID_PRINT '\&Print' + wx.ID_PREVIEW 'Print previe\&w' + wx.ID_PROPERTIES '\&Properties' + wx.ID_EXIT '\&Quit' + wx.ID_REDO '\&Redo' + wx.ID_REFRESH 'Refresh' + wx.ID_REMOVE 'Remove' + wx.ID_REVERT_TO_SAVED 'Revert to Saved' + wx.ID_SAVE '\&Save' + wx.ID_SAVEAS 'Save \&As...' + wx.ID_STOP '\&Stop' + wx.ID_UNDELETE 'Undelete' + wx.ID_UNDERLINE '\&Underline' + wx.ID_UNDO '\&Undo' + wx.ID_UNINDENT '\&Unindent' + wx.ID_YES '\&Yes' + wx.ID_ZOOM_100 '\&Actual Size' + wx.ID_ZOOM_FIT 'Zoom to \&Fit' + wx.ID_ZOOM_IN 'Zoom \&In' + wx.ID_ZOOM_OUT 'Zoom \&Out' + ===================== ====================== +"); DocCtorStrName( wxButton(), "Precreate a Button for 2-phase creation.", "", PreButton); + // 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, @@ -154,6 +222,7 @@ class wxBitmapButton : public wxButton public: %pythonAppend wxBitmapButton "self._setOORInfo(self)" %pythonAppend wxBitmapButton() "" + %typemap(out) wxBitmapButton*; // turn off this typemap DocCtorStr( wxBitmapButton(wxWindow* parent, wxWindowID id=-1, @@ -170,6 +239,10 @@ public: "Precreate a BitmapButton for 2-phase creation.", "", PreBitmapButton); + // Turn it back on again + %typemap(out) wxBitmapButton* { $result = wxPyMake_wxObject($1, $owner); } + + DocDeclStr( bool , Create(wxWindow* parent, wxWindowID id=-1, const wxBitmap& bitmap = wxNullBitmap,