aboutsummaryrefslogtreecommitdiff
path: root/src/Slit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Slit.cc')
-rw-r--r--src/Slit.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index 02eb877..02a8b29 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -43,6 +43,7 @@
43#include "FbTk/Transparent.hh" 43#include "FbTk/Transparent.hh"
44#include "FbTk/MacroCommand.hh" 44#include "FbTk/MacroCommand.hh"
45#include "FbTk/MemFun.hh" 45#include "FbTk/MemFun.hh"
46#include "FbTk/Luamm.hh"
46 47
47#include "FbCommands.hh" 48#include "FbCommands.hh"
48#include "Layer.hh" 49#include "Layer.hh"
@@ -164,6 +165,21 @@ void FbTk::Resource<Slit::Placement>::setFromString(const char *strval) {
164 setDefaultValue(); 165 setDefaultValue();
165} 166}
166 167
168template<>
169void FbTk::Resource<Slit::Placement>::setFromLua(lua::state &l) {
170 lua::stack_sentry s(l, -1);
171 if(l.isstring(-1))
172 setFromString(l.tostring(-1).c_str());
173 else
174 setDefaultValue();
175 l.pop();
176}
177
178template<>
179void FbTk::Resource<Slit::Placement>::pushToLua(lua::state &l) const {
180 l.pushstring(getString());
181}
182
167} // end namespace FbTk 183} // end namespace FbTk
168namespace { 184namespace {
169 185