aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Theme.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Theme.cc')
-rw-r--r--src/FbTk/Theme.cc31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc
index 82bda06..2037431 100644
--- a/src/FbTk/Theme.cc
+++ b/src/FbTk/Theme.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Theme.cc,v 1.7 2003/06/15 21:02:41 fluxgen Exp $ 22// $Id: Theme.cc,v 1.8 2003/07/01 12:39:49 fluxgen Exp $
23 23
24#include "Theme.hh" 24#include "Theme.hh"
25 25
@@ -43,7 +43,34 @@
43using namespace std; 43using namespace std;
44namespace FbTk { 44namespace FbTk {
45 45
46// create default handlers for Color, Font, and Texture 46// create default handlers for Color, Font, Texture, int and string
47template <>
48void FbTk::ThemeItem<std::string>::load() { }
49
50template <>
51void FbTk::ThemeItem<std::string>::setDefaultValue() {
52 *(*this) = "";
53}
54
55template <>
56void FbTk::ThemeItem<std::string>::setFromString(const char *str) {
57 *(*this) = (str ? str : "");
58}
59
60template <>
61void FbTk::ThemeItem<int>::load() { }
62
63template <>
64void FbTk::ThemeItem<int>::setDefaultValue() {
65 *(*this) = 0;
66}
67
68template <>
69void FbTk::ThemeItem<int>::setFromString(const char *str) {
70 if (str == 0)
71 return;
72 sscanf(str, "%d", &m_value);
73}
47 74
48template <> 75template <>
49void ThemeItem<FbTk::Font>::setDefaultValue() { 76void ThemeItem<FbTk::Font>::setDefaultValue() {