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