diff options
author | fluxgen <fluxgen> | 2003-08-11 14:32:39 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-08-11 14:32:39 (GMT) |
commit | d45b3ad764f2854f323254a6616c93466df5445d (patch) | |
tree | 002939ca9daafa14eda54507b87bf37f6536c0c9 /src/WorkspaceNameTool.hh | |
parent | 4f51fab7afc2b7fa48e28d182336df84ffe284d2 (diff) | |
download | fluxbox-d45b3ad764f2854f323254a6616c93466df5445d.zip fluxbox-d45b3ad764f2854f323254a6616c93466df5445d.tar.bz2 |
basic tools for toolbar
Diffstat (limited to 'src/WorkspaceNameTool.hh')
-rw-r--r-- | src/WorkspaceNameTool.hh | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/WorkspaceNameTool.hh b/src/WorkspaceNameTool.hh new file mode 100644 index 0000000..a5d0188 --- /dev/null +++ b/src/WorkspaceNameTool.hh | |||
@@ -0,0 +1,62 @@ | |||
1 | // WorkspaceNameTool.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: WorkspaceNameTool.hh,v 1.1 2003/08/11 14:32:39 fluxgen Exp $ | ||
24 | |||
25 | #ifndef WORKSPACENAMETOOL_HH | ||
26 | #define WORKSPACENAMETOOL_HH | ||
27 | |||
28 | #include "ToolbarItem.hh" | ||
29 | #include "TextButton.hh" | ||
30 | |||
31 | #include "FbTk/Observer.hh" | ||
32 | |||
33 | class BScreen; | ||
34 | class ToolTheme; | ||
35 | |||
36 | class WorkspaceNameTool: public ToolbarItem, FbTk::Observer { | ||
37 | public: | ||
38 | WorkspaceNameTool(const FbTk::FbWindow &parent, ToolTheme &theme, BScreen &screen); | ||
39 | virtual ~WorkspaceNameTool(); | ||
40 | |||
41 | void move(int x, int y); | ||
42 | void resize(unsigned int width, unsigned int height); | ||
43 | void moveResize(int x, int y, | ||
44 | unsigned int width, unsigned int height); | ||
45 | |||
46 | void show(); | ||
47 | void hide(); | ||
48 | unsigned int width() const; | ||
49 | unsigned int height() const; | ||
50 | |||
51 | void update(FbTk::Subject *subj); | ||
52 | |||
53 | private: | ||
54 | void renderTheme(); | ||
55 | TextButton m_button; | ||
56 | const ToolTheme &m_theme; | ||
57 | BScreen &m_screen; | ||
58 | Pixmap m_pixmap; | ||
59 | }; | ||
60 | |||
61 | #endif // WORKSPACENAMETOOL_HH | ||
62 | |||