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

Method PreviousPage

src/SFGUI/Notebook.cpp:227–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227void Notebook::PreviousPage() {
228 auto old_page = m_current_page;
229
230 if( ( m_current_page >= 0 ) && ( m_current_page < GetPageCount() ) ) {
231 m_children[static_cast<std::size_t>( m_current_page )].child->Show( false );
232 }
233
234 m_current_page = std::max( m_current_page - 1, 0 );
235
236 if( ( m_current_page >= 0 ) && ( m_current_page < GetPageCount() ) ) {
237 m_children[static_cast<std::size_t>( m_current_page )].child->Show( true );
238 }
239
240 if( m_current_page != old_page ) {
241 GetSignals().Emit( OnTabChange );
242 }
243
244 Invalidate();
245}
246
247void Notebook::ReorderChild( Widget::Ptr child, IndexType position ) {
248 auto tab_label = GetTabLabel( child );

Callers

nothing calls this directly

Calls 2

EmitMethod · 0.80
ShowMethod · 0.45

Tested by

no test coverage detected