From f6cb92b81f31654a1f401bbd736c1dd555efc4c2 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 10 Jun 2010 12:43:09 +0000 Subject: [PATCH] Implemented wxDataViewColumn for wxOSX/Cocoa git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/dataview.h | 4 ++-- src/osx/carbon/dataview.cpp | 11 +++++++++++ src/osx/cocoa/dataview.mm | 12 ++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/include/wx/osx/dataview.h b/include/wx/osx/dataview.h index 3aaabd5a76..fcb57dead1 100644 --- a/include/wx/osx/dataview.h +++ b/include/wx/osx/dataview.h @@ -49,14 +49,14 @@ public: virtual int GetMinWidth() const { return m_minWidth; } virtual wxString GetTitle() const { return m_title; } virtual int GetWidth() const; - virtual bool IsHidden() const { return false; } // TODO virtual bool IsSortOrderAscending() const { return m_ascending; } virtual bool IsSortKey() const; + virtual bool IsHidden() const; virtual void SetAlignment (wxAlignment align); virtual void SetBitmap (wxBitmap const& bitmap); virtual void SetFlags (int flags) { SetIndividualFlags(flags); } - virtual void SetHidden (bool WXUNUSED(hidden)) { } // TODO + virtual void SetHidden (bool hidden); virtual void SetMaxWidth (int maxWidth); virtual void SetMinWidth (int minWidth); virtual void SetReorderable(bool reorderable); diff --git a/src/osx/carbon/dataview.cpp b/src/osx/carbon/dataview.cpp index 1bcd605657..d0b36ae7fb 100644 --- a/src/osx/carbon/dataview.cpp +++ b/src/osx/carbon/dataview.cpp @@ -2750,6 +2750,17 @@ void wxDataViewColumn::SetWidth(int width) } } +void wxDataViewColumn::SetHidden(bool WXUNUSED(hidden)) +{ + // How to do that? +} + +bool wxDataViewColumn::IsHidden() const +{ + return true; +} + + void wxDataViewColumn::SetAsSortKey(bool WXUNUSED(sort)) { // see wxGTK native wxDataViewColumn implementation diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index be4074a36e..7de547f6ac 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -2937,6 +2937,18 @@ void wxDataViewColumn::SetReorderable(bool reorderable) { } +void wxDataViewColumn::SetHidden(bool hidden) +{ + // How to set flag here? + + [m_NativeDataPtr->GetNativeColumnPtr() setHidden:hidden]; +} + +bool wxDataViewColumn::IsHidden() const +{ + return [m_NativeDataPtr->GetNativeColumnPtr() isHidden]; +} + void wxDataViewColumn::SetResizeable(bool resizeable) { wxDataViewColumnBase::SetResizeable(resizeable); -- 2.45.2