1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:37:46 +00:00

LibGUI+FileManager: Move has_{parent,child}_segment logic into BCB

This commit is contained in:
Sam Atkins 2023-02-06 15:42:13 +00:00 committed by Linus Groh
parent fcb5259796
commit f5cf41eb5d
2 changed files with 5 additions and 2 deletions

View file

@ -29,6 +29,9 @@ public:
void set_selected_segment(Optional<size_t> index);
Optional<size_t> selected_segment() const { return m_selected_segment; }
bool has_parent_segment() const { return m_selected_segment.has_value() && m_selected_segment.value() > 0; }
bool has_child_segment() const { return m_selected_segment.has_value() && m_selected_segment.value() < m_segments.size() - 1; }
Function<void(Optional<size_t> index)> on_segment_change;
Function<void(size_t index)> on_segment_click;
Function<void(size_t index, DropEvent&)> on_segment_drop;