aboutsummaryrefslogtreecommitdiff
path: root/src/Layer.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Layer.hh')
-rw-r--r--src/Layer.hh46
1 files changed, 15 insertions, 31 deletions
diff --git a/src/Layer.hh b/src/Layer.hh
index 34dd350..4cc0282 100644
--- a/src/Layer.hh
+++ b/src/Layer.hh
@@ -23,6 +23,7 @@
23#define RESOURCE_LAYER_HH 23#define RESOURCE_LAYER_HH
24 24
25#include "FbTk/StringUtil.hh" 25#include "FbTk/StringUtil.hh"
26#include "Resources.hh"
26 27
27/** 28/**
28 * (This is not the layer->raise/lower handling stuff, @see FbTk::Layer) 29 * (This is not the layer->raise/lower handling stuff, @see FbTk::Layer)
@@ -32,23 +33,6 @@
32 */ 33 */
33class ResourceLayer { 34class ResourceLayer {
34public: 35public:
35 enum Type {
36 MENU = 0,
37 LAYER1 = 1,
38 ABOVE_DOCK = 2,
39 LAYER3 = 3,
40 DOCK = 4,
41 LAYER5 = 5,
42 TOP = 6,
43 LAYER7 = 7,
44 NORMAL = 8,
45 LAYER9 = 9,
46 BOTTOM = 10,
47 LAYER11 = 11,
48 DESKTOP = 12,
49 NUM_LAYERS = 13
50 };
51
52 explicit ResourceLayer(int i) : m_num(i) {}; 36 explicit ResourceLayer(int i) : m_num(i) {};
53 37
54 static int getNumFromString(const std::string &str) { 38 static int getNumFromString(const std::string &str) {
@@ -57,37 +41,37 @@ public:
57 if (FbTk::StringUtil::extractNumber(str, tempnum)) 41 if (FbTk::StringUtil::extractNumber(str, tempnum))
58 return tempnum; 42 return tempnum;
59 if (v == "menu") 43 if (v == "menu")
60 return ::ResourceLayer::MENU; 44 return LAYERMENU;
61 if (v == "abovedock") 45 if (v == "abovedock")
62 return ::ResourceLayer::ABOVE_DOCK; 46 return LAYERABOVE_DOCK;
63 if (v == "dock") 47 if (v == "dock")
64 return ::ResourceLayer::DOCK; 48 return LAYERDOCK;
65 if (v == "top") 49 if (v == "top")
66 return ::ResourceLayer::TOP; 50 return LAYERTOP;
67 if (v == "normal") 51 if (v == "normal")
68 return ::ResourceLayer::NORMAL; 52 return LAYERNORMAL;
69 if (v == "bottom") 53 if (v == "bottom")
70 return ::ResourceLayer::BOTTOM; 54 return LAYERBOTTOM;
71 if (v == "desktop") 55 if (v == "desktop")
72 return ::ResourceLayer::DESKTOP; 56 return LAYERDESKTOP;
73 return -1; 57 return -1;
74 } 58 }
75 59
76 static std::string getString(int num) { 60 static std::string getString(int num) {
77 switch (num) { 61 switch (num) {
78 case ::ResourceLayer::MENU: 62 case LAYERMENU:
79 return std::string("Menu"); 63 return std::string("Menu");
80 case ::ResourceLayer::ABOVE_DOCK: 64 case LAYERABOVE_DOCK:
81 return std::string("AboveDock"); 65 return std::string("AboveDock");
82 case ::ResourceLayer::DOCK: 66 case LAYERDOCK:
83 return std::string("Dock"); 67 return std::string("Dock");
84 case ::ResourceLayer::TOP: 68 case LAYERTOP:
85 return std::string("Top"); 69 return std::string("Top");
86 case ::ResourceLayer::NORMAL: 70 case LAYERNORMAL:
87 return std::string("Normal"); 71 return std::string("Normal");
88 case ::ResourceLayer::BOTTOM: 72 case LAYERBOTTOM:
89 return std::string("Bottom"); 73 return std::string("Bottom");
90 case ::ResourceLayer::DESKTOP: 74 case LAYERDESKTOP:
91 return std::string("Desktop"); 75 return std::string("Desktop");
92 default: 76 default:
93 return FbTk::StringUtil::number2String(num); 77 return FbTk::StringUtil::number2String(num);