aboutsummaryrefslogtreecommitdiff
path: root/src/OSDWindow.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-19 12:00:46 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-19 12:00:46 (GMT)
commitdb4ec8cf20b4e72cd32d0632a5ab6a8584d2515a (patch)
treef89bd2773b284aed8c1bbb7f9e5d1fe64d694070 /src/OSDWindow.hh
parent7b055cc54a2db2398a7da012b57f0dcbc9f85a35 (diff)
downloadfluxbox-db4ec8cf20b4e72cd32d0632a5ab6a8584d2515a.zip
fluxbox-db4ec8cf20b4e72cd32d0632a5ab6a8584d2515a.tar.bz2
move position and geometry windows into their own class
Diffstat (limited to 'src/OSDWindow.hh')
-rw-r--r--src/OSDWindow.hh59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/OSDWindow.hh b/src/OSDWindow.hh
new file mode 100644
index 0000000..3fd5c42
--- /dev/null
+++ b/src/OSDWindow.hh
@@ -0,0 +1,59 @@
1// OSDWindow.hh
2// Copyright (c) 2008 Fluxbox Team (fluxgen at fluxbox dot org)
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#ifndef OSDWINDOW_HH
23#define OSDWINDOW_HH
24
25#include "FbTk/FbWindow.hh"
26#include <string>
27
28class BScreen;
29class FbWinFrameTheme;
30
31namespace FbTk {
32template <class T> class ThemeProxy;
33}
34
35class OSDWindow: public FbTk::FbWindow {
36public:
37 OSDWindow(const FbTk::FbWindow &parent, BScreen &screen,
38 FbTk::ThemeProxy<FbWinFrameTheme> &theme):
39 FbTk::FbWindow(parent, 0, 0, 10, 10, 0, false, true),
40 m_screen(screen), m_theme(theme),
41 m_pixmap(None), m_visible(false) { }
42
43 void reconfigTheme();
44 void resize(const std::string &text);
45 void showText(const std::string &text);
46 void hide();
47
48 bool isVisible() const { return m_visible; }
49
50private:
51 void show();
52
53 BScreen &m_screen;
54 FbTk::ThemeProxy<FbWinFrameTheme> &m_theme;
55 Pixmap m_pixmap;
56 bool m_visible;
57};
58
59#endif // OSDWINDOW_HH