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.
This commit is contained in:
Vadim Zeitlin 2023-09-06 14:13:34 +02:00
parent 49b2f9c809
commit 4844d37df1

View file

@ -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();