aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index 3d8167a..48eb45f 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -154,8 +154,6 @@ namespace QuickMedia {
sf::Vector2i thumbnail_size;
std::vector<Reaction> reactions; // TODO: Move to a different body item type
std::shared_ptr<BodyItemExtra> extra; // TODO: Remove
-
- float calculated_height = -1.0f;
private:
// TODO: Clean up these strings when set in text, and get_title for example should return |title_text.getString()|
// TODO: Use sf::String instead, removes the need to convert to utf32 every time the text is dirty (for example when resizing window)
@@ -272,8 +270,12 @@ namespace QuickMedia {
void update_dirty_state(BodyItem *body_item, float width);
void clear_body_item_cache(BodyItem *body_item);
sf::Vector2i get_item_thumbnail_size(BodyItem *item) const;
- BodyItem* get_previous_visible_item(int start_index);
- BodyItem* get_next_visible_item(int start_index);
+ // Returns -1 if not found
+ int get_previous_visible_item(int start_index);
+ // Returns -1 if not found
+ int get_next_visible_item(int start_index);
+ float get_offset_to_first_visible_item(sf::Vector2f body_size);
+ float get_offset_to_last_visible_item(sf::Vector2f body_size);
private:
Program *program;
std::unordered_map<std::string, std::shared_ptr<ThumbnailData>> item_thumbnail_textures;