本文整理汇总了C++中wxDataViewEvent类的典型用法代码示例。如果您正苦于以下问题:C++ wxDataViewEvent类的具体用法?C++ wxDataViewEvent怎么用?C++ wxDataViewEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wxDataViewEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: OnColumnItemToggled
void DIALOG_BOM_EDITOR::OnColumnItemToggled( wxDataViewEvent& event )
{
wxDataViewItem item = event.GetItem();
int row = m_columnListCtrl->ItemToRow( item );
int col = event.GetColumn();
if( row == wxNOT_FOUND || row < 0 || row >= (int) m_bom->ColumnCount() ) return;
BOM_COLUMN* bomColumn = m_bom->ColumnList.GetColumnByIndex( row );
if( nullptr == bomColumn ) return;
bool bValue = m_columnListCtrl->GetToggleValue( row, col );
switch ( col )
{
default:
break;
case 1: // Column visibility
bomColumn->SetVisible( bValue );
// Insert a new column
if( bValue )
{
m_bom->AddColumn( bomColumn );
}
else
{
m_bom->RemoveColumn( bomColumn );
}
break;
}
}
开发者ID:hyOzd,项目名称:kicad-source-mirror,代码行数:35,代码来源:dialog_bom_editor.cpp
示例2: OnItemActivated
void DebuggerCallstackView::OnItemActivated(wxDataViewEvent& event)
{
int row = m_dvListCtrl->ItemToRow(event.GetItem());
StackEntry* entry = reinterpret_cast<StackEntry*>(m_dvListCtrl->GetItemData(event.GetItem()));
if(entry) {
long frame, frameLine;
if(!entry->level.ToLong(&frame)) { frame = 0; }
// Remove the currently selected item
wxDataViewItem curitem = m_dvListCtrl->RowToItem(m_currLevel);
if(curitem.IsOk()) {
wxVariant v;
v = ::MakeBitmapIndexText(wxString() << m_currLevel, 1);
m_dvListCtrl->SetValue(v, m_currLevel, 0);
}
entry->line.ToLong(&frameLine);
SetCurrentLevel(row);
ManagerST::Get()->DbgSetFrame(frame, frameLine);
// At this point m_currLevel is pointing to the new stack level
// set it as the active one
curitem = m_dvListCtrl->RowToItem(m_currLevel);
if(curitem.IsOk()) {
wxVariant v;
v = ::MakeBitmapIndexText(wxString() << m_currLevel, 0);
m_dvListCtrl->SetValue(v, m_currLevel, 0);
}
}
}
开发者ID:eranif,项目名称:codelite,代码行数:31,代码来源:DebuggerCallstackView.cpp
示例3: OnItemActivated
void LLDBThreadsView::OnItemActivated(wxDataViewEvent& event)
{
CHECK_ITEM_RET(event.GetItem());
LLDBThreadViewClientData* cd =
reinterpret_cast<LLDBThreadViewClientData*>(m_dvListCtrlThreads->GetItemData(event.GetItem()));
if(cd && !cd->GetThread().IsActive()) { m_plugin->GetLLDB()->SelectThread(cd->GetThread().GetId()); }
}
开发者ID:eranif,项目名称:codelite,代码行数:7,代码来源:LLDBThreadsView.cpp
示例4: OnEntryActivated
void OpenResourceDialog::OnEntryActivated(wxDataViewEvent& event)
{
CHECK_ITEM_RET(event.GetItem());
m_dataviewModel->GetClientObject(event.GetItem());
OpenResourceDialogItemData* data =
dynamic_cast<OpenResourceDialogItemData*>(m_dataviewModel->GetClientObject(event.GetItem()));
if(data) { EndModal(wxID_OK); }
}
开发者ID:stahta01,项目名称:codelite,代码行数:9,代码来源:open_resource_dialog.cpp
示例5: OnItemActivated
void NodeJSDebuggerPane::OnItemActivated(wxDataViewEvent& event)
{
CHECK_ITEM_RET(event.GetItem());
FrameData* cd = (FrameData*)m_dvListCtrlCallstack->GetItemData(event.GetItem());
CHECK_PTR_RET(cd);
NodeJSDebugger::Ptr_t debugger = NodeJSWorkspace::Get()->GetDebugger();
if(!debugger) return;
debugger->SelectFrame(cd->index);
}
开发者ID:huanghjb,项目名称:codelite,代码行数:9,代码来源:NodeJSDebuggerPane.cpp
示例6: OnActivated
void MyFrame::OnActivated( wxDataViewEvent &event )
{
wxString title = m_music_model->GetTitle( event.GetItem() );
wxLogMessage( "wxEVT_DATAVIEW_ITEM_ACTIVATED, Item: %s", title );
if (m_ctrl[0]->IsExpanded( event.GetItem() ))
{
wxLogMessage( "Item: %s is expanded", title );
}
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:10,代码来源:dataview.cpp
示例7: OnValueChanged
void ImplementParentVirtualFunctionsDialog::OnValueChanged(wxDataViewEvent& event)
{
event.Skip();
clFunctionImplDetails *cd = dynamic_cast<clFunctionImplDetails*>( m_dataviewModel->GetClientObject(event.GetItem()) );
wxVector<wxVariant> cols = m_dataviewModel->GetItemColumnsData(event.GetItem());
cd->SetVisibility( cols.at(2).GetString() );
cd->SetPrependVirtualKeyword( cols.at(3).GetBool() );
cd->SetSelected( cols.at(0).GetBool() );
cd->SetDoxygen( cols.at(4).GetBool() );
}
开发者ID:05storm26,项目名称:codelite,代码行数:10,代码来源:implement_parent_virtual_functions.cpp
示例8: OnDropPossible
void MyFrame::OnDropPossible( wxDataViewEvent &event )
{
wxDataViewItem item( event.GetItem() );
// only allow drags for item, not containers
if (m_music_model->IsContainer( item ) )
event.Veto();
if (event.GetDataFormat() != wxDF_UNICODETEXT)
event.Veto();
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:11,代码来源:dataview.cpp
示例9: OnHeaderClick
void MyFrame::OnHeaderClick( wxDataViewEvent &event )
{
// we need to skip the event to let the default behaviour of sorting by
// this column when it is clicked to take place
event.Skip();
int pos = m_ctrl[0]->GetColumnPosition( event.GetDataViewColumn() );
wxLogMessage( "wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, Column position: %d", pos );
wxLogMessage( "Column width: %d", event.GetDataViewColumn()->GetWidth() );
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:11,代码来源:dataview.cpp
示例10: OnSelectionChanged
void GitCommitListDlg::OnSelectionChanged(wxDataViewEvent& event)
{
wxVariant v;
if(!event.GetItem().IsOk()) {
return;
}
m_dvListCtrlCommitList->GetValue(v, m_dvListCtrlCommitList->ItemToRow(event.GetItem()), 0);
wxString commitID = v.GetString();
wxString command = wxString::Format(wxT("%s --no-pager show %s"), m_gitPath.c_str(), commitID.c_str());
m_process = CreateAsyncProcess(this, command, IProcessCreateDefault, m_workingDir);
}
开发者ID:05storm26,项目名称:codelite,代码行数:12,代码来源:gitCommitListDlg.cpp
示例11: OnLayerSelection
void DIALOG_KEEPOUT_AREA_PROPERTIES::OnLayerSelection( wxDataViewEvent& event )
{
if( event.GetColumn() != 0 )
return;
int row = m_layers->ItemToRow( event.GetItem() );
wxVariant layerID;
m_layers->GetValue( layerID, row, 2 );
bool selected = m_layers->GetToggleValue( row, 0 );
m_zonesettings.m_Layers.set( ToLAYER_ID( layerID.GetInteger() ), selected );
}
开发者ID:KiCad,项目名称:kicad-source-mirror,代码行数:12,代码来源:dialog_keepout_area_properties.cpp
示例12: OnStartEditing
void MyFrame::OnStartEditing( wxDataViewEvent &event )
{
wxString artist = m_music_model->GetArtist( event.GetItem() );
if (artist == "Ludwig van Beethoven")
{
event.Veto();
wxLogMessage( "wxEVT_DATAVIEW_ITEM_START_EDITING vetoed. Artist: %s", artist );
}
else
wxLogMessage( "wxEVT_DATAVIEW_ITEM_START_EDITING not vetoed. Artist: %s", artist );
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:13,代码来源:dataview.cpp
示例13: OnKeyChanged
void TableSettings::OnKeyChanged(wxDataViewEvent& event)
{
Constraint *key = reinterpret_cast<Constraint*>( m_dvKeys->GetItemData( event.GetItem() ) );
if( key ) {
wxVariant val;
event.GetModel()->GetValue( val, event.GetItem(), event.GetColumn() );
if( ! val.IsNull() ) {
key->SetName( val.GetString() );
}
}
event.Skip();
}
开发者ID:05storm26,项目名称:codelite,代码行数:13,代码来源:TableSettings.cpp
示例14: OnItemActivated
void ThreadListPanel::OnItemActivated(wxDataViewEvent& event)
{
if(!event.GetItem().IsOk()) return;
wxVariant v;
long threadId;
m_dvListCtrl->GetValue(v, m_dvListCtrl->ItemToRow(event.GetItem()), 0);
wxString str_id = v.GetString();
if(str_id.ToCLong(&threadId)) {
Manager* mgr = ManagerST::Get();
mgr->DbgSetThread(threadId);
}
}
开发者ID:292388900,项目名称:codelite,代码行数:13,代码来源:threadlistpanel.cpp
示例15: OnEditAccount
void SSHAccountManagerDlg::OnEditAccount(wxDataViewEvent& event)
{
SSHAccountInfo *account = (SSHAccountInfo*)(m_dvListCtrlAccounts->GetItemData( event.GetItem() ));
AddSSHAcountDlg dlg(this, *account);
if ( dlg.ShowModal() == wxID_OK ) {
// update the user info
dlg.GetAccountInfo(*account);
// update the UI
m_dvListCtrlAccounts->GetStore()->SetValue(account->GetAccountName(), event.GetItem(), 0);
m_dvListCtrlAccounts->GetStore()->SetValue(account->GetUsername(), event.GetItem(), 1);
m_dvListCtrlAccounts->Refresh();
}
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:14,代码来源:SSHAccountManagerDlg.cpp
示例16: OnItemExpanding
void ImportFilesDialogNew::OnItemExpanding(wxDataViewEvent& event)
{
event.Skip();
wxDataViewItemArray children;
if ( m_dataviewModel->GetChildren(event.GetItem(), children) ) {
wxDataViewItem child = children.Item(0);
ImportFilesDlgData *cd = dynamic_cast<ImportFilesDlgData*>(m_dataviewModel->GetClientObject(child));
if ( cd && cd->IsDummy() ) {
cd = dynamic_cast<ImportFilesDlgData*>(m_dataviewModel->GetClientObject(event.GetItem()));
m_dataviewModel->DeleteItem( child );
wxDir dir ( cd->GetPath() );
DoBuildTree( event.GetItem(), dir, cd->IsChecked() );
}
}
}
开发者ID:HTshandou,项目名称:codelite,代码行数:15,代码来源:ImportFilesDialogNew.cpp
示例17: SendItemEvent
void wxTreeListCtrl::SendItemEvent(wxEventType evt, wxDataViewEvent& eventDV)
{
wxTreeListEvent eventTL(evt, this, m_model->FromDVI(eventDV.GetItem()));
if ( !ProcessWindowEvent(eventTL) )
{
eventDV.Skip();
return;
}
if ( !eventTL.IsAllowed() )
{
eventDV.Veto();
}
}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:15,代码来源:treelist.cpp
示例18: OnTabActivated
void OpenWindowsPanel::OnTabActivated(wxDataViewEvent& event)
{
event.Skip();
CHECK_WORKSPACE_CLOSING();
wxDataViewItem item = event.GetItem();
CHECK_ITEM_RET(item);
TabClientData* data = reinterpret_cast<TabClientData*>(m_dvListCtrl->GetItemData(item));
if(data->IsFile()) {
m_mgr->OpenFile(data->tab.filename.GetFullPath());
} else {
m_mgr->SelectPage(m_mgr->FindPage(data->tab.text));
}
}
开发者ID:eranif,项目名称:codelite,代码行数:15,代码来源:openwindowspanel.cpp
示例19: OnItemRightClick
void mmCustomFieldListDialog::OnItemRightClick(wxDataViewEvent& event)
{
wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, wxID_ANY) ;
evt.SetEventObject( this );
Model_CustomField::Data *field = Model_CustomField::instance().get(m_field_id);
wxMenu* mainMenu = new wxMenu;
if (field) mainMenu->SetTitle(field->DESCRIPTION);
mainMenu->Append(new wxMenuItem(mainMenu, MENU_NEW_FIELD, _("&Add ")));
mainMenu->AppendSeparator();
mainMenu->Append(new wxMenuItem(mainMenu, MENU_EDIT_FIELD, _("&Edit ")));
mainMenu->Append(new wxMenuItem(mainMenu, MENU_DELETE_FIELD, _("&Remove ")));
mainMenu->Append(new wxMenuItem(mainMenu, MENU_UPDATE_FIELD, _("&Massive content update ")));
if (!field)
{
mainMenu->Enable(MENU_EDIT_FIELD, false);
mainMenu->Enable(MENU_DELETE_FIELD, false);
mainMenu->Enable(MENU_UPDATE_FIELD, false);
}
PopupMenu(mainMenu);
delete mainMenu;
event.Skip();
}
开发者ID:vomikan,项目名称:moneymanagerex,代码行数:25,代码来源:customfieldlistdialog.cpp
示例20: OnItemRightClick
void mmAttachmentDialog::OnItemRightClick(wxDataViewEvent& event)
{
wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, wxID_ANY) ;
evt.SetEventObject( this );
Model_Attachment::Data* attachment = Model_Attachment::instance().get(m_attachment_id);
wxMenu* mainMenu = new wxMenu;
if (attachment) mainMenu->SetTitle(attachment->DESCRIPTION);
mainMenu->Append(new wxMenuItem(mainMenu, MENU_NEW_ATTACHMENT, _("&Add ")));
mainMenu->AppendSeparator();
mainMenu->Append(new wxMenuItem(mainMenu, MENU_OPEN_ATTACHMENT, _("&Open ")));
mainMenu->Append(new wxMenuItem(mainMenu, MENU_EDIT_ATTACHMENT, _("&Edit ")));
if (!attachment) mainMenu->Enable(MENU_EDIT_ATTACHMENT, false);
mainMenu->Append(new wxMenuItem(mainMenu, MENU_DELETE_ATTACHMENT, _("&Remove ")));
//Disable buttons
wxString AttachmentsFolder = mmex::getPathAttachment(mmAttachmentManage::InfotablePathSetting());
if (AttachmentsFolder == wxEmptyString || !wxDirExists(AttachmentsFolder))
mainMenu->Enable(MENU_NEW_ATTACHMENT, false);
if (!attachment)
{
mainMenu->Enable(MENU_OPEN_ATTACHMENT, false);
mainMenu->Enable(MENU_EDIT_ATTACHMENT, false);
mainMenu->Enable(MENU_DELETE_ATTACHMENT, false);
}
PopupMenu(mainMenu);
delete mainMenu;
event.Skip();
}
开发者ID:moneymanagerex,项目名称:moneymanagerex,代码行数:32,代码来源:attachmentdialog.cpp
注:本文中的wxDataViewEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论