aboutsummaryrefslogtreecommitdiff
path: root/src/MenuTheme.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2007-12-28 06:52:48 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2007-12-28 06:52:48 (GMT)
commit62bcfaf0e4fd7d77873343d880fc526ec58cdaa6 (patch)
treeb9433c7f8e0aaa5d6e9ce40e7f5257d81136815f /src/MenuTheme.cc
parent0ec165e85b313588d43dbdc2450da9838c4c528f (diff)
downloadfluxbox-62bcfaf0e4fd7d77873343d880fc526ec58cdaa6.zip
fluxbox-62bcfaf0e4fd7d77873343d880fc526ec58cdaa6.tar.bz2
move Shape to FbTk
Diffstat (limited to 'src/MenuTheme.cc')
-rw-r--r--src/MenuTheme.cc30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/MenuTheme.cc b/src/MenuTheme.cc
index 682239c..d7f8388 100644
--- a/src/MenuTheme.cc
+++ b/src/MenuTheme.cc
@@ -24,36 +24,8 @@
24#include "MenuTheme.hh" 24#include "MenuTheme.hh"
25#include "StringUtil.hh" 25#include "StringUtil.hh"
26 26
27using std::string;
28
29namespace FbTk {
30
31template <>
32void FbTk::ThemeItem<Shape::ShapePlace>::load(const string *name, const string *altname) { }
33
34template <>
35void FbTk::ThemeItem<Shape::ShapePlace>::setDefaultValue() {
36 *(*this) = Shape::NONE;
37}
38
39template <>
40void FbTk::ThemeItem<Shape::ShapePlace>::setFromString(const char *str) {
41 int places = 0;
42
43 if (StringUtil::strcasestr(str, "topleft") != 0)
44 places |= Shape::TOPLEFT;
45 if (StringUtil::strcasestr(str, "topright") != 0)
46 places |= Shape::TOPRIGHT;
47 if (StringUtil::strcasestr(str, "bottomleft") != 0)
48 places |= Shape::BOTTOMLEFT;
49 if (StringUtil::strcasestr(str, "bottomright") != 0)
50 places |= Shape::BOTTOMRIGHT;
51
52 *(*this) = static_cast<Shape::ShapePlace>(places);
53}
54} // end namespace FbTk
55MenuTheme::MenuTheme(int screen_num):FbTk::MenuTheme(screen_num), 27MenuTheme::MenuTheme(int screen_num):FbTk::MenuTheme(screen_num),
56 m_shapeplace(*this, "menu.roundCorners", "Menu.RoundCorners") { 28 m_shapeplace(*this, "menu.roundCorners", "Menu.RoundCorners") {
57 *m_shapeplace = Shape::NONE; 29 *m_shapeplace = FbTk::Shape::NONE;
58 FbTk::ThemeManager::instance().loadTheme(*this); 30 FbTk::ThemeManager::instance().loadTheme(*this);
59} 31}