From 3a02b9ec882c98009ae6c24913ee8a7a620b0f87 Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 15 Dec 2009 19:33:18 -0800 Subject: added setBlockFromValue so setting a LLRect param in code will set the individual left, right, top, bottom values, for example don't call setupParams when creating widgets from code moved Multiple param constraints into BaseBlock to remove extra scoping --- indra/llrender/llfontgl.cpp | 23 +++++++++++++++++++++++ indra/llrender/llfontgl.h | 1 + 2 files changed, 24 insertions(+) (limited to 'indra/llrender') diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index db1f019a81..7ad5f9608f 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -760,6 +760,29 @@ U8 LLFontGL::getStyleFromString(const std::string &style) return ret; } +// static +std::string LLFontGL::getStringFromStyle(U8 style) +{ + std::string style_string; + if (style & NORMAL) + { + style_string += "|NORMAL"; + } + if (style & BOLD) + { + style_string += "|BOLD"; + } + if (style & ITALIC) + { + style_string += "|ITALIC"; + } + if (style & UNDERLINE) + { + style_string += "|UNDERLINE"; + } + return style_string; +} + // static std::string LLFontGL::nameFromFont(const LLFontGL* fontp) { diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index bb7d8524e7..ea8eee7690 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -144,6 +144,7 @@ public: // Takes a string with potentially several flags, i.e. "NORMAL|BOLD|ITALIC" static U8 getStyleFromString(const std::string &style); + static std::string getStringFromStyle(U8 style); static std::string nameFromFont(const LLFontGL* fontp); static std::string sizeFromFont(const LLFontGL* fontp); -- cgit v1.2.3 From e8fe81c4fcbec173606b5ad635e0b774e4d8b24b Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 16 Dec 2009 16:04:09 -0800 Subject: Backed out changeset: cfa60aef8061, added setBlockFromValue so setting a LLRect param in code will set the individua --- indra/llrender/llfontgl.cpp | 23 ----------------------- indra/llrender/llfontgl.h | 1 - 2 files changed, 24 deletions(-) (limited to 'indra/llrender') diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 7ad5f9608f..db1f019a81 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -760,29 +760,6 @@ U8 LLFontGL::getStyleFromString(const std::string &style) return ret; } -// static -std::string LLFontGL::getStringFromStyle(U8 style) -{ - std::string style_string; - if (style & NORMAL) - { - style_string += "|NORMAL"; - } - if (style & BOLD) - { - style_string += "|BOLD"; - } - if (style & ITALIC) - { - style_string += "|ITALIC"; - } - if (style & UNDERLINE) - { - style_string += "|UNDERLINE"; - } - return style_string; -} - // static std::string LLFontGL::nameFromFont(const LLFontGL* fontp) { diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index ea8eee7690..bb7d8524e7 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -144,7 +144,6 @@ public: // Takes a string with potentially several flags, i.e. "NORMAL|BOLD|ITALIC" static U8 getStyleFromString(const std::string &style); - static std::string getStringFromStyle(U8 style); static std::string nameFromFont(const LLFontGL* fontp); static std::string sizeFromFont(const LLFontGL* fontp); -- cgit v1.2.3 From 9ff869a6b287a2b4b8c94219584d1c7b66ebb399 Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 17 Dec 2009 10:01:55 -0800 Subject: Backed out changeset: 4d482c1ed041 --- indra/llrender/llfontgl.cpp | 23 +++++++++++++++++++++++ indra/llrender/llfontgl.h | 1 + 2 files changed, 24 insertions(+) (limited to 'indra/llrender') diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index db1f019a81..7ad5f9608f 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -760,6 +760,29 @@ U8 LLFontGL::getStyleFromString(const std::string &style) return ret; } +// static +std::string LLFontGL::getStringFromStyle(U8 style) +{ + std::string style_string; + if (style & NORMAL) + { + style_string += "|NORMAL"; + } + if (style & BOLD) + { + style_string += "|BOLD"; + } + if (style & ITALIC) + { + style_string += "|ITALIC"; + } + if (style & UNDERLINE) + { + style_string += "|UNDERLINE"; + } + return style_string; +} + // static std::string LLFontGL::nameFromFont(const LLFontGL* fontp) { diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index bb7d8524e7..ea8eee7690 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -144,6 +144,7 @@ public: // Takes a string with potentially several flags, i.e. "NORMAL|BOLD|ITALIC" static U8 getStyleFromString(const std::string &style); + static std::string getStringFromStyle(U8 style); static std::string nameFromFont(const LLFontGL* fontp); static std::string sizeFromFont(const LLFontGL* fontp); -- cgit v1.2.3