diff options
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 | |||