📄 cdd_annot_dialog.cpp
字号:
} else if (rPMID->GetValue()) { DECLARE_AND_FIND_WINDOW_RETURN_FALSE_ON_ERR(tPMID, ID_T_PMID, wxTextCtrl) unsigned long pmid; if (tPMID->GetValue().ToULong(&pmid)) { evidence->SetReference().SetPmid().Set(pmid); return true; } else { ERRORMSG("CDDEvidenceDialog::GetData() - PMID must be a positive integer"); return false; } } else if (rSTRUCTURE->GetValue()) { DECLARE_AND_FIND_WINDOW_RETURN_FALSE_ON_ERR(tSTRUCTURE, ID_T_STRUCTURE, wxTextCtrl) // either leave existing range alone, or use new one if none present or rerange button pressed if (!evidence->IsBsannot() || rerange) { CBiostruc_annot_set *ref = GlobalMessenger()->CreateBiostrucAnnotSetForHighlightsOnSingleObject(); if (ref) evidence->SetBsannot(*ref); else return false; } // reset structure evidence tag CRef < CBiostruc_descr > descr(new CBiostruc_descr()); descr->SetOther_comment(STRUCTURE_EVIDENCE_COMMENT); evidence->SetBsannot().SetDescr().clear(); evidence->SetBsannot().SetDescr().push_front(descr); // reset name CRef < CBiostruc_feature_set_descr > name(new CBiostruc_feature_set_descr()); name->SetName(tSTRUCTURE->GetValue().c_str()); evidence->SetBsannot().SetFeatures().front()->SetDescr().clear(); evidence->SetBsannot().SetFeatures().front()->SetDescr().push_front(name); return true; } ERRORMSG("CDDEvidenceDialog::GetData() - unknown evidence type"); return false;}END_SCOPE(Cn3D)////////////////////////////////////////////////////////////////////////////////////////////////// The following is taken unmodified from wxDesigner's C++ code from cdd_annot_dialog.wdr////////////////////////////////////////////////////////////////////////////////////////////////wxSizer *SetupCDDAnnotDialog( wxPanel *parent, bool call_fit, bool set_sizer ){ wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); wxFlexGridSizer *item1 = new wxFlexGridSizer( 1, 0, 0, 0 ); wxStaticBox *item3 = new wxStaticBox( parent, -1, "Annotations" ); wxStaticBoxSizer *item2 = new wxStaticBoxSizer( item3, wxVERTICAL ); wxString *strs4 = (wxString*) NULL; wxListBox *item4 = new wxListBox( parent, ID_L_ANNOT, wxDefaultPosition, wxSize(200,100), 0, strs4, wxLB_SINGLE ); item2->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); wxGridSizer *item5 = new wxGridSizer( 2, 0, 0, 0 ); wxButton *item6 = new wxButton( parent, ID_B_NEW_ANNOT, "New", wxDefaultPosition, wxDefaultSize, 0 ); item5->Add( item6, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item7 = new wxButton( parent, ID_B_HIGHLIGHT, "Highlight", wxDefaultPosition, wxDefaultSize, 0 ); item5->Add( item7, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item8 = new wxButton( parent, ID_B_ANNOT_UP, "Move Up", wxDefaultPosition, wxDefaultSize, 0 ); item5->Add( item8, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item9 = new wxButton( parent, ID_B_EDIT_ANNOT, "Edit", wxDefaultPosition, wxDefaultSize, 0 ); item5->Add( item9, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item10 = new wxButton( parent, ID_B_DEL_ANNOT, "Delete", wxDefaultPosition, wxDefaultSize, 0 ); item5->Add( item10, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item11 = new wxButton( parent, ID_B_ANNOT_DOWN, "Move Down", wxDefaultPosition, wxDefaultSize, 0 ); item5->Add( item11, 0, wxALIGN_CENTRE|wxALL, 5 ); item2->Add( item5, 0, wxALIGN_CENTRE|wxALL, 5 ); item1->Add( item2, 0, wxALIGN_CENTRE|wxALL, 5 ); wxStaticBox *item13 = new wxStaticBox( parent, -1, "Evidence" ); wxStaticBoxSizer *item12 = new wxStaticBoxSizer( item13, wxVERTICAL ); wxString *strs14 = (wxString*) NULL; wxListBox *item14 = new wxListBox( parent, ID_L_EVID, wxDefaultPosition, wxSize(300,100), 0, strs14, wxLB_SINGLE ); item12->Add( item14, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); wxGridSizer *item15 = new wxGridSizer( 2, 0, 0, 0 ); wxButton *item16 = new wxButton( parent, ID_B_NEW_EVID, "New", wxDefaultPosition, wxDefaultSize, 0 ); item15->Add( item16, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item17 = new wxButton( parent, ID_B_SHOW, "Show", wxDefaultPosition, wxDefaultSize, 0 ); item15->Add( item17, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item18 = new wxButton( parent, ID_B_EVID_UP, "Move Up", wxDefaultPosition, wxDefaultSize, 0 ); item15->Add( item18, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item19 = new wxButton( parent, ID_B_EDIT_EVID, "Edit", wxDefaultPosition, wxDefaultSize, 0 ); item15->Add( item19, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item20 = new wxButton( parent, ID_B_DEL_EVID, "Delete", wxDefaultPosition, wxDefaultSize, 0 ); item15->Add( item20, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item21 = new wxButton( parent, ID_B_EVID_DOWN, "Move Down", wxDefaultPosition, wxDefaultSize, 0 ); item15->Add( item21, 0, wxALIGN_CENTRE|wxALL, 5 ); item12->Add( item15, 0, wxALIGN_CENTRE|wxALL, 5 ); item1->Add( item12, 0, wxALIGN_CENTRE|wxALL, 5 ); item0->Add( item1, 0, wxALIGN_CENTRE, 5 ); if (set_sizer) { parent->SetAutoLayout( TRUE ); parent->SetSizer( item0 ); if (call_fit) { item0->Fit( parent ); item0->SetSizeHints( parent ); } } return item0;}wxSizer *SetupEvidenceDialog( wxPanel *parent, bool call_fit, bool set_sizer ){ wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); wxStaticBox *item2 = new wxStaticBox( parent, -1, "Evidence Options" ); wxStaticBoxSizer *item1 = new wxStaticBoxSizer( item2, wxVERTICAL ); wxFlexGridSizer *item3 = new wxFlexGridSizer( 1, 0, 0, 0 ); item3->AddGrowableCol( 2 ); wxRadioButton *item4 = new wxRadioButton( parent, ID_R_COMMENT, "", wxDefaultPosition, wxDefaultSize, 0 ); item3->Add( item4, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); wxStaticText *item5 = new wxStaticText( parent, ID_ST_COMMENT, "Comment:", wxDefaultPosition, wxDefaultSize, 0 ); item3->Add( item5, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 ); wxTextCtrl *item6 = new wxTextCtrl( parent, ID_T_COMMENT, "", wxDefaultPosition, wxSize(150,-1), 0 ); item3->Add( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); wxStaticLine *item7 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL ); item1->Add( item7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); wxFlexGridSizer *item8 = new wxFlexGridSizer( 1, 0, 0, 0 ); item8->AddGrowableCol( 2 ); wxRadioButton *item9 = new wxRadioButton( parent, ID_R_PMID, "", wxDefaultPosition, wxDefaultSize, 0 ); item8->Add( item9, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); wxStaticText *item10 = new wxStaticText( parent, ID_ST_PMID, "Reference (PubMed ID):", wxDefaultPosition, wxDefaultSize, 0 ); item8->Add( item10, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 ); wxTextCtrl *item11 = new wxTextCtrl( parent, ID_T_PMID, "", wxDefaultPosition, wxDefaultSize, 0 ); item8->Add( item11, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); item1->Add( item8, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); wxStaticLine *item12 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL ); item1->Add( item12, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); wxFlexGridSizer *item13 = new wxFlexGridSizer( 1, 0, 0, 0 ); item13->AddGrowableCol( 2 ); wxRadioButton *item14 = new wxRadioButton( parent, ID_R_STRUCTURE, "", wxDefaultPosition, wxDefaultSize, 0 ); item13->Add( item14, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); wxStaticText *item15 = new wxStaticText( parent, ID_ST_STRUCTURE, "Structure:", wxDefaultPosition, wxDefaultSize, 0 ); item13->Add( item15, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 ); wxTextCtrl *item16 = new wxTextCtrl( parent, ID_T_STRUCTURE, "", wxDefaultPosition, wxSize(80,-1), 0 ); item13->Add( item16, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); item1->Add( item13, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); wxButton *item17 = new wxButton( parent, ID_B_RERANGE, "Reset Residues to Current Highlights", wxDefaultPosition, wxDefaultSize, 0 ); item1->Add( item17, 0, wxALIGN_CENTRE|wxALL, 5 ); item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); wxFlexGridSizer *item18 = new wxFlexGridSizer( 1, 0, 0, 0 ); wxButton *item19 = new wxButton( parent, ID_B_EDIT_OK, "OK", wxDefaultPosition, wxDefaultSize, 0 ); item19->SetDefault(); item18->Add( item19, 0, wxALIGN_CENTRE|wxALL, 5 ); item18->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 ); wxButton *item20 = new wxButton( parent, ID_B_EDIT_CANCEL, "Cancel", wxDefaultPosition, wxDefaultSize, 0 ); item18->Add( item20, 0, wxALIGN_CENTRE|wxALL, 5 ); item0->Add( item18, 0, wxALIGN_CENTRE|wxALL, 5 ); if (set_sizer) { parent->SetAutoLayout( TRUE ); parent->SetSizer( item0 ); if (call_fit) { item0->Fit( parent ); item0->SetSizeHints( parent ); } } return item0;}/** ---------------------------------------------------------------------------* $Log: cdd_annot_dialog.cpp,v $* Revision 1000.2 2004/06/01 18:27:54 gouriano* PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.39** Revision 1.39 2004/05/21 21:41:38 gorelenk* Added PCH ncbi_pch.hpp** Revision 1.38 2004/04/02 22:45:03 thiessen* make stuff visible in global style on show evidence** Revision 1.37 2004/03/15 18:16:33 thiessen* prefer prefix vs. postfix ++/-- operators** Revision 1.36 2004/02/19 17:04:45 thiessen* remove cn3d/ from include paths; add pragma to disable annoying msvc warning** Revision 1.35 2003/07/14 18:37:07 thiessen* change GetUngappedAlignedBlocks() param types; other syntax changes** Revision 1.34 2003/02/03 19:20:01 thiessen* format changes: move CVS Log to bottom of file, remove std:: from .cpp files, and use new diagnostic macros** Revision 1.33 2002/12/18 15:02:34 thiessen* fixes for linux/gcc** Revision 1.32 2002/12/12 23:07:18 thiessen* improved handling of alignment annotation errors** Revision 1.31 2002/11/25 15:02:20 thiessen* changes for cdd annotation evidence show** Revision 1.30 2002/11/21 18:07:25 thiessen* show whole objects again on evidence show** Revision 1.29 2002/11/12 20:35:36 thiessen* use ShowDomainsWithHighlights for structure evidence show** Revision 1.28 2002/11/06 00:18:10 thiessen* fixes for new CRef/const rules in objects** Revision 1.27 2002/09/06 18:28:46 thiessen* fix show object bug** Revision 1.26 2002/08/15 22:13:12 thiessen* update for wx2.3.2+ only; add structure pick dialog; fix MultitextDialog bug** Revision 1.25 2002/04/09 23:59:08 thiessen* add cdd annotations read-only option** Revision 1.24 2002/04/09 14:38:22 thiessen* add cdd splash screen** Revision 1.23 2002/03/28 14:06:02 thiessen* preliminary BLAST/PSSM ; new CD startup style** Revision 1.22 2002/02/12 21:15:59 thiessen* add move up/down to CDD annotations** Revision 1.21 2002/01/19 15:25:03 thiessen* tweaks for DebugMT build to work** Revision 1.20 2002/01/19 02:34:35 thiessen* fixes for changes in asn serialization API** Revision 1.19 2001/12/12 14:04:13 thiessen* add missing object headers after object loader change** Revision 1.18 2001/12/06 23:13:44 thiessen* finish import/align new sequences into single-structure data; many small tweaks** Revision 1.17 2001/11/30 14:02:05 thiessen* progress on sequence imports to single structures** Revision 1.16 2001/11/28 14:16:13 thiessen* add 'show' to comment + structure name evidence** Revision 1.15 2001/11/27 16:26:07 thiessen* major update to data management system** Revision 1.14 2001/10/30 02:54:11 thiessen* add Biostruc cache** Revision 1.13 2001/10/23 20:10:22 thiessen* fix scaling of fonts in high-res PNG output** Revision 1.12 2001/10/16 21:49:06 thiessen* restructure MultiTextDialog; allow virtual bonds for alpha-only PDB's** Revision 1.11 2001/10/14 09:27:46 thiessen* add cdd evidence move up/down** Revision 1.10 2001/10/01 16:04:23 thiessen* make CDD annotation window non-modal; add SetWindowTitle to viewers** Revision 1.9 2001/09/26 17:09:30 thiessen* fix rerange bug** Revision 1.8 2001/09/26 15:27:53 thiessen* tweak sequence viewer widget for wx2.3.2, tweak cdd annotation** Revision 1.7 2001/09/24 14:37:52 thiessen* more wxPanel stuff - fix for new heirarchy in wx 2.3.2+** Revision 1.6 2001/09/24 13:29:54 thiessen* fix wxPanel issues** Revision 1.5 2001/09/20 19:31:30 thiessen* fixes for SGI and wxWin 2.3.2** Revision 1.4 2001/08/27 00:06:23 thiessen* add structure evidence to CDD annotation** Revision 1.3 2001/08/06 20:22:00 thiessen* add preferences dialog ; make sure OnCloseWindow get wxCloseEvent** Revision 1.2 2001/07/19 19:14:38 thiessen* working CDD alignment annotator ; misc tweaks** Revision 1.1 2001/07/12 17:35:15 thiessen* change domain mapping ; add preliminary cdd annotation GUI**/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -