File tag/Display


class tag.Display

Inherits

State supers
tom.State, tag

variables

static tom.MutableMapped registered_cits;
The registered Concrete Implementations of TAG.
static tom.MutableIndexed active_displays;
The currently active displays.
static tom.MutableIndexed cmd_displays;
Displays specified on the command line or environment. Each element is of the form `cit:display'.
local static tom.MutableArray focus_stack;
The stack of locked focusses in this thread.
local static public Display current;
The currently active display in this thread.
static boolean locks_needed;
Iff TRUE, each display needs a lock (because we're running multi-threaded).
tom.MutableMapped preferred_classes;
Mapping from tag class objects to CIT class objects which are to be preferred for this display class. For example, the X cit uses this to prefer x.Window objects to (the uselessly abstract) tag.Window objects.

methods

tom.OutputStream (s)
  help tom.OutputStream s
  done tom.MutableKeyed done;
Output information on the : options understood by the tag.Display class.

void
  load tom.MutableArray arguments;
Get the `:display' arguments from the command line.

void
  set_locks_needed boolean yes_or_no;
Manipulate locks_needed according to yes_or_no, and inform the active displays.

Display management

tom.Indexed
  active_displays;
Return the active displays.

instance (id)
  default;
Return the default display.

void
  flushOutput;
Have the active displays flushOutput.

deferred instance (id)
  openDisplay tom.String display;
Attempt to open the display on the receiving CIT.

boolean
  openDisplays;
Open the displays as indicated by the user on the command-line, or whatever other way of indication s/he has. Return TRUE upon success, i.e. when at least one display was openend.

instance (id) (display)
  openQualifiedDisplay tom.String name;
Undocumented.

void
  registerDisplay Display display;
Register the (newly openened) display.

void
  unregisterDisplay Display display;
Unregister the display.

void
  registerDisplayRequest tom.String name;
According to a commandline option, the display is to be opened; register it in the cmd_displays.

CIT management

A `CIT' is a `Concrete Implementation of TAG'. Every CIT is represented by its Display class.

void
  registerCIT class (Display) cit
     withName tom.String name;
Register the Display class cit under the name.

class (tom.State)
  preferred_class class (tom.State) c;
Return the preferred CIT class for the TAG class c. If there is no preferred class, the argument class is returned.

instance tag.Display

variables

tom.Lock lock;
The (recursive) lock we use to protect us from being busy in more than one thread.
public View locked_view;
The currently locked view.
float track_x;
A rectangle for use by handling mouse events. This is, for example, set by a Cell while handling a mouseDown, to register its borders, for use in mouseDragged and mouseUp.
float track_y;
float track_w;
float track_h;
public Event event;
The events used for dispatching. Every type of Event has its own cache copy here, which is reinitialized when needed. When you want to keep an event around for a while, you'll have to make a copy.

The event is the `current' event.

MouseEvent e_mouse;
The event used for dispatching mouse events.

methods

id
  init;
Designated initializer.

deferred class (CachedImageRep)
  cachedImageRepClass;
Return the CachedImageRep class to be used to display on the rceiving kind of Display.

deferred void
  close;
Close this display.

deferred tom.ByteStream
  output;
If this display is associated with a file, return it.

id
  flushOutput;
Flush any pending output. The default implementation does nothing. Returns self.

Device
  deviceDescription;
Return a description of the currently active output device, i.e. the device on which the locked_view would display.

void
  doLockView View view;
Do the actual work of locking the view, now we have the lock.

void
  doUnlockView View view;
Do the actual work of unlocking the view, before releasing the lock.

void
  lockView View view;
Lock this display for the view to this thread.

void
  set_locks_needed boolean yes_or_no;
Set or clear the lock.

void
  set_track_rectangle (float, float, float, float) (x, y, w, h);
Set the track rectangle.

(float, float, float, float)
  track_rectangle;
Return the track rectangle.

void
  unlockView View view;
Unlock the view.

Screen
  locked_screen;
Return the screen of the current locked_view.

deferred tom.Indexed
  screens;
Return the screens (subclass of Screen) attached to this display.

Screen
  defaultScreen;
Return this display's default screen.

Blitting

deferred void
  copyRect (float, float, float, float) (rx, ry, rw, rh)
        to (float, float) (x, y);
Copy the indicated rectange in the currently locked_view to the destination point.

Clipping

deferred void
  clipToRect (float, float, float, float) (x, y, w, h);
Start clipping to the indicated rectangle on the currently locked_view.

deferred void
  unclip;
Cancel a previous clipToRect.

Paths

These are all terribly familiar...
deferred void
  closepath;
Close the current path.

deferred (float, float)
  currentpoint;
Undocumented.

deferred void
  curveto (float, float, float, float, float, float) (x1, y1, x2, y2, x3, y3);
Undocumented.

deferred void
  eofill;
Undocumented.

deferred void
  fill;
Undocumented.

deferred void
  flattenpath;
Undocumented.

deferred void
  lineto (float, float) (x, y);
Undocumented.

deferred void
  newpath;
Undocumented.

void
  rlineto (float, float) (x, y);
Undocumented.

deferred void
  moveto (float, float) (x, y);
Undocumented.

deferred (float, float, float, float) (x1, y1, x2, y2)
  pathbbox;
Undocumented.

void
  rmoveto (float, float) (x, y);
Undocumented.

deferred void
  stroke;
Undocumented.

deferred void
  beep;

Drawing

deferred void
  drawLine (float, float, float, float) (x1, y1, x2, y2);
Undocumented.

deferred void
  fillRect (float, float, float, float) (x, y, w, h);
Undocumented.

deferred void
  setColor Color c;
Undocumented.

deferred void
  setFont Font f;
Undocumented.

deferred void
  show tom.String text
    at (float, float) (x, y);
Undocumented.

void
        drawRect (float, float, float, float) (x, y, w, h)
  withBorderType int border_type;
Undocumented.

(float, float, float, float)
      innerRect (float, float, float, float) (x, y, w, h)
  forBorderType int border_type;
Undocumented.

void
  drawRect (float, float, float, float) (x, y, w, h);
Draw a rectangle (in the current color, etc) within the rectangle denoted by (x, y, w, h). Like all rectangular routines, this draws inside the given rectangle.

(float, float, float, float)
    drawButton (float, float, float, float) (x, y, w, h)
  highlighted: boolean high = NO
         fill: boolean fill = NO;
Draw a button outline, possibly highlighted, and return its inner rectangle.

(float, float, float, float)
   innerButton (float, float, float, float) (x, y, w, h)
  highlighted: boolean high = NO;
Return the inner rectangle if a, possibly highlighted, button would have been drawn in the given rectangle.

(float, float, float, float)
  drawGrayBezel (float, float, float, float) (x, y, w, h)
          fill: boolean fill = NO;
Draw a gray bezel. That is a highlighted button.

(float, float, float, float)
  innerGrayBezel (float, float, float, float) (x, y, w, h);
Return the inner rectangle if a gray bezel would have been drawn in the given rectangle.

(float, float, float, float)
  drawWhiteBezel (float, float, float, float) (x, y, w, h)
           fill: boolean fill = NO;
Draw a white bezel.

(float, float, float, float)
  innerWhiteBezel (float, float, float, float) (x, y, w, h);
Return the inner rectangle if a white bezel would have been drawn in the given rectangle.

(float, float, float, float)
  drawBWRect (float, float, float, float) (x, y, w, h);
Draw a rectangle, top-left being black, bottom-right being white.

(float, float, float, float)
  innerBWRect (float, float, float, float) (x, y, w, h);
Undocumented.

(float, float, float, float)
  drawGroove (float, float, float, float) (x, y, w, h);
Draw a groove.

(float, float, float, float)
  innerGroove (float, float, float, float) (x, y, w, h);
Return the inner rectangle of a groove.

Fonts

deferred Font
  fontNamed tom.String name
       size int size;
Return the font with with name and size. It is possible that the size is ignored.

deferred Font (result)
  systemFont
post
  result != nil;
Return the system font at the normal size.


Generated by tm 1.01.