A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/config__utils_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/seq_graphic/config_utils.cpp Source File

44  const string

& curr_key,

const string

& def_key1,

45  const string

& def_key2,

const string

& def_key3)

48  if

( !def_key3.empty()) {

49

keys.push_back(def_key3);

51  if

( !def_key2.empty() && def_key2 != def_key3 ) {

52

keys.push_back(def_key2);

54  if

( !def_key1.empty() && def_key1 != def_key2) {

55

keys.push_back(def_key1);

57  if

(curr_key != def_key1) {

58

keys.push_back(curr_key);

66  const string

& curr_key,

const string

& def_key1,

67  const string

& def_key2,

const string

& def_key3)

70  if

( !def_key3.empty()) {

71

keys.push_back(def_key3);

73  if

( !def_key2.empty() && def_key2 != def_key3 ) {

74

keys.push_back(def_key2);

76  if

( !def_key1.empty() && def_key1 != def_key2) {

77

keys.push_back(def_key1);

79  if

(curr_key != def_key1) {

80

keys.push_back(curr_key);

89  typedef

vector<string>

TTokens

;

92  ITERATE

(vector<string>, iter, tokens) {

95  if

(pair.size() == 2) {

96

settings[pair[0]] = pair[1];

105  if

(!settings.

empty

()) {

106  auto

it = settings.

begin

();

110  while

(++it != settings.

end

()) {

122  const string

& face_key,

const string

& size_key,

126

view.

GetString

(face_key,

"Helvetica"

));

127  unsigned int

font_size = (

unsigned int

)view.

GetInt

(size_key, 10);

129  f

.SetFontFace(font_face);

130  f

.SetFontSize(font_size);

135  const string

& face_key,

const string

& size_key,

139

view.

Set

(size_key, (

int

)

f

.GetFontSize());

144  const string

& face_key,

const string

& size_key,

148

view.

GetString

(face_key,

"Helvetica"

));

149  unsigned int

font_size = (

unsigned int

)view.

GetInt

(size_key, 10);

151  f

.SetFontFace(font_face);

152  f

.SetFontSize(font_size);

157  const string

& face_key,

const string

& size_key,

161

view.

Set

(size_key, (

int

)

f

.GetFontSize());

167  switch

(

f

.GetData().Which()) {

170

vector<int> cvi =

f

.GetData().GetInts();

171  if

(cvi.size() > 2 ) {

172

vector<int>::const_iterator cv_it = cvi.begin();

173

c.

SetRed

(

static_cast<unsigned char>

(*cv_it++));

174

c.

SetGreen

(

static_cast<unsigned char>

(*cv_it++));

175

c.

SetBlue

(

static_cast<unsigned char>

(*cv_it++));

176  if

(cv_it != cvi.end()) {

177

c.

SetAlpha

(

static_cast<unsigned char>

(*cv_it));

185

vector<double> cvd =

f

.GetData().GetReals();

186  if

(cvd.size() > 2 ) {

187

vector<double>::const_iterator cv_it = cvd.begin();

188

c.

SetRed

(

static_cast<float>

(*cv_it++));

189

c.

SetGreen

(

static_cast<float>

(*cv_it++));

190

c.

SetBlue

(

static_cast<float>

(*cv_it++));

191  if

(cv_it != cvd.end()) {

192

c.

SetAlpha

(

static_cast<float>

(*cv_it));

200  string

cs =

f

.GetData().GetStr();

220  f

.SetData().SetInts() =

val

;

CRegistryWriteView GetWriteView(const string &section)

get a read-write view at a particular level.

CRegistryReadView GetReadView(const string &section) const

get a read-only view at a particular level.

class CRegistryReadView provides a nested hierarchical view at a particular key.

int GetInt(const string &key, int default_val=0) const

access a named key at this level, with no recursion

string GetString(const string &key, const string &default_val=kEmptyStr) const

void Set(const string &key, int val)

access a named key at this level, with no recursion

class CRgbaColor provides a simple abstraction for managing colors.

static void GetTexFont(const CRegistryReadView &view, const string &face_key, const string &size_key, CGlTextureFont &f)

static void SetTexFont(CRegistryWriteView &view, const string &face_key, const string &size_key, const CGlTextureFont &f)

static void GetFont(const CRegistryReadView &view, const string &face_key, const string &size_key, CGlTextureFont &f)

static bool x_UserFieldToColor(const objects::CUser_field &f, CRgbaColor &c)

static string ComposeProfileString(const TKeyValuePairs &settings)

static CRegistryReadView GetReadView(const CGuiRegistry &reg, const string &base_key, const string &curr_key, const string &def_key1="", const string &def_key2="", const string &def_key3="")

read/readwrite view creation helper methods.

static CRegistryWriteView GetWriteView(CGuiRegistry &reg, const string &base_key, const string &curr_key, const string &def_key1="", const string &def_key2="", const string &def_key3="")

static void x_ColorToUserField(const CRgbaColor &c, objects::CUser_field &f)

static string m_CommonDefaultStyleName

static void ParseProfileString(const string &profile_str, TKeyValuePairs &settings)

static void SetFont(CRegistryWriteView &view, const string &face_key, const string &size_key, const CGlTextureFont &f)

const_iterator begin() const

const_iterator end() const

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

static string FaceToString(EFontFace face)

funtions below provide conversion of font parameters to strings and back.

EFontFace

Set of pre-defined fonts for which we know we have valid font files.

static EFontFace FaceFromString(const string &str)

Selects a font face given a string or eFontFace_LastFont on failure.

unsigned char GetRedUC(void) const

Get specific channels in unsigned char values.

unsigned char GetGreenUC(void) const

unsigned char GetAlphaUC(void) const

void FromString(const string &str)

Assign color values encoded in a string.

unsigned char GetBlueUC(void) const

static void TokenizeWithEscape(const string &str, const string &delim, vector< string > &tokens, bool remove_escape=false)

Tokenize a string using the delim.

void SetRed(float r)

Set specific channels from floating point values.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

unsigned int

A callback function used to compare two keys in a database.

list< STokenInfo > TTokens


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