Programmer Guide/Shell Items/Display/SET DISPLAY: Difference between revisions
No edit summary |
|||
Line 50: | Line 50: | ||
SET <var>display</var> BGCOLOR <var>text</var> <var>draw</var>< | SET <var>display</var> BGCOLOR <var>text</var> <var>draw</var>< | ||
SET <var>display</var> TITLE <var>mode</var> <var>font</var> <var>color</var> [<var>title</var>] | SET <var>display</var> TITLE <var>mode</var> <var>font</var> <var>color</var> [<var>title</var>] | ||
==Popup Menus== | |||
===ADDPOPUP=== | |||
SET <var>display</var> ADDPOPUP <var>title item1 item2</var> … | |||
SET <var>display</var> ADDPOPUP <var>title table</var> /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 <code>ADDPOPUP</code> commands are issued. Here is an example. | |||
[[File:5662.gif]] | |||
When a user selects an entry from one of these popups, the display item is sent a <code>[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|POPUP]]</code> message. | |||
;<var>title</var> | |||
:The menu title which is displayed in the menu bar of the display. | |||
;<var>itemX</var> | |||
:The menu items. <var>itemX</var> is used as the menu item capture unless the following applies: | |||
:The string <var>itemX</var> is an asterisk - a menu separator is added rather than a caption. | |||
:The string <var>itemX</var> begins with the character '<code>></code>' (e.g. <code>>text</code>) - A submenu is defined using <code>text</code> as the caption. | |||
The string <var>itemX</var> is the character '<code><</code>' - 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". | |||
;<var>table</var> | |||
:A simple table with one item per entry. See <var>itemX</var> for item details. | |||
Separators or items which start or end a submenu are not counted in the menu item index computation!=====SETPOPUP===== | |||
<code>SET <var>display</var> SETPOPUP <var>index1</var> [...] [/Enable|Disable /Check|Uncheck]</code> | |||
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 <code>SETPOPUP</code> command. It is computed as follows: | |||
<var>index</var> <code>= menuIndex * 100 + itemindex</code> | |||
{| | |||
|- | |||
|<code>menuindex</code> | |||
|index of menu (0, 1, ..; leftmost = 0) | |||
|- | |||
|<code>itemindex</code> | |||
|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. |
Revision as of 17:39, 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 item1 item2 … 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.