From 4844d37df16d8ccea23a15f1cd1aebc45b261158 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 6 Sep 2023 14:13:34 +0200 Subject: [PATCH] Make recently added GTK-specific wxTextCtrl accessors public Make GTKGetTextBuffer() and GTKGetEditable() functions added in e4388d4f87 (Add accessors for underling wxTextCtrl GTK widgets, 2023-08-27) public instead of protected as it doesn't make sense to force people to derive from wxTextCtrl just to call them. See #23829. Closes #23843. --- include/wx/gtk/textctrl.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/wx/gtk/textctrl.h b/include/wx/gtk/textctrl.h index 743e3db31a..0448f66191 100644 --- a/include/wx/gtk/textctrl.h +++ b/include/wx/gtk/textctrl.h @@ -105,6 +105,14 @@ public: virtual wxTextProofOptions GetProofCheckOptions() const override; #endif // wxUSE_SPELLCHECK && __WXGTK3__ + // GTK-specific functions + + // Get the underlying text buffer for multi-line controls. + GtkTextBuffer *GTKGetTextBuffer() { return IsMultiLine() ? m_buffer : nullptr; } + // Get the underlying text control. + GtkEditable *GTKGetEditable() const { return GetEditable(); } + + // Implementation from now on void OnDropFiles( wxDropFilesEvent &event ); void OnChar( wxKeyEvent &event ); @@ -188,11 +196,6 @@ protected: void GTKSetWrapMode(); void GTKSetJustification(); - // get the underlying text buffer for multi-line controls, or null otherwise - GtkTextBuffer *GTKGetTextBuffer() { return IsMultiLine() ? m_buffer : nullptr; } - // get the underlying text control - GtkEditable *GTKGetEditable() const { return GetEditable(); } - private: void Init();