aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextTheme.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2007-12-28 04:39:31 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2007-12-28 04:39:31 (GMT)
commit00ceefd8846bda6f4dc43a5a990086545ea28727 (patch)
treea87c37dbb853e3604b52198e6a64e8d45711fb27 /src/FbTk/TextTheme.hh
parentb5c354b994bc06667abe35e2d528c0f025703c4e (diff)
downloadfluxbox-00ceefd8846bda6f4dc43a5a990086545ea28727.zip
fluxbox-00ceefd8846bda6f4dc43a5a990086545ea28727.tar.bz2
moved BorderTheme and TextTheme to FbTk
Diffstat (limited to 'src/FbTk/TextTheme.hh')
-rw-r--r--src/FbTk/TextTheme.hh55
1 files changed, 55 insertions, 0 deletions
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 @@
1// TextTheme.hh
2// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
3// and Simon Bowden (rathnor at users.sourceforge.net)
4//
5// Permission is hereby granted, free of charge, to any person obtaining a
6// copy of this software and associated documentation files (the "Software"),
7// to deal in the Software without restriction, including without limitation
8// the rights to use, copy, modify, merge, publish, distribute, sublicense,
9// and/or sell copies of the Software, and to permit persons to whom the
10// Software is furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE.
22
23#ifndef FBTK_TEXTTHEME_HH
24#define FBTK_TEXTTHEME_HH
25
26#include "Theme.hh"
27#include "Font.hh"
28#include "Color.hh"
29#include "Text.hh"
30#include "GContext.hh"
31
32namespace FbTk {
33
34class TextTheme {
35public:
36 TextTheme(Theme &theme, const std::string &name, const std::string &altname);
37 virtual ~TextTheme() { }
38
39 void update();
40
41 Font &font() { return *m_font; }
42 const Font &font() const { return *m_font; }
43 const Color &textColor() const { return *m_text_color; }
44 Justify justify() const { return *m_justify; }
45 GC textGC() const { return m_text_gc.gc(); }
46private:
47 ThemeItem<Font> m_font;
48 ThemeItem<Color> m_text_color;
49 ThemeItem<Justify> m_justify;
50 GContext m_text_gc;
51};
52
53}; // end namespace FbTk
54
55#endif // FBTK_TEXTTHEME_HH