[−][src]Trait prototty_render::View
Required methods
fn view<G: ViewGrid, R: ViewTransformRgb24>(
&mut self,
data: T,
context: ViewContext<R>,
grid: &mut G
)
&mut self,
data: T,
context: ViewContext<R>,
grid: &mut G
)
Update the cells in grid
to describe how a type should be rendered.
This mutably borrows self
to allow the view to contain buffers/caches which
are updated during rendering.
Provided methods
fn visible_bounds<R: ViewTransformRgb24>(
&mut self,
data: T,
context: ViewContext<R>
) -> Size
&mut self,
data: T,
context: ViewContext<R>
) -> Size
Return the size of the visible component of the element without rendering it. By default this is the current context size.
fn view_reporting_intended_size<G: ViewGrid, R: ViewTransformRgb24>(
&mut self,
data: T,
context: ViewContext<R>,
grid: &mut G
) -> Size
&mut self,
data: T,
context: ViewContext<R>,
grid: &mut G
) -> Size
Render an element and return the size that the element, regardless of the
size of the visible component of the element. This allows decorators to know
the size of the output of a view they are decorating.
By default this calls view
keeping track of the maximum x and y
components of the relative coords of cells which are set in grid
.