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

Method ReorderChild

src/SFGUI/Notebook.cpp:247–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void Notebook::ReorderChild( Widget::Ptr child, IndexType position ) {
248 auto tab_label = GetTabLabel( child );
249
250 if( !tab_label ) {
251 return;
252 }
253
254 auto old_page_number = GetPageOf( child );
255
256 RemovePage( old_page_number );
257 InsertPage( child, tab_label, position - ( old_page_number > position ? 1 : 0 ) );
258}
259
260Notebook::TabPosition Notebook::GetTabPosition() const {
261 return static_cast<TabPosition>( m_tab_position );

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected