diff --git a/Userland/Applications/Presenter/Presentation.cpp b/Userland/Applications/Presenter/Presentation.cpp index cdd6f7321f..fa4e86e028 100644 --- a/Userland/Applications/Presenter/Presentation.cpp +++ b/Userland/Applications/Presenter/Presentation.cpp @@ -41,6 +41,16 @@ StringView Presentation::author() const return "Unknown Author"sv; } +bool Presentation::has_a_next_frame() const +{ + return m_current_slide < u32(m_slides.size() > 1 ? m_slides.size() - 1 : 0); +} + +bool Presentation::has_a_previous_frame() const +{ + return m_current_slide > 0u; +} + void Presentation::next_frame() { m_current_frame_in_slide++; diff --git a/Userland/Applications/Presenter/Presentation.h b/Userland/Applications/Presenter/Presentation.h index f2e6084d0a..210c9fefd1 100644 --- a/Userland/Applications/Presenter/Presentation.h +++ b/Userland/Applications/Presenter/Presentation.h @@ -32,6 +32,8 @@ public: unsigned current_slide_number() const { return m_current_slide.value(); } unsigned current_frame_in_slide_number() const { return m_current_frame_in_slide.value(); } + bool has_a_next_frame() const; + bool has_a_previous_frame() const; void next_frame(); void previous_frame(); void go_to_first_slide();