File tag/View


class tag.View

Inherits

State supers
Responder

instance tag.View

variables

public mutable Window window;
Our window.
public id superview;
Our containing view.
public tom.MutableIndexed subviews;
Our subviews.
public mutable int auto_size;
The way we move and size with our superview being resized.
float f_x;
Our frame in our parent.
float f_y;
float f_w;
float f_h;
float b_x;
Our bounds.
float b_y;
float b_w;
float b_h;
public mutable boolean needs_display;
Iff !0, this view should be redrawn.

methods

tom.OutputStream
  writeFields tom.OutputStream s;
Undocumented.

Screen
  screen;
Undocumented.

Display
  currentDisplay;
The only legitimate way to ask a locked View for the Display onto which the output will appear.

(float, float)
  convertPoint (float, float) (x, y)
      fromView id v;
Undocumented.

(float, float)
  convertPoint (float, float) (x, y)
        toView id v;
Undocumented.

(float, float)
  convertPointFromSuperview (float, float) (x, y);
Return the point (x, y), given in the coordinates of the superview, in the coordinates of the receiving view. This does not query the superview, since the computations only involve the frame and bounds.

(float, float)
  convertPointToSuperview (float, float) (x, y);
Return the point (x, y), given in the coordinates of the receiving view, in the coordinates of the superview. This does not query the superview, since the computations only involve the frame and bounds.

(float, float, float, float)
  convertRectFromSuperview (float, float, float, float) (x, y, w, h);
Return the rectangle (x, y, w, h), given in the coordinates of the superview to the coordinates of the receiving view.

(float, float, float, float)
  convertRectToSuperview (float, float, float, float) (x, y, w, h);
Return the rectangle (x, y, w, h), given in the coordinates of the receiving view, to the coordinates of the super view.

void
  descendantFrameChanged View descendant;
Be informed that the descendant has changed its frame. The default implementation passed this on to its superview, if it has one.

id
  initFrame (float, float, float, float) (x, y, w, h)
pre
  system_display != nil;
Designated initializer.

(float, float, float, float)
  bounds;
Return the bounds of the receiving view, in its own coordinates.

(float, float, float, float)
  frame;
Return the frame of the receiving view, in the coordinates of the superview.

void
  setFrame (float, float, float, float) (x, y, w, h);
Set the frame of the receiving view to the arguments, expressed in the coordinates of the superview.

void
  moveBy (float, float) (dx, dy);
Move the view by the specified amount, in the coordinates of the superview. Invokes moveTo.

void
  moveTo (float, float) (x, y);
Move the view to the indicated position, in the coordinates of the superview. Notify the superview that a descendantFrameChanged.

void
  resizeSubviews (float, float) (old_w, old_h);
Inform the subviews that their superviewSizeChanged.

void
  sizeBy (float, float) (dw, dh);
Adjust the size of the receiving view by (dw, dh), in the coordinates of its superview. Implemented by invoking sizeTo.

void
  sizeTo (float, float) (w, h);
Set the size of the receiving view to (w, h), in the coordinates of its superview. Resize the subviews as indicated by their auto_size, and inform the superview that a descendantFrameChanged.

private (float, float)
  autoResize int how
          of (float, float, float, float) (x, w, sow, snw);
Return the new values for x and w, given their old values and the old and new values for the superview's w. how defines how to resize.

void
  superviewSizeChanged (float, float) (so_w, so_h);
Autoresize the receiving view, according to auto_size.

void
  clipToFrame;

Drawing

void
  clipToFrame (float, float, float, float) (sv_x, sv_y, sv_w, sv_h);
Undocumented.

void
  display;
Undocumented.

void
  display (float, float, float, float) (x, y, w, h);
Display the View and it subviews.

void
  displayIfNeeded;
display the receiving View, if needed according to its needs_display flag. Otherwise,if displaying is not needed, propagate this message to this view's subviews.

void
  drawSelf (float, float, float, float) (x, y, w, h);
Draw the contents of the receiving view, which already has the focus locked. The default implementation does nothing.

void
  lockFocus;
Lock focus on the receiving view with the currentDisplay.

void
  unlockFocus;
Unlock focus on the receiving view with the currentDisplay. The receiving view should be the one that is currently locked.

Hierarchy management

void
  addSubview View view;
Add the view to the subviews of the receiving view. This will set the superview of the view to the receiver.

void
  removeFromSuperview;
Remove the receiving view from its superview. This also removes the receiving view and all subviews from the window.

protected void
  removeSubview View view;
Remove the view from the subviews.

protected void
  setSuperview View v;
Accept a new superview. Invoke removeFromSuperview if v is nil.

protected void
  viewWillMoveToWindow Window w;
Be informed that this view will be moved to the window w. In fact, this method actually performs the move, passing it on to subviews.

Responder management

boolean
  acceptsFirstMouse MouseEvent event
pre
  [event type] == EVENT_MOUSE_DOWN;
Return TRUE iff the receiving view accepts the mouse event, even though the same event is making the window key window. The default implementation returns FALSE.

This is currently unused because of the mouse-over-to-focus of many X11 window managers.

void
  encodeUsingCoder tom.Encoder coder;

Archiving

void
  initWithCoder tom.Decoder coder;
Undocumented.

Aiding event handling

id
  hitTest (float, float) (x, y);
Return the View in the receiving view's hierarchy, containing the point (x, y). The coordinates are in the receiving view's superview coordinate system.

boolean
   mouse (float, float) (m_x, m_y)
  inRect (float, float, float, float) (x, y, w, h);
Undocumented.


Generated by tm 1.01.