From 00ceefd8846bda6f4dc43a5a990086545ea28727 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Thu, 27 Dec 2007 20:39:31 -0800 Subject: moved BorderTheme and TextTheme to FbTk --- src/BorderTheme.cc | 34 ------------------------------ src/BorderTheme.hh | 45 ---------------------------------------- src/FbTk/BorderTheme.cc | 36 ++++++++++++++++++++++++++++++++ src/FbTk/BorderTheme.hh | 47 ++++++++++++++++++++++++++++++++++++++++++ src/FbTk/Makefile.am | 1 + src/FbTk/TextTheme.cc | 48 ++++++++++++++++++++++++++++++++++++++++++ src/FbTk/TextTheme.hh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ src/FbWinFrameTheme.hh | 6 +++--- src/IconbarTheme.hh | 21 +++++++++---------- src/Makefile.am | 2 -- src/TextTheme.cc | 50 -------------------------------------------- src/TextTheme.hh | 53 ----------------------------------------------- src/ToolTheme.cc | 2 +- src/ToolTheme.hh | 13 +++++------- src/ToolbarTheme.hh | 7 +++---- 15 files changed, 209 insertions(+), 211 deletions(-) delete mode 100644 src/BorderTheme.cc delete mode 100644 src/BorderTheme.hh create mode 100644 src/FbTk/BorderTheme.cc create mode 100644 src/FbTk/BorderTheme.hh create mode 100644 src/FbTk/TextTheme.cc create mode 100644 src/FbTk/TextTheme.hh delete mode 100644 src/TextTheme.cc delete mode 100644 src/TextTheme.hh diff --git a/src/BorderTheme.cc b/src/BorderTheme.cc deleted file mode 100644 index c3c0c06..0000000 --- a/src/BorderTheme.cc +++ /dev/null @@ -1,34 +0,0 @@ -// BorderTheme.cc -// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) -// and Simon Bowden (rathnor at users.sourceforge.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -// $Id$ - -#include "BorderTheme.hh" - -BorderTheme::BorderTheme(FbTk::Theme &theme, const std::string &name, - const std::string &altname): - m_width(theme, name + ".borderWidth", altname + ".BorderWidth"), - m_color(theme, name + ".borderColor", altname + ".BorderColor") { - // set default values - *m_width = 0; - m_color->setFromString("black", theme.screenNum()); -} diff --git a/src/BorderTheme.hh b/src/BorderTheme.hh deleted file mode 100644 index b5a4dd1..0000000 --- a/src/BorderTheme.hh +++ /dev/null @@ -1,45 +0,0 @@ -// BorderTheme.hh -// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) -// and Simon Bowden (rathnor at users.sourceforge.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -// $Id$ - -#ifndef BORDERTHEME_HH -#define BORDERTHEME_HH - -#include "FbTk/Theme.hh" -#include "FbTk/Color.hh" - -/// helper class for border theme items -class BorderTheme { -public: - BorderTheme(FbTk::Theme &theme, const std::string &name, const std::string &altname); - virtual ~BorderTheme() { } - - int width() const { return *m_width; } - const FbTk::Color &color() const { return *m_color; } - -private: - FbTk::ThemeItem m_width; - FbTk::ThemeItem m_color; -}; - -#endif // BORDERTHEME_HH diff --git a/src/FbTk/BorderTheme.cc b/src/FbTk/BorderTheme.cc new file mode 100644 index 0000000..1223954 --- /dev/null +++ b/src/FbTk/BorderTheme.cc @@ -0,0 +1,36 @@ +// BorderTheme.cc +// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) +// and Simon Bowden (rathnor at users.sourceforge.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#include "BorderTheme.hh" + +namespace FbTk { + +BorderTheme::BorderTheme(Theme &theme, const std::string &name, + const std::string &altname): + m_width(theme, name + ".borderWidth", altname + ".BorderWidth"), + m_color(theme, name + ".borderColor", altname + ".BorderColor") { + // set default values + *m_width = 0; + m_color->setFromString("black", theme.screenNum()); +} + +}; // end namespace FbTk diff --git a/src/FbTk/BorderTheme.hh b/src/FbTk/BorderTheme.hh new file mode 100644 index 0000000..9b9ca55 --- /dev/null +++ b/src/FbTk/BorderTheme.hh @@ -0,0 +1,47 @@ +// BorderTheme.hh +// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) +// and Simon Bowden (rathnor at users.sourceforge.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef FBTK_BORDERTHEME_HH +#define FBTK_BORDERTHEME_HH + +#include "Theme.hh" +#include "Color.hh" + +namespace FbTk { + +/// helper class for border theme items +class BorderTheme { +public: + BorderTheme(Theme &theme, const std::string &name, const std::string &altname); + virtual ~BorderTheme() { } + + int width() const { return *m_width; } + const Color &color() const { return *m_color; } + +private: + ThemeItem m_width; + ThemeItem m_color; +}; + +}; // end namespace FbTk + +#endif // FBTK_BORDERTHEME_HH diff --git a/src/FbTk/Makefile.am b/src/FbTk/Makefile.am index e3e5d76..75733a7 100644 --- a/src/FbTk/Makefile.am +++ b/src/FbTk/Makefile.am @@ -28,6 +28,7 @@ libFbTk_a_SOURCES = App.hh App.cc Color.cc Color.hh Command.hh \ BoolMenuItem.hh IntMenuItem.hh \ MultiButtonMenuItem.hh MultiButtonMenuItem.cc \ MenuTheme.hh MenuTheme.cc NotCopyable.hh \ + BorderTheme.hh BorderTheme.cc TextTheme.hh TextTheme.cc \ RefCount.hh SimpleCommand.hh SignalHandler.cc SignalHandler.hh \ Text.hh Text.cc \ Texture.cc Texture.hh TextureRender.hh TextureRender.cc \ diff --git a/src/FbTk/TextTheme.cc b/src/FbTk/TextTheme.cc new file mode 100644 index 0000000..848ee01 --- /dev/null +++ b/src/FbTk/TextTheme.cc @@ -0,0 +1,48 @@ +// TextTheme.cc +// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) +// and Simon Bowden (rathnor at users.sourceforge.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#include "TextTheme.hh" + +#include "App.hh" + +#include + +namespace FbTk { + +TextTheme::TextTheme(Theme &theme, + const std::string &name, const std::string &altname): + m_font(theme, name + ".font", altname + ".Font"), + m_text_color(theme, name + ".textColor", altname + ".TextColor"), + m_justify(theme, name + ".justify", altname + ".Justify"), + m_text_gc(RootWindow(App::instance()->display(), theme.screenNum())) { + *m_justify = LEFT; + // set default values + m_text_color->setFromString("white", theme.screenNum()); + + update(); +} + +void TextTheme::update() { + m_text_gc.setForeground(*m_text_color); +} + +}; // end namespace FbTk diff --git a/src/FbTk/TextTheme.hh b/src/FbTk/TextTheme.hh new file mode 100644 index 0000000..ea22d4b --- /dev/null +++ b/src/FbTk/TextTheme.hh @@ -0,0 +1,55 @@ +// TextTheme.hh +// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) +// and Simon Bowden (rathnor at users.sourceforge.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef FBTK_TEXTTHEME_HH +#define FBTK_TEXTTHEME_HH + +#include "Theme.hh" +#include "Font.hh" +#include "Color.hh" +#include "Text.hh" +#include "GContext.hh" + +namespace FbTk { + +class TextTheme { +public: + TextTheme(Theme &theme, const std::string &name, const std::string &altname); + virtual ~TextTheme() { } + + void update(); + + Font &font() { return *m_font; } + const Font &font() const { return *m_font; } + const Color &textColor() const { return *m_text_color; } + Justify justify() const { return *m_justify; } + GC textGC() const { return m_text_gc.gc(); } +private: + ThemeItem m_font; + ThemeItem m_text_color; + ThemeItem m_justify; + GContext m_text_gc; +}; + +}; // end namespace FbTk + +#endif // FBTK_TEXTTHEME_HH diff --git a/src/FbWinFrameTheme.hh b/src/FbWinFrameTheme.hh index c68c418..df3c312 100644 --- a/src/FbWinFrameTheme.hh +++ b/src/FbWinFrameTheme.hh @@ -29,10 +29,10 @@ #include "FbTk/Text.hh" #include "FbTk/Color.hh" #include "FbTk/Theme.hh" +#include "FbTk/BorderTheme.hh" #include "FbTk/Subject.hh" #include "FbTk/GContext.hh" -#include "BorderTheme.hh" #include "IconbarTheme.hh" #include "Shape.hh" @@ -84,7 +84,7 @@ public: inline Cursor bottomSideCursor() const { return m_cursor_bottom_side; } inline Shape::ShapePlace shapePlace() const { return *m_shape_place; } - inline const BorderTheme &border(bool focus) const { return (focus ? m_border_focus : m_border_unfocus); } + inline const FbTk::BorderTheme &border(bool focus) const { return (focus ? m_border_focus : m_border_unfocus); } unsigned int titleHeight() const { return *m_title_height; } unsigned int bevelWidth() const { return *m_bevel_width; } @@ -109,7 +109,7 @@ private: FbTk::ThemeItem m_shape_place; FbTk::ThemeItem m_title_height, m_bevel_width, m_handle_width; - BorderTheme m_border_focus, m_border_unfocus; + FbTk::BorderTheme m_border_focus, m_border_unfocus; FbTk::GContext m_button_pic_focus_gc, m_button_pic_unfocus_gc; diff --git a/src/IconbarTheme.hh b/src/IconbarTheme.hh index 419ab1a..9e2307b 100644 --- a/src/IconbarTheme.hh +++ b/src/IconbarTheme.hh @@ -26,10 +26,9 @@ #define ICONBARTHEME_HH #include "FbTk/Theme.hh" +#include "FbTk/BorderTheme.hh" #include "FbTk/Texture.hh" - -#include "TextTheme.hh" -#include "BorderTheme.hh" +#include "FbTk/TextTheme.hh" class IconbarTheme:public FbTk::Theme { public: @@ -39,21 +38,21 @@ public: void reconfigTheme(); bool fallback(FbTk::ThemeItem_base &item); - TextTheme &focusedText() { return m_focused_text; } - TextTheme &unfocusedText() { return m_unfocused_text; } + FbTk::TextTheme &focusedText() { return m_focused_text; } + FbTk::TextTheme &unfocusedText() { return m_unfocused_text; } + + const FbTk::BorderTheme &focusedBorder() const { return m_focused_border; } + const FbTk::BorderTheme &unfocusedBorder() const { return m_unfocused_border; } + const FbTk::BorderTheme &border() const { return m_border; } - const BorderTheme &focusedBorder() const { return m_focused_border; } - const BorderTheme &unfocusedBorder() const { return m_unfocused_border; } - const BorderTheme &border() const { return m_border; } - const FbTk::Texture &focusedTexture() const { return *m_focused_texture; } const FbTk::Texture &unfocusedTexture() const { return *m_unfocused_texture; } const FbTk::Texture &emptyTexture() const { return *m_empty_texture; } private: FbTk::ThemeItem m_focused_texture, m_unfocused_texture, m_empty_texture; - BorderTheme m_focused_border, m_unfocused_border, m_border; - TextTheme m_focused_text, m_unfocused_text; + FbTk::BorderTheme m_focused_border, m_unfocused_border, m_border; + FbTk::TextTheme m_focused_text, m_unfocused_text; std::string m_name, m_altname; }; diff --git a/src/Makefile.am b/src/Makefile.am index e6f21d3..6b29c1a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -120,8 +120,6 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \ Shape.hh Shape.cc \ MenuTheme.hh MenuTheme.cc \ Container.hh Container.cc \ - TextTheme.hh TextTheme.cc \ - BorderTheme.hh BorderTheme.cc \ CommandDialog.hh CommandDialog.cc SendToMenu.hh SendToMenu.cc \ AlphaMenu.hh AlphaMenu.cc ObjectResource.hh \ CompareWindow.hh \ diff --git a/src/TextTheme.cc b/src/TextTheme.cc deleted file mode 100644 index a35af64..0000000 --- a/src/TextTheme.cc +++ /dev/null @@ -1,50 +0,0 @@ -// TextTheme.cc -// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) -// and Simon Bowden (rathnor at users.sourceforge.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -// $Id$ - -#include "TextTheme.hh" - -#include "FbTk/App.hh" - -#include - -TextTheme::TextTheme(FbTk::Theme &theme, - const std::string &name, const std::string &altname): - m_font(theme, name + ".font", altname + ".Font"), - m_text_color(theme, name + ".textColor", altname + ".TextColor"), - m_justify(theme, name + ".justify", altname + ".Justify"), - m_text_gc(RootWindow(FbTk::App::instance()->display(), theme.screenNum())) { - *m_justify = FbTk::LEFT; - // set default values - m_text_color->setFromString("white", theme.screenNum()); - - update(); -} - -TextTheme::~TextTheme() { - -} - -void TextTheme::update() { - m_text_gc.setForeground(*m_text_color); -} diff --git a/src/TextTheme.hh b/src/TextTheme.hh deleted file mode 100644 index 2b1ce53..0000000 --- a/src/TextTheme.hh +++ /dev/null @@ -1,53 +0,0 @@ -// TextTheme.hh -// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) -// and Simon Bowden (rathnor at users.sourceforge.net) -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -// $Id$ - -#ifndef TEXTTHEME_HH -#define TEXTTHEME_HH - -#include "FbTk/Theme.hh" -#include "FbTk/Font.hh" -#include "FbTk/Color.hh" -#include "FbTk/Text.hh" -#include "FbTk/GContext.hh" - -class TextTheme { -public: - TextTheme(FbTk::Theme &theme, const std::string &name, const std::string &altname); - virtual ~TextTheme(); - - void update(); - - FbTk::Font &font() { return *m_font; } - const FbTk::Font &font() const { return *m_font; } - const FbTk::Color &textColor() const { return *m_text_color; } - FbTk::Justify justify() const { return *m_justify; } - GC textGC() const { return m_text_gc.gc(); } -private: - FbTk::ThemeItem m_font; - FbTk::ThemeItem m_text_color; - FbTk::ThemeItem m_justify; - FbTk::GContext m_text_gc; -}; - -#endif // TEXTTHEME_HH diff --git a/src/ToolTheme.cc b/src/ToolTheme.cc index 2432655..4cfb991 100644 --- a/src/ToolTheme.cc +++ b/src/ToolTheme.cc @@ -26,7 +26,7 @@ ToolTheme::ToolTheme(int screen_num, const std::string &name, const std::string &altname): FbTk::Theme(screen_num), - TextTheme(*this, name, altname), + FbTk::TextTheme(*this, name, altname), m_texture(*this, name, altname), m_border(*this, name, altname), m_alpha(255) { diff --git a/src/ToolTheme.hh b/src/ToolTheme.hh index 52e926a..270b67a 100644 --- a/src/ToolTheme.hh +++ b/src/ToolTheme.hh @@ -26,18 +26,15 @@ #define TOOLTHEME_HH -#include "TextTheme.hh" -#include "BorderTheme.hh" - +#include "FbTk/TextTheme.hh" +#include "FbTk/BorderTheme.hh" #include "FbTk/Texture.hh" #include #include -class ToolbarTheme; - /// Handles toolbar item theme for text and texture -class ToolTheme: public FbTk::Theme, public TextTheme { +class ToolTheme: public FbTk::Theme, public FbTk::TextTheme { public: ToolTheme(int screen_num, const std::string &name, const std::string &altname); virtual ~ToolTheme(); @@ -47,7 +44,7 @@ public: void reconfigTheme(); // textures const FbTk::Texture &texture() const { return *m_texture; } - const BorderTheme &border() const { return m_border; } + const FbTk::BorderTheme &border() const { return m_border; } inline unsigned char alpha() const { return m_alpha; } inline void setAlpha(unsigned char alpha) { m_alpha = alpha; } @@ -56,7 +53,7 @@ protected: private: FbTk::ThemeItem m_texture; - BorderTheme m_border; + FbTk::BorderTheme m_border; unsigned char m_alpha; }; diff --git a/src/ToolbarTheme.hh b/src/ToolbarTheme.hh index c4dfaae..c62a5c1 100644 --- a/src/ToolbarTheme.hh +++ b/src/ToolbarTheme.hh @@ -27,8 +27,7 @@ #include "FbTk/Theme.hh" #include "FbTk/Texture.hh" #include "FbTk/Color.hh" - -#include "BorderTheme.hh" +#include "FbTk/BorderTheme.hh" /// toolbar theme class container class ToolbarTheme: public FbTk::Theme { @@ -39,7 +38,7 @@ public: void reconfigTheme(); - inline const BorderTheme &border() const { return m_border; } + inline const FbTk::BorderTheme &border() const { return m_border; } inline const FbTk::Texture &toolbar() const { return *m_toolbar; } bool fallback(FbTk::ThemeItem_base &item); @@ -50,7 +49,7 @@ public: inline int buttonSize() const { return *m_button_size; } private: FbTk::ThemeItem m_toolbar; - BorderTheme m_border; + FbTk::BorderTheme m_border; FbTk::ThemeItem m_bevel_width; FbTk::ThemeItem m_shape; -- cgit v0.11.2