Merge branch 'dvc-more-fixes'
More, mostly event-related, wxDataViewCtrl fixes. See https://github.com/wxWidgets/wxWidgets/pull/718
This commit is contained in:
@@ -47,9 +47,10 @@ public:
|
||||
|
||||
// called when the cell value was edited by user with the new value
|
||||
//
|
||||
// it validates the new value and notifies the model about the change by
|
||||
// calling GtkOnCellChanged() if it was accepted
|
||||
virtual void GtkOnTextEdited(const char *itempath, const wxString& value);
|
||||
// it uses GtkGetValueFromString() to parse the new value, then validates
|
||||
// it by calling Validate() and notifies the model about the change if it
|
||||
// passes validation
|
||||
void GtkOnTextEdited(const char *itempath, const wxString& value);
|
||||
|
||||
GtkCellRenderer* GetGtkHandle() { return m_renderer; }
|
||||
void GtkInitHandlers();
|
||||
@@ -78,14 +79,16 @@ protected:
|
||||
|
||||
virtual bool IsHighlighted() const wxOVERRIDE;
|
||||
|
||||
virtual void GtkOnCellChanged(const wxVariant& value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
|
||||
// Apply our effective alignment (i.e. m_alignment if specified or the
|
||||
// associated column alignment by default) to the given renderer.
|
||||
void GtkApplyAlignment(GtkCellRenderer *renderer);
|
||||
|
||||
// This method is used to interpret the string entered by user and by
|
||||
// default just uses it as is, but can be overridden for classes requiring
|
||||
// special treatment.
|
||||
virtual wxVariant GtkGetValueFromString(const wxString& str) const;
|
||||
|
||||
|
||||
GtkCellRenderer *m_renderer;
|
||||
int m_alignment;
|
||||
|
||||
|
@@ -228,9 +228,7 @@ public:
|
||||
virtual void GtkPackIntoColumn(GtkTreeViewColumn *column) wxOVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual void GtkOnCellChanged(const wxVariant& value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col) wxOVERRIDE;
|
||||
virtual wxVariant GtkGetValueFromString(const wxString& str) const wxOVERRIDE;
|
||||
|
||||
private:
|
||||
wxDataViewIconText m_value;
|
||||
@@ -281,7 +279,7 @@ public:
|
||||
virtual bool GetValue( wxVariant &value ) const wxOVERRIDE;
|
||||
|
||||
private:
|
||||
virtual void GtkOnTextEdited(const char *itempath, const wxString& str) wxOVERRIDE;
|
||||
virtual wxVariant GtkGetValueFromString(const wxString& str) const;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user