Fix determining the length of the text in wxTextEntry/wxTextCtrl (wxGTK)

Several functions of wxTextEntry and wxTextCtrl call to
gtk_entry_get_text_length() API to determine the length of the text in
GTKEntry. This API is available since GTK+ 2.14 so we have to implement
a fallback method for older GTK+ versions.
Dedicated function GTKGetEntryTextLength() is implemented in wxTextEntry
and exposed through its interface because it is also used in wxTextCtrl.
This commit is contained in:
Artur Wieczorek
2017-07-31 21:36:02 +02:00
parent 5b679bfbec
commit 8317bc2844
3 changed files with 29 additions and 4 deletions

View File

@@ -80,6 +80,8 @@ protected:
// Override the base class method to use GtkEntry IM context.
virtual int GTKIMFilterKeypress(GdkEventKey* event) const;
static unsigned int GTKGetEntryTextLength(GtkEntry* entry);
private:
// implement this to return the associated GtkEntry or another widget
// implementing GtkEditable