void SettersGettersModel::GetValue(wxVariant& variant, const wxDataViewItem& item, unsigned int col) const { SettersGettersModel_Item* node = reinterpret_cast<SettersGettersModel_Item*>(item.m_pItem); if ( node && node->GetData().size() > col ) { variant = node->GetData().at(col); } }
bool SettersGettersModel::SetValue(const wxVariant& variant, const wxDataViewItem& item, unsigned int col) { SettersGettersModel_Item* node = reinterpret_cast<SettersGettersModel_Item*>(item.m_pItem); if ( node && node->GetData().size() > col ) { node->GetData().at(col) = variant; } return true; }
wxVector<wxVariant> SettersGettersModel::GetItemColumnsData(const wxDataViewItem& item) const { if ( !item.IsOk() ) return wxVector<wxVariant>(); SettersGettersModel_Item* node = reinterpret_cast<SettersGettersModel_Item*>(item.GetID()); if ( !node ) { return wxVector<wxVariant>(); } return node->GetData(); }