// variable definition and initialization:
wxVariant modifiedData(true);
- if (dataViewCtrlPtr->GetModel()->SetValue(modifiedData, dvItem, col) &&
- dataViewCtrlPtr->GetModel()->ValueChanged(dvItem, col))
+ if (dataViewCtrlPtr->GetModel()->ChangeValue(modifiedData, dvItem, col))
return noErr;
else
return errDataBrowserInvalidPropertyData;
// variable definition and initialization:
wxVariant modifiedData(false);
- if (dataViewCtrlPtr->GetModel()->SetValue(modifiedData, dvItem, col) &&
- dataViewCtrlPtr->GetModel()->ValueChanged(dvItem, col))
+ if (dataViewCtrlPtr->GetModel()->ChangeValue(modifiedData, dvItem, col))
return noErr;
else
return errDataBrowserInvalidPropertyData;
#endif
wxVariant modifiedData(modifiedString.AsString());
- if (dataViewCtrlPtr->GetModel()->SetValue(modifiedData, dvItem, col) &&
- dataViewCtrlPtr->GetModel()->ValueChanged(dvItem, col))
+ if (dataViewCtrlPtr->GetModel()->ChangeValue(modifiedData, dvItem, col))
return noErr;
else
return errDataBrowserInvalidPropertyData;
{
// make sure that 'Render' can draw only in the allowed area:
dc->SetClippingRegion(content.left,content.top,content.right-content.left+1,content.bottom-content.top+1);
- (void) (dataViewCustomRendererPtr->Render( cellrect, dc,
+ (void) (dataViewCustomRendererPtr->WXCallRender( cellrect, dc,
((state == kDataBrowserItemIsSelected) ? wxDATAVIEW_CELL_SELECTED : 0)));
dc->DestroyClippingRegion(); // probably not necessary
}
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)
// wxDataViewCustomRenderer
// ---------------------------------------------------------
wxDataViewCustomRenderer::wxDataViewCustomRenderer(wxString const& varianttype, wxDataViewCellMode mode, int align)
- :wxDataViewRenderer(varianttype,mode,align), m_editorCtrlPtr(NULL), m_DCPtr(NULL)
+ :wxDataViewCustomRendererBase(varianttype,mode,align),
+ m_editorCtrlPtr(NULL),
+ m_DCPtr(NULL)
{
SetNativeData(new wxDataViewRendererNativeData(kDataBrowserCustomType));
}
delete m_NativeDataPtr;
}
+int wxDataViewColumn::GetWidth() const
+{
+ // FIXME: This returns the last programatically set width and will not work if
+ // the user changes the column's width by dragging it with the mouse.
+ return m_width;
+}
+
bool wxDataViewColumn::IsSortKey() const
{
wxDataViewCtrl * const dataViewCtrlPtr(GetOwner());