aboutsummaryrefslogtreecommitdiff
path: root/include/SearchBar.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-10 03:52:44 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-10 03:52:44 +0200
commita50b832de4019ce8b5d72e8541d64d68ed3a615a (patch)
tree7a49d864642e5c8254db9c3bbfd6ce35c890c670 /include/SearchBar.hpp
parenta5be59329daa54c8afeab01a8ee530fca07baaf7 (diff)
Make autocomplete asynchronous
Diffstat (limited to 'include/SearchBar.hpp')
-rw-r--r--include/SearchBar.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/SearchBar.hpp b/include/SearchBar.hpp
index 0cffff5..6966466 100644
--- a/include/SearchBar.hpp
+++ b/include/SearchBar.hpp
@@ -12,7 +12,7 @@ namespace QuickMedia {
// Return true to consume the search (clear the search field)
using TextSubmitCallback = std::function<bool(const sf::String &text)>;
using TextBeginTypingCallback = std::function<void()>;
- using AutocompleteRequestCallback = std::function<std::string(const sf::String &text)>;
+ using AutocompleteRequestCallback = std::function<void(const sf::String &text)>;
class SearchBar {
public:
@@ -25,6 +25,7 @@ namespace QuickMedia {
void append_text(const std::string &text_to_add);
bool is_cursor_at_start_of_line() const;
void set_to_autocomplete();
+ void set_autocomplete_text(const std::string &text);
float getBottom() const;
float getBottomWithoutShadow() const;