diff options
author | fluxgen <fluxgen> | 2003-08-29 10:30:08 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-08-29 10:30:08 (GMT) |
commit | 359037659a46cc26e422a3eccfa25fe827075db4 (patch) | |
tree | ae8f1bbb3834678cb337093bf99204550c6ae9b0 /src | |
parent | aca5f8d9d7e8c608b71c0ee0d28b25dd22f4b7ab (diff) | |
download | fluxbox-359037659a46cc26e422a3eccfa25fe827075db4.zip fluxbox-359037659a46cc26e422a3eccfa25fe827075db4.tar.bz2 |
first
Diffstat (limited to 'src')
-rw-r--r-- | src/SlitTheme.cc | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/SlitTheme.cc b/src/SlitTheme.cc new file mode 100644 index 0000000..6a882be --- /dev/null +++ b/src/SlitTheme.cc | |||
@@ -0,0 +1,61 @@ | |||
1 | // SlitTheme.cc for fluxbox | ||
2 | // Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) | ||
3 | // | ||
4 | // Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | // copy of this software and associated documentation files (the "Software"), | ||
6 | // to deal in the Software without restriction, including without limitation | ||
7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | // and/or sell copies of the Software, and to permit persons to whom the | ||
9 | // Software is furnished to do so, subject to the following conditions: | ||
10 | // | ||
11 | // The above copyright notice and this permission notice shall be included in | ||
12 | // all copies or substantial portions of the Software. | ||
13 | // | ||
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | // DEALINGS IN THE SOFTWARE. | ||
21 | |||
22 | // $Id: SlitTheme.cc,v 1.1 2003/08/29 10:30:08 fluxgen Exp $ | ||
23 | |||
24 | #include "SlitTheme.hh" | ||
25 | |||
26 | SlitTheme::SlitTheme(int screen_num):FbTk::Theme(screen_num), | ||
27 | m_texture(*this, "slit", "Slit"), | ||
28 | m_border_width(*this, "slit.borderWidth", "Slit.borderWidth"), | ||
29 | m_bevel_width(*this, "slit.bevelWidth", "slit.bevelWidth"), | ||
30 | m_border_color(*this, "slit.borderColor", "Slit.BorderColor") { | ||
31 | m_texture.setDefaultValue(); | ||
32 | m_border_width.setDefaultValue(); | ||
33 | m_bevel_width.setDefaultValue(); | ||
34 | m_border_color.setDefaultValue(); | ||
35 | // default texture type | ||
36 | m_texture->setType(FbTk::Texture::SOLID); | ||
37 | } | ||
38 | |||
39 | |||
40 | void SlitTheme::reconfigTheme() { | ||
41 | } | ||
42 | |||
43 | bool SlitTheme::fallback(FbTk::ThemeItem_base &item) { | ||
44 | if (&item == &m_texture) { | ||
45 | // special case for textures since they're using .load() | ||
46 | FbTk::ThemeItem<FbTk::Texture> tmp_item(m_texture.theme(), | ||
47 | "toolbar", "Toolbar"); | ||
48 | tmp_item.load(); | ||
49 | // copy texture | ||
50 | *m_texture = *tmp_item; | ||
51 | return true; | ||
52 | } else if (item.name().find(".borderWidth") != std::string::npos) { | ||
53 | return FbTk::ThemeManager::instance().loadItem(item, | ||
54 | "borderWidth", | ||
55 | "BorderWidth"); | ||
56 | } | ||
57 | |||
58 | return false; | ||
59 | } | ||
60 | |||
61 | |||