window [-backgroundColor float float float] [-closeCommand script] [-defineTemplate string] [-docTag string] [-dockCorner string string] [-dockStation] [-dockingLayout string] [-exists] [-frontWindow] [-height int] [-iconName string] [-iconify boolean] [-interactivePlacement] [-leftEdge int] [-mainWindow] [-maximizeButton boolean] [-menuArray] [-menuBar boolean] [-menuBarCornerWidget string string] [-menuBarResize] [-menuBarVisible boolean] [-menuIndex string uint] [-minimizeButton boolean] [-minimizeCommand script] [-nestedDockingEnabled boolean] [-numberOfMenus] [-parent string] [-resizeToFitChildren boolean] [-restoreCommand script] [-retain] [-sizeable boolean] [-state string] [-title string] [-titleBar boolean] [-titleBarMenu boolean] [-toolbox boolean] [-topEdge int] [-topLeftCorner int int] [-useTemplate string] [-visible boolean] [-width int] [-widthHeight int int]
[string]
window は、取り消し可能、照会可能、および編集可能です。
このコマンドは新しいウィンドウを作成しますが、作成されたウィンドウは非表示のままになります。最も効率的なのは、ウィンドウの要素を追加してから showWindow コマンドを使用してウィンドウを可視化する方法です。ウィンドウにはオプションでメニュー バーを付けることができます。また、タイトル バーや最小化/最大化ボタンをオンまたはオフにすることもできます。タイトル バーをオフにすると、最小化/最大化ボタンを使用することはできません。 注: ウィンドウには、ボタン、スライダ、フィールドといったコントロールを配置するために使うコントロール レイアウトが必要です。コントロール レイアウトの例としては、columnLayout、formLayout、rowLayout などがあります。 注: このコマンドは uiTemplate コマンドのスタックをクリアします。window コマンドを実行した後に、ウィンドウ テンプレートを設定する必要があります。| string | ウィンドウの名前。 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
-backgroundColor(-bgc)
|
float float float
|
|
||
|
||||
-closeCommand(-cc)
|
script
|
|
||
|
||||
-defineTemplate(-dt)
|
string
|
|
||
|
||||
-docTag(-dtg)
|
string
|
|
||
|
||||
-dockCorner(-dc)
|
string string
|
|
||
|
||||
-dockStation(-ds)
|
|
|
||
|
||||
-dockingLayout(-dl)
|
string
|
|
||
|
||||
-exists(-ex)
|
|
|
||
|
||||
-frontWindow(-fw)
|
|
|
||
|
||||
-height(-h)
|
int
|
|
||
|
||||
-iconName(-in)
|
string
|
|
||
|
||||
-iconify(-i)
|
boolean
|
|
||
|
||||
-interactivePlacement(-ip)
|
|
|
||
|
||||
-leftEdge(-le)
|
int
|
|
||
|
||||
-mainWindow(-mw)
|
|
|
||
|
||||
-maximizeButton(-mxb)
|
boolean
|
|
||
|
||||
-menuArray(-ma)
|
|
|
||
|
||||
-menuBar(-mb)
|
boolean
|
|
||
|
||||
-menuBarCornerWidget(-mcw)
|
string string
|
|
||
|
||||
-menuBarResize(-mbr)
|
|
|
||
|
||||
-menuBarVisible(-mbv)
|
boolean
|
|
||
|
||||
-menuIndex(-mi)
|
string uint
|
|
||
|
||||
-minimizeButton(-mnb)
|
boolean
|
|
||
|
||||
-minimizeCommand(-mnc)
|
script
|
|
||
|
||||
-nestedDockingEnabled(-nde)
|
boolean
|
|
||
|
||||
-numberOfMenus(-nm)
|
|
|
||
|
||||
-parent(-p)
|
string
|
|
||
|
||||
-resizeToFitChildren(-rtf)
|
boolean
|
|
||
|
||||
-restoreCommand(-rc)
|
script
|
|
||
|
||||
-retain(-ret)
|
|
|
||
|
||||
-sizeable(-s)
|
boolean
|
|
||
|
||||
-state(-st)
|
string
|
|
||
|
||||
-title(-t)
|
string
|
|
||
|
||||
-titleBar(-tb)
|
boolean
|
|
||
|
||||
-titleBarMenu(-tbm)
|
boolean
|
|
||
|
||||
-toolbox(-tlb)
|
boolean
|
|
||
|
||||
-topEdge(-te)
|
int
|
|
||
|
||||
-topLeftCorner(-tlc)
|
int int
|
|
||
|
||||
-useTemplate(-ut)
|
string
|
|
||
|
||||
-visible(-vis)
|
boolean
|
|
||
|
||||
-width(-w)
|
int
|
|
||
|
||||
-widthHeight(-wh)
|
int int
|
|
||
|
||||
// Make a new window
//
string $window = `window -title "Long Name"
-iconName "Short Name"
-widthHeight 200 55`;
columnLayout -adjustableColumn true;
button -label "Do Nothing";
button -label "Close" -command ("deleteUI -window " + $window);
setParent ..;
showWindow $window;
// Resize the main window
//
global string $gMainWindow;
window -edit -widthHeight 900 777 $gMainWindow;
// Make a new window and adjust the docking parameters
// Dock a sub-window into the left area
// set allow nested docking to true to allow for more docking configurations like multiple top rows
// set the dockCorner so the left dock area occupies the top left corner instead of the top docking area.
//
string $window = `window -title "Long Name"
-iconName "Short Name"
-widthHeight 200 55
-dockStation
-nestedDockingEnabled true
-dockCorner "topLeft" "left"`;
columnLayout -adjustableColumn true;
button -label "Do Nothing";
button -label "Close" -command ("deleteUI -window " + $window);
setParent ..;
showWindow $window;
string $subWindow = `window`;
string $buttonForm = `formLayout -parent $subWindow`;
button -parent $buttonForm;
dockControl -area "left"
-content $subWindow
-allowedArea "left"
-allowedArea "right"
-dockStation $window;
// Add a menu to the right of the main window's menu bar.
//
setParent "";
string $menuName = "menuTest";
optionMenu -label "test menu" $menuName;
menuItem -label "item 1" -parent $menuName;
menuItem -label "item 2" -parent $menuName;
menuItem -label "item 3" -parent $menuName;
window -e -menuBarCornerWidget $menuName "topRight" $gMainWindow;