1 #ifndef GUI_CONFIG____SETTINGSSETREG_HPP
2 #define GUI_CONFIG____SETTINGSSETREG_HPP
136 const string& GetType(
void)
const;
137 string GetCurrentStyleName(
void)
const;
138 void SetCurrentStyleName(
const string& new_style);
143 void SetDefaultCurrentStyle();
144 void RestoreCurrentStyle();
146 string GetTypeDescription(
void)
const;
154 list<string> GetStyleNames(
void)
const;
157 string AddStyle(
void);
158 string DuplicateStyle(
const string& style);
159 string RenameStyle(
const string& old_style,
const string& new_style);
160 bool CanRenameStyle(
const string& style);
162 bool DeleteStyle(
const string& style);
179 const string& default_val =
kEmptyStr)
const;
183 int default_val = 0)
const;
186 double GetReal(
const string&
key,
187 double default_val = 0)
const;
191 bool default_val =
false)
const;
198 void GetIntVec(
const string&
key,
199 vector<int>&
val)
const;
202 void GetRealVec(
const string&
key,
203 vector<double>&
val)
const;
206 void GetStringVec(
const string&
key,
207 vector<string>&
val)
const;
216 void Set(
const string&
key,
int val);
219 void Set(
const string&
key,
double val);
222 void Set(
const string&
key,
bool val);
225 void Set(
const string&
key,
const string&
val);
229 void Set(
const string&
key,
const char*
val);
232 void Set(
const string&
key,
const vector<int>&
val);
235 void Set(
const string&
key,
const vector<double>&
val);
238 void Set(
const string&
key,
const vector<string>&
val);
247 bool Delete(
const string&
key);
258 string GetFeatReadKey(
TFeatSubtype feat_subtype,
const string& section,
262 static string GetFeatWriteKey(
TFeatSubtype feat_subtype,
const string& section);
268 static void ColorToUserField(
const CRgbaColor& c, objects::CUser_field&
f);
274 static bool UserFieldToColor(
const objects::CUser_field&
f,
CRgbaColor& c);
277 string GetCurrentStyleKey(
void)
const;
278 void SetCurrentStyleKey(
const string& new_style_key);
288 string x_GetStyleName(
const string&
key)
const;
289 string x_GetStyleKey(
const string& name)
const;
292 string x_MakeUniqueStyleName(
const string& name)
const;
293 string x_MakeUniqueStyleKey(
const string&
key)
const;
298 x_GetReadView(
const string& section)
const;
303 string x_GetSection()
const;
306 string x_GetStyleSection()
const;
319 x_GetCurrentViewField(
const string&
key)
const;
322 void x_Uncache(
const string&
key)
const;
325 void x_UncacheAll()
const;
class CRegistryReadView provides a nested hierarchical view at a particular key.
class CRgbaColor provides a simple abstraction for managing colors.
CSettingsSet is an adapter of the CGuiRegistry to provide persistance of and easy access to view's (o...
std::map< string, CRgbaColor > TColorDictionary
dictionary to cache string -> color lookups
string m_SavedStyle
> key used in cache.
TFieldDictionary m_FieldDictionary
static const string sm_DefaultValuesKey
the key for the default set of values.
static const string kDefaultDelim
must be the same used as a default in CGuiRegistry.
std::map< string, CConstRef< objects::CUser_field > > TFieldDictionary
dictionary for caching look-ups into CGuiRegistry
int TFeatSubtype
we use int instead of CSeqFeatData::ESubtype for two reasons:
CRef< CGuiRegistry > m_Registry
TColorDictionary m_ColorDictionary
string m_Type
> the registry these views come from.
int GetInt(void) const
get value
const string & GetString(void) const
The NCBI C++ standard methods for dealing with std::string.
CRgbaColor & GetColor(CSeqFeatData::ESubtype subtype)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
#define NCBI_GUICONFIG_EXPORT
Defines to provide correct exporting from DLLs in Windows.
const struct ncbi::grid::netcache::search::fields::KEY key
const struct ncbi::grid::netcache::search::fields::SUBKEY subkey
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.