Allow using arbitrary windows as wxDataViewCtrl editors in wxGTK

Previously the editor created by wxDataViewRenderer::CreateEditorCtrl() had to
be a native GTK+ widget implementing GtkCellEditable interface which prevented
using composite windows (e.g. a container for a text control and a button) as
editors.

Create a helper container wrapping them now and implementing GtkCellEditable
now to allow this.
This commit is contained in:
Vadim Zeitlin
2016-02-28 18:03:35 +01:00
parent 890ccf8e30
commit c2821dcea0
4 changed files with 189 additions and 4 deletions

View File

@@ -60,6 +60,10 @@ public:
// text
virtual GtkCellRendererText *GtkGetTextRenderer() const { return NULL; }
// return the widget actually used by the renderer for editing, this may be
// different from the editor control widget for the custom renderers
virtual GtkWidget* GtkGetEditorWidget() const;
private:
// Change the mode at GTK level without touching m_mode, this is useful for
// temporarily making the renderer insensitive but does mean that GetMode()