X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e59cbe40ca6d003598e71c3c54d9a0c06bdff08..b02dd12239c8a59b9a545d9fcb04974f8ad02c6b:/include/wx/osx/cocoa/dataview.h diff --git a/include/wx/osx/cocoa/dataview.h b/include/wx/osx/cocoa/dataview.h index ded2b5f9b7..0859b2dbae 100644 --- a/include/wx/osx/cocoa/dataview.h +++ b/include/wx/osx/cocoa/dataview.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wx/osx/carbon/dataview.h +// Name: wx/osx/cocoa/dataview.h // Purpose: wxDataViewCtrl native implementation header for carbon // Author: // Id: $Id: dataview.h 57374 2009-01-27 @@ -250,7 +250,7 @@ private: // owned by the set. Furthermore, children of the last parent are stored // in a linear list. // -@interface wxCocoaOutlineDataSource : NSObject +@interface wxCocoaOutlineDataSource : NSObject wxOSX_10_6_AND_LATER() { // descriptors specifying the sorting (currently the array only holds one // object only) @@ -281,7 +281,7 @@ private: ofItem:(id)item; -(id) - outlineView:(NSOutlineView*)outlineView + outlineView:(NSOutlineView*)outlineView objectValueForTableColumn:(NSTableColumn*)tableColumn byItem:(id)item; @@ -398,7 +398,7 @@ private: // wxCocoaOutlineView // ============================================================================ -@interface wxCocoaOutlineView : NSOutlineView +@interface wxCocoaOutlineView : NSOutlineView wxOSX_10_6_AND_LATER() { @private // column and row of the cell being edited or -1 if none @@ -441,6 +441,7 @@ public: virtual wxDataViewColumn* GetColumn(unsigned int pos) const; virtual int GetColumnPosition(wxDataViewColumn const* columnPtr) const; virtual bool InsertColumn(unsigned int pos, wxDataViewColumn* columnPtr); + virtual void FitColumnWidthToContent(unsigned int pos); // item related methods (inherited from wxDataViewWidgetImpl) virtual bool Add(const wxDataViewItem& parent, const wxDataViewItem& item); @@ -471,6 +472,10 @@ public: // // selection related methods (inherited from wxDataViewWidgetImpl) // + virtual wxDataViewItem GetCurrentItem() const; + virtual void SetCurrentItem(const wxDataViewItem& item); + virtual wxDataViewColumn *GetCurrentColumn() const; + virtual int GetSelectedItemsCount() const; virtual int GetSelections(wxDataViewItemArray& sel) const; virtual bool IsSelected(const wxDataViewItem& item) const; virtual void Select(const wxDataViewItem& item); @@ -493,12 +498,19 @@ public: wxDataViewColumn*& columnPtr) const; virtual void SetRowHeight(const wxDataViewItem& item, unsigned int height); virtual void OnSize(); + + virtual void StartEditor( const wxDataViewItem & item, unsigned int column ); // drag & drop helper methods wxDataFormat GetDnDDataFormat(wxDataObjectComposite* dataObjects); wxDataObjectComposite* GetDnDDataObjects(NSData* dataObject) const; + // Cocoa-specific helpers + id GetItemAtRow(int row) const; + private: + void InitOutlineView(long style); + wxCocoaOutlineDataSource* m_DataSource; wxCocoaOutlineView* m_OutlineView;