pub trait ConfigureCursorWrapper<'a> {
// Required methods
fn get_cursor_blink(&self) -> Blink;
fn set_cursor_blink(&mut self, blink: Blink);
fn get_cursor_colors(&self) -> Colors;
fn set_cursor_colors(&mut self, colors: Colors);
fn get_cursor_extent(&self) -> Extent;
fn set_cursor_extent(&mut self, extent: Extent);
fn get_cursor_symbol(&self) -> Symbol<'a>;
fn set_cursor_symbol(&mut self, symbol: Symbol<'a>);
}Expand description
Backend configuration retrieval and modification of the CursorWrapper layer.
A backend wrapper that implements this trait allows the fields of a CursorWrapper that are
configurable to have their values read or have new values assigned.
Required Methods§
Sourcefn get_cursor_blink(&self) -> Blink
fn get_cursor_blink(&self) -> Blink
Returns the blink animation cycle for the cursor.
§Examples
use dumo::blink::Blink;
use dumo::cursor::{Colors, Cursor, Extent};
use dumo::fonts::*;
use dumo::{ConfigureCursorWrapper, DumoBackend};
let backend = DumoBackend::new(&mut display, &FONT_8X24_4_BITS).with_cursor(
Cursor::default()
.blink(Blink::with_period(10))
.colors(Colors::InvertedReset)
.extent(Extent::Underline { height: 2 }),
);
let cursor_blink = backend.get_cursor_blink();Sourcefn set_cursor_blink(&mut self, blink: Blink)
fn set_cursor_blink(&mut self, blink: Blink)
Sets the blink animation cycle for the cursor.
§Examples
use dumo::blink::Blink;
use dumo::cursor::{Colors, Cursor, Extent};
use dumo::fonts::*;
use dumo::{ConfigureCursorWrapper, DumoBackend};
let mut backend = DumoBackend::new(&mut display, &FONT_8X24_4_BITS).with_cursor(
Cursor::default()
.blink(Blink::with_period(10))
.colors(Colors::InvertedReset)
.extent(Extent::Underline { height: 2 }),
);
backend.set_cursor_blink(Blink::with_period(12));Sourcefn get_cursor_colors(&self) -> Colors
fn get_cursor_colors(&self) -> Colors
Returns the method used by the cursor for choosing colors.
§Examples
use dumo::blink::Blink;
use dumo::cursor::{Colors, Cursor, Extent};
use dumo::fonts::*;
use dumo::{ConfigureCursorWrapper, DumoBackend};
let backend = DumoBackend::new(&mut display, &FONT_8X24_4_BITS).with_cursor(
Cursor::default()
.blink(Blink::with_period(10))
.colors(Colors::InvertedReset)
.extent(Extent::Underline { height: 2 }),
);
let cursor_colors = backend.get_cursor_colors();Sourcefn set_cursor_colors(&mut self, colors: Colors)
fn set_cursor_colors(&mut self, colors: Colors)
Sets the method used by the cursor for choosing colors.
§Examples
use dumo::blink::Blink;
use dumo::cursor::{Colors, Cursor, Extent};
use dumo::fonts::*;
use dumo::{ConfigureCursorWrapper, DumoBackend};
let mut backend = DumoBackend::new(&mut display, &FONT_8X24_4_BITS).with_cursor(
Cursor::default()
.blink(Blink::with_period(10))
.colors(Colors::InvertedReset)
.extent(Extent::Underline { height: 2 }),
);
backend.set_cursor_colors(Colors::ReversedReset);Sourcefn get_cursor_extent(&self) -> Extent
fn get_cursor_extent(&self) -> Extent
Returns the shape that represents the cursor inside of the cell area.
§Examples
use dumo::blink::Blink;
use dumo::cursor::{Colors, Cursor, Extent};
use dumo::fonts::*;
use dumo::{ConfigureCursorWrapper, DumoBackend};
let backend = DumoBackend::new(&mut display, &FONT_8X24_4_BITS).with_cursor(
Cursor::default()
.blink(Blink::with_period(10))
.colors(Colors::InvertedReset)
.extent(Extent::Underline { height: 2 }),
);
let cursor_extent = backend.get_cursor_extent();Sourcefn set_cursor_extent(&mut self, extent: Extent)
fn set_cursor_extent(&mut self, extent: Extent)
Sets the shape that represents the cursor inside of the cell area.
§Examples
use dumo::blink::Blink;
use dumo::cursor::{Colors, Cursor, Extent};
use dumo::fonts::*;
use dumo::{ConfigureCursorWrapper, DumoBackend};
let mut backend = DumoBackend::new(&mut display, &FONT_8X24_4_BITS).with_cursor(
Cursor::default()
.blink(Blink::with_period(10))
.colors(Colors::InvertedReset)
.extent(Extent::Underline { height: 2 }),
);
backend.set_cursor_extent(Extent::VerticalBar { width: 2 });Sourcefn get_cursor_symbol(&self) -> Symbol<'a>
fn get_cursor_symbol(&self) -> Symbol<'a>
Returns the source of the content that the cursor uses to symbolize itself.
§Examples
use dumo::blink::Blink;
use dumo::cursor::{Colors, Cursor, Symbol};
use dumo::fonts::*;
use dumo::{ConfigureCursorWrapper, DumoBackend};
let backend = DumoBackend::new(&mut display, &FONT_8X24_4_BITS).with_cursor(
Cursor::default()
.blink(Blink::with_period(10))
.colors(Colors::InvertedReset)
.symbol(Symbol::Custom("🮕🮕")),
);
let cursor_symbol = backend.get_cursor_symbol();Sourcefn set_cursor_symbol(&mut self, symbol: Symbol<'a>)
fn set_cursor_symbol(&mut self, symbol: Symbol<'a>)
Sets the source of the content that the cursor uses to symbolize itself.
§Examples
use dumo::blink::Blink;
use dumo::cursor::{Colors, Cursor, Symbol};
use dumo::fonts::*;
use dumo::{ConfigureCursorWrapper, DumoBackend};
let mut backend = DumoBackend::new(&mut display, &FONT_8X24_4_BITS).with_cursor(
Cursor::default()
.blink(Blink::with_period(10))
.colors(Colors::InvertedReset)
.symbol(Symbol::Custom("🮕🮕")),
);
backend.set_cursor_symbol(Symbol::UnderCursor);Implementors§
impl<'a, B, D> ConfigureCursorWrapper<'a> for CursorWrapper<'a, B, D>
impl<'a, W, B> ConfigureCursorWrapper<'a> for Wwhere
B: ConfigureCursorWrapper<'a>,
W: WrapTrait<ConfigureCursorWrapper, Inner = B>,
Blanket implementation of the ConfigureCursorWrapper trait for function call passthrough.