aboutsummaryrefslogtreecommitdiff
path: root/include/SearchBar.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-08-09 18:22:43 +0200
committerdec05eba <dec05eba@protonmail.com>2021-08-09 18:22:43 +0200
commit44bc399ccbd7e37107ae754db7da3d918229422d (patch)
treecf989a2699c7638328f292bcde49ed66ac013640 /include/SearchBar.hpp
parentc2efd1e6587223cf9fff302fbc0ef80fcb4340e2 (diff)
Youtube: show search suggestions instead of immediate search
Fix save file dialog not showing all files after navigating to another directory if the search is not empty. Fix matrix system message deletion reverting back to use message (for avatar) and text color.
Diffstat (limited to 'include/SearchBar.hpp')
-rw-r--r--include/SearchBar.hpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/include/SearchBar.hpp b/include/SearchBar.hpp
index 027f534..a888ffb 100644
--- a/include/SearchBar.hpp
+++ b/include/SearchBar.hpp
@@ -18,7 +18,6 @@ namespace QuickMedia {
using TextUpdateCallback = std::function<void(const std::string &text)>;
using TextSubmitCallback = std::function<void(const std::string &text)>;
using TextBeginTypingCallback = std::function<void()>;
- using AutocompleteRequestCallback = std::function<void(const std::string &text)>;
class SearchBar {
public:
@@ -29,9 +28,6 @@ namespace QuickMedia {
void onWindowResize(const sf::Vector2f &window_size);
void clear();
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);
void set_position(sf::Vector2f pos);
void set_editable(bool editable);
@@ -45,9 +41,7 @@ namespace QuickMedia {
TextUpdateCallback onTextUpdateCallback;
TextSubmitCallback onTextSubmitCallback;
TextBeginTypingCallback onTextBeginTypingCallback;
- AutocompleteRequestCallback onAutocompleteRequestCallback;
int text_autosearch_delay;
- int autocomplete_search_delay;
bool caret_visible;
float padding_top = 0.0f;
@@ -55,11 +49,8 @@ namespace QuickMedia {
float padding_x = 10.0f;
private:
void onTextEntered(sf::Uint32 codepoint);
- void clear_autocomplete_if_text_not_substring();
- void clear_autocomplete_if_last_char_not_substr();
private:
sf::Text text;
- sf::Text autocomplete_text;
RoundedRectangle background;
sf::RectangleShape shade;
sf::RectangleShape caret;
@@ -67,7 +58,6 @@ namespace QuickMedia {
std::string placeholder_str;
bool show_placeholder;
bool updated_search;
- bool updated_autocomplete;
bool draw_logo;
bool needs_update;
bool input_masked;