SCO Visual Tcl Reference Guide
Chapter 3, SCO Visual Tcl - graphical scripting language

Character mode and graphical variants

Character mode and graphical variants

SCO Visual Tcl applications are intended to run equally well in character mode (Character Motif, or CHARM) or in the graphical environment. However, the screen size available to an application varies with the type of display, and some programs may be forced to use different visual interfaces.

All option names, as described in ``Generic SCO Visual Tcl options'', can be prefixed with either CHARM_ or MOTIF_. If an option begins with CHARM_ it will only be sent to the character mode server. If it is prefixed by MOTIF_ it will only go to the OSF/Motif-based (graphical) server. These prefixes are typically used when specifying offsets, since the graphical server needs pixels and the character mode server needs characters as measurements. If neither prefix is used, then the option and its value are sent to both servers.

For example, this small application displays a different label depending on whether it is executed in character or graphical mode:

   set app [VtOpen myprog]
   set form [VtFormDialog $app.mainform -ok -okLabel Goodbye \
                                      -okCallback VtClose]
   set label [VtLabel $form.label \
   		   -CHARM_label "Running in character mode" \
               -MOTIF_label "Running under Motif"]
   VtShow $form
   VtMainLoop