aboutsummaryrefslogtreecommitdiff
path: root/include/Text.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-11-04 18:44:51 +0100
committerdec05eba <dec05eba@protonmail.com>2020-11-04 18:44:51 +0100
commit096ee0c2670f176cfab76d54a440e5d9201d79b4 (patch)
tree4201e6334f8f5111365d1adc727c86b3bcdd2aa7 /include/Text.hpp
parent3dad7a548751b43b0e06e3bd6e869feec4c500f0 (diff)
Add ctrl+arrow key to move by word in text input, fix search triggering with backspace repeat char
Diffstat (limited to 'include/Text.hpp')
-rw-r--r--include/Text.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/Text.hpp b/include/Text.hpp
index e471441..f102c59 100644
--- a/include/Text.hpp
+++ b/include/Text.hpp
@@ -111,12 +111,16 @@ namespace QuickMedia
HOME,
END,
LEFT,
- RIGHT
+ RIGHT,
+ LEFT_WORD,
+ RIGHT_WORD
};
void updateCaret();
int getStartOfLine(int startIndex) const;
int getEndOfLine(int startIndex) const;
+ int getStartOfWord(int startIndex) const;
+ int getEndOfWord(int startIndex) const;
int getPreviousLineClosestPosition(int startIndex) const;
int getNextLineClosestPosition(int startIndex) const;
@@ -130,6 +134,7 @@ namespace QuickMedia
VertexRef& get_vertex_ref_clamp(int index);
// Takes into consideration if index is the last vertex and the last vertex is a newline, then it should be on its own line
int get_vertex_line(int index) const;
+ sf::Uint32 get_vertex_codepoint(int index) const;
private:
sf::String str; // TODO: Remove this for non-editable text??? also replace with std::string? then we get more efficient editing of text
const bool bold_font;