aboutsummaryrefslogtreecommitdiff
path: root/src/TooltipWindow.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/TooltipWindow.hh')
-rw-r--r--src/TooltipWindow.hh53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/TooltipWindow.hh b/src/TooltipWindow.hh
new file mode 100644
index 0000000..03abc1d
--- /dev/null
+++ b/src/TooltipWindow.hh
@@ -0,0 +1,53 @@
1// TooltipWindow.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.#ifndef TOOLTIPWINDOW_HH_
21#ifndef TOOLTIPWINDOW_HH_
22#define TOOLTIPWINDOW_HH_
23
24#include "OSDWindow.hh"
25#include "FbTk/Command.hh"
26#include "FbTk/RefCount.hh"
27#include "FbTk/Timer.hh"
28#include "FbTk/SimpleCommand.hh"
29
30
31class TooltipWindow : public OSDWindow {
32public:
33 TooltipWindow(const FbTk::FbWindow &parent, BScreen &screen,
34 FbTk::ThemeProxy<FbWinFrameTheme> &theme);
35
36 void showText(const std::string &text);
37 void setDelay(int iDelay) {
38 delay = iDelay;
39 timer.setTimeout(delay);
40 }
41 void hide() ;
42
43private:
44 void raiseTooltip();
45 void show();
46 int delay;
47 std::string lastText;
48 FbTk::Timer timer;
49};
50
51
52
53#endif /*TOOLTIPWINDOW_HH_*/