aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-05 12:39:40 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-06-15 23:07:49 (GMT)
commit787c7a994d4328a9c90a037dd464f8007351b0c0 (patch)
treef33943fe5b3e0a4baff6419760775acf769fbfa5 /src/Toolbar.cc
parentde1e05cec6b26f6a7f398a9ea64f38fa0943f9c0 (diff)
downloadfluxbox_pavel-787c7a994d4328a9c90a037dd464f8007351b0c0.zip
fluxbox_pavel-787c7a994d4328a9c90a037dd464f8007351b0c0.tar.bz2
Specializations of FbTk::Resource<X>::{setFromLua,pushToLua}
for various values of X.
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index a8b2c5b..fe4c591 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -54,6 +54,7 @@
54#include "FbTk/MemFun.hh" 54#include "FbTk/MemFun.hh"
55#include "FbTk/STLUtil.hh" 55#include "FbTk/STLUtil.hh"
56#include "FbTk/Util.hh" 56#include "FbTk/Util.hh"
57#include "FbTk/Luamm.hh"
57 58
58// use GNU extensions 59// use GNU extensions
59#ifndef _GNU_SOURCE 60#ifndef _GNU_SOURCE
@@ -132,6 +133,21 @@ setFromString(const char *strval) {
132 setDefaultValue(); 133 setDefaultValue();
133} 134}
134 135
136template<>
137void FbTk::Resource<Toolbar::Placement>::setFromLua(lua::state &l) {
138 lua::stack_sentry s(l, -1);
139 if(l.isstring(-1))
140 setFromString(l.tostring(-1).c_str());
141 else
142 setDefaultValue();
143 l.pop();
144}
145
146template<>
147void FbTk::Resource<Toolbar::Placement>::pushToLua(lua::state &l) const {
148 l.pushstring(getString());
149}
150
135} // end namespace FbTk 151} // end namespace FbTk
136 152
137namespace { 153namespace {