Struct scroll_phat_hd::scroller::Scroller [] [src]

pub struct Scroller<'a> { /* fields omitted */ }

A virtual scrollable buffer with a scoll offset defining a visible window on the buffer itself. It is composed by a horizontally growable virtual buffer, and an offset that defines what portion of the buffer is actually visible.

┌─────────────────────────virtual buffer─────────────────────┐
┌───────────╔═════════════════╗──────────────────────────────┐
│▓▓▓▓▓▓▓▓▓▓▓║░░░░░░░░░░░░░░░░░║▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓│
│▓▓▓▓▓▓▓▓▓▓▓║░░░░░░░░░░░░░░░░░║▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓│
│▓▓▓▓▓▓▓▓▓▓▓║░░░░░░░░░░░░░░░░░║▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓│
└───────────╚═════════════════╝──────────────────────────────┘
└──offset───┴─visible buffer──┘

Methods

impl<'a> Scroller<'a>
[src]

[src]

Create a new Scroller using the provided Display.

[src]

Moves the visible buffer one pixel to the right. When the right side of the visible buffer reaches the right side of the virtual buffer, it starts again from the beginning.

[src]

Sets the value of an individual pixel in the virtual buffer.

Coordinates are zero-based, with the origin in the top left corner of the virtual buffer, and increasing down and to the right.

If the virtual buffer is not wide enough to contain the pixel, it is automatically extended up to that size.

[src]

Clears the virtual buffer and sets the text to the specified value.

[src]

Sends the visible buffer to the output display.

[src]

Clears the virtual buffer.