X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47a8a4d5cc3e8fcb2efee4787cb9d244104beea5..9c9b12747f291200888bb7bf9bbdb84f8773279f:/include/wx/gtk/textctrl.h diff --git a/include/wx/gtk/textctrl.h b/include/wx/gtk/textctrl.h index 0d5c118934..da2f70bbbd 100644 --- a/include/wx/gtk/textctrl.h +++ b/include/wx/gtk/textctrl.h @@ -212,7 +212,17 @@ private: // encoding wxFontEncoding GetTextEncoding() const; + // returns either m_text or m_buffer depending on whether the control is + // single- or multi-line; convenient for the GTK+ functions which work with + // both + void *GetTextObject() const + { + return IsMultiLine() ? wx_static_cast(void *, m_buffer) + : wx_static_cast(void *, m_text); + } + + // the widget used for single line controls GtkWidget *m_text; bool m_modified:1;