diff options
Diffstat (limited to 'src/FbTk/TextBox.hh')
-rw-r--r-- | src/FbTk/TextBox.hh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/FbTk/TextBox.hh b/src/FbTk/TextBox.hh index d313dca..7b42bd1 100644 --- a/src/FbTk/TextBox.hh +++ b/src/FbTk/TextBox.hh | |||
@@ -24,8 +24,7 @@ | |||
24 | 24 | ||
25 | #include "FbWindow.hh" | 25 | #include "FbWindow.hh" |
26 | #include "EventHandler.hh" | 26 | #include "EventHandler.hh" |
27 | 27 | #include "FbString.hh" | |
28 | #include <string> | ||
29 | 28 | ||
30 | namespace FbTk { | 29 | namespace FbTk { |
31 | 30 | ||
@@ -37,7 +36,7 @@ public: | |||
37 | TextBox(const FbWindow &parent, const Font &font, const std::string &text); | 36 | TextBox(const FbWindow &parent, const Font &font, const std::string &text); |
38 | virtual ~TextBox(); | 37 | virtual ~TextBox(); |
39 | 38 | ||
40 | void setText(const std::string &text); | 39 | void setText(const FbTk::BiDiString &text); |
41 | void setFont(const Font &font); | 40 | void setFont(const Font &font); |
42 | void setGC(GC gc); | 41 | void setGC(GC gc); |
43 | void setCursorPosition(int cursor); | 42 | void setCursorPosition(int cursor); |
@@ -60,7 +59,7 @@ public: | |||
60 | void buttonPressEvent(XButtonEvent &event); | 59 | void buttonPressEvent(XButtonEvent &event); |
61 | void keyPressEvent(XKeyEvent &event); | 60 | void keyPressEvent(XKeyEvent &event); |
62 | 61 | ||
63 | const std::string &text() const { return m_text; } | 62 | const FbString &text() const { return m_text.logical(); } |
64 | const Font &font() const { return *m_font; } | 63 | const Font &font() const { return *m_font; } |
65 | GC gc() const { return m_gc; } | 64 | GC gc() const { return m_gc; } |
66 | int cursorPosition() const { return m_cursor_pos; } | 65 | int cursorPosition() const { return m_cursor_pos; } |
@@ -76,7 +75,7 @@ private: | |||
76 | void adjustPos(); | 75 | void adjustPos(); |
77 | 76 | ||
78 | const FbTk::Font *m_font; | 77 | const FbTk::Font *m_font; |
79 | std::string m_text; | 78 | BiDiString m_text; |
80 | GC m_gc; | 79 | GC m_gc; |
81 | std::string::size_type m_cursor_pos, m_start_pos, m_end_pos; | 80 | std::string::size_type m_cursor_pos, m_start_pos, m_end_pos; |
82 | }; | 81 | }; |