aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-29 00:51:55 (GMT)
committerfluxgen <fluxgen>2003-08-29 00:51:55 (GMT)
commite4e1e05c7df2ead15818fe177e98dc9fcdac95d3 (patch)
tree20e4a8f026b916db5dca270c360889f06f6f425f
parent8f0b2b2016d0023f928bab973936cf049fe9a30a (diff)
downloadfluxbox-e4e1e05c7df2ead15818fe177e98dc9fcdac95d3.zip
fluxbox-e4e1e05c7df2ead15818fe177e98dc9fcdac95d3.tar.bz2
handles theme for workspacename tool
-rw-r--r--src/WorkspaceNameTheme.hh57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/WorkspaceNameTheme.hh b/src/WorkspaceNameTheme.hh
new file mode 100644
index 0000000..a29dd51
--- /dev/null
+++ b/src/WorkspaceNameTheme.hh
@@ -0,0 +1,57 @@
1// WorkspaceNameTheme.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: WorkspaceNameTheme.hh,v 1.1 2003/08/29 00:51:55 fluxgen Exp $
24
25#ifndef WORKSPACENAMETHEME_HH
26#define WORKSPACENAMETHEME_HH
27
28#include "ToolTheme.hh"
29#include "FbTk/Theme.hh"
30
31class WorkspaceNameTheme:public ToolTheme {
32public:
33 WorkspaceNameTheme(int screen_num,
34 const std::string &name,
35 const std::string &alt_name):ToolTheme(screen_num, name, alt_name) { }
36
37 bool fallback(FbTk::ThemeItem_base &item) {
38 if (item.name() == "toolbar.workspace.textColor") {
39 return FbTk::ThemeManager::instance().loadItem(item,
40 "toolbar.label.textColor",
41 "Toolbar.Label.TextColor");
42 } else if (item.name() == "toolbar.workspace") {
43
44 // special case for textures since they're using .load()
45 FbTk::ThemeItem<FbTk::Texture> tmp_item(*this,
46 "toolbar.label", "Toolbar.Label");
47 tmp_item.load();
48 // copy texture
49 *textureTheme() = *tmp_item;
50 return true;
51 }
52
53 return ToolTheme::fallback(item);
54 }
55};
56
57#endif // WORKSPACENAMETHEME_HH