aboutsummaryrefslogtreecommitdiff
path: root/src/Focusable.hh
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-08 18:17:21 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-08 18:17:21 (GMT)
commit690d926ac444243611cd875fb84fabb4e6db2cf2 (patch)
treec8ef84056b295071f9a9207ffea5393c6cf4ad4d /src/Focusable.hh
parent1e8fe2bc14856fa16508686a28a85e72cb0e422c (diff)
downloadfluxbox-690d926ac444243611cd875fb84fabb4e6db2cf2.zip
fluxbox-690d926ac444243611cd875fb84fabb4e6db2cf2.tar.bz2
introduced FbTk::BidiString
a 'BidiString' holds both the logical content and the visual reordered version of the content of a string. this helps to reduce the number of calls to reorder the string before drawing it (as introduced in the patch from Ken Bloom) and to be more consistent in menus and textboxes (drawing cursors and underlining text).
Diffstat (limited to 'src/Focusable.hh')
-rw-r--r--src/Focusable.hh16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Focusable.hh b/src/Focusable.hh
index 8434a97..47f14d3 100644
--- a/src/Focusable.hh
+++ b/src/Focusable.hh
@@ -26,8 +26,7 @@
26#include "FbTk/ITypeAheadable.hh" 26#include "FbTk/ITypeAheadable.hh"
27#include "FbTk/Subject.hh" 27#include "FbTk/Subject.hh"
28#include "FbTk/Signal.hh" 28#include "FbTk/Signal.hh"
29 29#include "FbTk/FbString.hh"
30#include <string>
31 30
32class BScreen; 31class BScreen;
33class FluxboxWindow; 32class FluxboxWindow;
@@ -83,9 +82,9 @@ public:
83 FluxboxWindow *fbwindow() { return m_fbwin; } 82 FluxboxWindow *fbwindow() { return m_fbwin; }
84 83
85 /// @return WM_CLASS class string (for pattern matching) 84 /// @return WM_CLASS class string (for pattern matching)
86 virtual const std::string &getWMClassClass() const { return m_class_name; } 85 virtual const FbTk::FbString &getWMClassClass() const { return m_class_name; }
87 /// @return WM_CLASS name string (for pattern matching) 86 /// @return WM_CLASS name string (for pattern matching)
88 virtual const std::string &getWMClassName() const { return m_instance_name; } 87 virtual const FbTk::FbString &getWMClassName() const { return m_instance_name; }
89 /// @return wm role string (for pattern matching) 88 /// @return wm role string (for pattern matching)
90 virtual std::string getWMRole() const { return "Focusable"; } 89 virtual std::string getWMRole() const { return "Focusable"; }
91 90
@@ -96,9 +95,9 @@ public:
96 /// @return icon pixmap of the focusable 95 /// @return icon pixmap of the focusable
97 virtual const FbTk::PixmapWithMask &icon() const { return m_icon; } 96 virtual const FbTk::PixmapWithMask &icon() const { return m_icon; }
98 /// @return title string 97 /// @return title string
99 virtual const std::string &title() const { return m_title; } 98 virtual const FbTk::BiDiString &title() const { return m_title; }
100 /// @return type ahead string 99 /// @return type ahead string
101 const std::string &iTypeString() const { return title(); } 100 const std::string &iTypeString() const { return title().logical(); }
102 /** 101 /**
103 * Signaling object to attatch observers to. 102 * Signaling object to attatch observers to.
104 */ 103 */
@@ -139,7 +138,10 @@ protected:
139 BScreen &m_screen; //< the screen in which it works 138 BScreen &m_screen; //< the screen in which it works
140 FluxboxWindow *m_fbwin; //< the working fluxbox window 139 FluxboxWindow *m_fbwin; //< the working fluxbox window
141 140
142 std::string m_title, m_instance_name, m_class_name; 141 FbTk::BiDiString m_title;
142 FbTk::FbString m_instance_name;
143 FbTk::FbString m_class_name;
144
143 bool m_focused; //< whether or not it has focus 145 bool m_focused; //< whether or not it has focus
144 bool m_attention_state; //< state of icon button while demanding attention 146 bool m_attention_state; //< state of icon button while demanding attention
145 FbTk::PixmapWithMask m_icon; //< icon pixmap with mask 147 FbTk::PixmapWithMask m_icon; //< icon pixmap with mask