// =========================================================================== // 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 proc createWebBrowserPanel (string $whichPanel) // // Description: // Define the editors that are used in this panel. // No controls are created at this point. // { } global proc addWebBrowserPanel (string $whichPanel) // // Description: // Add the panel to a layout. // Parent the editors to that layout and create any other // controls required. // { string $browserControl = ($whichPanel + "BrowserControl"); // Make sure that there is no template active setUITemplate -pushTemplate NONE; // Define the standard panel // string $widgetList[]; $widgetList[2] = `scriptedPanel -query -control $whichPanel`; $widgetList[0] = `formLayout`; $widgetList[3] = `frameLayout -visible true -borderVisible false -labelVisible false -collapsable false -collapse true`; $widgetList[4] = `formLayout -visible true`; setParent $widgetList[0]; $widgetList[5] = `formLayout -visible true`; formLayout -edit -attachForm $widgetList[3] top 0 -attachForm $widgetList[3] right 0 -attachForm $widgetList[3] left 0 -attachControl $widgetList[5] top 0 $widgetList[3] -attachForm $widgetList[5] bottom 0 -attachForm $widgetList[5] right 0 -attachForm $widgetList[5] left 0 $widgetList[0]; setParent $widgetList[5]; // Create dummy control webBrowser $browserControl; formLayout -edit -attachForm $browserControl top 0 -attachForm $browserControl right 0 -attachForm $browserControl left 0 -attachForm $browserControl bottom 0 $widgetList[5]; setParent -top; setUITemplate -popTemplate; } global proc removeWebBrowserPanel (string $whichPanel) // // Description: // Remove the panel from a layout. // Delete controls. // { } global proc deleteWebBrowserPanel (string $whichPanel) // // Description: // This proc will delete the contents of the panel, but not // the panel itself. // // Note: // We only need to delete editors here. Other UI will be taken care of // by the remove proc. // { } global proc string saveStateWebBrowserPanel (string $whichPanel) // // Description: // This proc returns a string that when executed will restore the // current state of the panel elements. // { return (""); } global proc showWebBrowserPanel (string $inURL) // // Description: // This proc replaces the currently focused panel with web browser panel // if it's not among visible panels, then it navigates web browser control // specified URL { }