File tag/Scroller


class tag.Scroller

Inherits

State supers
Action, Control, Values

variables

static tom.Array arrows_hor;
Horizontal scrolling arrow images. Order is: left, right, page left, page right, plux highlighted versions.
static tom.Array arrows_ver;
Similarly, the vertial arrows, with left being bottom, and right being top.
static Image knob;
The knob image.
static float normal_arrow_width;
The width of the horizontal single arrow image.
static float page_arrow_width;
The width of the horizontal page arrow image.
static int scroller_configuration;
The configuration of scrollers in this app.
too.Timer scroll_timer;
The timer used to time scroll events.
float highlighted_pos;
The so-called position of the highlighted arrow.
float offset;
During mouse dragging, the distance from the mouse to the lower (left, bottom) side of the knob, in the positive (right, upper) direction.
const EXCESS_PAGE_ROOM = 10.0;
The extra space needed for the scroller knob to move before we introduce the page scrolling buttons.
const SCROLL_REPEAT = 0.05;
The time in seconds between scroll events.
const SCROLL_PAGE_REPEAT = 0.1;

methods

private void
  load_images;
Load the images and set arrows_width and arrows_height.

(float, float, float, float, float, float, float, float) (pos_less, pos_more, pos_less_page, pos_more_page, bg_pos, bg_length, knob_pos, knob_length)
  sizesForLength float length
           value float value
      percentage float percentage
      horizontal boolean horizontal_p
       withPages boolean page_p
pre
  value >= 0.0 && value <= 1.0 && percentage >= 0.0 && percentage <= 1.0;
Return the positional information for each of the elements of the scroller, with the indicated features. A position of -1.0 means the indicated part of the scroller is not to be drawn. If knob_length == -1, the knob is not to be drawn; if in addition knob_pos == -1 the size of the scroller is too small to draw the knob.

instance tag.Scroller

variables

public float percentage;
The size of the knob, between 0.0 and 1.0 (inclusive). Too small a size is clipped to SCROLLER_WIDTH when drawing.
float value;
The position of the knob, between 0.0 and 1.0, as a positive offset from the bottom/left.
public int highlighted_arrow;
The arrow that is highlighted, plus 1: SCROLLER_PART_KNOB is no arrow; SCROLLER_PART_LESS is lower, SCROLLER_PART_MORE is higher, SCROLLER_PART_PAGE_LESS is page-lower, and SCROLLER_PART_PAGE_MORE is page-higher. In addition, a value of SCROLLER_PART_NONE means nothing useful was being touched.
public mutable boolean continuous;
A continuous scroller will update its target during dragging. A non-continuous one only upon mouseUp.
byte configuration;
Configuration of this scroller.

methods

id
  initFrame (float, float, float, float) (x, y, w, h);
Designated initializer. This invokes load_images if needed. Default, a vertical scroller will (attempt to) show page scrolling; a horizontal scroller will not.

double
  doubleValue;
Return the value.

void
  setDoubleValue double v
pre
  v >= 0.0 && v <= 1.0;
Set the value and invoke display.

private void
  drawArrow int arrow
       from tom.Indexed array
         at float pos
    clipped (float, float, float, float) (x, y, w, h);
Undocumented.

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

int
  hitPart;
Return the highlighted_arrow.

void
  mouseDown MouseEvent event;
Undocumented.

void
  mouseDragged MouseEvent event;
Undocumented.

void
  mouseUp MouseEvent event;
Undocumented.

void
       setValue float v
  andPercentage float p
pre
  v >= 0.0 && v <= 1.0 && p >= 0.0 && p <= 1.0;
Undocumented.

Target/Action

selector
  action;
Forward to Action.

_builtin_.Any
  target;
Undocumented.

void
  setTarget tom.All t;
Undocumented.

void
  setAction selector a;
Undocumented.

void
  encodeUsingCoder tom.Encoder coder;

Archiving

void
  initWithCoder tom.Decoder coder;
Undocumented.


Generated by tm 1.01.