A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/cdd__splash__dialog_8cpp_source.html below:

NCBI C++ ToolKit: src/app/cn3d/cdd_splash_dialog.cpp Source File

66 #include <wx/statline.h> 67 #include <wx/spinbutt.h> 68 #include <wx/spinctrl.h> 69 #include <wx/splitter.h> 70 #include <wx/listctrl.h> 71 #include <wx/treectrl.h> 72 #include <wx/notebook.h> 78 #define ID_ST_NAME 10001 79 #define ID_T_DESCR 10002 80 #define ID_B_ANNOT 10003 81 #define ID_B_REF 10004 82 #define ID_B_DONE 10005 93 #define DECLARE_AND_FIND_WINDOW_RETURN_ON_ERR(var, id, type) \ 95  var = wxDynamicCast(FindWindow(id), type); \ 97  ERRORMSG("Can't find window with id "

<< id); \

108

wxWindow* parent, wxWindowID

id

,

const

wxString& title,

const

wxPoint& pos) :

109

wxDialog(parent,

id

, title, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE),

110

handle(parentHandle), structureWindow(cn3dFrame)

126  const string

& cddName = structureSet->GetCDDName();

127  if

(cddName.size() > 0)

128

tName->SetLabel(cddName.c_str());

130  const string

& cddDescr = structureSet->GetCDDDescription();

131  if

(cddDescr.size() > 0) {

133  for

(

i

=j=0;

i

<cddDescr.size(); ++

i

, ++j) {

134  if

(j > 60 && cddDescr[

i

] ==

' '

) {

138

*tDescr << cddDescr[

i

];

145  if

(annots && annots->

Get

().size() > 0) {

146

*tDescr <<

"Annotation summary:\n\n"

;

147

CAlign_annot_set::Tdata::const_iterator

a

, ae = annots->

Get

().end();

148  for

(

a

=annots->

Get

().begin();

a

!=ae; ++

a

) {

149

*tDescr << ((*a)->IsSetDescription() ? (*a)->GetDescription() :

string

(

""

)).c_str()

151  if

((*a)->IsSetEvidence()) {

152

CAlign_annot::TEvidence::const_iterator e, ee = (*a)->GetEvidence().end();

153  for

(e=(*a)->GetEvidence().begin(); e!=ee; ++e) {

154  if

((*e)->IsComment())

155

*tDescr <<

" comment: "

<< (*e)->GetComment().c_str() <<

'\n'

;

156  else if

((*e)->IsReference() && (*e)->GetReference().IsPmid()) {

158

*tDescr <<

" PubMed "

<< pmid_str <<

'\n'

;

160  else if

((*e)->IsBsannot()) {

161

*tDescr <<

" structure:"

;

162  if

((*e)->GetBsannot().GetFeatures().size() > 0 &&

163

(*e)->GetBsannot().GetFeatures().front()->IsSetDescr() &&

164

(*e)->GetBsannot().GetFeatures().front()->IsSetDescr() &&

165

(*e)->GetBsannot().GetFeatures().front()->GetDescr().front()->IsName())

167

(*e)->GetBsannot().GetFeatures().front()->GetDescr().front()->GetName().c_str();

168  if

((*e)->GetBsannot().IsSetId() && (*e)->GetBsannot().GetId().front()->IsMmdb_id()) {

169  int

mmdbID = (*e)->GetBsannot().GetId().front()->GetMmdb_id().Get();

170

StructureSet::ObjectList::const_iterator o, oe = structureSet->objects.end();

171  for

(o=structureSet->objects.begin(); o!=oe; ++o) {

172  if

((*o)->mmdbID == mmdbID) {

173

*tDescr <<

" ("

<< (*o)->GetPDBID().c_str() <<

')'

;

187  if

(structureSet->objects.size() > 0) {

188

*tDescr <<

"Structure summary:\n"

;

189

StructureSet::ObjectList::const_iterator o, oe = structureSet->objects.end();

190  for

(o=structureSet->objects.begin(); o!=oe; ++o) {

191

*tDescr <<

"\nPDB "

<< (*o)->GetPDBID().c_str() <<

" (MMDB "

<< (*o)->mmdbID <<

")\n"

;

194  typedef

list < string > ChainList;

198

ChemicalGraph::MoleculeMap::const_iterator m, me = (*o)->graph->molecules.

end

();

199  for

(m=(*o)->graph->molecules.begin(); m!=me; ++m) {

200  if

(m->second->IsProtein() || m->second->IsNucleotide()) {

202

SequenceSet::SequenceList::const_iterator

203

s, se = structureSet->sequenceSet->sequences.end();

204  for

(s=structureSet->sequenceSet->sequences.begin(); s!=se; ++s) {

205  if

((*s)->identifier == m->second->identifier) {

207

descr.Printf(

"%s: gi %s (%s)"

, m->second->identifier->ToString().c_str(),

208

gi_str.c_str(), (*s)->GetDescription().c_str());

215

descr.Printf(

"%s: gi %s"

, m->second->identifier->ToString().c_str(), gi_str.c_str());

219

}

else if

(m->second->IsHeterogen()) {

221  const string

& name = m->second->residues.find(1)->second->nameGraph;

222

HetList::iterator

n

= hetList.find(name);

223  if

(

n

== hetList.end())

232

ChainList::const_iterator c, ce = chainList.end();

233  for

(c=chainList.begin(); c!=ce; ++c)

234

*tDescr <<

" "

<< c->c_str() <<

'\n'

;

237  if

(hetList.size() > 0) {

238

*tDescr <<

"Heterogens: "

;

239

HetList::const_iterator h, he = hetList.end();

240  for

(h=hetList.begin(); h!=he; ++h) {

241  if

(h != hetList.begin())

245

descr.Printf(

"%s (x%i)"

, h->first.c_str(), h->second);

247

descr = h->first.c_str();

256

CCdd_descr_set::Tdata::const_iterator d, de = cddRefs->

Get

().end();

257  for

(d=cddRefs->

Get

().begin(); d!=de; ++d) {

258  if

((*d)->IsReference() && (*d)->GetReference().IsPmid())

262

bRef->Enable(

false

);

265  if

(cddAnnot->

Get

().size() == 0)

266

bAnnot->Enable(

false

);

269

topSizer->Fit(

this

);

270

topSizer->SetSizeHints(

this

);

290  else if

(event.GetId() ==

ID_B_REF

) {

308

wxBoxSizer *item0 =

new

wxBoxSizer( wxVERTICAL );

310

wxFlexGridSizer *item1 =

new

wxFlexGridSizer( 2, 0, 0 );

311

item1->AddGrowableCol( 1 );

313

wxStaticText *item2 =

new

wxStaticText( parent,

ID_TEXT

,

"Name:"

, wxDefaultPosition, wxDefaultSize, 0 );

314

item1->Add( item2, 0, wxALIGN_CENTRE|wxALL, 5 );

316

wxStaticText *item3 =

new

wxStaticText( parent,

ID_ST_NAME

,

""

, wxDefaultPosition, wxDefaultSize, 0 );

317

item1->Add( item3, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );

319

item0->Add(item1, 0, wxGROW | wxALL, 5);

321

wxTextCtrl *item4 =

new

wxTextCtrl( parent,

ID_T_DESCR

,

""

, wxDefaultPosition, wxSize(-1,100), wxTE_MULTILINE|wxTE_READONLY );

322

item0->Add(item4, 0, wxGROW | wxALL, 5);

324

wxBoxSizer *item5 =

new

wxBoxSizer( wxHORIZONTAL );

326

wxButton *item6 =

new

wxButton( parent,

ID_B_ANNOT

,

"Show Annotations Panel"

, wxDefaultPosition, wxDefaultSize, 0 );

327

item5->Add( item6, 0, wxGROW | wxALL, 5 );

329

wxButton *item7 =

new

wxButton( parent,

ID_B_REF

,

"Show References Panel"

, wxDefaultPosition, wxDefaultSize, 0 );

330

item5->Add(item7, 0, wxGROW | wxALL, 5);

332

item5->Add( 20, 20, 0, wxALIGN_CENTRE| wxALL, 5 );

334

wxButton *item8 =

new

wxButton( parent,

ID_B_DONE

,

"Dismiss"

, wxDefaultPosition, wxDefaultSize, 0 );

335

item5->Add( item8, 0, wxGROW | wxALL, 5 );

337

item0->Add( item5, 0, wxALIGN_CENTRE|wxALL, 5 );

341

parent->SetAutoLayout(

TRUE

);

342

parent->SetSizer( item0 );

345

item0->Fit( parent );

346

item0->SetSizeHints( parent );

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

#define DECLARE_AND_FIND_WINDOW_RETURN_ON_ERR(var, id, type)

wxSizer * SetupCDDSplashDialog(wxWindow *parent, bool call_fit=TRUE, bool set_sizer=TRUE)

CDDSplashDialog ** handle

void OnCloseWindow(wxCloseEvent &event)

void OnButton(wxCommandEvent &event)

StructureWindow * structureWindow

void ShowCDDReferences(void)

void ShowCDDAnnotations(void)

const_iterator end() const

Include a standard set of the NCBI C++ Toolkit most basic headers.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_SCOPE(ns)

Define a new scope.

static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)

Convert numeric value to string.

const Tdata & Get(void) const

Get the member data.

const Tdata & Get(void) const

Get the member data.

#define TRUE

bool replacment for C indicating true.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4