GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
gp_markup.h File Reference

A simple text markup format. More...

#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  gp_markup_glyph
 A markup glyph. More...
 
struct  gp_markup
 A text markup. More...
 

Typedefs

typedef struct gp_markup_glyph gp_markup_glyph
 A markup glyph.
 
typedef struct gp_markup gp_markup
 A text markup.
 

Enumerations

enum  gp_markup_flags {
  GP_MARKUP_BOLD = 0x01 , GP_MARKUP_LARGE = 0x02 , GP_MARKUP_MONO = 0x04 , GP_MARKUP_SUB = 0x08 ,
  GP_MARKUP_SUP = 0x10 , GP_MARKUP_UNDERLINE = 0x20 , GP_MARKUP_STRIKE = 0x40
}
 Markup format flags. More...
 
enum  gp_markup_color { GP_MARKUP_DEFAULT = 0x00 , GP_MARKUP_RED , GP_MARKUP_GREEN , GP_MARKUP_YELLOW , GP_MARKUP_BLUE , GP_MARKUP_MAGENTA , GP_MARKUP_CYAN , GP_MARKUP_GRAY , GP_MARKUP_BR_RED , GP_MARKUP_BR_GREEN , GP_MARKUP_BR_YELLOW , GP_MARKUP_BR_BLUE , GP_MARKUP_BR_MAGENTA , GP_MARKUP_BR_CYAN , GP_MARKUP_WHITE }
 A markup color. More...
 

Functions

void gp_markup_dump (gp_markup *self)
 Dumps markup into the stdout, this is just for debugging.
 

Detailed Description

A simple text markup format.

Definition in file gp_markup.h.

Typedef Documentation

◆ gp_markup

typedef struct gp_markup gp_markup

A text markup.

This represents a text with a markup.

Markups can be parsed from different formats with gp_markup_parse().

To display the text the markup needs to be dividies into lines, see gp_markup_justify().

Enumeration Type Documentation

◆ gp_markup_color

A markup color.

Default color + 16 colors.

Enumerator
GP_MARKUP_DEFAULT 

Default color

Definition at line 44 of file gp_markup.h.

◆ gp_markup_flags

Markup format flags.

These bitflags can be combined bitwise.

Enumerator
GP_MARKUP_BOLD 

Bold text

GP_MARKUP_LARGE 

Large text

GP_MARKUP_MONO 

Monospace text

GP_MARKUP_SUB 

Subscript text

GP_MARKUP_SUP 

Superscript text

GP_MARKUP_UNDERLINE 

Underlined text

GP_MARKUP_STRIKE 

Striked text

Definition at line 22 of file gp_markup.h.

Function Documentation

◆ gp_markup_dump()

void gp_markup_dump ( gp_markup self)

Dumps markup into the stdout, this is just for debugging.

Parameters
selfA markup.