Sha256: 069f732570d782779130636416235025255ef9302fdcf8e4937a62e1682da682

Contents?: true

Size: 1.82 KB

Versions: 12

Compression:

Stored size: 1.82 KB

Contents

# @title Vedeu Movement Events

## Movement Events

### :_cursor_origin_
This event moves the cursor to the interface origin; the top left
corner of the named interface.

    Vedeu.trigger(:_cursor_origin_, name)
    Vedeu.trigger(:_cursor_reset_, name)

### :_cursor_position_
When triggered will return the current position of the cursor.

    Vedeu.trigger(:_cursor_position_, name)

### :_cursor_reposition_
Moves the cursor to a relative position inside the interface.

    Vedeu.trigger(:_cursor_reposition_, name, y, x)

### :_cursor_(up, down, left, right)_
Adjusts the position of the cursor or view.

When a name is not given, the cursor in the interface which is
currently in focus should move in the direction specified.

    Vedeu.trigger(:_cursor_left_, 'my_interface')
    Vedeu.trigger(:_cursor_left_)
    Vedeu.trigger(:_cursor_right_)
    Vedeu.trigger(:_cursor_up_)
    Vedeu.trigger(:_cursor_down_)

- The cursor or view may not be visible, but it will still move if
  requested.
- The cursor will not exceed the border or boundary of the interface,
  or boundary of the visible terminal.
- The cursor will move freely within the bounds of the interface,
  irrespective of content.
- The view will not exceed the boundary of the visible terminal,
  though its offset may (this means content will appear to have
  scrolled).
- The view will move freely within the bounds of the interface,
  irrespective of content.

### :_view_(up, down, left, right)_

See {file:docs/events.md#\_cursor__up_down_left_right_}

Please note that the name of the view is required for these events.

    Vedeu.trigger(:_view_down_,  'my_interface')
    Vedeu.trigger(:_view_left_,  'my_interface')
    Vedeu.trigger(:_view_right_, 'my_interface')
    Vedeu.trigger(:_view_up_,    'my_interface')

Each of the :_view_* events has an alias, :_geometry_* if you prefer.

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
vedeu-0.6.20 docs/events/movement.md
vedeu-0.6.19 docs/events/movement.md
vedeu-0.6.18 docs/events/movement.md
vedeu-0.6.17 docs/events/movement.md
vedeu-0.6.16 docs/events/movement.md
vedeu-0.6.15 docs/events/movement.md
vedeu-0.6.14 docs/events/movement.md
vedeu-0.6.13 docs/events/movement.md
vedeu-0.6.12 docs/events/movement.md
vedeu-0.6.11 docs/events/movement.md
vedeu-0.6.10 docs/events/movement.md
vedeu-0.6.9 docs/events/movement.md