aboutsummaryrefslogtreecommitdiff
path: root/src/TextTheme.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/TextTheme.hh')
-rw-r--r--src/TextTheme.hh55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/TextTheme.hh b/src/TextTheme.hh
new file mode 100644
index 0000000..d24b201
--- /dev/null
+++ b/src/TextTheme.hh
@@ -0,0 +1,55 @@
1// TextTheme.hh
2// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
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// $Id: TextTheme.hh,v 1.3 2003/08/27 18:05:12 fluxgen Exp $
24
25#ifndef TEXTTHEME_HH
26#define TEXTTHEME_HH
27
28#include "FbTk/Theme.hh"
29#include "FbTk/Font.hh"
30#include "FbTk/Color.hh"
31#include "FbTk/Text.hh"
32#include "FbTk/GContext.hh"
33
34class TextTheme {
35public:
36 TextTheme(FbTk::Theme &theme, const std::string &name, const std::string &altname);
37 virtual ~TextTheme();
38
39 void update();
40
41 void setAntialias(bool value);
42
43 FbTk::Font &font() { return *m_font; }
44 const FbTk::Font &font() const { return *m_font; }
45 const FbTk::Color &textColor() const { return *m_text_color; }
46 FbTk::Justify justify() const { return *m_justify; }
47 GC textGC() const { return m_text_gc.gc(); }
48private:
49 FbTk::ThemeItem<FbTk::Font> m_font;
50 FbTk::ThemeItem<FbTk::Color> m_text_color;
51 FbTk::ThemeItem<FbTk::Justify> m_justify;
52 FbTk::GContext m_text_gc;
53};
54
55#endif // TEXTTHEME_HH