This structure provides functions related with the entire application, such as X-style option defaults.
List of Import References :
See BOOL
See Com
See DENOTATION
See Nat
See Option
See Real
See Seq
See Void
SIGNATURE WinAppl
$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)
IMPORT Real ONLY real:SORT Void ONLY void:SORT Com[void] ONLY com:SORT Seq[denotation] ONLY seq:SORT Option[denotation] ONLY option:SORT
Several TkOpal related constants specify properties of the environment of an actual application run.
The application's name, the arguments and the environment (as a function from variable names into optional values) are defined by the following functions:
FUN applName : denotation FUN applArgs : seq[denotation] FUN applEnv : denotation -> option[denotation]
The extent of a pixel in millimeters on the screen is defined by the
constant screenResolution
below. The size of the screen itself
(in millimeters) is described by the constants screenWidth
and
screenHeight
.
FUN screenResolution : real FUN screenWidth : real FUN screenHeight : real
The color model of the screen is described by the constant
colorModel
.
TYPE colorModel == directColor grayScale pseudoColor staticColor staticGray trueColor FUN colorModel : colorModel
OpalWin setups the display option defaults for the predefined views automatically on startup, taking the color model of the actual screen into account. The default settings may be reconfigured after application startup by the functions below.
Option settings are associated with a priority. In increasing order, the priority is defined as follows:
TYPE defaultPrio == builtin application preference interactive
As a developer, be aware that values from your own X
preference
data base overwrite application defaults when you are going to test them.
An option default setting is overwritten by the function
setDefault
.
FUN setDefault : defaultPrio ** denotation ** denotation -> com[void]
The first denotation is a pattern consisting of names and/or classes
separated by asterisks or dots in the X format. It is usually terminated
by the name of the option starting as in
*Frame.background
, which addresses the default background of
any frame. The second denotation specifies the default value.
The function loadDefaults
loads a file in the standard X11
resource database format:
FUN loadDefaults: defaultPrio ** denotation -> com[void]
The command update
flushes all pending output to the display,
waits for the window server to process it and dispatches all events,
until no more window operations are outstanding. The command
evaluate
is less rigorously: it ensures only that
any deferred operations such as window size calculations are
immediatly performed. This is usefull e.g. if the size of
a freshly packed window is needed, which will otherwise only
be available after the window has been displayed.
FUN update : com[void] FUN evaluate : com[void]
The command silently
deferes all output to the window manager
during the execution of the given command. It may be nested.
FUN silently : com[void] -> com[void]
next node: WinTag,
prev node: WinInternal,
up to node: Subsystem Opal Windows