aboutsummaryrefslogtreecommitdiff
path: root/src/IconButtonTheme.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-16 13:38:06 (GMT)
committerfluxgen <fluxgen>2003-08-16 13:38:06 (GMT)
commit3cc8fa8bbc086b3ceb99823136d699f69dc98f01 (patch)
tree5b1aab01e30a42cf675f766d5c18d12f6fc8ff15 /src/IconButtonTheme.cc
parentfff0fbae229e7280ad845782ddd888a0ac7bdf52 (diff)
downloadfluxbox_pavel-3cc8fa8bbc086b3ceb99823136d699f69dc98f01.zip
fluxbox_pavel-3cc8fa8bbc086b3ceb99823136d699f69dc98f01.tar.bz2
not used
Diffstat (limited to 'src/IconButtonTheme.cc')
-rw-r--r--src/IconButtonTheme.cc68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/IconButtonTheme.cc b/src/IconButtonTheme.cc
deleted file mode 100644
index d881329..0000000
--- a/src/IconButtonTheme.cc
+++ /dev/null
@@ -1,68 +0,0 @@
1// IconButtonTheme.cc
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: IconButtonTheme.cc,v 1.1 2003/08/11 15:49:56 fluxgen Exp $
24
25#include "IconButtonTheme.hh"
26
27#include "FbTk/App.hh"
28
29IconButtonTheme::IconButtonTheme(int screen_num):
30 FbTk::Theme(screen_num),
31 m_selected_texture(*this, "iconButton.selected", "IconButton.Selected"),
32 m_unselected_texture(*this, "iconButton.unselected", "IconButton.Unselected"),
33 m_selected_font(*this, "iconButton.selectedFont", "IconButton.SelectedFont"),
34 m_unselected_font(*this, "iconButton.unselectedFont", "IconButton.UnselectedFont"),
35 m_selected_color(*this, "iconButton.selectedTextColor", "IconButton.SelectedTextColor"),
36 m_unselected_color(*this, "iconButton.unselectedTextColor", "IconButton.UnselectedTextColor") {
37
38 // load default font
39 selectedFont().load("fixed");
40 unselectedFont().load("fixed");
41
42 // create graphic context
43 Display *disp = FbTk::App::instance()->display();
44 m_selected_gc = XCreateGC(disp, RootWindow(disp, screen_num), 0, 0);
45 m_unselected_gc = XCreateGC(disp, RootWindow(disp, screen_num), 0, 0);
46}
47
48IconButtonTheme::~IconButtonTheme() {
49 Display *disp = FbTk::App::instance()->display();
50 XFreeGC(disp, m_selected_gc);
51 XFreeGC(disp, m_unselected_gc);
52}
53
54void IconButtonTheme::reconfigTheme() {
55
56 XGCValues gcv;
57 unsigned long gc_value_mask = GCForeground;
58 Display *disp = FbTk::App::instance()->display();
59
60 gcv.foreground = m_selected_color->pixel();
61 XChangeGC(disp, m_selected_gc, gc_value_mask, &gcv);
62
63 gcv.foreground = m_unselected_color->pixel();
64 XChangeGC(disp, m_unselected_gc, gc_value_mask, &gcv);
65
66 m_theme_change.notify();
67}
68