本文整理汇总了C++中GetDataViewPeer函数的典型用法代码示例。如果您正苦于以下问题:C++ GetDataViewPeer函数的具体用法?C++ GetDataViewPeer怎么用?C++ GetDataViewPeer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetDataViewPeer函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetDataViewPeer
wxRect wxDataViewCtrl::GetItemRect(wxDataViewItem const& item, wxDataViewColumn const* columnPtr) const
{
if (item.IsOk() && (columnPtr != NULL))
return GetDataViewPeer()->GetRectangle(item,columnPtr);
else
return wxRect();
}
示例2: GetModel
void wxDataViewCtrl::SetSelections(wxDataViewItemArray const& sel)
{
size_t const noOfSelections = sel.GetCount();
size_t i;
wxDataViewItem last_parent;
// make sure that all to be selected items are visible in the control:
for (i = 0; i < noOfSelections; i++)
{
wxDataViewItem item = sel[i];
wxDataViewItem parent = GetModel()->GetParent( item );
if (parent.IsOk() && (parent != last_parent))
ExpandAncestors(item);
last_parent = parent;
}
// finally select the items:
wxDataViewWidgetImpl* dataViewWidgetPtr(GetDataViewPeer()); // variable definition for abbreviational purposes
for (i=0; i<noOfSelections; ++i)
dataViewWidgetPtr->Select(sel[i]);
}
示例3: ExpandAncestors
void wxDataViewCtrl::EnsureVisible(wxDataViewItem const& item, wxDataViewColumn const* columnPtr)
{
if (item.IsOk())
{
ExpandAncestors(item); // make sure that the item exists in the control
GetDataViewPeer()->EnsureVisible(item,columnPtr);
}
}
示例4: ClearColumns
bool wxDataViewCtrl::ClearColumns()
{
if (GetDataViewPeer()->ClearColumns())
{
WX_CLEAR_ARRAY(m_ColumnPtrs);
return true;
}
else
return false;
}
示例5: DeleteColumn
bool wxDataViewCtrl::DeleteColumn(wxDataViewColumn* columnPtr)
{
if (GetDataViewPeer()->DeleteColumn(columnPtr))
{
m_ColumnPtrs.Remove(columnPtr);
delete columnPtr;
return true;
}
else
return false;
}
示例6: dataViewWidgetPtr
bool wxDataViewCtrl::AssociateModel(wxDataViewModel* model)
{
wxDataViewWidgetImpl* dataViewWidgetPtr(GetDataViewPeer());
wxCHECK_MSG(dataViewWidgetPtr != NULL,false,"Pointer to native control must not be NULL.");
if (wxDataViewCtrlBase::AssociateModel(model) && dataViewWidgetPtr->AssociateModel(model))
{
if (model != NULL)
model->AddNotifier(new wxOSXDataViewModelNotifier(this));
return true;
}
else
return false;
}
示例7: GetColumnCount
// event handling:
void wxDataViewCtrl::OnSize(wxSizeEvent& event)
{
unsigned int const noOfColumns = GetColumnCount();
// reset DC of all custom renderers because DC has changed:
for (unsigned int i=0; i<noOfColumns; ++i)
{
wxDataViewColumn* dataViewColumnPtr(GetColumn(i));
if (dataViewColumnPtr != NULL)
{
wxDataViewCustomRenderer* dataViewCustomRendererPtr(dynamic_cast<wxDataViewCustomRenderer*>(dataViewColumnPtr->GetRenderer()));
if (dataViewCustomRendererPtr != NULL)
dataViewCustomRendererPtr->SetDC(NULL);
}
}
// update the layout of the native control after a size event:
GetDataViewPeer()->OnSize();
event.Skip();
}
示例8: dataViewWidgetPtr
bool wxDataViewCtrl::AssociateModel(wxDataViewModel* model)
{
wxDataViewWidgetImpl* dataViewWidgetPtr(GetDataViewPeer());
wxCHECK_MSG(dataViewWidgetPtr != NULL,false,"Pointer to native control must not be NULL.");
// We could have been associated with another model previously, break the
// association in this case.
if ( m_ModelNotifier )
m_ModelNotifier->GetOwner()->RemoveNotifier(m_ModelNotifier);
if (wxDataViewCtrlBase::AssociateModel(model) && dataViewWidgetPtr->AssociateModel(model))
{
if (model != NULL)
{
m_ModelNotifier = new wxOSXDataViewModelNotifier(this);
model->AddNotifier(m_ModelNotifier);
}
return true;
}
else
return false;
}
示例9: return
bool wxDataViewCtrl::IsExpanded( const wxDataViewItem & item ) const
{
return (item.IsOk() && GetDataViewPeer()->IsExpanded(item));
}