X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ed7af081efd3c370a9edb380cfd42e26c352106..46cb4b3f8aa0e004c7b7fd5afc49e04a10d0231f:/include/wx/generic/dataview.h diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h index 51390f679b..9673737c95 100644 --- a/include/wx/generic/dataview.h +++ b/include/wx/generic/dataview.h @@ -14,12 +14,15 @@ #include "wx/object.h" #include "wx/list.h" #include "wx/control.h" +#include "wx/scrolwin.h" // --------------------------------------------------------- // classes // --------------------------------------------------------- class WXDLLIMPEXP_CORE wxDataViewCtrl; +class WXDLLIMPEXP_CORE wxDataViewMainWindow; +class WXDLLIMPEXP_CORE wxDataViewHeaderWindow; // --------------------------------------------------------- // wxDataViewCell @@ -76,7 +79,7 @@ class wxDataViewCustomCell: public wxDataViewCell { public: wxDataViewCustomCell( const wxString &varianttype = wxT("string"), - wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT ) + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT ); ~wxDataViewCustomCell(); bool Init(); @@ -168,7 +171,11 @@ public: virtual void SetTitle( const wxString &title ); + void SetWidth( int width ) { m_width = width; } + int GetWidth() { return m_width; } + private: + int m_width; protected: DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumn) @@ -178,7 +185,7 @@ protected: // wxDataViewCtrl // --------------------------------------------------------- -class WXDLLIMPEXP_CORE wxDataViewCtrl: public wxDataViewCtrlBase, +class WXDLLIMPEXP_CORE wxDataViewCtrl: public wxDataViewCtrlBase, public wxScrollHelperNative { public: @@ -190,8 +197,8 @@ public: wxDataViewCtrl( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator ) : - wxScrollHelperNative(this) + const wxValidator& validator = wxDefaultValidator ) + : wxScrollHelperNative(this) { Create(parent, id, pos, size, style, validator ); } @@ -209,13 +216,14 @@ public: virtual bool AppendColumn( wxDataViewColumn *col ); private: + friend class wxDataViewMainWindow; wxDataViewListModelNotifier *m_notifier; - wxWindow *m_clientArea; - wxWindow *m_headerArea; + wxDataViewMainWindow *m_clientArea; + wxDataViewHeaderWindow *m_headerArea; private: - virtual void ScrollWindow( int dx, int dy, const wxRect *rect ); - + void OnSize( wxSizeEvent &event ); + // we need to return a special WM_GETDLGCODE value to process just the // arrows but let the other navigation characters through #ifdef __WXMSW__ @@ -223,10 +231,11 @@ private: #endif // __WXMSW__ WX_FORWARD_TO_SCROLL_HELPER() - + private: DECLARE_DYNAMIC_CLASS(wxDataViewCtrl) DECLARE_NO_COPY_CLASS(wxDataViewCtrl) + DECLARE_EVENT_TABLE() };