aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/TextBox.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/TextBox.hh')
-rw-r--r--src/FbTk/TextBox.hh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/FbTk/TextBox.hh b/src/FbTk/TextBox.hh
index 40a7c3c..2c1ef9d 100644
--- a/src/FbTk/TextBox.hh
+++ b/src/FbTk/TextBox.hh
@@ -65,6 +65,10 @@ public:
65 int cursorPosition() const { return m_cursor_pos; } 65 int cursorPosition() const { return m_cursor_pos; }
66 int textStartPos() const { return m_start_pos; } 66 int textStartPos() const { return m_start_pos; }
67 67
68 bool hasSelection() const { return m_select_pos != -1 && m_select_pos != m_cursor_pos + m_start_pos; }
69 void select(std::string::size_type pos, int length);
70 void selectAll();
71
68 unsigned int findEmptySpaceLeft(); 72 unsigned int findEmptySpaceLeft();
69 unsigned int findEmptySpaceRight(); 73 unsigned int findEmptySpaceRight();
70 74
@@ -77,7 +81,7 @@ private:
77 const FbTk::Font *m_font; 81 const FbTk::Font *m_font;
78 BiDiString m_text; 82 BiDiString m_text;
79 GC m_gc; 83 GC m_gc;
80 std::string::size_type m_cursor_pos, m_start_pos, m_end_pos; 84 std::string::size_type m_cursor_pos, m_start_pos, m_end_pos, m_select_pos;
81}; 85};
82 86
83} // end namespace FbTk 87} // end namespace FbTk