| 225 | } |
| 226 | |
| 227 | void 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 | |
| 247 | void Notebook::ReorderChild( Widget::Ptr child, IndexType position ) { |
| 248 | auto tab_label = GetTabLabel( child ); |