diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-09-03 22:08:04 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2016-09-11 07:56:33 (GMT) |
commit | cdd6861aff5cd06f84c9d23456b5a92b4202e423 (patch) | |
tree | a517c8a2638fe146c2db4af075dbf05f7db1e917 /src/FbTk/TextBox.hh | |
parent | 2047b1a2ba9ea5d3df77c8de9b4e2b3fd3a40a6d (diff) | |
download | fluxbox-cdd6861aff5cd06f84c9d23456b5a92b4202e423.zip fluxbox-cdd6861aff5cd06f84c9d23456b5a92b4202e423.tar.bz2 |
Support editing utf-8 text in TextBox
aka "Flüxbøx"
βµγ, pardon,
BUG: 720
Diffstat (limited to 'src/FbTk/TextBox.hh')
-rw-r--r-- | src/FbTk/TextBox.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/FbTk/TextBox.hh b/src/FbTk/TextBox.hh index a3b857f..20f3610 100644 --- a/src/FbTk/TextBox.hh +++ b/src/FbTk/TextBox.hh | |||
@@ -58,6 +58,7 @@ public: | |||
58 | void exposeEvent(XExposeEvent &event); | 58 | void exposeEvent(XExposeEvent &event); |
59 | void buttonPressEvent(XButtonEvent &event); | 59 | void buttonPressEvent(XButtonEvent &event); |
60 | void keyPressEvent(XKeyEvent &event); | 60 | void keyPressEvent(XKeyEvent &event); |
61 | void handleEvent(XEvent &event); | ||
61 | 62 | ||
62 | const FbString &text() const { return m_text.logical(); } | 63 | const FbString &text() const { return m_text.logical(); } |
63 | const Font &font() const { return *m_font; } | 64 | const Font &font() const { return *m_font; } |
@@ -79,10 +80,14 @@ private: | |||
79 | 80 | ||
80 | void adjustPos(); | 81 | void adjustPos(); |
81 | 82 | ||
83 | typedef struct { std::string::size_type begin, end; } StringRange; | ||
84 | StringRange charRange(std::string::size_type pos) const; | ||
85 | |||
82 | const FbTk::Font *m_font; | 86 | const FbTk::Font *m_font; |
83 | BiDiString m_text; | 87 | BiDiString m_text; |
84 | GC m_gc; | 88 | GC m_gc; |
85 | std::string::size_type m_cursor_pos, m_start_pos, m_end_pos, m_select_pos; | 89 | std::string::size_type m_cursor_pos, m_start_pos, m_end_pos, m_select_pos; |
90 | XIC m_xic; | ||
86 | }; | 91 | }; |
87 | 92 | ||
88 | } // end namespace FbTk | 93 | } // end namespace FbTk |