aboutsummaryrefslogtreecommitdiff
path: root/src/ScreenResources.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ScreenResources.cc')
-rw-r--r--src/ScreenResources.cc132
1 files changed, 0 insertions, 132 deletions
diff --git a/src/ScreenResources.cc b/src/ScreenResources.cc
index 2d2ddb6..159ecaa 100644
--- a/src/ScreenResources.cc
+++ b/src/ScreenResources.cc
@@ -52,136 +52,4 @@ void FbTk::Resource<FbTk::MenuTheme::MenuMode>::setFromString(const char *str) {
52 else 52 else
53 setDefaultValue(); 53 setDefaultValue();
54} 54}
55
56template<>
57string FbTk::Resource<BScreen::FollowModel>::getString() const {
58 switch (m_value) {
59 case BScreen::FOLLOW_ACTIVE_WINDOW:
60 default:
61 return string("Follow");
62 break;
63 case BScreen::FETCH_ACTIVE_WINDOW:
64 return string("Current");
65 break;
66 case BScreen::SEMIFOLLOW_ACTIVE_WINDOW:
67 return string("SemiFollow");
68 break;
69 case BScreen::IGNORE_OTHER_WORKSPACES:
70 return string("Ignore");
71 break;
72 }
73
74}
75
76template<>
77void FbTk::Resource<BScreen::FollowModel>::
78setFromString(char const *strval) {
79 if (strcasecmp(strval, "Follow") == 0)
80 m_value = BScreen::FOLLOW_ACTIVE_WINDOW;
81 else if (strcasecmp(strval, "Current") == 0 ||
82 strcasecmp(strval, "CurrentWorkspace") == 0 ||
83 strcasecmp(strval, "Fetch") == 0)
84 m_value = BScreen::FETCH_ACTIVE_WINDOW;
85 else if (strcasecmp(strval, "SemiFollow") == 0)
86 m_value = BScreen::SEMIFOLLOW_ACTIVE_WINDOW;
87 else if (strcasecmp(strval, "Ignore") == 0)
88 m_value = BScreen::IGNORE_OTHER_WORKSPACES;
89 else
90 setDefaultValue();
91}
92
93template<>
94string FbTk::Resource<FbTk::GContext::LineStyle>::getString() const {
95 switch(m_value) {
96 case FbTk::GContext::LINESOLID:
97 return "LineSolid";
98 break;
99 case FbTk::GContext::LINEONOFFDASH:
100 return "LineOnOffDash";
101 break;
102 case FbTk::GContext::LINEDOUBLEDASH:
103 return "LineDoubleDash";
104 break;
105 };
106 return "LineSolid";
107}
108
109template<>
110void FbTk::Resource<FbTk::GContext::LineStyle>
111::setFromString(char const *strval) {
112
113 if (strcasecmp(strval, "LineSolid") == 0 )
114 m_value = FbTk::GContext::LINESOLID;
115 else if (strcasecmp(strval, "LineOnOffDash") == 0 )
116 m_value = FbTk::GContext::LINEONOFFDASH;
117 else if (strcasecmp(strval, "LineDoubleDash") == 0)
118 m_value = FbTk::GContext::LINEDOUBLEDASH;
119 else
120 setDefaultValue();
121}
122
123template<>
124string FbTk::Resource<FbTk::GContext::JoinStyle>::getString() const {
125 switch(m_value) {
126 case FbTk::GContext::JOINMITER:
127 return "JoinMiter";
128 break;
129 case FbTk::GContext::JOINBEVEL:
130 return "JoinBevel";
131 break;
132 case FbTk::GContext::JOINROUND:
133 return "JoinRound";
134 break;
135 };
136 return "JoinMiter";
137}
138
139template<>
140void FbTk::Resource<FbTk::GContext::JoinStyle>
141::setFromString(char const *strval) {
142
143 if (strcasecmp(strval, "JoinRound") == 0 )
144 m_value = FbTk::GContext::JOINROUND;
145 else if (strcasecmp(strval, "JoinMiter") == 0 )
146 m_value = FbTk::GContext::JOINMITER;
147 else if (strcasecmp(strval, "JoinBevel") == 0)
148 m_value = FbTk::GContext::JOINBEVEL;
149 else
150 setDefaultValue();
151}
152
153template<>
154string FbTk::Resource<FbTk::GContext::CapStyle>::getString() const {
155 switch(m_value) {
156 case FbTk::GContext::CAPNOTLAST:
157 return "CapNotLast";
158 break;
159 case FbTk::GContext::CAPBUTT:
160 return "CapButt";
161 break;
162 case FbTk::GContext::CAPROUND:
163 return "CapRound";
164 break;
165 case FbTk::GContext::CAPPROJECTING:
166 return "CapProjecting";
167 break;
168 };
169 return "CapNotLast";
170}
171
172template<>
173void FbTk::Resource<FbTk::GContext::CapStyle>
174::setFromString(char const *strval) {
175
176 if (strcasecmp(strval, "CapNotLast") == 0 )
177 m_value = FbTk::GContext::CAPNOTLAST;
178 else if (strcasecmp(strval, "CapProjecting") == 0 )
179 m_value = FbTk::GContext::CAPPROJECTING;
180 else if (strcasecmp(strval, "CapRound") == 0)
181 m_value = FbTk::GContext::CAPROUND;
182 else if (strcasecmp(strval, "CapButt" ) == 0)
183 m_value = FbTk::GContext::CAPBUTT;
184 else
185 setDefaultValue();
186}
187} // end namespace FbTk 55} // end namespace FbTk