GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Functions
gp_widget_markup.h File Reference

A text markup widget. More...

#include <utils/gp_markup.h>
#include <utils/gp_markup_parser.h>
#include <utils/gp_markup_justify.h>

Go to the source code of this file.

Functions

gp_widgetgp_widget_markup_new (const char *markup, enum gp_markup_fmt fmt, int flags)
 Allocates and initializes a markup widget.
 
int gp_widget_markup_set (gp_widget *self, enum gp_markup_fmt fmt, int flags, const char *markup_str)
 Sets new markup string.
 

Detailed Description

A text markup widget.

Markup widget JSON attributes

Attribute Type Default Description
fmt string "gfxprim" A markup format enum gp_markup_fmt.
text string Markup text.

Definition in file gp_widget_markup.h.

Function Documentation

◆ gp_widget_markup_new()

gp_widget * gp_widget_markup_new ( const char *  markup,
enum gp_markup_fmt  fmt,
int  flags 
)

Allocates and initializes a markup widget.

Parameters
markupA markup string.
fmtA markup format.
flagsMarkup parser flags, depends on the markup format.
Returns
A markup widget.

◆ gp_widget_markup_set()

int gp_widget_markup_set ( gp_widget self,
enum gp_markup_fmt  fmt,
int  flags,
const char *  markup_str 
)

Sets new markup string.

Parameters
selfA markup widget.
fmtA markup format.
flagsMarkup parser flags, depends on the markup format.
markup_strNew markup string.
Returns
Zero on success non-zero on a failure.