diff options
author | fluxgen <fluxgen> | 2003-08-11 15:42:29 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-08-11 15:42:29 (GMT) |
commit | fe1c6012e49a516e591aaca4f8c13cb645bce54a (patch) | |
tree | 47b9793ac43beef3df41c0f29bad18520da24798 /src/IconbarTool.hh | |
parent | 0df2793bb7651897ff50c7587913b543bd6560bc (diff) | |
download | fluxbox_pavel-fe1c6012e49a516e591aaca4f8c13cb645bce54a.zip fluxbox_pavel-fe1c6012e49a516e591aaca4f8c13cb645bce54a.tar.bz2 |
iconbar for toolbar
Diffstat (limited to 'src/IconbarTool.hh')
-rw-r--r-- | src/IconbarTool.hh | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/IconbarTool.hh b/src/IconbarTool.hh new file mode 100644 index 0000000..6711324 --- /dev/null +++ b/src/IconbarTool.hh | |||
@@ -0,0 +1,68 @@ | |||
1 | // IconbarTool.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: IconbarTool.hh,v 1.1 2003/08/11 15:42:29 fluxgen Exp $ | ||
24 | |||
25 | #ifndef ICONBARTOOL_HH | ||
26 | #define ICONBARTOOL_HH | ||
27 | |||
28 | #include "ToolbarItem.hh" | ||
29 | #include "Container.hh" | ||
30 | |||
31 | #include "FbTk/Observer.hh" | ||
32 | |||
33 | #include <map> | ||
34 | |||
35 | #include <X11/Xlib.h> | ||
36 | |||
37 | class IconbarTheme; | ||
38 | class BScreen; | ||
39 | class IconButton; | ||
40 | class FluxboxWindow; | ||
41 | |||
42 | class IconbarTool: public ToolbarItem, public FbTk::Observer { | ||
43 | public: | ||
44 | IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, BScreen &screen); | ||
45 | void move(int x, int y); | ||
46 | void resize(unsigned int width, unsigned int height); | ||
47 | void moveResize(int x, int y, | ||
48 | unsigned int width, unsigned int height); | ||
49 | |||
50 | void update(FbTk::Subject *subj); | ||
51 | void show(); | ||
52 | void hide(); | ||
53 | unsigned int width() const; | ||
54 | unsigned int height() const; | ||
55 | |||
56 | private: | ||
57 | void renderTheme(); | ||
58 | |||
59 | BScreen &m_screen; | ||
60 | Container m_icon_container; | ||
61 | const IconbarTheme &m_theme; | ||
62 | Pixmap m_focused_pm, m_unfocused_pm; | ||
63 | |||
64 | typedef std::map<FluxboxWindow *, IconButton *> Icon2WinMap; | ||
65 | Icon2WinMap m_icon2winmap; | ||
66 | }; | ||
67 | |||
68 | #endif // ICONBARTOOL_HH | ||