Difference between revisions of "SCI/FreeSCI/Graphics/GRM"

From ScummVM :: Wiki
< SCI‎ | FreeSCI‎ | Graphics
Jump to navigation Jump to search
(Merging of the FreeSCI documentation. Page done.)
 
(No difference)

Latest revision as of 22:31, 20 January 2009

The graphical resource manager (GRM)

The operational layer

FreeSCI graphical widgets

Printing widgets

By means of each widget's print method, its state can be written to the FreeSCI output stream. Output of the STATE is as follows:

   STATE ::= VALIDITY "S"SERIAL ID [BOUNDS] FLAGS WIDGET-INFO VALIDITY ::= "v" /* widget is valid */ | "NoVis" /* Valid, but does not have a visual- internal error, unless it's a visual itself */ | "INVALID" /* Widget was invalidated */ | /* empty: Should never happen */ SERIAL ::= HEXNUMBER /* The widget's unique serial number */ ID ::= /* No ID */ | "#"HEXNUMBER /* ID assigned to the widget- typically an SCI heap address */ BOUNDS ::= (X-COORDINATE,Y-COORDINATE)(WIDTH,HEIGHT) /* Full extension of the graphics described by the widget */

The FLAGS are described by a sequence of characters; their meanings are listed below:

  • V: Widget is visible
  • O: Widget is completely opaque, i.e. fully covers all area in its bounds
  • C: Widget is a container
  • D: Widget is "dirty", i.e. will be redrawn at the next update
  • T: Widget has been tagged for clean-up
  • M: The widget's ID is not considered to be unique
  • I: Widget will not be freed if a snapshot is resored

The widget's ID will generally be considered to be unique within the container it is appended to, unless the Multi-ID flag ('M') is set. Functionally, this means that a widget w is appended to a list containing one or more widgets with an ID identical to its own, it overwrites the first widget with a matching ID, unless w itself has the M flag set.

The WIDGET-DESCRIPTION part of a widget starts with a string describing the widget's type; this is followed by widget- specific information.