[−][src]Trait unsegen::base::cursor::CursorTarget
Something that can be written to using a Cursor. A most prominent example would be a Window.
Required methods
fn get_width(&self) -> Width
Return the actual width of the window. Writing to a column outside of this range is not possible.
fn get_height(&self) -> Height
Return the maximum height of the target. Writing to a row outside of this range is not possible.
fn get_cell_mut(
&mut self,
x: ColIndex,
y: RowIndex
) -> Option<&mut StyledGraphemeCluster>
&mut self,
x: ColIndex,
y: RowIndex
) -> Option<&mut StyledGraphemeCluster>
Get the (mutable) cell at the specified position. The implementor must ensure that in the range for x \in [0, Width) and y \in [0, Height) a valid cluster is returned.
fn get_cell(&self, x: ColIndex, y: RowIndex) -> Option<&StyledGraphemeCluster>
Get the cell at the specified position. The implementor must ensure that in the range for x \in [0, Width) and y \in [0, Height) a valid cluster is returned.
fn get_default_style(&self) -> Style
Return the default style that characters of this target should be printed as. This serves as the base for further style modifications while writing to the target.
Provided methods
fn get_soft_width(&self) -> Width
Return the soft or "desired" width of the target. In most cases this is equal to the width. An example where this is not the case would be a terminal with builtin wrapping of lines where it is some cases desirable for the cursor to wrap at the width of the terminal, even though there is no (conceptual) limit of line length.
Implementors
impl CursorTarget for ExtentEstimationWindow
[src]
fn get_width(&self) -> Width
[src]
fn get_height(&self) -> Height
[src]
fn get_cell_mut(
&mut self,
x: ColIndex,
y: RowIndex
) -> Option<&mut StyledGraphemeCluster>
[src]
&mut self,
x: ColIndex,
y: RowIndex
) -> Option<&mut StyledGraphemeCluster>
fn get_cell(&self, x: ColIndex, _: RowIndex) -> Option<&StyledGraphemeCluster>
[src]
fn get_default_style(&self) -> Style
[src]
impl<'a> CursorTarget for Window<'a>
[src]
fn get_width(&self) -> Width
[src]
fn get_height(&self) -> Height
[src]
fn get_cell_mut(
&mut self,
x: ColIndex,
y: RowIndex
) -> Option<&mut StyledGraphemeCluster>
[src]
&mut self,
x: ColIndex,
y: RowIndex
) -> Option<&mut StyledGraphemeCluster>