From 0e1a719781b0a28ddf3f6d8dbdd10a963fef9bfa Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Thu, 10 Jul 2003 12:00:09 +0000
Subject: added shape

---
 src/ToolbarTheme.cc | 21 +++++++++++++++++++--
 src/ToolbarTheme.hh | 11 ++++++++---
 2 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/src/ToolbarTheme.cc b/src/ToolbarTheme.cc
index 61df3d4..2797c1e 100644
--- a/src/ToolbarTheme.cc
+++ b/src/ToolbarTheme.cc
@@ -19,7 +19,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: ToolbarTheme.cc,v 1.3 2003/06/24 16:26:56 fluxgen Exp $
+// $Id: ToolbarTheme.cc,v 1.4 2003/07/10 12:00:09 fluxgen Exp $
 
 #include "ToolbarTheme.hh"
 
@@ -27,6 +27,22 @@
 #include <iostream>
 using namespace std;
 
+template<>
+void FbTk::ThemeItem<bool>::load() { }
+
+template<>
+void FbTk::ThemeItem<bool>::setDefaultValue() {
+    *(*this) = false;
+}
+
+template<>
+void FbTk::ThemeItem<bool>::setFromString(char const *strval) {
+    if (strcasecmp(strval, "true")==0)
+        *(*this) = true;
+    else
+        *(*this) = false;
+}
+
 ToolbarTheme::ToolbarTheme(int screen_num):
     FbTk::Theme(screen_num),
     m_label_textcolor(*this, 
@@ -51,7 +67,8 @@ ToolbarTheme::ToolbarTheme(int screen_num):
     m_justify(*this, "toolbar.justify", "Toolbar.Justify"),
     m_border_width(*this, "toolbar.borderWidth", "Toolbar.BorderWidth"),
     m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"),
-    m_display(FbTk::App::instance()->display()){
+    m_shape(*this, "toolbar.shape", "Toolbar.Shape"),
+    m_display(FbTk::App::instance()->display()) {
 
     Window rootwindow = RootWindow(m_display, screen_num);
 
diff --git a/src/ToolbarTheme.hh b/src/ToolbarTheme.hh
index dda3346..770967f 100644
--- a/src/ToolbarTheme.hh
+++ b/src/ToolbarTheme.hh
@@ -19,7 +19,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: ToolbarTheme.hh,v 1.3 2003/06/24 16:26:56 fluxgen Exp $
+// $Id: ToolbarTheme.hh,v 1.4 2003/07/10 12:00:09 fluxgen Exp $
 
 #ifndef TOOLBARTHEME_HH
 #define TOOLBARTHEME_HH
@@ -73,10 +73,13 @@ public:
     ///@}
     FbTk::Justify justify() const { return *m_justify; }
 
-    int borderWidth() const { return *m_border_width; }
-    int bevelWidth() const { return *m_bevel_width; }    
+    inline int borderWidth() const { return *m_border_width; }
+    inline int bevelWidth() const { return *m_bevel_width; }    
+    inline bool shape() const { return *m_shape; }
+
     void addListener(FbTk::Observer &obs) { m_theme_change_sig.attach(&obs); }
     void removeListener(FbTk::Observer &obs) { m_theme_change_sig.detach(&obs); }
+
 private:
     // text colors
     FbTk::ThemeItem<FbTk::Color> m_label_textcolor, m_window_textcolor, m_clock_textcolor;
@@ -87,6 +90,8 @@ private:
     FbTk::ThemeItem<FbTk::Justify> m_justify;
 
     FbTk::ThemeItem<int> m_border_width, m_bevel_width;
+    FbTk::ThemeItem<bool> m_shape;
+
     // graphic context
     GC m_label_text_gc, m_window_text_gc, m_clock_text_gc, m_button_pic_gc;
     Display *m_display;
-- 
cgit v0.11.2