X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/35d85392ff011bc8d24b036ede54e69ab557ed32..b3cec67186d678d2c3985923bdb8c787455cf369:/src/osx/dataview_osx.cpp diff --git a/src/osx/dataview_osx.cpp b/src/osx/dataview_osx.cpp index 69e1b27925..f2140e4e36 100644 --- a/src/osx/dataview_osx.cpp +++ b/src/osx/dataview_osx.cpp @@ -12,7 +12,6 @@ #if (wxUSE_DATAVIEWCTRL != 0) && (!defined(wxUSE_GENERICDATAVIEWCTRL) || (wxUSE_GENERICDATAVIEWCTRL == 0)) -#include #include #ifndef WX_PRECOMP @@ -38,7 +37,7 @@ wxString ConcatenateDataViewItemValues(wxDataViewCtrl const* dataViewCtrlPtr, wx { // variable definition: wxVariant dataValue; - + dataViewCtrlPtr->GetModel()->GetValue(dataValue,dataViewItem,dataViewCtrlPtr->GetColumn(i)->GetModelColumn()); if (i > 0) dataString << wxT('\t'); @@ -239,7 +238,7 @@ void wxOSXDataViewModelNotifier::AdjustRowHeight(wxDataViewItem const& item) for (col = 0; col < num; col++) { wxDataViewColumn* column(this->m_DataViewCtrlPtr->GetColumnPtr(col)); - + if (!(column->IsHidden())) { wxDataViewCustomRenderer *renderer = dynamic_cast(column->GetRenderer()); @@ -274,7 +273,7 @@ void wxOSXDataViewModelNotifier::AdjustRowHeights(wxDataViewItemArray const& ite for (col = 0; col < num; col++) { wxDataViewColumn* column(this->m_DataViewCtrlPtr->GetColumnPtr(col)); - + if (!(column->IsHidden())) { wxDataViewCustomRenderer *renderer = dynamic_cast(column->GetRenderer()); @@ -627,7 +626,8 @@ void wxDataViewCtrl::FinishCustomItemEditing(void) } /*static*/ -wxVisualAttributes wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant variant) +wxVisualAttributes +wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) { wxVisualAttributes attr; @@ -680,14 +680,14 @@ wxSize wxDataViewCtrl::DoGetBestSize() const { wxSize best = wxControl::DoGetBestSize(); best.y = 80; - + return best; } void wxDataViewCtrl::OnMouse(wxMouseEvent& event) { event.Skip(); - + if (GetModel() == NULL) return; @@ -704,8 +704,8 @@ void wxDataViewCtrl::OnMouse(wxMouseEvent& event) UInt16 headerHeight = 0; MacDataViewListCtrlPtr->GetHeaderButtonHeight(&headerHeight); - - + + if (event.GetY() < headerHeight) { unsigned int col_count = GetColumnCount(); @@ -715,12 +715,12 @@ void wxDataViewCtrl::OnMouse(wxMouseEvent& event) wxDataViewColumn *column = GetColumn( col ); if (column->IsHidden()) continue; - + Rect itemrect; - ::GetDataBrowserItemPartBounds( MacDataViewListCtrlPtr->GetControlRef(), + ::GetDataBrowserItemPartBounds( MacDataViewListCtrlPtr->GetControlRef(), reinterpret_cast(firstChild.GetID()), column->GetPropertyID(), kDataBrowserPropertyEnclosingPart, &itemrect ); - + if (abs( event.GetX() - itemrect.right) < 3) { if (column->GetFlags() & wxDATAVIEW_COL_RESIZABLE) @@ -730,9 +730,9 @@ void wxDataViewCtrl::OnMouse(wxMouseEvent& event) return; } } - + } - + SetCursor( *wxSTANDARD_CURSOR ); #endif }