X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d55734102e25f5d11bcb4bbac39083320afd3699..c655dbdd8987b4d64b453bbbd8938d813387dd93:/wxPython/src/_statctrls.i diff --git a/wxPython/src/_statctrls.i b/wxPython/src/_statctrls.i index 3c15670aaf..904bcbd2b2 100644 --- a/wxPython/src/_statctrls.i +++ b/wxPython/src/_statctrls.i @@ -19,6 +19,7 @@ MAKE_CONST_WXSTRING(StaticBitmapNameStr); MAKE_CONST_WXSTRING(StaticBoxNameStr); MAKE_CONST_WXSTRING(StaticTextNameStr); +MAKE_CONST_WXSTRING(StaticLineNameStr); //--------------------------------------------------------------------------- %newgroup @@ -29,6 +30,7 @@ class wxStaticBox : public wxControl { public: %pythonAppend wxStaticBox "self._setOORInfo(self)" %pythonAppend wxStaticBox() "" + %typemap(out) wxStaticBox*; // turn off this typemap wxStaticBox(wxWindow* parent, wxWindowID id=-1, const wxString& label = wxPyEmptyString, @@ -36,7 +38,10 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyStaticBoxNameStr); - %name(PreStaticBox)wxStaticBox(); + %RenameCtor(PreStaticBox, wxStaticBox()); + + // Turn it back on again + %typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); } bool Create(wxWindow* parent, wxWindowID id=-1, const wxString& label = wxPyEmptyString, @@ -65,14 +70,14 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString& name = wxPyStaticTextNameStr); - %name(PreStaticLine)wxStaticLine(); + const wxString& name = wxPyStaticLineNameStr); + %RenameCtor(PreStaticLine, wxStaticLine()); bool Create( wxWindow *parent, wxWindowID id=-1, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, - const wxString& name = wxPyStaticTextNameStr); + const wxString& name = wxPyStaticLineNameStr); // is the line vertical? bool IsVertical() const; @@ -90,6 +95,16 @@ public: MustHaveApp(wxStaticText); +enum { + wxST_NO_AUTORESIZE, + wxST_MARKUP, + + wxST_ELLIPSIZE_START, + wxST_ELLIPSIZE_MIDDLE, + wxST_ELLIPSIZE_END +}; + + class wxStaticText : public wxControl { public: %pythonAppend wxStaticText "self._setOORInfo(self)" @@ -101,7 +116,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyStaticTextNameStr); - %name(PreStaticText)wxStaticText(); + %RenameCtor(PreStaticText, wxStaticText()); bool Create(wxWindow* parent, wxWindowID id=-1, const wxString& label = wxPyEmptyString, @@ -110,6 +125,29 @@ public: long style = 0, const wxString& name = wxPyStaticTextNameStr); + DocDeclStr( + void , Wrap(int width), + "This functions wraps the control's label so that each of its lines +becomes at most ``width`` pixels wide if possible (the lines are +broken at words boundaries so it might not be the case if words are +too long). If ``width`` is negative, no wrapping is done.", ""); + + bool IsEllipsized() const; + + DocDeclStr( + static wxString , RemoveMarkup(const wxString& str), + "Removes the markup accepted by wx.StaticText when wx.ST_MARKUP is +used, and then returns the cleaned string. + ", ""); + + + DocDeclStr( + static wxString , EscapeMarkup(const wxString& str), + "Escapes the alls special symbols (<>\"\'&) present inside the given +string using the corresponding entities (< > " ' +&)", ""); + + static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; @@ -130,7 +168,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyStaticBitmapNameStr); - %name(PreStaticBitmap)wxStaticBitmap(); + %RenameCtor(PreStaticBitmap, wxStaticBitmap()); bool Create(wxWindow* parent, wxWindowID id=-1, const wxBitmap& bitmap = wxNullBitmap,