EVT_CHOICE( ID_CFIELD_TYPE_CHOICE,
CFieldChoicePanel::OnFieldTypeChoiceSelected )
89 CFieldChoicePanel::CFieldChoicePanel( wxWindow* parent,
constvector<CFieldNamePanel::EFieldType>& field_types,
boolhorizontal,
boolis_pair, wxWindowID
id,
constwxPoint& pos,
constwxSize&
size,
longstyle )
90: m_IsPair (is_pair), m_IsHorizontal(horizontal), m_Composed(
false), m_FieldTypes(field_types), m_Field1(
NULL), m_Field2(
NULL)
93 Create(parent, field_types, horizontal,
id, pos,
size, style);
101 bool CFieldChoicePanel::Create( wxWindow* parent,
constvector<CFieldNamePanel::EFieldType>& field_types,
boolhorizontal, wxWindowID
id,
constwxPoint& pos,
constwxSize&
size,
longstyle )
104CFieldNamePanel::Create( parent,
id, pos,
size, style );
109GetSizer()->SetSizeHints(
this);
152wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
153itemCFieldNamePanel1->SetSizer(itemBoxSizer2);
158wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
159itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_LEFT|wxALL, 5);
165itemBoxSizer4->Add(
m_FieldPicker, 0, wxALIGN_TOP|wxLEFT|wxRIGHT, 5);
168wxArrayString field_type_strings;
228wxCommandEvent fieldTypeEvent(wxEVT_COMMAND_UPDATE_CONSTRAINT_FIELD,
GetId());
229fieldTypeEvent.SetEventObject(
this);
230GetEventHandler()->ProcessEvent(fieldTypeEvent);
250 switch(field_type) {
300 if(featfield_panel) {
396wxCommandEvent fieldTypeEvent(wxEVT_COMMAND_UPDATE_STRUCTCOMMENT_FIELD);
397fieldTypeEvent.SetEventObject(
this);
398GetEventHandler()->ProcessEvent(fieldTypeEvent);
476min_width += borders;
477min_height += borders;
479 intthis_width, this_height;
482 m_Field1->GetSize(&this_width, &this_height);
483min_width += this_width + borders;
484this_height += borders;
485 if(this_height > min_height) {
486min_height = this_height;
490 m_Field2->GetSize(&this_width, &this_height);
491min_width += this_width + borders;
492this_height += borders;
493 if(this_height > min_height) {
494min_height = this_height;
499 m_Field1->GetSize(&this_width, &this_height);
500min_height += this_height + borders;
501this_width += borders;
502 if(this_width > min_width) {
503min_width = this_width;
507 m_Field2->GetSize(&this_width, &this_height);
508min_width += this_width + borders;
514}
else if(min_width < 380) {
519}
else if(min_height < 185) {
523wxSize min_size(min_width, min_height);
524this->SetMinClientSize(min_size);
573vector<CFieldNamePanel::EFieldType> field_types;
575 for(
size_t i= 0;
i<
strings.size();
i++) {
578field_types.push_back(field_type);
593vector<string> choices;
620field =
"RNA "+ field;
641 if(pos == string::npos) {
651 tmp=
tmp.substr(field_name_str.length());
677answer =
AutoMatch(field_name, field_type);
684 if(field_names.empty()) {
688 unsigned intunmatched = 0;
689 ITERATE(vector<string>, it, field_names) {
696 return(unmatched <= (2*field_names.size())/3);
704 switch(field_type) {
707vector<CFieldNamePanel::EFieldType> guess_preference;
713 ITERATE(vector<CFieldNamePanel::EFieldType>, it, guess_preference) {
780answer =
"specimen-voucher";
812 ITERATE(vector<string>, it, options) {
826 ITERATE(vector<string>, it, options) {
841 if(pos != string::npos) {
842 stringfeat = field_name.substr(0, pos);
843 stringqual = field_name.substr(pos + 1);
845vector<string> features;
847 stringanswer_feat =
"";
848 ITERATE(vector<string>, it, features) {
855 stringanswer_qual =
"";
860answer_qual = check_qual;
874answer = answer_feat +
" "+ answer_qual;
886 stringanswer_rna_type =
"";
887 stringremainder = field_name;
889 if(pos != string::npos) {
890 stringcheck_rna_type = field_name.substr(0, pos);
891 ITERATE(vector<string>, it, rna_types) {
893answer_rna_type = *it;
894remainder = field_name.substr(pos);
900answer_rna_type = rna_types[0];
904 stringncrna_class =
"";
905 stringanswer_field =
"";
907 ITERATE(vector<string>, it, rna_fields) {
909 if(remainder.length() > (*it).length()) {
910ncrna_class = remainder.substr(0, remainder.length() - (*it).length());
917 ITERATE(vector<string>, it, rna_fields) {
925answer = answer_rna_type;
927answer +=
" "+ ncrna_class;
929answer +=
" "+ answer_field;
941 ITERATE(vector<string>, it, field_names) {
956 ITERATE(vector<string>, it, field_names) {
970 ITERATE(vector<string>, it, field_names) {
static vector< string > GetStrings()
static vector< string > GetFieldNames()
CConfigurableItems - a static list of items that can be configured.
void GetDescriptions(vector< string > &descs, bool hierarchical=false) const
return a list of all the feature descriptions for a menu or other control.
void PopulateFeatureListbox(void)
static string AutoMatchRNA(string field_name)
string GetField2(const bool subfield=false)
static string AutoMatchFeat(string field_name)
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
bool SetFieldType(CFieldNamePanel::EFieldType field_type, bool is_pair=false)
bool IsOneFieldProteinName(void)
static bool LooksLikeHeader(const vector< string > &field_names)
~CFieldChoicePanel()
Destructor.
const vector< CFieldNamePanel::EFieldType > GetFieldTypes()
static string AutoMatch(string field_name)
bool SetOneFieldName(const string &field)
void SetSubpanelSelection(const string &sel)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
static bool ShowToolTips()
Should we show tooltips?
static string AutoMatchSrc(string field_name)
CFieldChoicePanel()
Constructors.
void OnFieldTypeChoiceSelected(wxCommandEvent &event)
static string AutoMatchMolInfo(string field_name)
static string AutoMatchMisc(string field_name)
virtual vector< string > GetChoices(bool &allow_other)
wxBoxSizer * m_FieldPicker
void CreateControls()
Creates the controls and sizers.
wxBoxSizer * m_TopFieldTypeSizer
virtual bool SetFieldName(const string &field)
void Init()
Initialises member variables.
string GetField1(const bool subfield=false)
static string AutoMatchPub(string field_name)
void IncludeComposedItems(bool show)
static string AutoMatchDBLink(string field_name)
wxBoxSizer * m_SideFieldTypeSizer
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CFieldNamePanel * m_Field1
bool Create(wxWindow *parent, const vector< CFieldNamePanel::EFieldType > &field_types, bool horizontal, wxWindowID id=ID_CFIELDCHOICEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSIMPLE_BORDER|wxTAB_TRAVERSAL)
Creation.
CFieldNamePanel::EFieldType GetFieldType()
CFieldNamePanel * m_Field2
static string AutoMatchCGP(string field_name)
vector< CFieldNamePanel::EFieldType > m_FieldTypes
virtual string GetFieldName(const bool subfield=false)=0
Returns the name of the field as selected in the panel.
bool x_IsParentAECRDlg(void)
virtual void SetShowLegalOnly(bool show)
virtual vector< string > GetChoices(bool &allow_other)
@ eFieldType_BankITComment
@ eFieldType_StructuredComment
virtual bool SetFieldName(const string &field)=0
static string GetFieldTypeName(EFieldType field_type)
void x_UpdateParent(void)
static EFieldType GetFieldTypeFromName(const string &field_type_name)
static vector< string > GetStrings()
static vector< string > GetFieldNames()
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)
static string NormalizePubFieldName(string orig_label)
static vector< string > GetFieldNames(bool extended=false)
static vector< string > GetRNAFields()
static vector< string > GetRNATypes()
EQualifier
List of available qualifiers for feature keys.
static const CFeatList * GetFeatList()
static CTempString GetQualifierAsString(EQualifier qual)
Convert a qualifier from an enumerated value to a string representation or empty if not found.
void SetSourceSubpanelSelection(const string &sel)
void DoNotShowSubList(bool val)
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)
static const string kSpecid_suffix("-specid")
wxDEFINE_EVENT(wxEVT_COMMAND_UPDATE_CONSTRAINT_FIELD, wxCommandEvent)
static const string kColl_suffix("-coll")
static const string kInst_suffix("-inst")
const char * kDefinitionLineLabel
const char * kFwdPrimerSeq
const char * kFieldTypeSeqId
const char * kFwdPrimerName
const char * kSubSourceNote
const char * kTaxnameAfterBinomial
const char * kRevPrimerName
const char * kBankITComment
const char * kRevPrimerSeq
static const char *const strings[]
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
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 bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
static string & ToLower(string &str)
Convert string to lower case â string& version.
@ eReverseSearch
Search in a backward direction.
@ eNocase
Case insensitive compare.
@ eCase
Case sensitive compare.
const struct ncbi::grid::netcache::search::fields::SIZE size
bool IsOrgColumnName(string name)
bool QualifierNamesAreEquivalent(string name1, string name2)
bool IsOrgModNoteName(const string &name)
bool IsSubSourceNoteName(const string &name)
static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
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