Progress
AppBuilder
Developer’s Guide


Run-time Properties and AppBuilder Settings

For each alternate layout, the AppBuilder places an IF statement in the Run-time Properties and AppBuilder Settings code section. This IF statement checks to see whether the layout’s run-time expression evaluates to TRUE. If so, this statement runs the layout case’s internal procedure, passing to it the name of the layout as an input parameter.

For example, the multi-layout run-time adjustments code appears as follows:

/* _MULTI-LAYOUT-RUN-TIME-ADJUSTMENTS */

/* LAYOUT-NAME: "Standard Character"
   LAYOUT-TYPE: CHARACTER
   EXPRESSION:  SESSION:DISPLAY-TYPE = ’TTY’:U 
   COMMENT:     This layout is the standard layout specification for
                 a customized Character based terminal.  It is usually
                 selected to modify a window that has a GUI based
                 master layout.
                                                                        */
IF SESSION:DISPLAY-TYPE = ’TTY’:U  THEN 
  RUN C-Win-layouts (INPUT ’Standard Character’:U) NO-ERROR.

/* LAYOUT-NAME: "Standard MS Windows"
   LAYOUT-TYPE: GUI
   EXPRESSION:  SESSION:WINDOW-SYSTEM = ’MS-WINDOWS’:U 
   COMMENT:     This layout is the standard layout specification for
                 a customized MS Windows window.  It is usually
                 selected to modify a window that needs to have a
                 standard "MS Windows" look.
                                                                        */
ELSE IF SESSION:WINDOW-SYSTEM = ’MS-WINDOWS’:U  THEN 
  RUN C-Win-layouts (INPUT ’Standard MS Windows’:U) NO-ERROR.

/* LAYOUT-NAME: "Standard Windows 95"
   LAYOUT-TYPE: GUI
   EXPRESSION:  SESSION:WINDOW-SYSTEM = ’MS-WIN95’:U
   COMMENT:     This layout is the standard layout specification for
                 a customized Windows 95 window.  It is usually
                 selected to modify a window that needs to have a
                 standard "Windows 95" look.
                                                                        */
ELSE IF SESSION:WINDOW-SYSTEM = ’MS-WIN95’:U THEN 
  RUN C-Win-layouts (INPUT ’Standard Windows 95’:U) NO-ERROR.

/* END-OF-LAYOUT-DEFINITIONS */

IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(C-Win)
THEN C-Win:HIDDEN = no. 

If the expression SESSION:WINDOW–SYSTEM = ’MS–WINDOWS’:U evaluates to TRUE, this IF statement passes the input parameter ’Standard MS Windows’ to the layout cases internal procedure. For SmartObjects, the DefaultLayout property is set. This is used to run the appropriate layout case later, when the SmartObject is initialized.

Thus, for SmartObjects, the multi-layout run-time adjustments code appears as follows:

/* _MULTI-LAYOUT-RUN-TIME-ADJUSTMENTS */

/* LAYOUT-NAME: "Standard Character"
   LAYOUT-TYPE: CHARACTER
   EXPRESSION:  SESSION:DISPLAY-TYPE = ’TTY’:U 
   COMMENT:     This layout is the standard layout specification for
                 a customized Character based terminal.  It is usually
                 selected to modify a window that has a GUI based
                 master layout.
                                                                        */
IF SESSION:DISPLAY-TYPE = ’TTY’:U  THEN 
  DYNAMIC-FUNCTION(’setDefaultLayout’:U, ’Standard Character’:U) NO-ERROR.

/* LAYOUT-NAME: "Standard MS Windows"
   LAYOUT-TYPE: GUI
   EXPRESSION:  SESSION:WINDOW-SYSTEM = ’MS-WINDOWS’:U 
   COMMENT:     This layout is the standard layout specification for
                 a customized MS Windows window.  It is usually
                 selected to modify a window that needs to have a
                 standard "MS Windows" look.
                                                                        */
ELSE IF SESSION:WINDOW-SYSTEM = ’MS-WINDOWS’:U  THEN 
  DYNAMIC-FUNCTION(’setDefaultLayout’:U, ’Standard MS Windows’:U) NO-ERROR.

/* LAYOUT-NAME: "Standard Windows 95"
   LAYOUT-TYPE: GUI
   EXPRESSION:  SESSION:WINDOW-SYSTEM = ’MS-WIN95’:U
   COMMENT:     This layout is the standard layout specification for
                 a customized Windows 95 window.  It is usually
                 selected to modify a window that needs to have a
                 standard "Windows 95" look.
                                                                        */
ELSE IF SESSION:WINDOW-SYSTEM = ’MS-WIN95’:U THEN 
  DYNAMIC-FUNCTION(’setDefaultLayout’:U, ’Standard Windows 95’:U) NO-ERROR.

DYNAMIC-FUNCTION(’setLayoutOptions’:U, "Master Layout,Standard 
Character,Standard MS Windows,Standard Windows 95":U). 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095