當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetDataViewPeer函數代碼示例

本文整理匯總了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();
}
開發者ID:Annovae,項目名稱:Dolphin-Core,代碼行數:7,代碼來源:dataview_osx.cpp

示例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]);
}
開發者ID:Annovae,項目名稱:Dolphin-Core,代碼行數:26,代碼來源:dataview_osx.cpp

示例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);
  }
}
開發者ID:Annovae,項目名稱:Dolphin-Core,代碼行數:8,代碼來源:dataview_osx.cpp

示例4: ClearColumns

bool wxDataViewCtrl::ClearColumns()
{
  if (GetDataViewPeer()->ClearColumns())
  {
    WX_CLEAR_ARRAY(m_ColumnPtrs);
    return true;
  }
  else
    return false;
}
開發者ID:Annovae,項目名稱:Dolphin-Core,代碼行數:10,代碼來源:dataview_osx.cpp

示例5: DeleteColumn

bool wxDataViewCtrl::DeleteColumn(wxDataViewColumn* columnPtr)
{
  if (GetDataViewPeer()->DeleteColumn(columnPtr))
  {
    m_ColumnPtrs.Remove(columnPtr);
    delete columnPtr;
    return true;
  }
  else
    return false;
}
開發者ID:Annovae,項目名稱:Dolphin-Core,代碼行數:11,代碼來源:dataview_osx.cpp

示例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;
}
開發者ID:Annovae,項目名稱:Dolphin-Core,代碼行數:15,代碼來源:dataview_osx.cpp

示例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();
}
開發者ID:Annovae,項目名稱:Dolphin-Core,代碼行數:25,代碼來源:dataview_osx.cpp

示例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;
}
開發者ID:CustomCardsOnline,項目名稱:wxWidgets,代碼行數:24,代碼來源:dataview_osx.cpp

示例9: return

bool wxDataViewCtrl::IsExpanded( const wxDataViewItem & item ) const
{
  return (item.IsOk() && GetDataViewPeer()->IsExpanded(item));
}
開發者ID:Annovae,項目名稱:Dolphin-Core,代碼行數:4,代碼來源:dataview_osx.cpp


注:本文中的GetDataViewPeer函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。