void RegularLayout::deactivate() { // Show the camera toggle option again GlobalUIManager().getMenuManager().setVisibility("main/view/cameraview", true); GlobalUIManager().getMenuManager().setVisibility("main/view/textureBrowser", true); // Remove all previously stored pane information GlobalRegistry().deleteXPath(RKEY_REGULAR_ROOT + "//pane"); // Save pane info saveStateToPath(RKEY_REGULAR_ROOT); // Delete all active views GlobalXYWndManager().destroyViews(); // Delete the CamWnd _camWnd = CamWndPtr(); // Hide the group dialog GlobalGroupDialog().hideDialogWindow(); GlobalTextureBrowser().destroyWindow(); // Destroy the widget, so it gets removed from the main container gtk_widget_destroy(GTK_WIDGET(_regular.horizPane)); }
CamWndPtr GlobalCameraManager::getActiveCamWnd() { // Sanity check in debug builds assert(_cameras.find(_activeCam) != _cameras.end()); CamWndPtr cam = _cameras[_activeCam].lock(); if (cam == NULL) { // Camera is not used anymore, remove it removeCamWnd(_activeCam); // Find a new active camera if (!_cameras.empty()) { _activeCam = _cameras.begin()->first; } else { // No more cameras available _activeCam = -1; } if (_activeCam != -1) { cam = _cameras[_activeCam].lock(); } } return (_activeCam != -1) ? cam : CamWndPtr(); }
void RegularLayout::deactivate() { // Show the camera toggle option again GlobalUIManager().getMenuManager().setVisibility("main/view/cameraview", true); GlobalUIManager().getMenuManager().setVisibility("main/view/textureBrowser", true); // Remove all previously stored pane information GlobalRegistry().deleteXPath(RKEY_REGULAR_ROOT + "//pane"); // Save pane info saveStateToPath(RKEY_REGULAR_ROOT); // Disconnect before destroying stuff _regular.posHPane.disconnect(); _regular.posTexCamPane.disconnect(); // Delete all active views GlobalXYWndManager().destroyViews(); // Delete the CamWnd _camWnd = CamWndPtr(); // Hide the group dialog GlobalGroupDialog().hideDialogWindow(); GlobalTextureBrowser().destroyWindow(); wxFrame* topLevelParent = GlobalMainFrame().getWxTopLevelWindow(); topLevelParent->RemoveChild(_regular.horizPane); _regular.horizPane->Destroy(); _regular.horizPane = NULL; _regular.texCamPane = NULL; }
void SplitPaneLayout::deconstructLayout() { if (GlobalRegistry().keyExists(RKEY_SPLITPANE_TEMP_ROOT)) { // We're maximised, restore the size first restorePanePositions(); } // Save camera position saveCameraPositionToRegistry(); // Remove all previously saved pane information GlobalRegistry().deleteXPath(RKEY_SPLITPANE_ROOT + "//pane"); // Save the pane info saveStateToPath(RKEY_SPLITPANE_ROOT); _splitPane.posHPane.disconnect(); _splitPane.posVPane1.disconnect(); _splitPane.posVPane2.disconnect(); // Reset quadrant information clearQuadrantInfo(); // Delete all active views GlobalXYWndManager().destroyViews(); // Delete the CamWnd _camWnd = CamWndPtr(); // Hide the group dialog GlobalGroupDialog().hideDialogWindow(); // Remove the texture browser from the groupdialog GlobalGroupDialog().removePage("textures"); // Destroy the widgets, so it gets removed from the main container wxFrame* topLevelParent = GlobalMainFrame().getWxTopLevelWindow(); topLevelParent->RemoveChild(_splitPane.horizPane); _splitPane.horizPane->Destroy(); _splitPane.clear(); }
void SplitPaneLayout::deconstructLayout() { if (GlobalRegistry().keyExists(RKEY_SPLITPANE_TEMP_ROOT)) { // We're maximised, restore the size first restorePanePositions(); } // Save camera position saveCameraPositionToRegistry(); // Remove all previously saved pane information GlobalRegistry().deleteXPath(RKEY_SPLITPANE_ROOT + "//pane"); // Save the pane info saveStateToPath(RKEY_SPLITPANE_ROOT); // Reset quadrant information clearQuadrantInfo(); // Delete all active views GlobalXYWndManager().destroyViews(); // Delete the CamWnd _camWnd = CamWndPtr(); // Hide the group dialog GlobalGroupDialog().hideDialogWindow(); // Remove the texture browser from the groupdialog GlobalGroupDialog().removePage("textures"); GlobalTextureBrowser().destroyWindow(); // Destroy the widgets, so it gets removed from the main container _splitPane = SplitPaneView(); }