Window management

Management of windows.

<product logo> Logo provides commands to set the active window and to move and resize windows. </product>

<product logopro> Logo provides commands to set the active window and to move and resize windows. These commands are legacy commands, and should not be used anymore. The Logo Pro environment is based on dockable windows; therefore, commands that set the position or a size of a window can only be used on floating windows that are not docked anywhere. Legal window names are LISTENER, GRAPHICS, TRACE, NAMES, EDITOR, STACK, and HELP. </product>

ACTIVEWINDOW (ACTIVEW)

Reports the name of the active graphics window.

Syntax

ACTIVEWINDOW

Description

ACTIVEWINDOW reports the name of the currently active window. Change the active window using SETACTIVEWINDOW. The name of currently active window is also available in the system variable :CURRENT.WINDOW.

Example

ACTIVEWINDOW
Result: LISTENER

CLOSEWINDOW

Closes a window.

Syntax

CLOSEWINDOW name

Description

CLOSEWINDOW hides the window whose Logo name is the first input. The window is not erased, and may be reopened using the SETACTIVEWINDOW.

Example

CLOSEWINDOW "LISTENER

SETACTIVEWINDOW (SETACTIVEW)

Sets the name of the active window.

Syntax

SETACTIVEWINDOW windowname

Description

SETACTIVEWINDOW changes the currently active window. The name of the active window is reported by the ACTIVEWINDOW command. You can also set the system variable :CURRENT.WINDOW to change the active window. If the active window is hidden, it is made visible.

Example

SETACTIVEWINDOW "GRAPHICS

SETWINSIZE

Sets the size of a window.

Syntax

SETWINSIZE "windowname [width height]

Description

<product logo> SETWINSIZE sets the size of a window. Its input is the name of the window to resize, and a list of two numbers: the width of the window in screen pixels and the window height. WINSIZE reports the current window size. Note that this command changes the size of the window's drawing area; to change the size of the outer bounds of a window including its frame and title bar, use SETWSIZE.

Change a window's position using SETXY. </product>

<product logopro> SETWINSIZE used to set the size of a window's drawing area. The command has been kept for backwards compatibility. SETWINSIZE is now synonymous to SETWSIZE, and sets the overall size of a window including its frame and title bar.

Legal window names are LISTENER, GRAPHICS, TRACE, NAMES, EDITOR, STACK, and HELP. </product>

SETWPOS

Sets the position of a window.

Syntax

SETWPOS windowname [x y]

Description

SETWPOS takes as input the name of the window to move, and a list of two positive integers specifying the position of the upper left corner of the window (in screen coordinates). The current position is reported by WPOS. Change a window's size using SETWINSIZE or SETWSIZE.

<product logopro> Note that the size or position of a window can only be changed if the window is not docked. </product>

Example

SETWPOS "LISTENER [100 100]

SETWSIZE

Sets the size of a floating window.

Syntax

SETWSIZE windowname [width height]

Description

SETWSIZE sets the size of a window. Its input is the name of the window to resize, and a list of two numbers: the width of the window in screen pixels and the window height, including its frame and title bar. WSIZE reports the current window size. Change a window's position using SETWPOS. Note that the size or position of a window can only be changed if the window is not docked.

<product logopro> Note that the size or position of a window can only be changed if the window is not docked. </product>

Example

SETWSIZE "LISTENER [600 100]

WINSIZE

Reports the size of a window.

Syntax

WINSIZE "windowname

Description

<product logo> WINSIZE reports the size of the drawing area of a window as a list with two elements. The first element is the width in pixels and the second is the height in pixels. The input specifies the target window by its name.

To get the size of the bounding window rectangle, see WSIZE.

See also SETWINSIZE, SETWPOS, and WPOS. </product>

<product logopro> WINSIZE used to report the size of a window's drawing area. The command has been kept for backwards compatibility. WINSIZE is now synonymous to WSIZE, and reports the overall size of a window including its frame and title bar. </product>

WPOS

Outputs the position of a window.

Syntax

WPOS windowname

Description

WPOS takes as input the name of the window. It reports the position of the upper left corner of the window as a two-element list. Use SETWPOS to change the position of a window. Change a window's size using SETWINSIZE or SETWSIZE. Note that the size or position of a window can only be changed if the window is not docked.

Example

WPOS "LISTENER
Result: [20 450]

WSIZE

Reports the size of a window.

Syntax

WSIZE "windowname

Description

<product logo> WSIZE reports the size of the outside frame of a window as a list of two elements. The first element is the width in pixels and the second is the height in pixels. The input specifies the target window by its name.

To obtain the size of a window's drawing area, use WINSIZE.

See also SETWINSIZE, SETWPOS, and WPOS. </product>

<product logopro> WSIZE reports the size of the outside frame of a window as a list of two elements. The first element is the width in pixels and the second is the height in pixels. The input specifies the target window by its name. See also SETWINSIZE, SETWPOS, and WPOS. </product>

Example

WSIZE "GRAPHICS
Result: [850 350]