NCBI C++ ToolKit
source_field_name_panel.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: source_field_name_panel.cpp 47485 2023-05-02 14:46:59Z ucko $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Colleen Bollin
27  */
28 
29 
30 #include <ncbi_pch.hpp>
35 
42 #include <wx/radiobox.h>
43 
46 
47 /*!
48  * CSourceFieldNamePanel type definition
49  */
50 
51 IMPLEMENT_DYNAMIC_CLASS( CSourceFieldNamePanel, CFieldNamePanel )
52 
53 
54 /*!
55  * CSourceFieldNamePanel event table definition
56  */
57 
58 BEGIN_EVENT_TABLE( CSourceFieldNamePanel, CFieldNamePanel )
59 
60 ////@begin CSourceFieldNamePanel event table entries
61  EVT_RADIOBUTTON( ID_CSOURCEFIELD_TEXT_QUAL_BTN, CSourceFieldNamePanel::OnTextQualBtnSelected)
62 
63  EVT_RADIOBUTTON( ID_CSOURCEFIELD_TAXONOMY_BTN, CSourceFieldNamePanel::OnTaxonomyBtnSelected)
64 
65  EVT_RADIOBUTTON( ID_CSOURCEFIELD_LOCATION_BTN, CSourceFieldNamePanel::OnLocationBtnSelected)
66 
67  EVT_RADIOBUTTON( ID_CSOURCEFIELD_ORIGIN_BTN, CSourceFieldNamePanel::OnOriginBtnSelected)
68 
69  EVT_LISTBOX( ID_CSOURCEFIELD_SRC_SUBLIST, CSourceFieldNamePanel::OnSrcSublistSelected)
70 
71 ////@end CSourceFieldNamePanel event table entries
72 
74 
75 
76 /*!
77  * CSourceFieldNamePanel constructors
78  */
79 
81 {
82  Init();
83 }
84 
85 CSourceFieldNamePanel::CSourceFieldNamePanel( wxWindow* parent, bool additional_items, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
86  : m_AdditionalItems(additional_items), m_DoNotShowSubList(false), m_is_taxonomy_panel(false), m_first_run(true)
87 {
88  Init();
89  Create(parent, id, pos, size, style);
90 }
91 
92 
93 /*!
94  * CSourceFieldNamePanel creator
95  */
96 
97 bool CSourceFieldNamePanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
98 {
99 ////@begin CSourceFieldNamePanel creation
100  CFieldNamePanel::Create( parent, id, pos, size, style );
101 
102  CreateControls();
103  if (GetSizer())
104  {
105  GetSizer()->SetSizeHints(this);
106  }
107  Centre();
108 ////@end CSourceFieldNamePanel creation
109  return true;
110 }
111 
112 
113 /*!
114  * CSourceFieldNamePanel destructor
115  */
116 
118 {
119 ////@begin CSourceFieldNamePanel destruction
120 ////@end CSourceFieldNamePanel destruction
121 }
122 
123 
124 /*!
125  * Member initialisation
126  */
127 
129 {
130 ////@begin CSourceFieldNamePanel member initialisation
132  m_Taxonomy = NULL;
133  m_Location = NULL;
134  m_Origin = NULL;
136 ////@end CSourceFieldNamePanel member initialisation
137 }
138 
139 
140 /*!
141  * Control creation for CSourceFieldNamePanel
142  */
143 
145 {
146 ////@begin CSourceFieldNamePanel content construction
147  CSourceFieldNamePanel* itemCFieldNamePanel1 = this;
148 
149  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
150  itemCFieldNamePanel1->SetSizer(itemBoxSizer2);
151 
152  wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
153  itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT, 0);
154 
155  wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
156  itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5);
157 
158  m_TextQualifier = new wxRadioButton(itemCFieldNamePanel1, ID_CSOURCEFIELD_TEXT_QUAL_BTN, _("Text Qualifier"), wxDefaultPosition, wxDefaultSize, 0);
159  m_TextQualifier->SetValue(true);
160  itemBoxSizer4->Add(m_TextQualifier, 0, wxALIGN_LEFT|wxALL, 5);
161 
162  m_Taxonomy = new wxRadioButton(itemCFieldNamePanel1, ID_CSOURCEFIELD_TAXONOMY_BTN, _("Taxonomy"), wxDefaultPosition, wxDefaultSize, 0);
163  m_Taxonomy->SetValue(false);
164  itemBoxSizer4->Add(m_Taxonomy, 0, wxALIGN_LEFT|wxALL, 5);
165 
166  m_Location = new wxRadioButton(itemCFieldNamePanel1, ID_CSOURCEFIELD_LOCATION_BTN, _("Location"), wxDefaultPosition, wxDefaultSize, 0);
167  m_Location->SetValue(false);
168  itemBoxSizer4->Add(m_Location, 0, wxALIGN_LEFT|wxALL, 5);
169 
170  m_Origin = new wxRadioButton(itemCFieldNamePanel1, ID_CSOURCEFIELD_ORIGIN_BTN, _("Origin"), wxDefaultPosition, wxDefaultSize, 0);
171  m_Origin->SetValue(false);
172  itemBoxSizer4->Add(m_Origin, 0, wxALIGN_LEFT|wxALL, 5);
173 
174  wxArrayString m_SourceSubListStrings;
175  m_SourceSubList = new wxListBox(itemCFieldNamePanel1, ID_CSOURCEFIELD_SRC_SUBLIST, wxDefaultPosition, wxSize(220, 109), m_SourceSubListStrings, wxLB_SINGLE);
176  itemBoxSizer3->Add(m_SourceSubList, 0, wxGROW|wxLEFT|wxRIGHT, 5);
177 
178  wxArrayString m_BioSourceTypes;
179  m_BioSourceTypes.Add(_("&All"));
180  m_BioSourceTypes.Add(_("&Descriptors"));
181  m_BioSourceTypes.Add(_("&Features"));
182  m_SourceType = new wxRadioBox(itemCFieldNamePanel1, ID_CSOURCEFIELD_SRCTYPES, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_BioSourceTypes, 1, wxRA_SPECIFY_ROWS);
183  m_SourceType->SetSelection(0);
184  itemBoxSizer2->Add(m_SourceType, 0, wxGROW | wxLEFT | wxRIGHT, 5);
185 
186 ////@end CSourceFieldNamePanel content construction
188 
189 #ifdef __WXMAC__
190  m_SourceSubList->EnsureVisible(0);
191 #endif
192 
193 }
194 
196 {
198  {
199  m_TextQualifier->SetValue(false);
200  m_Taxonomy->SetValue(true);
201  m_Location->SetValue(false);
202  m_Origin->SetValue(false);
204  }
205  else
206  {
207  m_TextQualifier->SetValue(true);
208  m_Taxonomy->SetValue(false);
209  m_Location->SetValue(false);
210  m_Origin->SetValue(false);
212  }
213  m_SourceSubList->SetSelection(wxNOT_FOUND);
214  m_SourceSubList->SetFirstItem(0);
215  m_SourceType->SetSelection(0);
216 }
217 
218 /*!
219  * Should we show tooltips?
220  */
221 
223 {
224  return true;
225 }
226 
227 /*!
228  * Get bitmap resources
229  */
230 
231 wxBitmap CSourceFieldNamePanel::GetBitmapResource( const wxString& name )
232 {
233  // Bitmap retrieval
234 ////@begin CSourceFieldNamePanel bitmap retrieval
235  wxUnusedVar(name);
236  return wxNullBitmap;
237 ////@end CSourceFieldNamePanel bitmap retrieval
238 }
239 
240 /*!
241  * Get icon resources
242  */
243 
244 wxIcon CSourceFieldNamePanel::GetIconResource( const wxString& name )
245 {
246  // Icon retrieval
247 ////@begin CSourceFieldNamePanel icon retrieval
248  wxUnusedVar(name);
249  return wxNullIcon;
250 ////@end CSourceFieldNamePanel icon retrieval
251 }
252 
254 {
255  m_SourceType->Show(false);
256 }
257 
258 static const string kInst_suffix("-inst");
259 static const string kColl_suffix("-coll");
260 static const string kSpecid_suffix("-specid");
261 
262 string CSourceFieldNamePanel::GetFieldName(const bool subfield)
263 {
264  string field = "";
265  if (m_TextQualifier->GetValue() || m_Taxonomy->GetValue()) {
266  int val = m_SourceSubList->GetSelection();
267  if (val > -1) {
268  field = ToStdString(m_SourceSubList->GetString(val));
269  }
270  } else if ( m_Location->GetValue() ) {
271  field = "genome";
272  } else if (m_Origin->GetValue()) {
273  field = "origin";
274  }
275 
276  if (m_SourceType->IsShown()) {
277  if (m_SourceType->GetSelection() == 1) {
278  field.append(" descriptor");
279  } else if (m_SourceType->GetSelection() == 2) {
280  field.append(" feature");
281  }
282  }
283  return field;
284 }
285 
286 
287 
288 bool CSourceFieldNamePanel::SetFieldName(const string& field)
289 {
290  bool rval = false;
291  SIZE_TYPE descr_pos = NStr::FindNoCase(field, " descriptor");
292  SIZE_TYPE feat_pos = NStr::FindNoCase(field, " feature");
293  string field_name(field);
294 
295  if ( descr_pos != NPOS) {
296  m_SourceType->SetSelection(1);
297  field_name = field.substr(0, descr_pos);
298  } else if (feat_pos != NPOS) {
299  m_SourceType->SetSelection(2);
300  field_name = field.substr(0, feat_pos);
301  }
302 
303  if (NStr::EqualNocase(field_name, "genome") || NStr::EqualNocase(field_name, "location")) {
304  m_Location->SetValue(true);
306  rval = true;
307  } else if (NStr::EqualNocase(field_name, "origin")) {
308  m_Origin->SetValue(true);
309  m_SourceSubList->Show(false);
310  rval = true;
311  } else {
312  bool is_textqual = false;
313  // see if it's a SubSource subtype:
315  if (issubsrc) {
317  is_textqual = true;
318  } else {
319  // is it an OrgMod subtype?
320  bool isorgmod = COrgMod::IsValidSubtypeName(field_name, COrgMod::eVocabulary_insdc);
321  if (isorgmod) {
323  is_textqual = true;
324  }
325  }
326 
327  // special cases
332  ) {
333  is_textqual = true;
334  }
335 
336  if (NStr::EndsWith(field_name, kInst_suffix)
337  || NStr::EndsWith(field_name, kColl_suffix)
338  || NStr::EndsWith(field_name, kSpecid_suffix)) {
339  is_textqual = true;
340  }
341 
342  // primers
343  if (NStr::EqualNocase(field_name, kFwdPrimerName) || NStr::EqualNocase(field_name, kFwdPrimerSeq)
344  || NStr::EqualNocase(field_name, kRevPrimerName) || NStr::EqualNocase(field_name, kRevPrimerSeq)) {
345  is_textqual = true;
346  }
347 
348  if (is_textqual) {
349  m_TextQualifier->SetValue(true);
352  rval = m_SourceSubList->SetStringSelection(kHost);
353  m_SourceSubList->SetFirstItem(kHost);
354  } else {
355  rval = m_SourceSubList->SetStringSelection(field_name);
356  if (rval) {
357  m_SourceSubList->SetFirstItem(field_name);
358  }
359  }
360  } else {
361  if (m_first_run) {
362  m_is_taxonomy_panel = true;
363  }
364  m_Taxonomy->SetValue(true);
366  rval = m_SourceSubList->SetStringSelection(field_name);
367  m_SourceSubList->SetFirstItem(field_name);
368  }
369  }
370  m_first_run = false;
371  x_UpdateParent();
372  return rval;
373 }
374 
376 {
377  if (!m_SourceSubList)
378  return;
379  m_SourceSubList->SetStringSelection(sel);
380  m_SourceSubList->SetFirstItem(sel);
381 }
382 
383 
385 {
386  return {
387  "unknown",
388  "natural",
389  "natmut",
390  "mut",
391  "artificial",
392  "synthetic",
393  "other"
394  };
395 }
396 
398 {
399  vector<string> choices;
400  choices.push_back("mitochondrion");
401  choices.push_back("chloroplast");
402  CEnumeratedTypeValues::TValues loc_values = CBioSource::ENUM_METHOD_NAME(EGenome)()->GetValues();
403  for (auto& it : loc_values) {
404  if (it.first != "mitochondrion" && it.first != "chloroplast" && it.first != "unknown") {
405  choices.push_back(it.first);
406  }
407  }
408  return choices;
409 }
410 
411 vector<string> s_GetTrueFalseList()
412 {
413  vector<string> tf_strings;
414  tf_strings.push_back("true");
415  tf_strings.push_back("");
416  return tf_strings;
417 }
418 
419 vector<string> CSourceFieldNamePanel::GetChoices(bool &allow_other)
420 {
421  vector<string> choices;
422 
423  if (m_Location->GetValue()) {
424  choices = s_GetSourceLocationOptions();
425  allow_other = false;
426  } else if (m_Origin->GetValue()) {
427  choices = s_GetSourceOriginOptions();
428  allow_other = false;
429  } else if (m_TextQualifier->GetValue()) {
430  bool is_true_false = false;
431  int val = m_SourceSubList->GetSelection();
432  if (val > -1) {
433  string field = ToStdString(m_SourceSubList->GetString(val));
434  if (!NStr::IsBlank(field)) {
435  // see if it's a SubSource subtype:
437  if (issubsrc) {
439  is_true_false = CSubSource::NeedsNoText(st);
440  }
441  // no orgmod values are true/false
442  }
443  if (is_true_false) {
444  choices = s_GetTrueFalseList();
445  allow_other = false;
446  }
447  }
448  }
449 
450  return choices;
451 }
452 
454 {
455  m_SourceSubList->Show(true);
456  m_SourceSubList->Clear();
457 
458  wxArrayString choices;
459  // subsource modifiers
460  for (int i = 0; i < CSubSource::eSubtype_other; i++) {
461  try {
462  string qual_name = CSubSource::GetSubtypeName (i);
463  if (!NStr::IsBlank(qual_name) && !CSubSource::IsDiscouraged(i)) {
464  choices.push_back(ToWxString(qual_name));
465  }
466 
467  } catch (const exception&) {
468  }
469  }
470  choices.push_back(kSubSourceNote);
471 
472  // orgmod modifiers
473  for (int i = 0; i < COrgMod::eSubtype_other; i++) {
474  try {
475  string qual_name = COrgMod::GetSubtypeName (i);
476  if (!NStr::IsBlank(qual_name)) {
477  // special case for nat-host
478  if (NStr::EqualNocase(qual_name, kNatHost)) {
479  choices.push_back(kHost);
480  } else {
481  choices.push_back(ToWxString(qual_name));
485  choices.push_back(ToWxString(qual_name + kColl_suffix));
486  choices.push_back(ToWxString(qual_name + kInst_suffix));
487  choices.push_back(ToWxString(qual_name + kSpecid_suffix));
488  }
489  }
490  }
491 
492  } catch (const exception&) {
493  }
494  }
495  choices.push_back(kOrgModNote);
496 
497  // primers
498  choices.push_back(kFwdPrimerName);
499  choices.push_back(kFwdPrimerSeq);
500  choices.push_back(kRevPrimerName);
501  choices.push_back(kRevPrimerSeq);
502 
503  choices.push_back(kDbXref);
504 
505  choices.Sort();
506  choices.insert(choices.begin(), wxT("taxname"));
507 
508  if (m_AdditionalItems) {
509  m_SourceSubList->Insert(ToWxString(kAllNotes), 0);
511  }
512 
513  ITERATE (wxArrayString, it, choices) {
514  m_SourceSubList->Append (*it);
515  }
516 }
517 
518 // BioSource
519 string CSourceFieldNamePanel::GetMacroFieldName(const string &target, const string& selected_field)
520 {
521  string str;
522  if (m_TextQualifier->GetValue() || m_Taxonomy->GetValue())
523  {
524  int val = m_SourceSubList->GetSelection();
525  if (val > -1)
526  {
527  string field = ToStdString(m_SourceSubList->GetString(val));
529  str = "\"subtype\", \"" + field + "\"";
531  str = "\"org.orgname.mod\", \"" + field + "\"";
534  str = "\"org.orgname.mod\", \"nat-host\"";
536  str = "\"org.db.db\"";
537  if (field == "taxname")
538  str = "\"org.taxname\"";
539  if (field == "lineage")
540  str = "\"org.orgname.lineage\"";
541  if (field == "division")
542  str = "\"org.orgname.div\"";
544  str = "\"org.orgname.mod\", \"other\"";
546  str = "\"subtype\", \"other\"";
547  if ( NStr::EqualNocase(field, kFwdPrimerSeq))
548  str = "\"pcr-primers..forward..seq\"";
549  if (NStr::EqualNocase(field, kRevPrimerSeq))
550  str = "\"pcr-primers..reverse..seq\"";
551  if ( NStr::EqualNocase(field, kFwdPrimerName))
552  str = "\"pcr-primers..forward..name\"";
553  if (NStr::EqualNocase(field, kRevPrimerName))
554  str = "\"pcr-primers..reverse..name\"";
555  if (field == "common name")
556  str = "\"org.common\"";
558  auto pos = field.find_last_of('-');
559  str = macro::CMacroFunction_StructVoucherPart::GetFuncName();
560  str += "(\"" + field.substr(0, pos) + "\", \"" + field.substr(pos + 1) + "\")";
561  }
562  }
563  }
564 
565  if ( m_Location->GetValue() )
566  {
567  str = "\"genome\"";
568  }
569 
570  if (m_Origin->GetValue())
571  {
572  str = "\"origin\"";
573  }
574 
575  if (!str.empty())
576  {
577  if (target == macro::CMacroBioData::sm_BioSource) {
578 
579  }
580  else if (target == macro::CMacroBioData::sm_MolInfo) {
581  str = macro::CMacroFunction_GetSeqdesc::sm_BsrcForMolinfo + string("(") + str + ")";
582  }
583  else if (target == macro::CMacroBioData::sm_StrComm || target == macro::CMacroBioData::sm_Pubdesc) {
584  str = macro::CMacroFunction_GetSeqdesc::sm_BsrcForSeqdesc + string("(") + str + ")";
585  }
586  else if (target == macro::CMacroBioData::sm_Seq || target == macro::CMacroBioData::sm_SeqNa) {
587  str = macro::CMacroFunction_GetSeqdesc::sm_BsrcForSeq + string("(") + str + ")";
588  }
589  else if (CFieldNamePanel::IsFeature(target)) {
590  str = macro::CMacroFunction_GetSeqdesc::sm_BsrcForFeat + string("(") + str + ")";
591  }
592  else {
593  str.clear();
594  }
595  }
596 
597  return str;
598 }
599 
601 {
602  m_SourceSubList->Show(true);
603  m_SourceSubList->Clear();
604 
605  m_SourceSubList->Append(_("taxname"));
606  m_SourceSubList->Append(_("common name"));
607  m_SourceSubList->Append(_("division"));
608  m_SourceSubList->Append(_("lineage"));
609  m_SourceSubList->SetStringSelection(_("taxname"));
610  m_SourceSubList->SetFirstItem(_("taxname"));
611 }
612 
614 {
615  m_SourceSubList->Clear();
616  m_SourceSubList->Show(false);
617 }
618 
619 
620 /*!
621  * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TEXT_QUAL_BTN
622  */
623 
624 void CSourceFieldNamePanel::OnTextQualBtnSelected( wxCommandEvent& event )
625 {
627  x_UpdateParent();
628  event.Skip();
629 }
630 
631 
632 /*!
633  * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TAXONOMY_BTN
634  */
635 
636 void CSourceFieldNamePanel::OnTaxonomyBtnSelected( wxCommandEvent& event )
637 {
639  x_UpdateParent();
640  event.Skip();
641 }
642 
643 
644 /*!
645  * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_LOCATION_BTN
646  */
647 
648 void CSourceFieldNamePanel::OnLocationBtnSelected( wxCommandEvent& event )
649 {
651  x_UpdateParent();
652  event.Skip();
653 }
654 
655 
656 /*!
657  * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ORIGIN_BTN
658  */
659 
660 void CSourceFieldNamePanel::OnOriginBtnSelected( wxCommandEvent& event )
661 {
662  m_SourceSubList->Show(false);
663  x_UpdateParent();
664  event.Skip();
665 }
666 
667 
668 /*!
669  * wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_SRC_SUBLIST
670  */
671 
672 void CSourceFieldNamePanel::OnSrcSublistSelected( wxCommandEvent& event )
673 {
674  x_UpdateParent();
675  event.Skip();
676 }
677 
678 
void x_UpdateParent(void)
static bool IsFeature(const string &target)
@ eVocabulary_insdc
Definition: OrgMod.hpp:69
static bool IsValidSubtypeName(const string &str, EVocabulary vocabulary=eVocabulary_raw)
Definition: OrgMod.cpp:86
static string GetSubtypeName(TSubtype stype, EVocabulary vocabulary=eVocabulary_raw)
Definition: OrgMod.cpp:108
static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)
Definition: OrgMod.cpp:62
void SetSourceSubpanelSelection(const string &sel)
virtual bool SetFieldName(const string &field)
static vector< string > s_GetSourceLocationOptions()
virtual vector< string > GetChoices(bool &allow_other)
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
void OnLocationBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_LOCATION_BTN
void OnTextQualBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TEXT_QUAL_BTN
void OnOriginBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ORIGIN_BTN
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
virtual string GetMacroFieldName(const string &target, const string &selected_field=kEmptyStr)
static vector< string > s_GetSourceOriginOptions()
void OnTaxonomyBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TAXONOMY_BTN
bool Create(wxWindow *parent, wxWindowID id=ID_CSOURCEFIELDNAMEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
static bool ShowToolTips()
Should we show tooltips?
void OnSrcSublistSelected(wxCommandEvent &event)
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_SRC_SUBLIST
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)
Definition: SubSource.cpp:128
static bool IsValidSubtypeName(const string &str, EVocabulary vocabulary=eVocabulary_raw)
Definition: SubSource.cpp:157
@ eVocabulary_insdc
Definition: SubSource.hpp:83
static string GetSubtypeName(CSubSource::TSubtype stype, EVocabulary vocabulary=eVocabulary_raw)
Definition: SubSource.cpp:185
static bool NeedsNoText(const TSubtype &subtype)
Definition: SubSource.cpp:233
static bool IsDiscouraged(const TSubtype subtype)
Definition: SubSource.cpp:247
#define _(proto)
Definition: ct_nlmzip_i.h:78
const char * kOrgModNote
const char * kFwdPrimerSeq
const char * kFwdPrimerName
const char * kDbXref
const char * kAllNotes
const char * kAllPrimers
const char * kSubSourceNote
const char * kNatHost
const char * kHost
const char * kRevPrimerName
const char * kRevPrimerSeq
#define true
Definition: bool.h:35
#define false
Definition: bool.h:36
static void Init(void)
Definition: cursor6.c:76
static const char * str(char *buf, int n)
Definition: stats.c:84
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
string
Definition: cgiapp.hpp:687
#define NULL
Definition: ncbistd.hpp:225
list< pair< string, TEnumValueType > > TValues
Definition: enumvalues.hpp:54
bool IsStructVoucherPart(const string &field)
Definition: macro_util.cpp:826
#define ENUM_METHOD_NAME(EnumName)
Definition: serialbase.hpp:994
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
NCBI_NS_STD::string::size_type SIZE_TYPE
Definition: ncbistr.hpp:132
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
Definition: ncbistr.cpp:2993
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
Definition: ncbistr.hpp:5430
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106
#define NPOS
Definition: ncbistr.hpp:133
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5353
@ eSubtype_other
ASN5: old-name (254) will be added to next spec.
Definition: OrgMod_.hpp:125
@ eSubtype_specimen_voucher
Definition: OrgMod_.hpp:106
@ eSubtype_bio_material
Definition: OrgMod_.hpp:119
@ eSubtype_culture_collection
Definition: OrgMod_.hpp:118
END_EVENT_TABLE()
int i
#define wxT(x)
Definition: muParser.cpp:41
const struct ncbi::grid::netcache::search::fields::SIZE size
bool QualifierNamesAreEquivalent(string name1, string name2)
USING_SCOPE(objects)
vector< string > s_GetTrueFalseList()
static const string kSpecid_suffix("-specid")
static const string kColl_suffix("-coll")
static const string kInst_suffix("-inst")
wxString ToWxString(const string &s)
Definition: wx_utils.hpp:173
string ToStdString(const wxString &s)
Definition: wx_utils.hpp:161
Modified on Mon Jun 17 05:05:30 2024 by modify_doxy.py rev. 669887