Programmer Guide/Shell Items/Display/SET DISPLAY: Difference between revisions
(→Print) |
|||
Line 159: | Line 159: | ||
Delete the toolbar <var>index</var>. | Delete the toolbar <var>index</var>. | ||
==Window Layout== | |||
<code>SET <var>display mode</var>|* [<var>style xpos ypos width height</var>] [/Centered /Foreground /Dialog /View /Layout /Modal=<var>itemId</var>]</code> | |||
Set the display window mode, style position and size and configure the dialog. | |||
;<var>mode</var> | |||
:The window mode. Possible values are <code>NOWINDOW</code> (the window is hidden and disabled), <code>HIDDEN</code> (the window is hidden), <code>VISIBLE</code> (the window is visible but disabled), <code>ENABLED</code> (the window is visible and enabled) or an asterisk if you do not want to change the window mode. | |||
;<var>style</var> | |||
:The window style. Possible values are <code>MINIMIZE</code> (the window is minimized to the taskbar), <code>MAXIMIZE</code> (the window is maximized to take up the whole monitor display) or <code>RESTORE</code> (the window is restored to it's normal size). | |||
;<var>xpos</var> | |||
:The left coordinate of the window in pixels. The left most pixel on the display is 0. | |||
;<var>ypos</var> | |||
:The top coordinate of the window in pixels. The top most pixel on the display is 0. | |||
;<var>width</var> | |||
:The width of the window in pixels. | |||
;<var>height</var> | |||
:The height of the window in pixels. | |||
;<var>/Centered</var> | |||
:The window is displayed in the center of the screen; <var>xpos</var>, <var>ypos</var>, <var>width</var> and <var>height</var> are ignored. | |||
;<var>/Foreground</var> | |||
:The window is displayed as the top-most window. Note that a window that is top-most is always visible and enabled, therefore the <var>mode</var> parameter is ignored when this flag is used. | |||
;<var>/Dialog=pos</var> | |||
:Set the dialog position inside display (relative to the graphs); changing the position is only possible if the dialog is non-floating <var>pos</var> = <code>ABOVE</code>|<code>BELOW</code>|<code>LEFT</code>|<code>RIGHT</code>; | |||
;<var>/View=view</var> | |||
:Set window view mode to <var>view</var> ('<code>WINDOW</code>' is a normal window, or '<code>FULLSCREEN</code>' = display takes up whole screen (for displays of type 'frame' only) or '<code>ALWAYSONTOP</code>' = the display remains on top, even when other windows are activated). Note that you must use the /Apply option if you want the fullscreen mode to take effect. | |||
;<var>/Layout|layout</var> | |||
:Recalculate dialog window size; include (<code>L</code>) or ignore (<code>l</code>) hidden controls (case sensitive!) | |||
;<var>/Modal=<var>itemId</var></var> | |||
:Assign a modal parent to the display <var>display</var>. The modal parent <var>itemId</var> is inactive whilst the <var>display</var> exists and behind the <var>display</var> in the z-order. | |||
==TITLE== | |||
<code>SET <var>display</var> TITLE <var>mode font color</var> [ <var>title</var> ]</code> | |||
Set and configure the display's title. The option /Settitle can be used to set a new title without applying the other settings. | |||
;<var>mode</var> | |||
:Turn the display's title on or off. The following values are supported: | |||
:<code>ON</code>|<code>OFF</code> | |||
;<var>font</var> | |||
:A font argument as specified in Fonts and Font Argument Format. | |||
;<var>color</var> | |||
:A color argument as specified in Colors and Color Arguments. | |||
;<var>title</var> | |||
:The title text. |
Revision as of 18:01, 31 October 2012
This chapter documents the SET display
family of commands applicable to STx DISPLAY
items (i.e. shell items of type DISPLAY
).
SET display subcommand …
For a list of DISPLAY
item attributes, see DISPLAY Item Attributes. For a short first introduction into the matter of DISPLAY
items, see Introducing Display Items.
Contents
Graph Control
The following commands are used to set the height and width of the window in which a graph is displayed, as well as assigning the graph itself.
GRAPH
SET display GRAPH graphitemname
Activate a graph attached to the display. The activated graph gets the keyboard focus.
HEIGHT
SET display HEIGHT h1 [.. hNrows]
Set the height of all graph rows relative to one another. The height of the display window and of the dialog is not changed. E.g. SET display HEIGHT 1 1 2
sets the height of row three to the double of the height of rows one and two.
- hX
- The relative height of the row X (1 .. number of rows).
WIDTH
SET display WIDTH row|* left right
Set the width of the columns of the specified row (row ³ 0
) or all split rows (row = *
). The column splitter position is computed using:
pos = left / (left + right) . display_window_width.
- left
- The relative width of the left column (left >= 0).
- right
- The relative width of the right column (right >= 0).
Graph defaults
The following settings are not directly used by the display. They define the default settings for graphs which are created after the display. For a detailed description see the section SET GRAPH
. Only the argument title (of SET display TITLE
) is actually used by the display as the window caption (the text in the top left corner of the window).
SET display AXIS xLabel yLabel labelFont labelColor xTitle yTitle titleFont titleColor xUnit yUnit xBorder yBorder SET display FRAME xscale yscale scalecolor grid gridcolor xsteps ysteps major minor SET display MARKERS mode auto font color msfont mslincol msfillcol mstextcol SET display BGCOLOR text draw< SET display TITLE mode font color [title]
Popup Menus
ADDPOPUP
SET display ADDPOPUP title item1item2 … SET display ADDPOPUP title table /Table
Add a popup menu to the display. The popup menus are displayed in the menu bar of the window in the same order as the ADDPOPUP
commands are issued. Here is an example.
When a user selects an entry from one of these popups, the display item is sent a POPUP
message.
- title
- The menu title which is displayed in the menu bar of the display.
- itemX
- The menu items. itemX is used as the menu item capture unless the following applies:
- The string itemX is an asterisk - a menu separator is added rather than a caption.
- The string itemX begins with the character '
>
' (e.g.>text
) - A submenu is defined usingtext
as the caption.
The string itemX is the character '<
' - the last opened submenu is closed.
- If you want to display a hotkey in the menu item, add a tab and the hotkey to the item text, e.g. "Open [tab] Ctrl+O".
- table
- A simple table with one item per entry. See itemX for item details.
Separators or items which start or end a submenu are not counted in the menu item index computation!=====SETPOPUP=====
SET display SETPOPUP index1 [...] [/Enable|Disable /Check|Uncheck]
Activate|deactivate and/or set|clear the check status of menu items. The items may be located in different menus.
The index of menu items is used in the message handling and for the SETPOPUP
command. It is computed as follows:
index = menuIndex * 100 + itemindex
menuindex
|
index of menu (0, 1, ..; leftmost = 0) |
itemindex
|
index of item in addressed menu (0, 1, ..; topmost = 0); separators and submenu headers are not counted |
DELETEPOPUP
SET display DELPOPUP|DELETEPOPUP
Delete all popup menus and hide the menu bar.
SET display PRINT CLIPBOARD
Copy the display to the clipboard
SET display PRINT filename
Save the display to the file filename
SET display PRINT PRINTER
Print the display
Print or save all graphs contained in the display (this does not include the dialog). The options /Print and /Screen are used to select the color scheme. For file output, the file format is selected by the options /Enhancedmetafile (*.WMF), /Bitmap (*.BMP) or /pnG (*.PNG). Once started, the operation is performed in the background and a STOP
message is sent when finished.
Toolbars
A set of toolbars can be added to each display. Each toolbar consists of the buttons specified in the ADDTOOLBAR
command and can be identified by an index (>0). If a button is assigned to more than one toolbar, it has the same meaning and message id in all toolbars. Toolbar buttons can be used like buttons (press) or switches (turn on/off). The set of defined toolbar buttons (see Appendix) is very small at present but will be expanded in the future as needed.
SET display ADDTOOLBAR index title button1 ...
Add a toolbar to the display.
- index
- The toolbar index (> 0).
- title
- The title of the toolbar window. This is only displayed if the toolbar is floating.
- buttonX
- The id of the toolbar button (see the Appendix for a list).
SET display SETTOOLBAR index /Visible|Hidden
Show or hide a toolbar index.
SET display SETTOOLBAR button1 ... [/Enable|Disable /Check|Uncheck /Button|Switch]
Set state (/E|D, /C|U) and mode (/B|S) of all listed toolbar buttons (button1 ..). If a button is member of more than one toolbar, the state/mode is changed in all toolbars.
SET display DELTOOLBAR|DELETETOOLBAR index
Delete the toolbar index.
Window Layout
SET display mode|* [style xpos ypos width height] [/Centered /Foreground /Dialog /View /Layout /Modal=itemId]
Set the display window mode, style position and size and configure the dialog.
- mode
- The window mode. Possible values are
NOWINDOW
(the window is hidden and disabled),HIDDEN
(the window is hidden),VISIBLE
(the window is visible but disabled),ENABLED
(the window is visible and enabled) or an asterisk if you do not want to change the window mode.
- style
- The window style. Possible values are
MINIMIZE
(the window is minimized to the taskbar),MAXIMIZE
(the window is maximized to take up the whole monitor display) orRESTORE
(the window is restored to it's normal size).
- xpos
- The left coordinate of the window in pixels. The left most pixel on the display is 0.
- ypos
- The top coordinate of the window in pixels. The top most pixel on the display is 0.
- width
- The width of the window in pixels.
- height
- The height of the window in pixels.
- /Centered
- The window is displayed in the center of the screen; xpos, ypos, width and height are ignored.
- /Foreground
- The window is displayed as the top-most window. Note that a window that is top-most is always visible and enabled, therefore the mode parameter is ignored when this flag is used.
- /Dialog=pos
- Set the dialog position inside display (relative to the graphs); changing the position is only possible if the dialog is non-floating pos =
ABOVE
|BELOW
|LEFT
|RIGHT
;
- /View=view
- Set window view mode to view ('
WINDOW
' is a normal window, or 'FULLSCREEN
' = display takes up whole screen (for displays of type 'frame' only) or 'ALWAYSONTOP
' = the display remains on top, even when other windows are activated). Note that you must use the /Apply option if you want the fullscreen mode to take effect.
- /Layout|layout
- Recalculate dialog window size; include (
L
) or ignore (l
) hidden controls (case sensitive!)
- /Modal=itemId
- Assign a modal parent to the display display. The modal parent itemId is inactive whilst the display exists and behind the display in the z-order.
TITLE
SET display TITLE mode font color [ title ]
Set and configure the display's title. The option /Settitle can be used to set a new title without applying the other settings.
- mode
- Turn the display's title on or off. The following values are supported:
ON
|OFF
- font
- A font argument as specified in Fonts and Font Argument Format.
- color
- A color argument as specified in Colors and Color Arguments.
- title
- The title text.