HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
tt::stencil Class Referenceabstract
Inheritance diagram for tt::stencil:
tt::image_stencil tt::label_stencil tt::text_stencil tt::glyph_stencil tt::pixel_map_stencil

Public Member Functions

 stencil (alignment alignment)
 
 stencil (stencil const &) noexcept=delete
 
 stencil (stencil &&) noexcept=delete
 
stenciloperator= (stencil const &) noexcept=delete
 
stenciloperator= (stencil &&) noexcept=delete
 
virtual f32x4 preferred_extent () noexcept
 Return the extent that this cell wants to be drawn as.
 
virtual void set_layout_parameters (aarect const &rectangle, float base_line_position=std::numeric_limits< float >::infinity()) noexcept
 Pass layout parameters in local coordinates.
 
virtual void draw (draw_context context, bool use_context_color=false) noexcept=0
 Draw the cell.
 

Static Public Member Functions

static std::unique_ptr< class image_stencilmake_unique (alignment alignment, icon const &icon)
 
static std::unique_ptr< class text_stencilmake_unique (alignment alignment, std::u8string const &text, text_style const &style)
 
static std::unique_ptr< class label_stencilmake_unique (alignment alignment, tt::label const &label, text_style const &style)
 

Member Function Documentation

◆ draw()

virtual void tt::stencil::draw ( draw_context context,
bool use_context_color = false )
pure virtualnoexcept

Draw the cell.

Parameters
contextThe current draw context.
use_context_colorTrue to use the colors in the context, False to use the colors in the cell itself.

Implemented in tt::glyph_stencil, tt::label_stencil, tt::pixel_map_stencil, and tt::text_stencil.

◆ preferred_extent()

virtual f32x4 tt::stencil::preferred_extent ( )
inlinevirtualnoexcept

Return the extent that this cell wants to be drawn as.

Reimplemented in tt::label_stencil, and tt::text_stencil.

◆ set_layout_parameters()

virtual void tt::stencil::set_layout_parameters ( aarect const & rectangle,
float base_line_position = std::numeric_limits<float>::infinity() )
inlinevirtualnoexcept

Pass layout parameters in local coordinates.

Parameters
rectangleThe rectangle the stencil will be drawn into.
base_line_positionThe position of the base line within the rectangle.

Reimplemented in tt::label_stencil.


The documentation for this class was generated from the following file: