aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r--src/IconbarTool.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index 45e3a45..0f3aeb7 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -51,6 +51,7 @@
51#include "FbTk/STLUtil.hh" 51#include "FbTk/STLUtil.hh"
52#include "FbTk/Select2nd.hh" 52#include "FbTk/Select2nd.hh"
53#include "FbTk/Compose.hh" 53#include "FbTk/Compose.hh"
54#include "FbTk/Luamm.hh"
54 55
55#include <typeinfo> 56#include <typeinfo>
56#include <iterator> 57#include <iterator>
@@ -92,6 +93,21 @@ void FbTk::Resource<FbTk::Container::Alignment>::setFromString(const char *str)
92 setDefaultValue(); 93 setDefaultValue();
93} 94}
94 95
96template<>
97void FbTk::Resource<FbTk::Container::Alignment>::setFromLua(lua::state &l) {
98 lua::stack_sentry s(l, -1);
99 if(l.isstring(-1))
100 setFromString(l.tostring(-1).c_str());
101 else
102 setDefaultValue();
103 l.pop();
104}
105
106template<>
107void FbTk::Resource<FbTk::Container::Alignment>::pushToLua(lua::state &l) const {
108 l.pushstring(getString());
109}
110
95} // end namespace FbTk 111} // end namespace FbTk
96 112
97namespace { 113namespace {