tickit_renderbuffer_text - Man Page

create text regions

Synopsis

#include <tickit.h>

int tickit_renderbuffer_text(TickitRenderBuffer *rb,
        const char *text);
int tickit_renderbuffer_textn(TickitRenderBuffer *rb,
        const char *text, size_t len);
int tickit_renderbuffer_textf(TickitRenderBuffer *rb,
        const char *fmt, ...);
int tickit_renderbuffer_vtextf(TickitRenderBuffer *rb,
        const char *fmt, va_list args);

int tickit_renderbuffer_text_at(TickitRenderBuffer *rb,
        int line, int col, const char *text);
int tickit_renderbuffer_textn_at(TickitRenderBuffer *rb,
        int line, int col, const char *text, size_t len);
int tickit_renderbuffer_textf_at(TickitRenderBuffer *rb,
        int line, int col, const char *fmt, ...);
int tickit_renderbuffer_vtextf_at(TickitRenderBuffer *rb,
        int line, int col, const char *fmt, va_list args);

Link with -ltickit.

Description

tickit_renderbuffer_text() creates a text region that starts at the current virtual cursor position, containing the given text string and set to the current pen. tickit_renderbuffer_textn() creates a text region of at most len bytes. It returns the number of columns that the text string occupies.  tickit_renderbuffer_textf() and tickit_renderbuffer_vtextf() take a format string in the style of sprintf(3) to create formatted text from either a list of arguments or a va_list. These functions will update the virtual cursor position.

tickit_renderbuffer_text_at(), tickit_renderbuffer_textn_at(), tickit_renderbuffer_textf_at() and tickit_renderbuffer_vtextf_at() create a text region at the given position, and otherwise operate analogously to their non-_at counterpart. These functions do not use or update the virtual cursor position.

Calls to any of these functions allocate storage owned by the TickitRenderBuffer instance itself to store the strings. This storage is released again by tickit_renderbuffer_reset(3), the implicit reset that happens at the end of tickit_renderbuffer_flush_to_term(3), or when every cell that was originally part of the region has been overwritten with other content.

Return Value

These functions return an integer giving the number of columns the new region occupies.

See Also

tickit_renderbuffer_new(3), tickit_renderbuffer_blit(3), tickit_renderbuffer_flush_to_term(3), tickit_renderbuffer(7), tickit(7)

Referenced By

tickit_debug(7), tickit_renderbuffer(7), tickit_renderbuffer_goto(3), tickit_renderbuffer_new(3), tickit_renderbuffer_setpen(3).

The man pages tickit_renderbuffer_text_at(3), tickit_renderbuffer_textf(3), tickit_renderbuffer_textf_at(3), tickit_renderbuffer_textn(3), tickit_renderbuffer_textn_at(3), tickit_renderbuffer_vtextf(3) and tickit_renderbuffer_vtextf_at(3) are aliases of tickit_renderbuffer_text(3).