// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== global int $gToggleMainWindowZoomInModeDefer = 0; global proc toggleMainWindowZoomInMode() { int $inZoomInMode = `optionVar -q "workspacesInZoomInUIMode"`; int $inFullScreenMode = `optionVar -q "workspacesInFullScreenUIMode"`; // enter zoom in mode only if the full screen mode is not active. if(!$inFullScreenMode) { string $panelWithFocus = `getPanel -withFocus`; string $parentControl = `workspaceLayoutManager -parentWorkspaceControl $panelWithFocus`; int $isFloatingPanel = `workspaceControl -q -floating $parentControl`; if(!$isFloatingPanel) { global int $gToggleMainWindowZoomInModeDefer; if (!$gToggleMainWindowZoomInModeDefer) { $gToggleMainWindowZoomInModeDefer = 1; evalDeferred("toggleMainWindowZoomInModeDefer " + " " + $inZoomInMode + " " + $parentControl); } } } else { inViewMessage -amg (uiRes("m_toggleMainWindowZoomInMode.kIvmFullScreenModeIsActive")) -fade -pos topCenter; } } global proc toggleMainWindowZoomInModeDefer(int $inZoomInMode, string $parentControl) { if($inZoomInMode) { //come out of zoom in mode workspaceLayoutManager -restoreMainWindowControls; } else { // enter zoom-in mode workspaceLayoutManager -collapseMainWindowControls $parentControl false; } optionVar -iv "workspacesInZoomInUIMode" (!$inZoomInMode); if(!$inZoomInMode) { inViewMessage -amg (uiRes("m_toggleMainWindowZoomInMode.kIvmZoomInModeOn")) -fade -pos topCenter; } if (`about -macOS`){ // We want to make sure the main window is the active window so the // keyboard focus is not lost MAYA-70943 global string $gMainWindow; showWindow($gMainWindow); } global int $gToggleMainWindowZoomInModeDefer; $gToggleMainWindowZoomInModeDefer = 0; }