wxPanel::Create( parent,
id, pos,
size, style );
109GetSizer()->SetSizeHints(
this);
157wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxHORIZONTAL);
158itemPanel1->SetSizer(itemBoxSizer2);
160wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxVERTICAL);
161itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_TOP|wxALL, 5);
163wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxVERTICAL);
164itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
174itemBoxSizer3->Add(530, 0, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
176wxBoxSizer* itemBoxSizer8 =
newwxBoxSizer(wxVERTICAL);
177itemBoxSizer3->Add(itemBoxSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
179wxFlexGridSizer* itemFlexGridSizer9 =
newwxFlexGridSizer(0, 3, 0, 0);
180itemBoxSizer3->Add(itemFlexGridSizer9, 0, wxGROW|wxALL, 0);
182wxStaticText* itemStaticText10 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Source Note"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
183itemFlexGridSizer9->Add(itemStaticText10, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
186itemFlexGridSizer9->Add(
m_SrcInfo, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
188wxHyperlinkCtrl* itemHyperlinkCtrl12 =
newwxHyperlinkCtrl( itemPanel1,
ID_CLR_SRC_NOTE,
_(
"Clear"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
189itemFlexGridSizer9->Add(itemHyperlinkCtrl12, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
191wxStaticText* itemStaticText13 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Organism Note"), wxDefaultPosition, wxDefaultSize, 0 );
192itemFlexGridSizer9->Add(itemStaticText13, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
195itemFlexGridSizer9->Add(
m_OrgNote, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
197wxHyperlinkCtrl* itemHyperlinkCtrl15 =
newwxHyperlinkCtrl( itemPanel1,
ID_CLR_ORG_NOTE,
_(
"Clear"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
198itemFlexGridSizer9->Add(itemHyperlinkCtrl15, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
200itemBoxSizer2->Add(0, 500, 0, wxALIGN_TOP|wxALL, 0);
209wxBoxSizer* itemBoxSizer9 =
newwxBoxSizer(wxVERTICAL);
210itemBoxSizer3->Add(itemBoxSizer9, 1, wxGROW|wxALL, 5);
218itemBoxSizer9->Add(
m_PCRCheckbox, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
231wxStaticText* itemStaticTextPCRSet =
newwxStaticText(
this, wxID_STATIC,
_(
"Set"), wxDefaultPosition, wxSize(25,-1), wxALIGN_CENTRE );
234wxStaticText* itemStaticTextPCRDir =
newwxStaticText(
this, wxID_STATIC,
_(
"Direction"), wxDefaultPosition, wxSize(80,-1), wxALIGN_CENTRE );
237wxStaticText* itemStaticText14 =
newwxStaticText(
this, wxID_STATIC,
_(
"Name"), wxDefaultPosition, wxSize(80,-1), wxALIGN_CENTRE );
240wxStaticText* itemStaticText15 =
newwxStaticText(
this, wxID_STATIC,
_(
"Sequence"), wxDefaultPosition, wxSize(80,-1), wxALIGN_CENTRE );
243wxStaticText* itemStaticText16 =
newwxStaticText(
this, wxID_STATIC,
_(
" "), wxDefaultPosition, wxSize(80,-1), wxALIGN_CENTRE );
249wxButton* itemButton1 =
newwxButton(
this,
ID_ADD_PCR_PRIMER,
_(
"Add Another Primer"), wxDefaultPosition, wxDefaultSize, 0 );
278 if(!wxPanel::TransferDataToWindow())
330 m_Source->GetOrg().GetOrgname().IsSetMod())
342 om->Assign(**src_it);
377wxSizerItemList& children =
m_Sizer->GetChildren();
378wxSizerItemList::iterator node = children.begin();
379 for(; node != children.end(); ++node)
380(**node).DeleteWindows();
383 for(
auto&& it :
m_Data) {
420 m_Sizer->Add(panel, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0);
422 wxT(
"Delete"),
wxT(
""), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
423 m_Sizer->Add(itemHyperlinkCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 0);
427panel->GetClientSize(&row_width, &row_height);
431itemHyperlinkCtrl->GetClientSize (&link_width, &link_height);
432 if(link_height > row_height) {
433row_height = link_height;
435row_width += link_width;
448 x_AddRow(wxEmptyString, wxEmptyString);
453 if(!wxPanel::TransferDataFromWindow())
461 m_Source->SetOrg().SetOrgname().ResetMod();
480 m_Source->SetOrg().SetOrgname().SetMod().push_back(org_mod);
487 m_Source->SetSubtype().push_back(sub_src);
492wxSizerItemList& children =
m_Sizer->GetChildren();
493wxSizerItemList::iterator node = children.begin();
494 for(; node != children.end(); ++node) {
495wxWindow *w = (*node)->GetWindow();
500 if(singlemod_panel) {
528wxSizerItemList& children =
m_Sizer->GetChildren();
529wxSizerItemList::iterator node = children.begin();
531 while(node != children.end()) {
533wxWindow *w = (*node)->GetWindow();
545 m_Data.push_back(single_modifier_data);
557biosrc.
SetOrg().SetOrgname().ResetMod();
562sub_src->
SetSubtype((*src_it)->GetSubtype());
563sub_src->
SetName((*src_it)->GetName());
570biosrc.
SetOrg().SetOrgname().ResetMod();
574org_mod->
SetSubtype((*src_it)->GetSubtype());
575org_mod->
SetSubname((*src_it)->GetSubname());
576biosrc.
SetOrg().SetOrgname().SetMod().push_back(org_mod);
583biosrc.
SetOrg().SetOrgname().SetMod().push_back(org_mod);
599 static bool s_IsLastRow(wxWindow* wnd, wxSizerItemList& itemList)
601 boolis_last =
false;
605 for(wxSizerItemList::iterator it = itemList.begin(); it != itemList.end(); ++it) {
606wxWindow* child = (**it).GetWindow();
607 if(child && child == wnd) {
627wxSizerItemList& itemList =
m_Sizer->GetChildren();
639wxWindow* wnd = (wxWindow*)event.GetEventObject();
644wxSizerItemList& itemList =
m_Sizer->GetChildren();
645wxSizerItemList::iterator item_it =
x_FindRow(wnd, itemList);
647 for(
int i= 0; item_it != itemList.end() &&
i<
kCtrlColNum; ++
i) {
648(**item_it).DeleteWindows();
649item_it = itemList.erase(item_it);
652 if(itemList.empty()) {
661 returnitemList.end();
663wxSizerItemList::iterator
row= itemList.end(), it = itemList.begin();
665 for(; it != itemList.end(); ++it) {
666wxWindow* child = (**it).GetWindow();
716 autodit =
m_Data.begin();
717 while(dit !=
m_Data.end())
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
CHyperlink is wrapper class for wxHyperlinkCtrl On OSX platform it posts URL click instead of sending...
@OrgMod.hpp User-defined methods of the data storage class.
static bool IsValidSubtypeName(const string &str, EVocabulary vocabulary=eVocabulary_raw)
static string GetSubtypeName(TSubtype stype, EVocabulary vocabulary=eVocabulary_raw)
static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)
virtual bool TransferDataToWindow()
virtual bool TransferDataFromWindow()
void UpdateBioSourcePrimers(objects::CBioSource &source)
void x_AddEmptyRow(int nset=0, bool fwd_dir=true)
void x_AdjustScrollWindow()
CRichTextCtrl - a wrapper for wxRichTextCtrl that handles additional keyboard events (such as Clipboa...
void OnPCRCheckBox(wxCommandEvent &event)
void OnAddPCRPrimer(wxCommandEvent &event)
void OnDelete(wxHyperlinkEvent &event)
list< CRef< objects::COrgMod > > m_ReadOnlyQuals
void OnClrSrcNoteHyperlinkClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_CLR_SRC_NOTE
void OnClrOrgNoteHyperlinkClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_CLR_ORG_NOTE
void x_SetSrcOrgMod(int subtype, const string &value)
wxSizerItemList::iterator x_FindRow(wxWindow *wnd, wxSizerItemList &itemList)
virtual bool TransferDataFromWindow()
CRef< objects::CBioSource > m_Source
wxScrolledWindow * m_ScrolledWindow
wxBoxSizer * m_PCRPrimersBoxSizer1
CRichTextCtrl * m_OrgNote
void PopulateModifiers(objects::CBioSource &biosrc)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
virtual bool TransferDataToWindow()
CRichTextCtrl * m_SrcInfo
void x_AddRow(wxString name, wxString value)
static bool ShowToolTips()
Should we show tooltips?
wxBoxSizer * m_PCRPrimersBoxSizer2
void OnChangedTaxname(void)
void CreateControls()
Creates the controls and sizers.
wxFlexGridSizer * m_Sizer
void SetSource(const objects::CBioSource &biosrc)
void x_SetSrcSubMod(int subtype, const string &value)
wxCheckBox * m_PCRCheckbox
CSrcModListPanel()
Constructors.
void x_ShowPCRPrimerItems(bool value)
CPCRPrimersPanel * m_PCRPrimersPanel
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void Init()
Initialises member variables.
wxBoxSizer * m_PCRPrimersBoxSizer3
bool Create(wxWindow *parent, wxWindowID id=ID_CSRCMODLISTPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
void AddLastSrcMod(wxWindow *link)
~CSrcModListPanel()
Destructor.
void x_SetBioSourceModifier(const string &name, const string &value)
const SModData & GetModifierData()
static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)
static bool IsValidSubtypeName(const string &str, EVocabulary vocabulary=eVocabulary_raw)
static string GetSubtypeName(CSubSource::TSubtype stype, EVocabulary vocabulary=eVocabulary_raw)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static const char label[]
void SetSubtype(TSubtype value)
Assign a value to Subtype data member.
bool IsSetOrg(void) const
Check if a value has been assigned to Org data member.
list< CRef< CSubSource > > TSubtype
const TOrg & GetOrg(void) const
Get the Org member data.
void SetOrg(TOrg &value)
Assign a value to Org data member.
void SetName(const TName &value)
Assign a value to Name data member.
TSubtype & SetSubtype(void)
Assign a value to Subtype data member.
void ResetSubtype(void)
Reset Subtype data member.
void SetSubtype(TSubtype value)
Assign a value to Subtype data member.
list< CRef< COrgMod > > TMod
bool IsSetOrgname(void) const
Check if a value has been assigned to Orgname data member.
void SetSubname(const TSubname &value)
Assign a value to Subname data member.
@ eSubtype_gb_acronym
used by taxonomy database
@ eSubtype_gb_synonym
used by taxonomy database
@ eSubtype_other
ASN5: old-name (254) will be added to next spec.
@ eSubtype_gb_anamorph
used by taxonomy database
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
const CharType(& source)[N]
#define ID_ADD_PCR_PRIMER
static bool s_IsLastRow(wxWindow *wnd, wxSizerItemList &itemList)
static bool s_IsReadOnly(COrgMod::TSubtype subtype)
static bool s_IsNonText(string label)
CRef< objects::CObjectManager > om
#define row(bind, expected)
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)
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