| option | type | |
| NUM | A new Window always needs a handle for later addressing. - Caution: without WIN=handle the target is the script window!
- WINDOW(WINdowhandle=wh) ! a new all-default window
|
| NUM | to make a new window the child of a parent window - WINDOW(WINdowhandle=wh, Owner=parent_handle)
|
| txt | - with name some_text in a scrolling window
- if no file some_text exists the value of some_text becomes the (new) window caption
- WINDOW(WINdowhandle=wh, TItle="some_text")
|
| NUM | - WINDOW(Kill=wh) ! kill the window with handle wh
|
| num | - WINDOW(WIN=handle, Height=H) ! set window height
Units are - for H=0...1 in % screen height , default=0.25
- for H>1 in character heights of default font nr=1 if no option FONt=nr is noted
- for H<0 in pixels
|
| num | analogous to Height option, default is 50% screen width |
| num | - WINDOW(WIN=handle, X=xpos) ! set window x position
The window will not be positioned beyond the script window. Units are: - for X=0...1 in % screen width, default=0%
- for H>1 in character widths of script window font
|
| num | analogous to X option, default is 0% screen height (top of screen) |
| num | - WINDOW(WIN=handle, Left=chars) ! scroll window left
chars is in character widths of the script font if no option FONt=nr is noted. |
| num | analogous to Left=chars option - WINDOW(WIN=handle, Up=999) ! scroll beyond dimension:
|
| num | - WINDOW(WIN=handle, backcolor=7) ! window background grey, see Colors
|
| num | - WINDOW(WIN=handle, forecolor=1) ! writes will be blue
|
| c/n | font = "Courier new", for details see Fonts |
| c/n | graphFont = "Arial" |
| num | pt=10 ! typeface size |
| log | bo=0 ! bold off |
| log | it=1 ! italic on |
| log | ul= MOD(yourVariable,10) ! underline under a condition |
| num | rot=30 ! degrees 0...360 |
| NUM | fg=wh5 ! sets window with handle wh5 to foreground |
| txt | see Panel for easy-update screen layout for varying numeric, text, and graphics output. Make sure to see this option, it can save you a lot of work. |
| --- | update all Num/Text/Graphics of a panel. |
| | | : |
| TXT | - The menu name (e.g. "menus") must define a string "menus" and a subroutine "menus"
- The string has the menu items separated by non-alfabetical letters, default is the bar symbol
- The global SUBROUTINE (e.g. "menus") is called back by Windows. It should have no procedure arguments and no USE statement (this would make it a local procedure)
- 2 separators in sequence produce a horizontal line
- item types may be inserted after the separators: 1=grayed, 2=checked, 8=vertical bar
- The selected item nr is always returned in the global variable $$
- The selected item name is optionally stored by the SelTxt option
- CHARACTER menus="item without drop-down, mams, other, mams:cat, 2dog, 8horse, cow,, 1mouse, other:worm, bird, fish,"
- WINDOW(Ti="you name it", Menu=menus, SelTxt=MenuText, WIN=w1)
- END
- SUBROUTINE menus ! just display selected item nr and text:
- WRITE(WIN=w1, Name, ForeColor=$$) $$, MenuText
- END
 |
| TXT | - WINDOW(SelTxt=selectedText) ! retrieve the selected menu item name
|
| vec | To allow changes of menu item types (0=standard, 1=grayed, 2=checked) a vector dimensioned with the number of menu items must be defined: - REAL :: ntypes=12, types(ntypes)
- WINDOW(M=menus, MenuTypes=types, WIN=w1)
- END
- SUBROUTINE menus
- types($$) = 2 - types($$) ! toggle checked status of selected menu item
- END
|
| | | : |
| TXT | - The toolbar name (e.g. "tools") must define a string "tools" and a subroutine "tools" of the same name.
- The string "tools" has to start with the name of a bitmap file containing the button images.
- The width of the bitmap is divided equally between the buttons.
- After the name of the bitmap, "tools" has the tool tips separated by non-alfabetical letters. The last non-blank character is the separator. If this is alfabetical the bar symbol is expected to separate the individual tool tips.
- 2 separators in sequence produce an empty space.
- The global SUBROUTINE (e.g. "tools") is called back by Windows. It should have no procedure arguments and no USE statement (this would make it a local procedure)
- The selected item nr is always returned in the global variable $$ and is available in the callback subroutine to control the program flow.
- CHARACTER tools= "TEST.bmp, tip1, tip2, ,tip4,"
- WINDOW( WINdowhandle=wh, Toolbar=tools) ! opens the window
- END ! the script waits now for a toolbar input
- SUBROUTINE tools ! has the same name as the tooltip string
- ! called whenever a button is clicked.
- ! The global variable $$ has the button number:
- IF($$ == 1) THEN |
- ! here goes whatever button1 is supposed to do
- ELSEIF($$ == 2) THEN
- ! button2 actions, etc.
- ENDIF
- END
|
| vec | - The state of the individual buttons can be controlled by the ToolTypes vector.
- Its dimension must be at least the number of buttons.
- Each element can be:
- 0=enabled=default
- 1=disabled,
- 2=check (toggles between the pressed and nonpressed states each time the user clicks it)
- 4=group (stays pressed until another button in the group is pressed)
- 8=wrap (button is followed by a line break)
- 16=pressed (button is being clicked)
- 32=checked (has the check style and is being clicked)
- 64=hidden
|
| txt | with a bitmap file. Default size is the bitmap size: - WINDOW(WINdowhandle=wh1, LoaD="Test.bmp", Height=1/2)
|
| txt | as a bitmap file: - WINDOW(WINdowhandle=wh1, save="name.bmp")
Demo = Tutorial.dem(Toolbar) shows how to paint + save toolbar |
| num | click Print button |
| | | - The following 4 "space" commands generate a that is kept untouched by AXIS() or WRITE() or any window scroll.
- The margin settings remain in effect up to the next WINDOW(..Space) command or to a WRITE(DeCoRation="T R L B") statement.
|
| num | bs=2 ! the 2 text rows at the bottom of the window are not written to |
| num | ls=8 ! text columns |
| num | rs=8 ! text columns |
| num | ts=2 ! text rows |
| | | some advanced options that may come handy in special situations |
| [T] | thin-line border |
| [T] | title bar (incl BORder) |
| [T] | child (not with POPup) |
| [T] | excludes child area |
| [T] | avoid draw to overlap child |
| [T] | cannot receive user input |
| [T] | hd or hd /= 0 hides window |
| [T] | initially maximized |
| [T] | on title bar (needs SysMenu) |
| [T] | initially minimized |
| [T] | on title bar (needs SysMenu) |
| [T] | with title bar and border |
| [T] | default: OL+CAP+SM+TF+MINB+MAXB |
| [T] | popup (not with child) |
| [T] | with BOR+POP+SM. +CAP: menu |
| [T] | current size and position |
| [T] | minimize, keep active window |
| [T] | current state, keep active window |
| [T] | most recent state, keep active window |
| [T] | default: restore original size+pos |
| [T] | menu on title (needs CAP) |
| [T] | with sizing border |
| [T] | initially visible |