X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6eec70b984525aac09528c32411f19113620e284..8d2c70414cc0c6b93147d0c0cc963f217fcb2023:/include/wx/dataview.h diff --git a/include/wx/dataview.h b/include/wx/dataview.h index fd2ec0b4d7..369d18acc9 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -166,6 +166,8 @@ public: bool GetBold() const { return m_bold; } bool GetItalic() const { return m_italic; } + bool IsDefault() const { return !(HasColour() || HasFont()); } + private: wxColour m_colour; bool m_bold; @@ -416,34 +418,6 @@ private: }; #endif -//----------------------------------------------------------------------------- -// wxDataViewEditorCtrlEvtHandler -//----------------------------------------------------------------------------- - -class wxDataViewEditorCtrlEvtHandler: public wxEvtHandler -{ -public: - wxDataViewEditorCtrlEvtHandler( wxControl *editor, wxDataViewRenderer *owner ); - - void AcceptChangesAndFinish(); - void SetFocusOnIdle( bool focus = true ) { m_focusOnIdle = focus; } - -protected: - void OnChar( wxKeyEvent &event ); - void OnTextEnter( wxCommandEvent &event ); - void OnKillFocus( wxFocusEvent &event ); - void OnIdle( wxIdleEvent &event ); - -private: - wxDataViewRenderer *m_owner; - wxControl *m_editorCtrl; - bool m_finished; - bool m_focusOnIdle; - -private: - DECLARE_EVENT_TABLE() -}; - // ---------------------------------------------------------------------------- // wxDataViewRenderer and related classes // ---------------------------------------------------------------------------- @@ -1136,7 +1110,7 @@ public: wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const; int GetChildCount( const wxDataViewItem& parent ) const; - + void SetItemText( const wxDataViewItem& item, const wxString &text ); wxString GetItemText( const wxDataViewItem& item ) const; void SetItemIcon( const wxDataViewItem& item, const wxIcon &icon ); @@ -1210,6 +1184,9 @@ public: const wxDataViewTreeStore *GetStore() const { return (const wxDataViewTreeStore*) GetModel(); } + bool IsContainer( const wxDataViewItem& item ) const + { return GetStore()->IsContainer(item); } + void SetImageList( wxImageList *imagelist ); wxImageList* GetImageList() { return m_imageList; }