diff options
author | simonb <simonb> | 2006-04-25 02:19:04 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-04-25 02:19:04 (GMT) |
commit | 3707b74c40256c09465171d39e2c4d95aeaefb0e (patch) | |
tree | dcb835e0ee929b65b53d0c9d0538167f1840245b /src/FbTk | |
parent | fae88b329c63c16755f2c9b7a5a655a1414ab10f (diff) | |
download | fluxbox_paul-3707b74c40256c09465171d39e2c4d95aeaefb0e.zip fluxbox_paul-3707b74c40256c09465171d39e2c4d95aeaefb0e.tar.bz2 |
fix a bunch of comments, make default textures obvious
Thanks Jonas Koelker
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/EventHandler.hh | 4 | ||||
-rw-r--r-- | src/FbTk/Texture.cc | 8 | ||||
-rw-r--r-- | src/FbTk/Texture.hh | 11 | ||||
-rw-r--r-- | src/FbTk/Theme.hh | 2 | ||||
-rw-r--r-- | src/FbTk/ThemeItems.cc | 6 |
5 files changed, 19 insertions, 12 deletions
diff --git a/src/FbTk/EventHandler.hh b/src/FbTk/EventHandler.hh index 4ae1aa5..62e2cb9 100644 --- a/src/FbTk/EventHandler.hh +++ b/src/FbTk/EventHandler.hh | |||
@@ -1,4 +1,4 @@ | |||
1 | // EventHandler.cc for Fluxbox Window Manager | 1 | // EventHandler.hh for Fluxbox Window Manager |
2 | // Copyright (c) 2002-2003 Henrik Kinnunen (fluxgen at fluxbox dot org) | 2 | // Copyright (c) 2002-2003 Henrik Kinnunen (fluxgen at fluxbox dot org) |
3 | // | 3 | // |
4 | // Permission is hereby granted, free of charge, to any person obtaining a | 4 | // Permission is hereby granted, free of charge, to any person obtaining a |
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | // $Id$ | 22 | // $Id$ |
23 | 23 | ||
24 | /// @file holds EventHandler interface for X events | 24 | /// @file EventHandler.hh holds EventHandler interface for X events |
25 | 25 | ||
26 | #ifndef FBTK_EVENTHANDLER_HH | 26 | #ifndef FBTK_EVENTHANDLER_HH |
27 | #define FBTK_EVENTHANDLER_HH | 27 | #define FBTK_EVENTHANDLER_HH |
diff --git a/src/FbTk/Texture.cc b/src/FbTk/Texture.cc index e06c328..0395cd5 100644 --- a/src/FbTk/Texture.cc +++ b/src/FbTk/Texture.cc | |||
@@ -77,15 +77,19 @@ void Texture::setFromString(const char * const texture_str) { | |||
77 | addType(Texture::VERTICAL); | 77 | addType(Texture::VERTICAL); |
78 | else | 78 | else |
79 | addType(Texture::DIAGONAL); | 79 | addType(Texture::DIAGONAL); |
80 | } else // default is "solid", according to ThemeItems.cc | 80 | } else if (strstr(ts, "solid")) |
81 | addType(Texture::SOLID); | 81 | addType(Texture::SOLID); |
82 | else | ||
83 | addType(Texture::DEFAULT_BEVEL); | ||
82 | 84 | ||
83 | if (strstr(ts, "raised")) | 85 | if (strstr(ts, "raised")) |
84 | addType(Texture::RAISED); | 86 | addType(Texture::RAISED); |
85 | else if (strstr(ts, "sunken")) | 87 | else if (strstr(ts, "sunken")) |
86 | addType(Texture::SUNKEN); | 88 | addType(Texture::SUNKEN); |
87 | else // default us "flat", according to ThemeItems.cc | 89 | else if (strstr(ts, "flat")) |
88 | addType(Texture::FLAT); | 90 | addType(Texture::FLAT); |
91 | else | ||
92 | addType(Texture::DEFAULT_TEXTURE); | ||
89 | 93 | ||
90 | if (! (type() & Texture::FLAT)) | 94 | if (! (type() & Texture::FLAT)) |
91 | if (strstr(ts, "bevel2")) | 95 | if (strstr(ts, "bevel2")) |
diff --git a/src/FbTk/Texture.hh b/src/FbTk/Texture.hh index 162cf44..35b628b 100644 --- a/src/FbTk/Texture.hh +++ b/src/FbTk/Texture.hh | |||
@@ -39,15 +39,18 @@ class Texture { | |||
39 | public: | 39 | public: |
40 | 40 | ||
41 | enum Bevel { | 41 | enum Bevel { |
42 | // why are we not using the lowest-order bit? | ||
42 | FLAT = 0x00002, | 43 | FLAT = 0x00002, |
43 | SUNKEN = 0x00004, | 44 | SUNKEN = 0x00004, |
44 | RAISED = 0x00008 | 45 | RAISED = 0x00008, |
46 | DEFAULT_BEVEL = FLAT, | ||
45 | }; | 47 | }; |
46 | 48 | ||
47 | enum Textures { | 49 | enum Textures { |
48 | NONE = 0x00000, | 50 | NONE = 0x00000, |
49 | SOLID = 0x00010, | 51 | SOLID = 0x00010, |
50 | GRADIENT = 0x00020 | 52 | GRADIENT = 0x00020, |
53 | DEFAULT_TEXTURE = SOLID, | ||
51 | }; | 54 | }; |
52 | 55 | ||
53 | enum Gradients { | 56 | enum Gradients { |
@@ -58,7 +61,7 @@ public: | |||
58 | RECTANGLE = 0x00400, | 61 | RECTANGLE = 0x00400, |
59 | PYRAMID = 0x00800, | 62 | PYRAMID = 0x00800, |
60 | PIPECROSS = 0x01000, | 63 | PIPECROSS = 0x01000, |
61 | ELLIPTIC = 0x02000 | 64 | ELLIPTIC = 0x02000 |
62 | }; | 65 | }; |
63 | 66 | ||
64 | enum { | 67 | enum { |
diff --git a/src/FbTk/Theme.hh b/src/FbTk/Theme.hh index 5edc840..e3fc5b4 100644 --- a/src/FbTk/Theme.hh +++ b/src/FbTk/Theme.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // $Id$ | 22 | // $Id$ |
23 | 23 | ||
24 | /** | 24 | /** |
25 | @file holds ThemeItem<T>, Theme and ThemeManager which is the base for any theme | 25 | @file Theme.hh holds ThemeItem<T>, Theme and ThemeManager which is the base for any theme |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef FBTK_THEME_HH | 28 | #ifndef FBTK_THEME_HH |
diff --git a/src/FbTk/ThemeItems.cc b/src/FbTk/ThemeItems.cc index 41d05e8..2f58b2a 100644 --- a/src/FbTk/ThemeItems.cc +++ b/src/FbTk/ThemeItems.cc | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | // $Id$ | 22 | // $Id$ |
23 | 23 | ||
24 | /// @file implements common theme items | 24 | /// @file ThemeItems.cc implements common theme items |
25 | 25 | ||
26 | #ifndef THEMEITEMS_HH | 26 | #ifndef THEMEITEMS_HH |
27 | #define THEMEITEMS_HH | 27 | #define THEMEITEMS_HH |
@@ -71,7 +71,7 @@ void ThemeItem<string>::setFromString(const char *str) { | |||
71 | } | 71 | } |
72 | 72 | ||
73 | template <> | 73 | template <> |
74 | void ThemeItem<int>::load(const string *name, const string *altname) { } | 74 | void ThemeItem<int>::load(const std::string *name, const std::string *altname) { } |
75 | 75 | ||
76 | template<> | 76 | template<> |
77 | void ThemeItem<int>::setDefaultValue() { | 77 | void ThemeItem<int>::setDefaultValue() { |
@@ -233,7 +233,7 @@ void ThemeItem<Texture>::load(const string *o_name, const string *o_altname) { | |||
233 | 233 | ||
234 | template <> | 234 | template <> |
235 | void ThemeItem<Texture>::setDefaultValue() { | 235 | void ThemeItem<Texture>::setDefaultValue() { |
236 | m_value.setType(Texture::FLAT | Texture::SOLID); | 236 | m_value.setType(Texture::DEFAULT_BEVEL | Texture::DEFAULT_TEXTURE); |
237 | load(); // one might forget to add line something: so we try to load something.*: too | 237 | load(); // one might forget to add line something: so we try to load something.*: too |
238 | } | 238 | } |
239 | 239 | ||