34 #include "wx/wxprec.h"
54 #include <wx/statline.h>
87 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
88 wxFrame::Create( parent,
id, caption, pos,
size, style );
93 GetSizer()->SetSizeHints(
this);
95 Centre(wxBOTH|wxCENTRE_ON_SCREEN);
130 wxBoxSizer* itemBoxSizer0 =
new wxBoxSizer(wxVERTICAL);
131 SetSizer(itemBoxSizer0);
133 wxPanel* parentPanel =
new wxPanel(
this,
wxID_ANY);
134 itemBoxSizer0->Add(parentPanel, 1, wxGROW, 0);
136 wxBoxSizer* itemBoxSizer1 =
new wxBoxSizer(wxHORIZONTAL);
137 parentPanel->SetSizer(itemBoxSizer1);
139 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
140 itemBoxSizer1->Add(itemBoxSizer2, 0, wxALIGN_TOP|wxALL, 5);
142 wxBoxSizer* itemBoxSizer3 =
new wxBoxSizer(wxHORIZONTAL);
143 itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
145 wxArrayString m_MatchTypeStrings;
146 m_MatchTypeStrings.Add(
_(
"Contains"));
147 m_MatchTypeStrings.Add(
_(
"Does not contain"));
148 m_MatchTypeStrings.Add(
_(
"Equals"));
149 m_MatchTypeStrings.Add(
_(
"Does not equal"));
150 m_MatchTypeStrings.Add(
_(
"Starts with"));
151 m_MatchTypeStrings.Add(
_(
"Ends with"));
152 m_MatchTypeStrings.Add(
_(
"Is one of"));
153 m_MatchTypeStrings.Add(
_(
"Is not one of"));
154 m_MatchTypeStrings.Add(
_(
"Does not start with"));
155 m_MatchTypeStrings.Add(
_(
"Does not end with"));
159 itemBoxSizer3->Add(
m_MatchType, 0, wxALIGN_TOP|wxLEFT|wxRIGHT|wxBOTTOM, 5);
163 itemBoxSizer3->Add(
m_TextSizer, 0, wxALIGN_TOP, 0);
167 wxArrayString choice_strings;
168 m_MatchChoice =
new wxComboBox(parentPanel,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(300, -1), choice_strings, 0 );
172 wxBoxSizer* itemBoxSizer6 =
new wxBoxSizer(wxHORIZONTAL);
173 itemBoxSizer2->Add(itemBoxSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
177 itemBoxSizer6->Add(
m_IgnoreCase, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
181 itemBoxSizer6->Add(
m_IgnoreSpace, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
185 itemBoxSizer6->Add(
m_IgnorePunct, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
187 wxBoxSizer* itemBoxSizer7 =
new wxBoxSizer(wxHORIZONTAL);
188 itemBoxSizer2->Add(itemBoxSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
192 itemBoxSizer7->Add(
m_WholeWord, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
196 itemBoxSizer7->Add(
m_IgnoreSyn, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
198 wxBoxSizer* itemBoxSizer8 =
new wxBoxSizer(wxHORIZONTAL);
199 itemBoxSizer2->Add(itemBoxSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
203 itemBoxSizer8->Add(
m_AnyLetters, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
207 itemBoxSizer8->Add(
m_AllUpper, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
211 itemBoxSizer8->Add(
m_AllLower, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
215 itemBoxSizer8->Add(
m_AllPunct, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
217 wxBoxSizer* itemBoxSizer9 =
new wxBoxSizer(wxHORIZONTAL);
218 itemBoxSizer2->Add(itemBoxSizer9, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
221 itemBoxSizer9->Add(
m_ClearButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
225 itemBoxSizer9->Add(
m_WordSubst, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
228 wxBoxSizer* itemBoxSizer10 =
new wxBoxSizer(wxHORIZONTAL);
229 itemBoxSizer2->Add(itemBoxSizer10, 0, wxALIGN_CENTER_HORIZONTAL, 0);
231 wxButton* itemButton13 =
new wxButton( parentPanel, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
232 itemBoxSizer10->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
234 wxButton* itemButton14 =
new wxButton( parentPanel, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
235 itemBoxSizer10->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
269 if (!sc ||
label.empty())
275 constraint->SetString(*sc);
276 pair<string, CRef<CConstraint_choice> > item(
label, constraint);
277 wxWindow* parent = GetParent();
316 wxArrayString choice_strings;
317 ITERATE(vector<string>, it, choices)
418 default: c.
Reset();
break;
434 if (!match_text.empty())
461 str +=
"'" + match_text +
"' ";
466 subs.push_back(
"case-sensitive");
469 subs.push_back(
"ignore spaces");
472 subs.push_back(
"ignore punctuation");
475 subs.push_back(
"whole word");
478 subs.push_back(
"ignore 'putative' synonyms");
483 str +=
"(" + sub +
")";
500 sub =
"all letters are upper case";
503 sub =
"all letters are lower case";
506 sub =
"all characters are punctiation";
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.
void SetMatch_text(const TMatch_text &value)
void SetChoices(const vector< string > &choices)
wxCheckBox * m_IgnoreCase
CRef< objects::CString_constraint > GetStringConstraint()
void SetConstraint(const objects::CConstraint_choice &constraint)
wxRadioButton * m_AllPunct
wxCheckBox * m_IgnoreSpace
wxComboBox * m_MatchChoice
static bool ShowToolTips()
@ eMatchType_DoesNotEndWith
@ eMatchType_DoesNotEqual
@ eMatchType_DoesNotStartWith
@ eMatchType_DoesNotContain
wxCheckBox * m_IgnorePunct
wxIcon GetIconResource(const wxString &name)
CRef< objects::CWord_substitution_set > m_word_subst
virtual void AddWordSubstSet(CRef< objects::CWord_substitution_set > word_subst)
wxRadioButton * m_AllLower
@ ID_STRING_CONSTRAINT_MATCH_TEXT
@ ID_STRING_CONSTRAINT_CHECKBOX9
@ ID_STRING_CONSTRAINT_WORDSUBST_BUTTON
@ ID_STRING_CONSTRAINT_MATCH_CHOICE
@ ID_STRING_CONSTRAINT_CLEAR_BUTTON
@ ID_STRING_CONSTRAINT_RADIO3
@ ID_STRING_CONSTRAINT_RADIO2
@ ID_STRING_CONSTRAINT_RADIO0
@ ID_STRING_CONSTRAINT_CHECKBOX8
@ ID_STRING_CONSTRAINT_CHECKBOX5
@ ID_STRING_CONSTRAINT_RADIO1
@ ID_STRING_CONSTRAINT_CHECKBOX6
@ ID_STRING_CONSTRAINT_CHECKBOX7
void OnClear(wxCommandEvent &event)
@begin CMacroAdvStringConstraintPanel event handler declarations
void OnMatchTypeSelected(wxCommandEvent &event)
void ShowChoiceOrText(void)
wxRadioButton * m_AnyLetters
wxBitmap GetBitmapResource(const wxString &name)
void OnAccept(wxCommandEvent &event)
void OnWordSubstitution(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Constraint"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
wxRadioButton * m_AllUpper
void OnCancel(wxCommandEvent &event)
void AddConstraint(pair< string, CRef< objects::CConstraint_choice > > item, int id)
static string GetDescription(CRef< objects::CWord_substitution > ws)
static const char * str(char *buf, int n)
#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.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static const char label[]
TCase_sensitive GetCase_sensitive(void) const
Get the Case_sensitive member data.
bool IsLegal_qual(void) const
Check if variant Legal_qual is selected.
bool IsSetIgnore_weasel(void) const
Check if a value has been assigned to Ignore_weasel data member.
bool IsSetIs_all_lower(void) const
Check if a value has been assigned to Is_all_lower data member.
bool IsSetIs_all_punct(void) const
Check if a value has been assigned to Is_all_punct data member.
const TIgnore_words & GetIgnore_words(void) const
Get the Ignore_words member data.
void SetIs_all_lower(TIs_all_lower value)
Assign a value to Is_all_lower data member.
TIgnore_space GetIgnore_space(void) const
Get the Ignore_space member data.
const TField & GetField(void) const
Get the variant data.
bool IsSetType(void) const
Check if a value has been assigned to Type data member.
TMatch_location GetMatch_location(void) const
Get the Match_location member data.
const TString & GetString(void) const
Get the variant data.
bool IsSetCase_sensitive(void) const
Check if a value has been assigned to Case_sensitive data member.
TIs_all_caps GetIs_all_caps(void) const
Get the Is_all_caps member data.
bool IsSetIgnore_punct(void) const
Check if a value has been assigned to Ignore_punct data member.
void SetIs_all_punct(TIs_all_punct value)
Assign a value to Is_all_punct data member.
bool IsSetNot_present(void) const
Check if a value has been assigned to Not_present data member.
TWhole_word GetWhole_word(void) const
Get the Whole_word member data.
TLegal_qual GetLegal_qual(void) const
Get the variant data.
TIgnore_weasel GetIgnore_weasel(void) const
Get the Ignore_weasel member data.
bool IsSetWhole_word(void) const
Check if a value has been assigned to Whole_word data member.
const TField & GetField(void) const
Get the Field member data.
bool IsSetField(void) const
Check if a value has been assigned to Field data member.
void SetIgnore_punct(TIgnore_punct value)
Assign a value to Ignore_punct data member.
const TFeature_field & GetFeature_field(void) const
Get the variant data.
TIgnore_punct GetIgnore_punct(void) const
Get the Ignore_punct member data.
void SetIgnore_words(TIgnore_words &value)
Assign a value to Ignore_words data member.
bool IsFeature_field(void) const
Check if variant Feature_field is selected.
void SetMatch_location(TMatch_location value)
Assign a value to Match_location data member.
const TMatch_text & GetMatch_text(void) const
Get the Match_text member data.
bool IsString(void) const
Check if variant String is selected.
const TString_constraint & GetString_constraint(void) const
Get the String_constraint member data.
TNot_present GetNot_present(void) const
Get the Not_present member data.
bool IsSetString_constraint(void) const
Check if a value has been assigned to String_constraint data member.
bool IsSetField(void) const
Check if a value has been assigned to Field data member.
void SetIs_all_caps(TIs_all_caps value)
Assign a value to Is_all_caps data member.
TIs_all_punct GetIs_all_punct(void) const
Get the Is_all_punct member data.
bool IsField(void) const
Check if variant Field is selected.
TIs_all_lower GetIs_all_lower(void) const
Get the Is_all_lower member data.
const Tdata & Get(void) const
Get the member data.
void SetCase_sensitive(TCase_sensitive value)
Assign a value to Case_sensitive data member.
bool IsSetIgnore_space(void) const
Check if a value has been assigned to Ignore_space data member.
bool IsSetIs_all_caps(void) const
Check if a value has been assigned to Is_all_caps data member.
void SetIgnore_space(TIgnore_space value)
Assign a value to Ignore_space data member.
TType GetType(void) const
Get the Type member data.
bool IsSet(void) const
Check if a value has been assigned to data member.
void SetWhole_word(TWhole_word value)
Assign a value to Whole_word data member.
void SetIgnore_weasel(TIgnore_weasel value)
Assign a value to Ignore_weasel data member.
void SetNot_present(TNot_present value)
Assign a value to Not_present data member.
bool IsSetMatch_text(void) const
Check if a value has been assigned to Match_text data member.
const TField & GetField(void) const
Get the Field member data.
bool IsSetIgnore_words(void) const
Check if a value has been assigned to Ignore_words data member.
@ eMacro_feature_type_cds
@ eString_location_inlist
@ eString_location_equals
@ eString_location_contains
@ eString_location_starts
@ eFeat_qual_legal_product
const struct ncbi::grid::netcache::search::fields::SIZE size
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)