_mwin.utl Utility - Make Window
Syntax
call "_mwin.utl"{,column,row,columns,rows,type,
shadow,title$,border_attributes$,window_attributes$,
no_display,screen$,newline_character$,column_character$,
do_connect,disable_clear}
Description
The _mwin.utl utility creates screen windows in a manner similar to the PRO/5 'WINDOW' mnemonic. All of the program's parameters are optional. If no parameters are passed to _mwin.utl, it creates an exact duplicate of the current window.
| 
                                                         Parameter  | 
                                                    
                                                         Description  | 
                                                
| 
                                                         column  | 
                                                    
                                                         Starting column: -1 centers the window horizontally. -100 places the window at the current horizontal cursor position.  | 
                                                
| 
                                                         row  | 
                                                    
                                                         Starting row: -1 centers the window vertically. -100 places the window at the current vertical cursor position.  | 
                                                
| 
                                                         columns  | 
                                                    
                                                         Number of columns (width) for window.  | 
                                                
| 
                                                         rows  | 
                                                    
                                                         Number of rows (height) for window.  | 
                                                
| 
                                                         type  | 
                                                    
                                                         0 Window with no box.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         -99 No box, do not clear window  | 
                                                
| 
                                                         
  | 
                                                    
                                                         1 Window surrounded by a box.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         -1 Same as 1, do not clear window.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         2 Box open on the top.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         -2 Same as -2, do not clear window.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         3 Box open on the bottom.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         -3 Same as –3, do not clear window.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         4 Box open on the left.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         -4 Same as –4, do not clear window.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         5 Box open on the right.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         -5 Same as -5, do not clear window.  | 
                                                
| 
                                                         shadow  | 
                                                    
                                                         0 No shadow under scroll region.  | 
                                                
| 
                                                         
  | 
                                                    
                                                         1 Create a shadow under the scroll region.  | 
                                                
| 
                                                         title$  | 
                                                    
                                                         Title (optional). Places the title centered in a box by starting with an "@". Include an EUS Toolkit newline character to force a line break.  | 
                                                
| 
                                                         border_attributes$  | 
                                                    
                                                         Border Attributes may be any PRO/5 attribute mnemonics, for example: 'YELLOW'+'BR'.  | 
                                                
| 
                                                         window_attributes$  | 
                                                    
                                                         Window Attributes may be any PRO/5 attribute mnemonics.  | 
                                                
| 
                                                         no_display  | 
                                                    
                                                         If this parameter is nonzero, the window is not displayed but is returned in the following string variable.  | 
                                                
| 
                                                         screen$  | 
                                                    
                                                         Printable copy of the window is returned in this parameter if NO_DISPLAY is set to 1.  | 
                                                
| 
                                                         newline_character$  | 
                                                    
                                                         Character to use in place of the current global string table newline character.  | 
                                                
| 
                                                         column_character$  | 
                                                    
                                                         Use this character to separate columns in the title.  | 
                                                
| 
                                                         do_connect  | 
                                                    
                                                         If this parameter is nonzero, _mwin.utl will connect boxes (for example, drop-down menus).  | 
                                                
| 
                                                         disable_clear  | 
                                                    
                                                         An alternate method of preventing window clearing intended to ease integration of older window/menu management applications.  | 
                                                
Example
LET BBEXT$=STBL("BBEXT")
CALL BBEXT$+"_mwin.utl",10,10,40,6,1,0,"Title"
PRINT "Inside the window"
Users are positioned inside the new window after the call.
This example shows how to create a window, format the screen, and get input:
0100 REM " Simple input program
0110 LET BBEXT$=STBL("BBEXT")
0120 LET NEWLINE$=STBL("NEWLINE_CHAR")
0130 DIM INPUT$:STBL("!INPUT.TPL")
0140 LET WIN_COL=10,WIN_ROW=13,WIN_COLS=60,WIN_ROWS=5,
0140:WIN_TYPE=1,WIN_SHADOW=1
0150 LET TITLE$="@Accounts Receivable"+
0150:NEWLINE$+"Invoice Entry"
0160 REM " Save current window number
0170 LET TRASH$=FIN(0),CURRENT_WIN=DEC($00$+TRASH$(9,2))
0180 REM " Create a new window
0190 CALL BBEXT$+"_mwin.utl",WIN_COL,WIN_ROW,WIN_COLS,
0190:WIN_ROWS,WIN_TYPE,WIN_SHADOW,TITLE$
0200 REM " Save new window number for later
0210 LET TRASH$=FIN(0),NEW_WINDOW=DEC($00$+TRASH$(9,2))
0220 REM " Build 'form'
0230 PRINT @(0,0),"Invoice Number ",@(35),"Invoice
0230:Date",@(0,1),"Customer",
0240 REM " Get data from operator
0250 LET INPUT.COL=15,INPUT.ROW=0,INPUT.LENGTH=5,
0250:INPUT.IMASK$="00000",INPUT.COLPOS=0
0260 CALL BBEXT$+"_ninput.utl",INPUT$,INVOICE_NO$,
0260:CTLVAL
0270 LET INPUT.COL=50,INPUT.ROW=0,INPUT.LENGTH=6,
0270:INPUT.IMASK$="00/00/00",INPUT.COLPOS=0
0280 CALL BBEXT$+"_ninput.utl",INPUT$,INVOICE_DATE$,
0280:CTLVAL
0290 LET INPUT.COL=15,INPUT.ROW=1,INPUT.LENGTH=10,
0290:INPUT.IMASK$=$$,INPUT.COLPOS=0
0300 CALL BBEXT$+"_ninput.utl",INPUT$,CUSTOMER_NO$,
0300:CTLVAL
0310 REM "Now drop the 'form'
0320 PRINT 'GOTO'(NEW_WINDOW)+'DROP'(NEW_WINDOW),