diff options
Diffstat (limited to 'src/WinButtonTheme.hh')
-rw-r--r-- | src/WinButtonTheme.hh | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/src/WinButtonTheme.hh b/src/WinButtonTheme.hh new file mode 100644 index 0000000..af2f011 --- /dev/null +++ b/src/WinButtonTheme.hh | |||
@@ -0,0 +1,89 @@ | |||
1 | // WinButtonTheme.hh for Fluxbox - an X11 Window manager | ||
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: WinButtonTheme.hh,v 1.2 2003/05/06 23:52:55 fluxgen Exp $ | ||
23 | |||
24 | #ifndef WINBUTTONTHEME_HH | ||
25 | #define WINBUTTONTHEME_HH | ||
26 | |||
27 | #include "Theme.hh" | ||
28 | #include "Subject.hh" | ||
29 | #include "FbPixmap.hh" | ||
30 | |||
31 | class WinButtonTheme: public FbTk::Theme { | ||
32 | public: | ||
33 | struct PixmapWithMask { | ||
34 | FbTk::FbPixmap pixmap; | ||
35 | FbTk::FbPixmap pixmap_scaled; | ||
36 | FbTk::FbPixmap mask; | ||
37 | FbTk::FbPixmap mask_scaled; | ||
38 | }; | ||
39 | |||
40 | explicit WinButtonTheme(int screen_num); | ||
41 | ~WinButtonTheme(); | ||
42 | |||
43 | void reconfigTheme(); | ||
44 | |||
45 | inline const PixmapWithMask &closePixmap() const { return *m_close_pm; } | ||
46 | inline PixmapWithMask &closePixmap() { return *m_close_pm; } | ||
47 | inline PixmapWithMask &closeUnfocusPixmap() { return *m_close_unfocus_pm; } | ||
48 | inline const PixmapWithMask &closePressedPixmap() const { return *m_close_pressed_pm; } | ||
49 | inline PixmapWithMask &closePressedPixmap() { return *m_close_pressed_pm; } | ||
50 | |||
51 | inline const PixmapWithMask &maximizePixmap() const { return *m_maximize_pm; } | ||
52 | inline PixmapWithMask &maximizePixmap() { return *m_maximize_pm; } | ||
53 | inline PixmapWithMask &maximizeUnfocusPixmap() { return *m_maximize_unfocus_pm; } | ||
54 | inline const PixmapWithMask &maximizePressedPixmap() const { return *m_maximize_pressed_pm; } | ||
55 | inline PixmapWithMask &maximizePressedPixmap() { return *m_maximize_pressed_pm; } | ||
56 | |||
57 | inline const PixmapWithMask &iconifyPixmap() const { return *m_iconify_pm; } | ||
58 | inline PixmapWithMask &iconifyPixmap() { return *m_iconify_pm; } | ||
59 | inline PixmapWithMask &iconifyUnfocusPixmap() { return *m_iconify_unfocus_pm; } | ||
60 | inline const PixmapWithMask &iconifyPressedPixmap() const { return *m_iconify_pressed_pm; } | ||
61 | inline PixmapWithMask &iconifyPressedPixmap() { return *m_iconify_pressed_pm; } | ||
62 | |||
63 | inline const PixmapWithMask &stickPixmap() const { return *m_stick_pm; } | ||
64 | inline PixmapWithMask &stickPixmap() { return *m_stick_pm; } | ||
65 | inline PixmapWithMask &stickUnfocusPixmap() { return *m_stick_unfocus_pm; } | ||
66 | inline const PixmapWithMask &stickPressedPixmap() const { return *m_stick_pressed_pm; } | ||
67 | inline PixmapWithMask &stickPressedPixmap() { return *m_stick_pressed_pm; } | ||
68 | |||
69 | inline PixmapWithMask &stuckPixmap() { return *m_stuck_pm; } | ||
70 | inline PixmapWithMask &stuckUnfocusPixmap() { return *m_stuck_unfocus_pm; } | ||
71 | |||
72 | inline const PixmapWithMask &shadePixmap() const { return *m_shade_pm; } | ||
73 | inline PixmapWithMask &shadePixmap() { return *m_shade_pm; } | ||
74 | inline PixmapWithMask &shadeUnfocusPixmap() { return *m_shade_unfocus_pm; } | ||
75 | inline const PixmapWithMask &shadePressedPixmap() const { return *m_shade_pressed_pm; } | ||
76 | inline PixmapWithMask &shadePressedPixmap() { return *m_shade_pressed_pm; } | ||
77 | FbTk::Subject &reconfigSig() { return m_reconf_sig; } | ||
78 | private: | ||
79 | FbTk::Subject m_reconf_sig; | ||
80 | |||
81 | FbTk::ThemeItem<PixmapWithMask> m_close_pm, m_close_unfocus_pm, m_close_pressed_pm; | ||
82 | FbTk::ThemeItem<PixmapWithMask> m_maximize_pm, m_maximize_unfocus_pm, m_maximize_pressed_pm; | ||
83 | FbTk::ThemeItem<PixmapWithMask> m_iconify_pm, m_iconify_unfocus_pm, m_iconify_pressed_pm; | ||
84 | FbTk::ThemeItem<PixmapWithMask> m_shade_pm, m_shade_unfocus_pm, m_shade_pressed_pm; | ||
85 | FbTk::ThemeItem<PixmapWithMask> m_stick_pm, m_stick_unfocus_pm, m_stick_pressed_pm; | ||
86 | FbTk::ThemeItem<PixmapWithMask> m_stuck_pm, m_stuck_unfocus_pm; | ||
87 | }; | ||
88 | |||
89 | #endif // WINBUTTONTHEME_HH | ||