aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-05 12:39:40 (GMT)
committerPavel Labath <pavelo@centrum.sk>2013-02-16 23:36:35 (GMT)
commit3b7c1a3c220b7ccec0dee7804d36dabfe81449c4 (patch)
treee8b8aaf22411231fbfee9f16a8c91f8ed3c3f3f3 /src/IconbarTool.cc
parente27268fc69b776f533a2082d2ca9c13fe863cd80 (diff)
downloadfluxbox_pavel-3b7c1a3c220b7ccec0dee7804d36dabfe81449c4.zip
fluxbox_pavel-3b7c1a3c220b7ccec0dee7804d36dabfe81449c4.tar.bz2
Specializations of FbTk::Resource<X>::{setFromLua,pushToLua}
for various values of X.
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 {