ジャンプ先: 概要. 戻り値. フラグ. MEL 例.

概要

workspaceControlState [-defaultTopLeftCorner int int] [-defaultWidthHeight int int] [-exists] [-height int] [-leftEdge int] [-maximized boolean] [-remove] [-topEdge int] [-topLeftCorner int int] [-width int] [-widthHeight int int] string

workspaceControlState は、取り消し可能、照会可能、および編集可能です。

ワークスペース コントロールの希望するウィンドウ アトリビュートを作成または修正します。ワークスペース コントロールのサイズや位置は、アプリケーション セッション中は保持されます(ただし、位置はフローティング ワークスペース ドッキング パネルに単独で存在するワークスペース コントロールのみに適用されます)。ワークスペース コントロールを閉じると、既定のワークスペース コントロールの状態が作成されます。ワークスペース コントロールの状態に名前を付ける必要があり、その後は一致する名前を持つワークスペース コントロールのみに影響します。

戻り値

なし

照会モードでは、戻り値のタイプは照会されたフラグに基づきます。

フラグ

defaultTopLeftCorner, defaultWidthHeight, exists, height, leftEdge, maximized, remove, topEdge, topLeftCorner, width, widthHeight
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
-defaultTopLeftCorner(-dc) int int createqueryedit
サイズと位置の記憶(Remember size and position)がオフの場合に、このパネルを最初に開いたときのウィンドウの上端と左端の位置です。値は、編集時には DPI スケーリングされますが、照会中はスケーリングされないで返されます。この値は、既定の幅と高さも有効である場合のみ使用されます。
-defaultWidthHeight(-dwh) int int createqueryedit
サイズと位置の記憶(Remember size and position)がオフの場合に、このパネルを最初に開いたときのウィンドウの幅と高さです。値は、編集時には DPI スケーリングされますが、照会中はスケーリングされないで返されます。この場合に使用される位置は defaultTopLeftCorner です。
-exists(-ex) create
指定したオブジェクトが存在するかどうかによって、true または false を返します。他のフラグは無視されます。
-height(-h) int createqueryedit
ウィンドウの高さを指定します。
-leftEdge(-le) int createqueryedit
ウィンドウの左端の位置を指定します。
-maximized(-max) boolean createqueryedit
ウィンドウを最大化します。
-remove(-r) create
1 つのウィンドウ プリファレンスを除去します。
-topEdge(-te) int createqueryedit
ウィンドウの上端の位置を指定します。
-topLeftCorner(-tlc) int int createqueryedit
ウィンドウの上端と左端の位置を指定します。
-width(-w) int createqueryedit
ウィンドウの幅を指定します。
-widthHeight(-wh) int int createqueryedit
ウィンドウの幅と高さを指定します。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます コマンド内でフラグを複数回使用できます。

MEL 例

//    Check if the window exists.
//
if (`window -exists ExampleWindow`) deleteUI -window ExampleWindow;

//    Create a window.
//
window ExampleWindow;
columnLayout;
text -label "Size and position the window before closing it.";
button -label "Close" -command ("deleteUI -window ExampleWindow");
showWindow ExampleWindow;

//    When the window is closed a window preference object is
//    created for the window. It has the same name as the window
//    object.
//
workspaceControlState -exists ExampleWindow;

//    Query the window preference size and position.
//
workspaceControlState -query -topLeftCorner ExampleWindow;
workspaceControlState -query -widthHeight ExampleWindow;

//    Create a window with the same name. When it is shown
//    it will be sized and positioned according to the
//    window preference.
//
if (`window -exists ExampleWindow`) deleteUI -window ExampleWindow;
window ExampleWindow;
columnLayout;
text -label "Size and position the window before closing it.";
button -label "Close" -command ("deleteUI -window ExampleWindow");
showWindow ExampleWindow;

//    Delete the window preference and the window will have a
//    default size and position.
//
workspaceControlState -remove ExampleWindow;

//    Create the window one last time.
//
if (`window -exists ExampleWindow`) deleteUI -window ExampleWindow;
window ExampleWindow;
columnLayout;
text -label "Size and position the window before closing it.";
button -label "Close" -command ("deleteUI -window ExampleWindow");
showWindow ExampleWindow;