wxPanel::Create( parent,
id, pos,
size, style );
93GetSizer()->SetSizeHints(
this);
150wxStaticBox* itemStaticBoxSizer2Static =
newwxStaticBox(itemPanel1,
wxID_ANY,
_(
"SOURCE"));
151wxStaticBoxSizer* itemStaticBoxSizer2 =
newwxStaticBoxSizer(itemStaticBoxSizer2Static, wxVERTICAL);
152itemPanel1->SetSizer(itemStaticBoxSizer2);
154wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
155itemStaticBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
157wxStaticText* itemStaticText4 =
newwxStaticText( itemStaticBoxSizer2->GetStaticBox(), wxID_STATIC,
_(
"Modifier List"), wxDefaultPosition, wxDefaultSize, 0 );
158itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
160wxArrayString m_ModListTypeStrings;
161m_ModListTypeStrings.Add(
_(
"Custom"));
162m_ModListTypeStrings.Add(
_(
"All"));
163 m_ModListType=
newwxChoice( itemStaticBoxSizer2->GetStaticBox(),
ID_MOD_LIST_TYPE, wxDefaultPosition, wxDefaultSize, m_ModListTypeStrings, 0 );
165itemBoxSizer3->Add(
m_ModListType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
167 m_MaxMods=
newwxStaticText( itemStaticBoxSizer2->GetStaticBox(), wxID_STATIC,
_(
"Maximum modifiers per line"), wxDefaultPosition, wxDefaultSize, 0 );
168itemBoxSizer3->Add(
m_MaxMods, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
170wxArrayString m_MaxModifiersStrings;
171m_MaxModifiersStrings.Add(
_(
"No limit"));
172 m_MaxModifiers=
newwxChoice( itemStaticBoxSizer2->GetStaticBox(),
ID_AD_MODLIMIT, wxDefaultPosition, wxDefaultSize, m_MaxModifiersStrings, 0 );
174itemBoxSizer3->Add(
m_MaxModifiers, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
176 m_UseLabels=
newwxCheckBox( itemStaticBoxSizer2->GetStaticBox(),
ID_AD_USE_LABELS,
_(
"Use labels"), wxDefaultPosition, wxDefaultSize, 0 );
178itemBoxSizer3->Add(
m_UseLabels, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
182itemStaticBoxSizer2->Add(itemStaticBoxSizer9, 0, wxGROW|wxALL, 0);
187wxStaticBox* itemStaticBoxSizer11Static =
newwxStaticBox(itemStaticBoxSizer2->GetStaticBox(),
wxID_ANY,
_(
"Other Options"));
188wxStaticBoxSizer* itemStaticBoxSizer11 =
newwxStaticBoxSizer(itemStaticBoxSizer11Static, wxVERTICAL);
189itemStaticBoxSizer2->Add(itemStaticBoxSizer11, 0, wxGROW|wxALL, 0);
206 m_NoSp=
newwxCheckBox( itemStaticBoxSizer11->GetStaticBox(),
ID_AD_DO_NOT_APPLY_TO_SP,
_(
"Do not apply modifiers to 'sp.' organisms"), wxDefaultPosition, wxDefaultSize, 0 );
207 m_NoSp->SetValue(
false);
210 m_NoCf=
newwxCheckBox( itemStaticBoxSizer11->GetStaticBox(),
ID_AD_DO_NOT_APPLY_TO_CF,
_(
"Do not apply modifiers to 'cf.' organisms"), wxDefaultPosition, wxDefaultSize, 0 );
211 m_NoCf->SetValue(
false);
214 m_NoAff=
newwxCheckBox( itemStaticBoxSizer11->GetStaticBox(),
ID_AD_DO_NOT_APPLY_TO_AFF,
_(
"Do not apply modifiers to 'aff.' organisms"), wxDefaultPosition, wxDefaultSize, 0 );
218 m_NoNr=
newwxCheckBox( itemStaticBoxSizer11->GetStaticBox(),
ID_AD_DO_NOT_APPLY_TO_NR,
_(
"Do not apply modifiers to 'nr.' organisms"), wxDefaultPosition, wxDefaultSize, 0 );
219 m_NoNr->SetValue(
false);
222 m_NoMatchTaxname=
newwxCheckBox( itemStaticBoxSizer11->GetStaticBox(),
ID_AD_NO_MATCH_TAXNAME,
_(
"Do not apply modifier to organisms with matching taxname"), wxDefaultPosition, wxDefaultSize, 0 );
227itemStaticBoxSizer2->Add(
m_HIVRuleSizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
280 if(all_present && all_unique)
282status =
"All present, all unique";
284 else if(all_present && is_unique)
286status =
"All present, one unique";
288 else if(all_present && ! is_unique)
290status =
"All present, mixed";
292 else if(! all_present && all_unique)
294status =
"Some missing, all unique";
296 else if(! all_present && is_unique)
298status =
"Some missing, one unique";
300 else if(! all_present && ! is_unique)
302status =
"Some missing, mixed";
310wxArrayString HIVStrings;
311HIVStrings.Add(
_(
"Prefer Clone"));
312HIVStrings.Add(
_(
"Prefer Isolate"));
313HIVStrings.Add(
_(
"Want Both Isolate and Clone"));
315 m_HIVRule=
newwxRadioBox (
this,
wxID_ANY,
_(
"HIV Rule"), wxDefaultPosition, wxDefaultSize,
316HIVStrings, 1, wxRA_SPECIFY_ROWS);
320 bool sortByLabel(
constobjects::CAutoDefAvailableModifier& name1,
constobjects::CAutoDefAvailableModifier& name2)
322 returnname1.Label() < name2.Label();
332 intnum_available = 0;
334 if(it.AnyPresent()) {
340 if(num_available > 9) {
341 row= num_available / 3;
342 if(num_available % 3 != 0) {
347vector<wxFlexGridSizer*> flex_sizers;
349wxFlexGridSizer* flexsizerA =
newwxFlexGridSizer(0, 1, 0, 0);
351flex_sizers.push_back(flexsizerA);
362 if(first_value.length() > 25) {
363first_value = first_value.substr(0, 22) +
"...";
365mod_status +=
" '"+ first_value +
"'";
368mod_name[0] =
toupper(mod_name[0]);
371 ToWxString(mod_name +
": "+ mod_status), wxDefaultPosition, wxDefaultSize, 0);
374 size_tratio = num_available /
row;
375 if(ratio < flex_sizers.size()) {
376flex_sizers[ratio]->Add(btn, 0, wxALIGN_LEFT | wxALL, 5);
386 returnnum_available;
408 for(
int i= 1;
i< num_available;
i++) {
412 if(num_available < 1) {
442GetSizer()->SetSizeHints(
this);
static string s_GetModifierStatus(bool all_present, bool all_unique, bool is_unique)
bool sortByLabel(const objects::CAutoDefAvailableModifier &name1, const objects::CAutoDefAvailableModifier &name2)
#define ID_AD_INCLUDE_COUNTRY_TEXT
#define ID_AD_DO_NOT_APPLY_TO_CF
#define ID_AD_DO_NOT_APPLY_TO_SP
#define ID_AD_NO_MATCH_TAXNAME
#define ID_AD_LEAVE_PARENTHETICAL
#define ID_AD_DO_NOT_APPLY_TO_AFF
#define ID_AD_DO_NOT_APPLY_TO_NR
#define ID_AD_KEEP_AFTER_SEMICOLON
vector< wxCheckBox * > m_ModifierButtons
int m_ModifierSizerColumns
wxBoxSizer * m_HIVRuleSizer
wxCheckBox * m_IncludeCountry
wxChoice * m_MaxModifiers
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
~CAutodefOrgPanel()
Destructor.
CAutodefOrgPanel()
Constructors.
void SetParams(SAutodefParams *params)
int x_ListModifiers(SAutodefParams ¶ms)
wxFlexGridSizer * m_OtherOptionsGrid
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=10204, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
wxCheckBox * m_LeaveParen
wxStaticBox * m_AvailableModifiersSizer
wxCheckBox * m_NoMatchTaxname
static bool ShowToolTips()
Should we show tooltips?
wxFlexGridSizer * m_ModifierSizer
void PopulateParams(SAutodefParams ¶ms)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxCheckBox * m_KeepAfterSemicolon
void Init()
Initialises member variables.
objects::CAutoDefSourceDescription::TAvailableModifierVector m_ModifierList
bool m_LeaveParenthetical
bool m_KeepAfterSemicolon
bool m_IncludeCountryText
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
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.
constexpr auto sort(_Init &&init)
const struct ncbi::grid::netcache::search::fields::SIZE size
#define row(bind, expected)
wxString ToWxString(const string &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