⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cdd_splash_dialog.cpp

📁 ncbi源码
💻 CPP
📖 第 1 页 / 共 2 页
字号:
            // make lists of biopolymer chains and heterogens            typedef list < string > ChainList;            ChainList chainList;            typedef map < string , int > HetList;            HetList hetList;            ChemicalGraph::MoleculeMap::const_iterator m, me = (*o)->graph->molecules.end();            for (m=(*o)->graph->molecules.begin(); m!=me; ++m) {                if (m->second->IsProtein() || m->second->IsNucleotide()) {                    wxString descr;                    SequenceSet::SequenceList::const_iterator                        s, se = structureSet->sequenceSet->sequences.end();                    for (s=structureSet->sequenceSet->sequences.begin(); s!=se; ++s) {                        if ((*s)->identifier == m->second->identifier) {                            descr.Printf("%s: gi %i (%s)", m->second->identifier->ToString().c_str(),                                (*s)->identifier->gi, (*s)->description.c_str());                            break;                        }                    }                    if (s == se)                        descr.Printf("%s: gi %i", m->second->identifier->ToString().c_str(),                            m->second->identifier->gi);                    chainList.push_back(descr.c_str());                } else if (m->second->IsHeterogen()) {                    // get name from local graph name of first (should be only) residue                    const string& name = m->second->residues.find(1)->second->nameGraph;                    HetList::iterator n = hetList.find(name);                    if (n == hetList.end())                        hetList[name] = 1;                    else                        ++(n->second);                }            }            chainList.sort();            // print chains            ChainList::const_iterator c, ce = chainList.end();            for (c=chainList.begin(); c!=ce; ++c)                *tDescr << "    " << c->c_str() << '\n';            // print hets            if (hetList.size() > 0) {                *tDescr << "Heterogens: ";                HetList::const_iterator h, he = hetList.end();                for (h=hetList.begin(); h!=he; ++h) {                    if (h != hetList.begin())                        *tDescr << ", ";                    wxString descr;                    if (h->second > 1)                        descr.Printf("%s (x%i)", h->first.c_str(), h->second);                    else                        descr = h->first.c_str();                    *tDescr << descr;                }                *tDescr << '\n';            }        }    }    const CCdd_descr_set *cddRefs = structureSet->GetCDDDescrSet();    CCdd_descr_set::Tdata::const_iterator d, de = cddRefs->Get().end();    for (d=cddRefs->Get().begin(); d!=de; ++d) {        if ((*d)->IsReference() && (*d)->GetReference().IsPmid())            break;    }    if (d == de)    // if no PMID references found        bRef->Enable(false);    const CAlign_annot_set *cddAnnot = structureSet->GetCDDAnnotSet();    if (cddAnnot->Get().size() == 0)        bAnnot->Enable(false);    // call sizer stuff    topSizer->Fit(this);    topSizer->Fit(panel);    topSizer->SetSizeHints(this);}CDDSplashDialog::~CDDSplashDialog(void){    if (handle && *handle) *handle = NULL;}// same as hitting donevoid CDDSplashDialog::OnCloseWindow(wxCloseEvent& event){    Destroy();}void CDDSplashDialog::OnButton(wxCommandEvent& event){    if (event.GetId() == ID_B_ANNOT) {        structureWindow->ShowCDDAnnotations();    }    else if (event.GetId() == ID_B_REF) {        structureWindow->ShowCDDReferences();    }    else if (event.GetId() == ID_B_DONE) {        Destroy();    }}END_SCOPE(Cn3D)//////////////////////////////////////////////////////////////////////////////////////////////////// The following are taken *without* modification from wxDesigner C++ code generated from// cdd_splash_dialog.wdr.//////////////////////////////////////////////////////////////////////////////////////////////////wxSizer *SetupCDDSplashDialog( wxWindow *parent, bool call_fit, bool set_sizer ){    wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );    wxFlexGridSizer *item1 = new wxFlexGridSizer( 2, 0, 0 );    item1->AddGrowableCol( 1 );    wxStaticText *item2 = new wxStaticText( parent, ID_TEXT, "Name:", wxDefaultPosition, wxDefaultSize, 0 );    item1->Add( item2, 0, wxALIGN_CENTRE|wxALL, 5 );    wxStaticText *item3 = new wxStaticText( parent, ID_ST_NAME, "", wxDefaultPosition, wxDefaultSize, 0 );    item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );    item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );    wxTextCtrl *item4 = new wxTextCtrl( parent, ID_T_DESCR, "", wxDefaultPosition, wxSize(-1,100), wxTE_MULTILINE|wxTE_READONLY );    item0->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );    wxBoxSizer *item5 = new wxBoxSizer( wxHORIZONTAL );    wxButton *item6 = new wxButton( parent, ID_B_ANNOT, "Show Annotations Panel", wxDefaultPosition, wxDefaultSize, 0 );    item5->Add( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );    wxButton *item7 = new wxButton( parent, ID_B_REF, "Show References Panel", wxDefaultPosition, wxDefaultSize, 0 );    item5->Add( item7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );    item5->Add( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 );    wxButton *item8 = new wxButton( parent, ID_B_DONE, "Dismiss", wxDefaultPosition, wxDefaultSize, 0 );    item5->Add( item8, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );    item0->Add( item5, 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_splash_dialog.cpp,v $* Revision 1000.2  2004/06/01 18:28:01  gouriano* PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.12** Revision 1.12  2004/05/21 21:41:39  gorelenk* Added PCH ncbi_pch.hpp** Revision 1.11  2004/03/15 18:16:33  thiessen* prefer prefix vs. postfix ++/-- operators** Revision 1.10  2004/02/19 17:04:45  thiessen* remove cn3d/ from include paths; add pragma to disable annoying msvc warning** Revision 1.9  2003/03/13 14:26:18  thiessen* add file_messaging module; split cn3d_main_wxwin into cn3d_app, cn3d_glcanvas, structure_window, cn3d_tools** Revision 1.8  2003/02/03 19:20:02  thiessen* format changes: move CVS Log to bottom of file, remove std:: from .cpp files, and use new diagnostic macros** Revision 1.7  2002/12/19 19:15:27  thiessen* cosmetic fixes** Revision 1.6  2002/12/19 18:52:41  thiessen* add structure summary** Revision 1.5  2002/12/07 01:38:36  thiessen* fix header problem** Revision 1.4  2002/09/18 14:12:00  thiessen* add annotations summary to overview** Revision 1.3  2002/08/15 22:13:13  thiessen* update for wx2.3.2+ only; add structure pick dialog; fix MultitextDialog bug** Revision 1.2  2002/04/09 23:59:09  thiessen* add cdd annotations read-only option** Revision 1.1  2002/04/09 14:38:24  thiessen* add cdd splash screen**/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -