MCPcopy Create free account
hub / github.com/TankOs/SFGUI / NextPage

Method NextPage

src/SFGUI/Notebook.cpp:207–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207void Notebook::NextPage() {
208 auto old_page = m_current_page;
209
210 if( ( m_current_page >= 0 ) && ( m_current_page < GetPageCount() ) ) {
211 m_children[static_cast<std::size_t>( m_current_page )].child->Show( false );
212 }
213
214 m_current_page = std::min( m_current_page + 1, GetPageCount() - 1 );
215
216 if( ( m_current_page >= 0 ) && ( m_current_page < GetPageCount() ) ) {
217 m_children[static_cast<std::size_t>( m_current_page )].child->Show( true );
218 }
219
220 if( m_current_page != old_page ) {
221 GetSignals().Emit( OnTabChange );
222 }
223
224 Invalidate();
225}
226
227void Notebook::PreviousPage() {
228 auto old_page = m_current_page;

Callers

nothing calls this directly

Calls 2

EmitMethod · 0.80
ShowMethod · 0.45

Tested by

no test coverage detected