This is part of the HicEst documentation

WINDOW: Create, Texts, Graphics, Files, Display-Panels


Optionally set title, dimension, position, display state, text, menus, toolbar. For texts, file display, graphics, mixed graphic/text life panels etc.

⇒Home ⇒Contents ⇒more Input_Output

Bookmarks:


  ⇒clear_window   ⇒display_existing_file   ⇒margin_space   ⇒menu-bar_options   ⇒paint_window   ⇒save_window   ⇒tool_bar_options

Optional keywords:


(Syntax of optional keywords)
BORder BOld BaCkcolor BottomSpace CAPtion CHild ClipChildren ClipSiblings DisAbled FONt ForeColor ForeGround GraphicsFont Height HiDe ITalic Kill Left LeftSpace LoaD MAXimize MAXimizeBox MINimize MINimizeBox Menu MenuTypes OverLapped OverLappedWin Owner POPup POPupWindow PRint PaNeL PoinT ROTate RightSpace SHMiNnoAct SHow SHowNoACtcur SHowNoActRec SHowNormal SaveAs SelTxt SysMenu TItle ThickFrame ToolTypes Toolbar TopSpace UPDAtepanel UnderLine Up VISible WINdowhandle Width X Y
option type window : open, size, color, font
WINdowhandle 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
Owner NUM to make a new window the child of a parent window
  • WINDOW(WINdowhandle=wh, Owner=parent_handle)
TItle 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")
Kill NUM
  • WINDOW(Kill=wh) ! kill the window with handle wh
Height 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
Width num analogous to Height option, default is 50% screen width
X 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
Y num analogous to X option, default is 0% screen height (top of screen)
Left 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.
Up num analogous to Left=chars option
  • WINDOW(WIN=handle, Up=999) ! scroll beyond dimension:
MAXimize [NUM]
  • WINDOW(MAXimize) ! script window
  • WINDOW( WINdowhandle=wh, MAXimize) ! child window
MINimize [NUM]
  • WINDOW(MINimize) ! script window
  • WINDOW( WINdowhandle=wh, MINimize) ! child window
SHowNormal [NUM]
  • WINDOW(SHowNormal) ! script window
  • WINDOW( WINdowhandle=wh, SHowNormal) ! child window
BaCkcolor num
  • WINDOW(WIN=handle, backcolor=7) ! window background grey, see Colors
ForeColor num
  • WINDOW(WIN=handle, forecolor=1) ! writes will be blue
FONt c/n font = 'Courier new', for details see Fonts
GraphicsFont c/n graphFont = 'Arial'
PoinT num pt=10 ! typeface size
BOld log bo=0 ! bold off
ITalic log it=1 ! italic on
UnderLine log ul= MOD(yourVariable,10) ! underline under a condition
ROTate num rot=30 ! degrees 0...360
ForeGround NUM fg=wh5 ! sets window with handle wh5 to foreground
PaNeL 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.
UPDAtepanel --- update all Num/Text/Graphics of a panel.
(see also the closely related POP function)
Menu 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.
  • 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
  • The selected item nr is always returned in the global variable $$
  • The selected item name is optionally stored by the SelTxt option
  • CHARACTER MenuText*20, menus = " solo; animals; fruit; animals: dog; cat; fruit: apple; cherry; mango;"
  • WINDOW(Ti="my window", Menu=menus, SelTxt=MenuText, WIN=w1)
  • END
  • SUBROUTINE menus
  • ! just display selected item nr and text:
  • WRITE(WIN=w1, Name) $$, MenuText
  • END
SelTxt TXT
  • WINDOW(SelTxt=selectedText) ! retrieve the selected menu item name
MenuTypes 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
:
Toolbar 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
ToolTypes 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
LoaD txt with a bitmap file. Default size is the bitmap size:
  • WINDOW(WINdowhandle=wh1, LoaD='Test.bmp', Height=1/2)
SaveAs txt as a bitmap file:
  • WINDOW(WINdowhandle=wh1, save='name.bmp')
Demo = Tutorial.dem(Toolbar) shows how to paint + save toolbar
PRint 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.
BottomSpace num bs=2 ! the 2 text rows at the bottom of the window are not written to
LeftSpace num ls=8 ! text columns
RightSpace num rs=8 ! text columns
TopSpace num ts=2 ! text rows
some advanced options that may come handy in special situations
BORder [T] thin-line border
CAPtion [T] title bar (incl BORder)
CHild [T] child (not with POPup)
ClipChildren [T] excludes child area
ClipSiblings [T] avoid draw to overlap child
DisAbled [T] cannot receive user input
HiDe [T] hd or hd /= 0 hides window
MAXimize [T] initially maximized
MAXimizeBox [T] on title bar (needs SysMenu)
MINimize [T] initially minimized
MINimizeBox [T] on title bar (needs SysMenu)
OverLapped [T] with title bar and border
OverLappedWin [T] default: OL+CAP+SM+TF+MINB+MAXB
POPup [T] popup (not with child)
POPupWindow [T] with BOR+POP+SM. +CAP: menu
SHow [T] current size and position
SHMiNnoAct [T] minimize, keep active window
SHowNoACtcur [T] current state, keep active window
SHowNoActRec [T] most recent state, keep active window
SHowNormal [T] default: restore original size+pos
SysMenu [T] menu on title (needs CAP)
ThickFrame [T] with sizing border
VISible [T] initially visible



Support HicEst   ⇒ Impressum
©2000-2016 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.