/* ================ DialogDeclBrowser::OnBnClickedNew ================ */ void DialogDeclBrowser::OnBnClickedNew() { HTREEITEM item; idStr typeName, declName; const idDecl *decl; DialogDeclNew newDeclDlg; newDeclDlg.SetDeclTree( &baseDeclTree ); item = declTree.GetSelectedItem(); if ( item ) { GetDeclName( item, typeName, declName ); newDeclDlg.SetDefaultType( typeName ); newDeclDlg.SetDefaultName( declName ); } decl = GetSelectedDecl(); if ( decl ) { newDeclDlg.SetDefaultFile( decl->GetFileName() ); } if ( newDeclDlg.DoModal() != IDOK ) { return; } decl = newDeclDlg.GetNewDecl(); if ( decl ) { declName = declManager->GetDeclNameFromType( decl->GetType() ); declName += "/"; declName += decl->GetName(); int id = GetIdFromTypeAndIndex( decl->GetType(), decl->Index() ); baseDeclTree.InsertPathIntoTree( declName, id ); item = declTree.InsertPathIntoTree( declName, id ); declTree.SelectItem( item ); EditSelected(); } }
void CPluginsDialog::OnListboxDblClick(wxCommandEvent& WXUNUSED(event)) { int selection = m_pListBox->GetSelection(); EditSelected(selection); }
/* ================ DialogDeclBrowser::OnBnClickedEdit ================ */ void DialogDeclBrowser::OnBnClickedEdit() { EditSelected(); }
void CPluginsDialog::OnButtonEdit(wxCommandEvent& event) { unsigned int selection = m_pListBox->GetSelection(); EditSelected(selection); }