X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c70fd24fa839a38e807685df7cd2ef48c1b53884..922ba68045d84789ab1dfceb4d1aa1b6e2c5e810:/wxPython/src/controls.i?ds=inline diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index 1d8b745989..a622b6145d 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -188,10 +188,10 @@ public: %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" %pragma(python) addtomethod = "wxPreBitmapButton:val._setOORInfo(val)" - wxBitmap& GetBitmapLabel(); - wxBitmap& GetBitmapDisabled(); - wxBitmap& GetBitmapFocus(); - wxBitmap& GetBitmapSelected(); + wxBitmap GetBitmapLabel(); + wxBitmap GetBitmapDisabled(); + wxBitmap GetBitmapFocus(); + wxBitmap GetBitmapSelected(); void SetBitmapDisabled(const wxBitmap& bitmap); void SetBitmapFocus(const wxBitmap& bitmap); void SetBitmapSelected(const wxBitmap& bitmap); @@ -616,12 +616,19 @@ public: bool HasBackgroundColour() const; bool HasFont() const; - const wxColour& GetTextColour() const; - const wxColour& GetBackgroundColour() const; - const wxFont& GetFont() const; + wxColour GetTextColour() const; + wxColour GetBackgroundColour() const; + wxFont GetFont() const; // returns false if we have any attributes set, true otherwise bool IsDefault(); + + // return the attribute having the valid font and colours: it uses the + // attributes set in attr and falls back first to attrDefault and then to + // the text control font/colours for those attributes which are not set + static wxTextAttr Combine(const wxTextAttr& attr, + const wxTextAttr& attrDef, + const wxTextCtrl *text); }; @@ -727,6 +734,13 @@ public: self->AppendText(text); } } + + // TODO: replace this when the method is really added to wxTextCtrl + %addmethods { + wxString GetString(long from, long to) { + return self->GetValue().Mid(from, to-from); + } + } }; //---------------------------------------------------------------------- @@ -756,6 +770,9 @@ public: int GetThumbPosition(); int GetThumbSize(); %name(GetThumbLength) int GetThumbSize(); // to match the docs + + bool IsVertical(); + void SetThumbPosition(int viewStart); void SetScrollbar(int position, int thumbSize, int range, int pageSize, @@ -811,7 +828,7 @@ public: %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" %pragma(python) addtomethod = "wxPreStaticBitmap:val._setOORInfo(val)" - const wxBitmap& GetBitmap(); + wxBitmap GetBitmap(); void SetBitmap(const wxBitmap& bitmap); void SetIcon(const wxIcon& icon); };