mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:47:45 +00:00
Presenter: Add Presentation::has_a_[next,previous]_frame()
This commit is contained in:
parent
3ed9627f4e
commit
2372b3b8f9
2 changed files with 12 additions and 0 deletions
|
@ -41,6 +41,16 @@ StringView Presentation::author() const
|
||||||
return "Unknown Author"sv;
|
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()
|
void Presentation::next_frame()
|
||||||
{
|
{
|
||||||
m_current_frame_in_slide++;
|
m_current_frame_in_slide++;
|
||||||
|
|
|
@ -32,6 +32,8 @@ public:
|
||||||
unsigned current_slide_number() const { return m_current_slide.value(); }
|
unsigned current_slide_number() const { return m_current_slide.value(); }
|
||||||
unsigned current_frame_in_slide_number() const { return m_current_frame_in_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 next_frame();
|
||||||
void previous_frame();
|
void previous_frame();
|
||||||
void go_to_first_slide();
|
void go_to_first_slide();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue