diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-09-27 11:02:06 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-09-27 11:08:09 +0200 |
commit | 888fba907eba13ee6a30bf7169d4d96af5b443a5 (patch) | |
tree | 1703ab0dd0d52e80bde4bc44dae6a22156f36755 /include | |
parent | b07cca0bb59300fe193015f1a8361448af72d05b (diff) |
Implement pgup/pgdown/home/end keys
Diffstat (limited to 'include')
-rw-r--r-- | include/Body.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/Body.hpp b/include/Body.hpp index 9f7c2d8..4887582 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -85,6 +85,11 @@ namespace QuickMedia { Body(Program *program, sf::Font *font, sf::Font *bold_font, sf::Font *cjk_font); ~Body(); + // Select previous page, ignoring invisible items. Returns true if the item was changed. This can be used to check if the top was hit when wrap_around is set to false + bool select_previous_page(); + // Select next page, ignoring invisible items. Returns true if the item was changed. This can be used to check if the bottom was hit when wrap_around is set to false + bool select_next_page(); + // Select previous item, ignoring invisible items. Returns true if the item was changed. This can be used to check if the top was hit when wrap_around is set to false bool select_previous_item(); @@ -93,6 +98,7 @@ namespace QuickMedia { void set_selected_item(int item); void select_first_item(); + void select_last_item(); void reset_selected(); void clear_items(); void prepend_items(BodyItems new_items); @@ -161,5 +167,6 @@ namespace QuickMedia { sf::RoundedRectangleShape item_background; sf::Sprite image; std::future<void> load_thumbnail_future; + int num_visible_items; }; }
\ No newline at end of file |