- //
- // constructors / destructor
- //
- wxCocoaDataViewControl(wxWindow* peer, wxPoint const& pos, wxSize const& size, long style);
- ~wxCocoaDataViewControl();
-
- //
- // column related methods (inherited from wxDataViewWidgetImpl)
- //
- virtual bool ClearColumns ();
- virtual bool DeleteColumn (wxDataViewColumn* columnPtr);
- virtual void DoSetExpanderColumn(wxDataViewColumn const* columnPtr);
- virtual wxDataViewColumn* GetColumn (unsigned int pos) const;
- virtual int GetColumnPosition (wxDataViewColumn const* columnPtr) const;
- virtual bool InsertColumn (unsigned int pos, wxDataViewColumn* columnPtr);
-
- //
- // item related methods (inherited from wxDataViewWidgetImpl)
- //
- virtual bool Add (wxDataViewItem const& parent, wxDataViewItem const& item);
- virtual bool Add (wxDataViewItem const& parent, wxDataViewItemArray const& items);
- virtual void Collapse (wxDataViewItem const& item);
- virtual void EnsureVisible(wxDataViewItem const& item, wxDataViewColumn const* columnPtr);
- virtual void Expand (wxDataViewItem const& item);
- virtual unsigned int GetCount () const;
- virtual wxRect GetRectangle (wxDataViewItem const& item, wxDataViewColumn const* columnPtr);
- virtual bool IsExpanded (wxDataViewItem const& item) const;
- virtual bool Reload ();
- virtual bool Remove (wxDataViewItem const& parent, wxDataViewItem const& item);
- virtual bool Remove (wxDataViewItem const& parent, wxDataViewItemArray const& item);
- virtual bool Update (wxDataViewColumn const* columnPtr);
- virtual bool Update (wxDataViewItem const& parent, wxDataViewItem const& item);
- virtual bool Update (wxDataViewItem const& parent, wxDataViewItemArray const& items);
-
- //
- // model related methods
- //
- virtual bool AssociateModel(wxDataViewModel* model); // informs the native control that a model is present
-
- //
- // selection related methods (inherited from wxDataViewWidgetImpl)
- //
- virtual int GetSelections(wxDataViewItemArray& sel) const;
- virtual bool IsSelected (wxDataViewItem const& item) const;
- virtual void Select (wxDataViewItem const& item);
- virtual void SelectAll ();
- virtual void Unselect (wxDataViewItem const& item);
- virtual void UnselectAll ();
-
- //
- // sorting related methods
- //
- virtual wxDataViewColumn* GetSortingColumn () const;
- virtual void Resort ();
-
- //
- // other methods (inherited from wxDataViewWidgetImpl)
- //
- virtual void DoSetIndent (int indent);
- virtual void HitTest (wxPoint const& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const;
- virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height);
- virtual void OnSize ();
-
- //
- // other methods
- //
- wxDataViewCtrl* GetDataViewCtrl() const
- {
- return dynamic_cast<wxDataViewCtrl*>(GetWXPeer());
- }
+ // constructors / destructor
+ wxCocoaDataViewControl(wxWindow* peer,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style);
+ virtual ~wxCocoaDataViewControl();
+
+ wxDataViewCtrl* GetDataViewCtrl() const
+ {
+ return static_cast<wxDataViewCtrl*>(GetWXPeer());
+ }
+
+ // column related methods (inherited from wxDataViewWidgetImpl)
+ virtual bool ClearColumns();
+ virtual bool DeleteColumn(wxDataViewColumn* columnPtr);
+ virtual void DoSetExpanderColumn(wxDataViewColumn const* columnPtr);
+ virtual wxDataViewColumn* GetColumn(unsigned int pos) const;
+ virtual int GetColumnPosition(wxDataViewColumn const* columnPtr) const;
+ virtual bool InsertColumn(unsigned int pos, wxDataViewColumn* columnPtr);
+
+ // item related methods (inherited from wxDataViewWidgetImpl)
+ virtual bool Add(const wxDataViewItem& parent, const wxDataViewItem& item);
+ virtual bool Add(const wxDataViewItem& parent,
+ const wxDataViewItemArray& items);
+ virtual void Collapse(const wxDataViewItem& item);
+ virtual void EnsureVisible(const wxDataViewItem& item,
+ wxDataViewColumn const* columnPtr);
+ virtual void Expand(const wxDataViewItem& item);
+ virtual unsigned int GetCount() const;
+ virtual wxRect GetRectangle(const wxDataViewItem& item,
+ wxDataViewColumn const* columnPtr);
+ virtual bool IsExpanded(const wxDataViewItem& item) const;
+ virtual bool Reload();
+ virtual bool Remove(const wxDataViewItem& parent,
+ const wxDataViewItem& item);
+ virtual bool Remove(const wxDataViewItem& parent,
+ const wxDataViewItemArray& item);
+ virtual bool Update(const wxDataViewColumn* columnPtr);
+ virtual bool Update(const wxDataViewItem& parent,
+ const wxDataViewItem& item);
+ virtual bool Update(const wxDataViewItem& parent,
+ const wxDataViewItemArray& items);
+
+ // model related methods
+ virtual bool AssociateModel(wxDataViewModel* model);
+
+ //
+ // selection related methods (inherited from wxDataViewWidgetImpl)
+ //
+ virtual int GetSelections(wxDataViewItemArray& sel) const;
+ virtual bool IsSelected(const wxDataViewItem& item) const;
+ virtual void Select(const wxDataViewItem& item);
+ virtual void SelectAll();
+ virtual void Unselect(const wxDataViewItem& item);
+ virtual void UnselectAll();
+
+ //
+ // sorting related methods
+ //
+ virtual wxDataViewColumn* GetSortingColumn () const;
+ virtual void Resort();
+
+ //
+ // other methods (inherited from wxDataViewWidgetImpl)
+ //
+ virtual void DoSetIndent(int indent);
+ virtual void HitTest(const wxPoint& point,
+ wxDataViewItem& item,
+ wxDataViewColumn*& columnPtr) const;
+ virtual void SetRowHeight(const wxDataViewItem& item, unsigned int height);
+ virtual void OnSize();
+
+ // drag & drop helper methods
+ wxDataFormat GetDnDDataFormat(wxDataObjectComposite* dataObjects);
+ wxDataObjectComposite* GetDnDDataObjects(NSData* dataObject) const;
+
+ // Cocoa-specific helpers
+ id GetItemAtRow(int row) const;