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-11-01 09:52:46 (GMT)
commit60cd98604ae0ee62d64e3bc852898f69dae221d4 (patch)
tree198c36f2199c1441ff2c5cc76fb21896762c9a01 /src/Toolbar.cc
parentfc21fd822e527dbd918c6565e0e2cea82b0466f4 (diff)
downloadfluxbox_pavel-60cd98604ae0ee62d64e3bc852898f69dae221d4.zip
fluxbox_pavel-60cd98604ae0ee62d64e3bc852898f69dae221d4.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 {