]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/dataview.mm
no trailing slash for OSX_CARBON
[wxWidgets.git] / src / osx / cocoa / dataview.mm
index bff2560e350192ce2876e7767d65c3e90e0b93a1..7de547f6acb098f64b6f7f6265ab64059287aef7 100644 (file)
@@ -21,8 +21,8 @@
     #include "wx/utils.h"
 #endif
 
-#include "wx/osx/cocoa/dataview.h"
 #include "wx/osx/private.h"
+#include "wx/osx/cocoa/dataview.h"
 #include "wx/renderer.h"
 
 // ============================================================================
@@ -603,6 +603,7 @@ outlineView:(NSOutlineView*)outlineView
         ::CFRelease(osxData);
         delete dataObjects;
     }
+    return dragSuccessful;
 }
 
 -(id) outlineView:(NSOutlineView*)outlineView
@@ -705,7 +706,7 @@ outlineView:(NSOutlineView*)outlineView
             sortingColumnPtr:dvc->GetColumn([[newDescriptor key] intValue])
             ascending:[newDescriptor ascending]] autorelease]];
     }
-    [[outlineView dataSource] setSortDescriptors:wxSortDescriptors];
+    [(wxCocoaOutlineDataSource*)[outlineView dataSource] setSortDescriptors:wxSortDescriptors];
 
     // send first the event to wxWidgets that the sorting has changed so that
     // the program can do special actions before the sorting actually starts:
@@ -1751,7 +1752,8 @@ outlineView:(NSOutlineView*)outlineView
     wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED,dvc->GetId());
 
     event.SetEventObject(dvc);
-    event.SetModel      (dvc->GetModel());
+    event.SetModel(dvc->GetModel());
+    event.SetItem(dvc->GetSelection());
     dvc->GetEventHandler()->ProcessEvent(event);
 }
 
@@ -2935,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);