1 #ifndef GUI_WIDGETS_SEQ_GRAPHIC___LAYOUT_CONF__HPP
2 #define GUI_WIDGETS_SEQ_GRAPHIC___LAYOUT_CONF__HPP
62 const string& disp_name,
64 const string& legend_txt,
65 bool optional =
false)
68 item->SetName() = name;
69 item->SetDisplay_name() = disp_name;
70 item->SetHelp() =
help;
71 item->SetLegend_text() = legend_txt;
73 item->SetOptional(optional);
80 const string& disp_name,
81 const string& curr_val,
83 bool optional =
false)
86 choice->SetName() = name;
87 choice->SetDisplay_name() = disp_name;
88 choice->SetCurr_value() = curr_val;
89 choice->SetHelp() =
help;
91 choice->SetOptional(optional);
98 const string& help_text,
99 const string& legend_txt,
101 bool optional =
false)
104 cb->SetName() = name;
105 cb->SetValue() =
value;
106 cb->SetDisplay_name() = disp_n;
107 cb->SetHelp() = help_text;
108 cb->SetLegend_text() = legend_txt;
110 cb->SetOptional(optional);
115 const string& disp_n,
116 const string& help_text,
122 tb->SetDisplay_name(disp_n);
123 tb->SetHelp(help_text);
124 tb->SetLegend_text(help_text);
132 hs->SetName() = name;
133 hs->SetValue() =
value;
139 const string& pos_str)
142 comment->SetLabel() =
label;
143 comment->SetPos_str() = pos_str;
149 const string& disp_name,
154 cat->SetName() = name;
155 cat->SetDisplay_name() = disp_name;
156 cat->SetHelp() =
help;
157 cat->SetOrder() = order;
162 const string& disp_name,
164 const string& value_min,
165 const string& value_max,
166 bool autoscale =
true,
167 bool inverse =
false,
168 bool optional =
false)
171 range->SetName() = name;
172 range->SetDisplay_name() = disp_name;
174 range->SetValue().SetMin(value_min);
175 range->SetValue().SetMax(value_max);
176 range->SetValue().SetAutoscale(autoscale);
177 range->SetValue().SetInverse(inverse);
179 range->SetOptional(optional);
188 static void DecodeValueRange(
const string& value_range,
string& range_min,
string& range_max,
bool& range_auto)
193 if (value_range.empty())
197 auto val_size = vals.size();
198 if (val_size < 2 || val_size > 3)
202 range_auto = val_size == 3 && vals[2] ==
"auto";
205 static void EncodeValueRange(
const string& range_min,
const string& range_max,
bool range_auto,
string& value_range)
208 value_range = range_min.empty() ?
"inf" : range_min;
210 value_range += range_max.empty() ?
"inf" : range_max;
212 value_range +=
"|auto";
242 m_Subcategories[sub_cat->GetName()] = sub_cat;
250 m_Categories[cat.
m_Category->GetName()] = cat;
255 m_Categories[cat_name].m_Subcategories[sub_cat->GetName()] = sub_cat;
262 if (iter != m_Categories.end()) {
263 cat = iter->second.m_Category;
273 if (iter != m_Categories.end()) {
275 iter->second.m_Subcategories.find(sub_cat);
276 if (s_iter != iter->second.m_Subcategories.end()) {
277 cat = s_iter->second;
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.
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.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
data structure holding configuration for a track.
map< string, CRef< objects::CCategory > > TSubcategories
map< string, int > TGroupMap
group/subgroup settings from TMS string is group name, int is group order
CRef< objects::CCategory > GetCategory(const string &cat_name)
map< string, SCategorySettings > TCategories
map< TSubgroupName, int > TSubgroupMap
int is subgroup order
pair< string, string > TSubgroupName
first string is group name, second is subgroups name
CRef< objects::CCategory > GetSubcategory(const string &cat_name, const string &sub_cat)
void AddCategory(const SCategorySettings &cat)
void AddSubcategory(const string &cat_name, CRef< objects::CCategory > sub_cat)
static void EncodeValueRange(const string &range_min, const string &range_max, bool range_auto, string &value_range)
static CRef< objects::CCategory > CreateCategory(const string &name, const string &disp_name, const string &help, int order)
static CRef< objects::CChoice > CreateChoice(const string &name, const string &disp_name, const string &curr_val, const string &help, bool optional=false)
static CRef< objects::CHiddenSetting > CreateHiddenSetting(const string &name, const string &value)
static CRef< objects::CCheckBox > CreateCheckBox(const string &name, const string &disp_n, const string &help_text, const string &legend_txt, bool value, bool optional=false)
static CRef< objects::CRangeControl > CreateRangeControl(const string &name, const string &disp_name, const string &help, const string &value_min, const string &value_max, bool autoscale=true, bool inverse=false, bool optional=false)
static CRef< objects::CComment > CreateComment(const string &label, const string &pos_str)
static void DecodeValueRange(const string &value_range, string &range_min, string &range_max, bool &range_auto)
static CRef< objects::CTextBox > CreateTextBox(const string &name, const string &disp_n, const string &help_text, const string &value)
static CRef< objects::CChoiceItem > CreateChoiceItem(const string &name, const string &disp_name, const string &help, const string &legend_txt, bool optional=false)
container_type::const_iterator const_iterator
The NCBI C++ standard methods for dealing with std::string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
#define NCBI_GUIWIDGETS_SEQGRAPHIC_EXPORT
static const char label[]
range(_Ty, _Ty) -> range< _Ty >
CRef< objects::CCategory > m_Category
TSubcategories m_Subcategories
void AddSubcategory(CRef< objects::CCategory > sub_cat)