Add IM and full wxEVT_CHAR support to wxTextCtrl and wxComboBox in wxGTK.

Generate wxEVT_CHAR events for non-ASCII characters entered in these controls
by intercepting their insert-text signal.

Also try to use GtkEntry/GtkTextView internal IM objects but unsuccessfully so
far.

Closes #3158.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-03-21 22:37:09 +00:00
parent c77ef57e6e
commit b2c357747d
7 changed files with 154 additions and 50 deletions

View File

@@ -50,12 +50,17 @@ public:
// implementation only from now on
void SendMaxLenEvent();
bool GTKEntryOnInsertText(const char* text);
protected:
// This method must be called from the derived class Create() to connect
// the handlers for the clipboard (cut/copy/paste) events.
void GTKConnectClipboardSignals(GtkWidget* entry);
// And this one to connect "insert-text" signal.
void GTKConnectInsertTextSignal(GtkEntry* entry);
virtual void DoSetValue(const wxString& value, int flags);
virtual wxString DoGetValue() const;
@@ -65,6 +70,9 @@ protected:
virtual bool DoAutoCompleteStrings(const wxArrayString& choices);
// Override the base class method to use GtkEntry IM context.
virtual int GTKIMFilterKeypress(GdkEventKey* event) const;
private:
// implement this to return the associated GtkEntry or another widget
// implementing GtkEditable