//
// selection related methods (inherited from wxDataViewWidgetImpl)
//
+wxDataViewItem wxMacDataViewDataBrowserListViewControl::GetCurrentItem() const
+{
+ wxFAIL_MSG( "unimplemented for Carbon" );
+
+ return wxDataViewItem();
+}
+
+void wxMacDataViewDataBrowserListViewControl::SetCurrentItem(const wxDataViewItem& WXUNUSED(item))
+{
+ wxFAIL_MSG( "unimplemented for Carbon" );
+}
+
int wxMacDataViewDataBrowserListViewControl::GetSelections(wxDataViewItemArray& sel) const
{
size_t noOfSelectedItems;
void wxMacDataViewDataBrowserListViewControl::Resort()
{
- (void) Resort();
+ (void) wxMacDataBrowserListViewControl::Resort();
}
//
dataObject->Add(textDataObject);
else
{
- delete textDataObject;
- textDataObject = NULL;
+ wxDELETE(textDataObject);
}
}
} /* block */
dataObject->Add(textDataObject);
else
{
- delete textDataObject;
- textDataObject = NULL;
+ wxDELETE(textDataObject);
}
}
else // overwrite data because the 'utxt' flavor has priority over the 'TEXT' flavor
return wxELLIPSIZE_NONE;
if ( flags & kDataBrowserTruncateTextAtStart )
return wxELLIPSIZE_START;
- if ( flags & kDataBrowserTruncateTextMiddle )
- return wxELLIPSIZE_MIDDLE;
if ( flags & kDataBrowserTruncateTextAtEnd )
return wxELLIPSIZE_END;
- wxFAIL_MSG( "unknown flags" );
-
- return wxELLIPSIZE_NONE;
+ // kDataBrowserTruncateTextMiddle == 0 so there is no need to test for it
+ return wxELLIPSIZE_MIDDLE;
}
void wxDataViewRenderer::SetNativeData(wxDataViewRendererNativeData* newNativeDataPtr)
:wxDataViewColumnBase(renderer, model_column), m_NativeDataPtr(new wxDataViewColumnNativeData()), m_title(title)
{
InitCommon(width, align, flags);
- if ((renderer != NULL) && (renderer->GetAlignment() == wxDVR_DEFAULT_ALIGNMENT))
- renderer->SetAlignment(align);
+ if ((renderer != NULL) && !renderer->IsCustomRenderer() &&
+ (renderer->GetAlignment() == wxDVR_DEFAULT_ALIGNMENT))
+ renderer->SetAlignment(align);
}
wxDataViewColumn::wxDataViewColumn(const wxBitmap& bitmap, wxDataViewRenderer* renderer, unsigned int model_column, int width, wxAlignment align, int flags)
:wxDataViewColumnBase(bitmap, renderer, model_column), m_NativeDataPtr(new wxDataViewColumnNativeData())
{
InitCommon(width, align, flags);
- if ((renderer != NULL) && (renderer->GetAlignment() == wxDVR_DEFAULT_ALIGNMENT))
- renderer->SetAlignment(align);
+ if ((renderer != NULL) && !renderer->IsCustomRenderer() &&
+ (renderer->GetAlignment() == wxDVR_DEFAULT_ALIGNMENT))
+ renderer->SetAlignment(align);
}
wxDataViewColumn::~wxDataViewColumn()
{
wxDataViewCtrl* dataViewCtrlPtr(GetOwner());
+ switch ( width )
+ {
+ case wxCOL_WIDTH_AUTOSIZE:
+ // not implemented, fall through
+ case wxCOL_WIDTH_DEFAULT:
+ width = wxDVC_DEFAULT_WIDTH;
+ break;
+ default:
+ break;
+ }
if ((width >= m_minWidth) && (width <= m_maxWidth))
{
}
}
+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