X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7722248d7510121367c9d4db7af1156197c26e82..db679b8c836e69c111cdc31e62cf92cebe4f938f:/wxPython/src/_statusbar.i diff --git a/wxPython/src/_statusbar.i b/wxPython/src/_statusbar.i index 48ef90034f..6988a190a5 100644 --- a/wxPython/src/_statusbar.i +++ b/wxPython/src/_statusbar.i @@ -22,19 +22,33 @@ %newgroup; +enum { + wxSB_NORMAL, + wxSB_FLAT, + wxSB_RAISED +}; + + + + // wxStatusBar: a window near the bottom of the frame used for status info +MustHaveApp(wxStatusBar); class wxStatusBar : public wxWindow { public: - %addtofunc wxStatusBar "self._setOORInfo(self)" - %addtofunc wxStatusBar() "" + %pythonAppend wxStatusBar "self._setOORInfo(self)" + %pythonAppend wxStatusBar() "" + %typemap(out) wxStatusBar*; // turn off this typemap wxStatusBar(wxWindow* parent, wxWindowID id = -1, - long style = wxST_SIZEGRIP, + long style = wxDEFAULT_STATUSBAR_STYLE, const wxString& name = wxPyStatusLineNameStr); - %name(PreStatusBar)wxStatusBar(); + %RenameCtor(PreStatusBar, wxStatusBar()); - bool Create(wxWindow* parent, wxWindowID id, + // Turn it back on again + %typemap(out) wxStatusBar* { $result = wxPyMake_wxObject($1, $owner); } + + bool Create(wxWindow* parent, wxWindowID id=-1, long style = wxST_SIZEGRIP, const wxString& name = wxPyStatusLineNameStr); @@ -56,8 +70,16 @@ public: // minus the sum of fixed width fields) is divided between the fields with // negative width according to the abs value of the width (field with width // -2 grows twice as much as one with width -1 &c) - virtual void SetStatusWidths(int widths, const int* widths_field); // uses typemap in _toplvl.i + virtual void SetStatusWidths(int widths, const int* widths_field); + + // Set the field style. Use either wxSB_NORMAL (default) for a standard 3D + // border around a field, wxSB_FLAT for no border around a field, so that it + // appears flat or wxSB_POPOUT to make the field appear raised. + // Setting field styles only works on wxMSW + virtual void SetStatusStyles(int styles, const int* styles_field); + + // Get the position and size of the field's internal bounding rectangle %extend { wxRect GetFieldRect(int i) { @@ -73,6 +95,9 @@ public: // get the dimensions of the horizontal and vertical borders virtual int GetBorderX() const; virtual int GetBorderY() const; + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); };