aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
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 {