diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-28 06:52:48 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-28 06:52:48 (GMT) |
commit | 62bcfaf0e4fd7d77873343d880fc526ec58cdaa6 (patch) | |
tree | b9433c7f8e0aaa5d6e9ce40e7f5257d81136815f /src/MenuTheme.cc | |
parent | 0ec165e85b313588d43dbdc2450da9838c4c528f (diff) | |
download | fluxbox-62bcfaf0e4fd7d77873343d880fc526ec58cdaa6.zip fluxbox-62bcfaf0e4fd7d77873343d880fc526ec58cdaa6.tar.bz2 |
move Shape to FbTk
Diffstat (limited to 'src/MenuTheme.cc')
-rw-r--r-- | src/MenuTheme.cc | 30 |
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 | ||
27 | using std::string; | ||
28 | |||
29 | namespace FbTk { | ||
30 | |||
31 | template <> | ||
32 | void FbTk::ThemeItem<Shape::ShapePlace>::load(const string *name, const string *altname) { } | ||
33 | |||
34 | template <> | ||
35 | void FbTk::ThemeItem<Shape::ShapePlace>::setDefaultValue() { | ||
36 | *(*this) = Shape::NONE; | ||
37 | } | ||
38 | |||
39 | template <> | ||
40 | void 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 | ||
55 | MenuTheme::MenuTheme(int screen_num):FbTk::MenuTheme(screen_num), | 27 | MenuTheme::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 | } |