X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e0c87227cf6b6215d169985d2bb5d2421a74512..9176f38f730c3415ac7a911c2f85cdea7eca4478:/wxPython/src/_button.i?ds=sidebyside diff --git a/wxPython/src/_button.i b/wxPython/src/_button.i index d858873bf2..320f480990 100644 --- a/wxPython/src/_button.i +++ b/wxPython/src/_button.i @@ -16,10 +16,7 @@ //--------------------------------------------------------------------------- %newgroup; - -%{ - DECLARE_DEF_STRING(ButtonNameStr); -%} +MAKE_CONST_WXSTRING(ButtonNameStr); enum { wxBU_LEFT, @@ -40,26 +37,26 @@ DocStr(wxButton, RefDoc(wxButton, " Styles - wxBU_LEFT: Left-justifies the label. WIN32 only. - wxBU_TOP: Aligns the label to the top of the button. WIN32 only. - wxBU_RIGHT: Right-justifies the bitmap label. WIN32 only. - wxBU_BOTTOM: Aligns the label to the bottom of the button. WIN32 only. - wxBU_EXACTFIT: Creates the button as small as possible instead of making - it of the standard size (which is the default behaviour.) + wx.BU_LEFT: Left-justifies the label. WIN32 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. + wx.BU_BOTTOM: Aligns the label to the bottom of the button. WIN32 only. + wx.BU_EXACTFIT: Creates the button as small as possible instead of making + it of the standard size (which is the default behaviour.) Events - EVT_BUTTON(win,id,func): - Sent when the button is clicked. + EVT_BUTTON: Sent when the button is clicked. "); class wxButton : public wxControl { public: - %addtofunc wxButton "self._setOORInfo(self)" - %addtofunc wxButton() "" + %pythonAppend wxButton "self._setOORInfo(self)" + %pythonAppend wxButton() "" - DocStr(wxButton, "Create and show a button.") + 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, @@ -83,13 +80,13 @@ public: void SetDefault(); -#ifdef __WXMSW__ - // show the image in the button in addition to the label - void SetImageLabel(const wxBitmap& bitmap); +// #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 +// // 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(); @@ -100,15 +97,40 @@ public: //--------------------------------------------------------------------------- -DocStr(wxBitmapButton, "A Buttont that contains a bitmap."); +DocStr(wxBitmapButton, +"A Button that contains a bitmap. A bitmap button can be supplied with a +single bitmap, and wxWindows 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. +"); + +RefDoc(wxBitmapButton, " + Styles + wx.BU_AUTODRAW: If this is specified, the button will be drawn + automatically using the label bitmap only, providing a + 3D-look border. If this style is not specified, the button + will be drawn without borders and using all provided + bitmaps. WIN32 only. + wx.BU_LEFT: Left-justifies the label. WIN32 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. + wx.BU_BOTTOM: Aligns the label to the bottom of the button. WIN32 only. + wx.BU_EXACTFIT: Creates the button as small as possible instead of making + it of the standard size (which is the default behaviour.) + + Events + EVT_BUTTON: Sent when the button is clicked. +"); class wxBitmapButton : public wxButton { public: - %addtofunc wxBitmapButton "self._setOORInfo(self)" - %addtofunc wxBitmapButton() "" + %pythonAppend wxBitmapButton "self._setOORInfo(self)" + %pythonAppend wxBitmapButton() "" - DocStr(wxBitmapButton, "Create and show a button.") + DocStr(wxBitmapButton, "Create and show a button with a bitmap for the label.") + RefDoc(wxBitmapButton, ""); // turn it off for the ctors + wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,