// =========================================================================== // 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. // =========================================================================== // Parameters: // // $doWhat - contains the name of the panel configuration to // switch to or the special string "goBack" which will // switch to the previous configuration in the // mainPanelHistory, if there is one. // // $usePointer - if we're switching to the "single" configuration, // parameter specifies which of the old configuration's // panels should still be visible after the switch. // // If $usePointer is 1 then the panel currently under // the mouse pointer will be retained, otherwise the // panel which currently has the focus will be retained. // // This parameter is ignored when $doWhat contains // "goBack". // global proc switchPanes (string $doWhat, int $usePointer) { // Build up the argument list for a call to doSwitchPanes(). string $args[2]; if ($doWhat == "goBack") { $args[0] = "@goBack"; } else { $args[0] = $doWhat; } if ($usePointer) { $args[1] = "@pointer"; } else { $args[1] = "@focus"; } // Make the call. doSwitchPanes(1, $args); }