X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/806a83167b59b9bcb3655bb10615a5985c161f24..c564ca3c975aba89f8b911ace0f240c0aaf4cf73:/include/wx/osx/carbon/dataview.h?ds=sidebyside diff --git a/include/wx/osx/carbon/dataview.h b/include/wx/osx/carbon/dataview.h index d55d0b62ef..e4dfeb2940 100644 --- a/include/wx/osx/carbon/dataview.h +++ b/include/wx/osx/carbon/dataview.h @@ -26,7 +26,7 @@ public: // // constructors / destructor // - wxDataViewColumnNativeData(void) + wxDataViewColumnNativeData() { } wxDataViewColumnNativeData(DataBrowserPropertyID initPropertyID) @@ -37,14 +37,14 @@ public: // // data access methods // - DataBrowserPropertyID GetPropertyID(void) const + DataBrowserPropertyID GetPropertyID() const { - return this->m_PropertyID; + return m_PropertyID; } - + void SetPropertyID(DataBrowserPropertyID newPropertyID) { - this->m_PropertyID = newPropertyID; + m_PropertyID = newPropertyID; } protected: @@ -64,7 +64,7 @@ public: // // constructors / destructor // - wxDataViewRendererNativeData(void) + wxDataViewRendererNativeData() { } wxDataViewRendererNativeData(DataBrowserPropertyType initPropertyType, DataBrowserItemDataRef initItemDataRef=NULL) @@ -75,22 +75,22 @@ public: // // data access methods // - DataBrowserItemDataRef GetItemDataRef(void) const + DataBrowserItemDataRef GetItemDataRef() const { - return this->m_ItemDataRef; + return m_ItemDataRef; } - DataBrowserPropertyType GetPropertyType(void) const + DataBrowserPropertyType GetPropertyType() const { - return this->m_PropertyType; + return m_PropertyType; } void SetItemDataRef(DataBrowserItemDataRef newItemDataRef) { - this->m_ItemDataRef = newItemDataRef; + m_ItemDataRef = newItemDataRef; } void SetPropertyType(DataBrowserPropertyType newPropertyType) { - this->m_PropertyType = newPropertyType; + m_PropertyType = newPropertyType; } protected: @@ -126,9 +126,10 @@ public: // constructors / destructor // wxMacDataBrowserTableViewControl(wxWindow* peer, const wxPoint& pos, const wxSize& size, long style); - wxMacDataBrowserTableViewControl(void) + wxMacDataBrowserTableViewControl() { } + ~wxMacDataBrowserTableViewControl(); // // callback handling @@ -188,7 +189,7 @@ public: OSStatus GetPropertyFlags (DataBrowserPropertyID propertyID, DataBrowserPropertyFlags *flags ) const; OSStatus GetPropertyID (DataBrowserItemDataRef itemData, DataBrowserPropertyID* propertyID) const; // returns for the passed item data reference the corresponding property ID OSStatus GetPropertyID (DataBrowserTableViewColumnIndex index, DataBrowserPropertyID* propertyID) const; // returns for the passed column index the corresponding property ID - + OSStatus IsUsedPropertyID(DataBrowserPropertyID propertyID) const; // checks if passed property id is used by the control; no error is returned if the id exists OSStatus RemoveColumnByProperty(DataBrowserTableViewColumnID propertyID); @@ -203,14 +204,14 @@ public: // OSStatus AddItem(DataBrowserItemID container, DataBrowserItemID const* itemID) // adds a single item { - return this->AddItems(container,1,itemID,kDataBrowserItemNoProperty); + return AddItems(container,1,itemID,kDataBrowserItemNoProperty); } OSStatus AddItems(DataBrowserItemID container, UInt32 numItems, DataBrowserItemID const* items, DataBrowserPropertyID preSortProperty); // adds items to the data browser OSStatus GetFreeItemID(DataBrowserItemID* id) const; // this method returns an item id that is valid and currently not used; if it cannot be found 'errDataBrowserItemNotAdded' is returned OSStatus GetItemCount (ItemCount* numItems) const { - return this->GetItemCount(kDataBrowserNoItem,true,kDataBrowserItemAnyState,numItems); + return GetItemCount(kDataBrowserNoItem,true,kDataBrowserItemAnyState,numItems); } OSStatus GetItemCount (DataBrowserItemID container, Boolean recurse, DataBrowserItemState state, ItemCount* numItems) const; OSStatus GetItemID (DataBrowserTableViewRowIndex row, DataBrowserItemID* item) const; @@ -224,21 +225,21 @@ public: OSStatus RemoveItem(DataBrowserItemID container, DataBrowserItemID const* itemID) // removes a single item { - return this->RemoveItems(container,1,itemID,kDataBrowserItemNoProperty); + return RemoveItems(container,1,itemID,kDataBrowserItemNoProperty); } OSStatus RemoveItems(void) // removes all items { - return this->RemoveItems(kDataBrowserNoItem,0,NULL,kDataBrowserItemNoProperty); + return RemoveItems(kDataBrowserNoItem,0,NULL,kDataBrowserItemNoProperty); } OSStatus RemoveItems(DataBrowserItemID container, UInt32 numItems, DataBrowserItemID const* items, DataBrowserPropertyID preSortProperty); OSStatus UpdateItem(DataBrowserItemID container, DataBrowserItemID const* item) // updates all columns of the passed item { - return this->UpdateItems(container,1,item,kDataBrowserItemNoProperty,kDataBrowserItemNoProperty); + return UpdateItems(container,1,item,kDataBrowserItemNoProperty,kDataBrowserItemNoProperty); } OSStatus UpdateItems(void) // updates all items { - return this->UpdateItems(kDataBrowserNoItem,0,NULL,kDataBrowserItemNoProperty,kDataBrowserItemNoProperty); + return UpdateItems(kDataBrowserNoItem,0,NULL,kDataBrowserItemNoProperty,kDataBrowserItemNoProperty); } OSStatus UpdateItems(DataBrowserItemID container, UInt32 numItems, DataBrowserItemID const* items, DataBrowserPropertyID preSortProperty, DataBrowserPropertyID propertyID) const; @@ -269,7 +270,7 @@ public: // container handling // OSStatus CloseContainer(DataBrowserItemID containerID); - + OSStatus OpenContainer(DataBrowserItemID containerID); protected : @@ -310,6 +311,11 @@ protected : virtual Boolean DataBrowserAddDragItemProc(DragReference dragRef, DataBrowserItemID itemID, ItemReference* itemRef) = 0; virtual Boolean DataBrowserReceiveDragProc(DragReference dragRef, DataBrowserItemID itemID) = 0; +// +// event handler for hit testing +/// + void* m_macDataViewCtrlEventHandler; + private: // // wxWidget internal stuff @@ -364,12 +370,13 @@ public: // // column related methods (inherited from wxDataViewWidgetImpl) // - virtual bool ClearColumns (void); + 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); + virtual void FitColumnWidthToContent(unsigned int WXUNUSED(pos)) { /*not implemented*/ } // // item related methods (inherited from wxDataViewWidgetImpl) @@ -379,10 +386,10 @@ public: 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 (void) const; + virtual unsigned int GetCount () const; virtual wxRect GetRectangle (wxDataViewItem const& item, wxDataViewColumn const* columnPtr); virtual bool IsExpanded (wxDataViewItem const& item) const; - virtual bool Reload (void); + 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); @@ -397,18 +404,22 @@ 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 (wxDataViewItem const& item) const; virtual void Select (wxDataViewItem const& item); - virtual void SelectAll (void); + virtual void SelectAll (); virtual void Unselect (wxDataViewItem const& item); - virtual void UnselectAll (void); + virtual void UnselectAll (); // // sorting related methods // - virtual wxDataViewColumn* GetSortingColumn (void) const; - virtual void Resort (void); + virtual wxDataViewColumn* GetSortingColumn () const; + virtual void Resort (); // // other methods (inherited from wxDataViewWidgetImpl) @@ -416,14 +427,16 @@ public: 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 (void); + virtual void OnSize (); + + virtual void StartEditor( const wxDataViewItem & item, unsigned int column ); // // other methods // - wxDataViewCtrl* GetDataViewCtrl(void) const + wxDataViewCtrl* GetDataViewCtrl() const { - return dynamic_cast(this->GetWXPeer()); + return dynamic_cast(GetWXPeer()); } protected: