X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e59cbe40ca6d003598e71c3c54d9a0c06bdff08..43ff861df48f0837dac98005dd397c5f127ca136:/include/wx/osx/cocoa/dataview.h?ds=sidebyside diff --git a/include/wx/osx/cocoa/dataview.h b/include/wx/osx/cocoa/dataview.h index ded2b5f9b7..335bce5ad7 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,8 @@ public: // // selection related methods (inherited from wxDataViewWidgetImpl) // + virtual wxDataViewItem GetCurrentItem() const; + virtual void SetCurrentItem(const wxDataViewItem& item); virtual int GetSelections(wxDataViewItemArray& sel) const; virtual bool IsSelected(const wxDataViewItem& item) const; virtual void Select(const wxDataViewItem& item); @@ -498,7 +501,12 @@ public: 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;