aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorMatteo Galiazzo <matteo@maltesenarrazioni.it>2008-05-05 12:05:52 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-05-05 12:05:52 (GMT)
commit4a3be045b28edac4953be9f195640654f8b5a1a1 (patch)
tree4b2e6466b54a5fb4bb6406ff9cf38c420be032df /src/Screen.cc
parentba604ac821b7c1c89d10b0e8c9f85fde948856ef (diff)
downloadfluxbox-4a3be045b28edac4953be9f195640654f8b5a1a1.zip
fluxbox-4a3be045b28edac4953be9f195640654f8b5a1a1.tar.bz2
add tooltips for iconbar buttons when title is too long to fit
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 7950b83..f817e6b 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -290,6 +290,7 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm,
290 menu_delay(rm, 0, scrname + ".menuDelay", altscrname+".MenuDelay"), 290 menu_delay(rm, 0, scrname + ".menuDelay", altscrname+".MenuDelay"),
291 menu_delay_close(rm, 0, scrname + ".menuDelayClose", altscrname+".MenuDelayClose"), 291 menu_delay_close(rm, 0, scrname + ".menuDelayClose", altscrname+".MenuDelayClose"),
292 tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"), 292 tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"),
293 tooltip_delay(rm, 500, scrname + ".tooltipDelay", altscrname+".TooltipDelay"),
293 menu_mode(rm, FbTk::MenuTheme::DELAY_OPEN, scrname+".menuMode", altscrname+".MenuMode"), 294 menu_mode(rm, FbTk::MenuTheme::DELAY_OPEN, scrname+".menuMode", altscrname+".MenuMode"),
294 295
295 gc_line_width(rm, 1, scrname+".overlay.lineWidth", altscrname+".Overlay.LineWidth"), 296 gc_line_width(rm, 1, scrname+".overlay.lineWidth", altscrname+".Overlay.LineWidth"),
@@ -343,6 +344,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
343 m_root_window(scrn), 344 m_root_window(scrn),
344 m_geom_window(m_root_window, *this, *m_focused_windowtheme), 345 m_geom_window(m_root_window, *this, *m_focused_windowtheme),
345 m_pos_window(m_root_window, *this, *m_focused_windowtheme), 346 m_pos_window(m_root_window, *this, *m_focused_windowtheme),
347 m_tooltip_window(m_root_window, *this, *m_focused_windowtheme),
346 m_dummy_window(scrn, -1, -1, 1, 1, 0, true, false, CopyFromParent, 348 m_dummy_window(scrn, -1, -1, 1, 1, 0, true, false, CopyFromParent,
347 InputOnly), 349 InputOnly),
348 resource(rm, screenname, altscreenname), 350 resource(rm, screenname, altscreenname),
@@ -484,6 +486,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
484 486
485 renderGeomWindow(); 487 renderGeomWindow();
486 renderPosWindow(); 488 renderPosWindow();
489 m_tooltip_window.setDelay(*resource.tooltip_delay);
487 490
488 // setup workspaces and workspace menu 491 // setup workspaces and workspace menu
489 int nr_ws = *resource.workspaces; 492 int nr_ws = *resource.workspaces;
@@ -1849,6 +1852,17 @@ void BScreen::showGeometry(int gx, int gy) {
1849} 1852}
1850 1853
1851 1854
1855void BScreen::showTooltip(const std::string &text) {
1856 if (*resource.tooltip_delay >= 0)
1857 m_tooltip_window.showText(text);
1858}
1859
1860void BScreen::hideTooltip() {
1861 if (*resource.tooltip_delay >= 0)
1862 m_tooltip_window.hide();
1863}
1864
1865
1852void BScreen::hideGeometry() { 1866void BScreen::hideGeometry() {
1853 m_geom_window.hide(); 1867 m_geom_window.hide();
1854} 1868}