void PropertiesManager::Present( uint32_t selectionId, const Inspect::V_Control& controls ) { if ( selectionId != m_SelectionId ) { return; } SCENE_GRAPH_SCOPE_TIMER( ("Canvas Layout") ); Inspect::Container* container = m_Generator->GetContainer(); for ( Inspect::V_Control::const_iterator itr = controls.begin(), end = controls.end(); itr != end; ++itr ) { container->AddChild( *itr ); } Inspect::Canvas* canvas = container->GetCanvas(); canvas->Realize( NULL ); }
DrawerWidget::DrawerWidget( Inspect::Container* container ) : m_ContainerControl( container ) , m_Drawer( NULL ) , m_StripCanvas( NULL ) { HELIUM_ASSERT( m_ContainerControl ); m_StripCanvas = new StripCanvas( wxVERTICAL ); Inspect::V_Control controls = m_ContainerControl->ReleaseChildren(); // move children out of the container and into the new vertical strip canvas for( Inspect::V_Control::const_iterator itr = controls.begin(), end = controls.end(); itr != end; ++itr ) { m_StripCanvas->AddChild( *itr ); } m_ContainerControl->AddChild( m_StripCanvas ); SetControl( m_ContainerControl ); }