Orcus
Public Member Functions | List of all members
orcus::css_handler Class Reference

#include <css_parser.hpp>

Public Member Functions

void at_rule_name (const char *p, size_t n)
 
void simple_selector_type (const char *p, size_t n)
 
void simple_selector_class (const char *p, size_t n)
 
void simple_selector_pseudo_element (orcus::css::pseudo_element_t pe)
 
void simple_selector_pseudo_class (orcus::css::pseudo_class_t pc)
 
void simple_selector_id (const char *p, size_t n)
 
void end_simple_selector ()
 
void end_selector ()
 
void combinator (orcus::css::combinator_t combinator)
 
void property_name (const char *p, size_t n)
 
void value (const char *p, size_t n)
 
void rgb (uint8_t red, uint8_t green, uint8_t blue)
 
void rgba (uint8_t red, uint8_t green, uint8_t blue, double alpha)
 
void hsl (uint8_t hue, uint8_t sat, uint8_t light)
 
void hsla (uint8_t hue, uint8_t sat, uint8_t light, double alpha)
 
void url (const char *p, size_t n)
 
void begin_parse ()
 
void end_parse ()
 
void begin_block ()
 
void end_block ()
 
void begin_property ()
 
void end_property ()
 

Detailed Description

Empty handler for CSS parser. Sub-class from it and implement necessary methods.

Member Function Documentation

◆ begin_block()

void orcus::css_handler::begin_block ( )
inline

Called at the beginning of each block. An opening brace '{' marks the beginning of a block.

◆ begin_parse()

void orcus::css_handler::begin_parse ( )
inline

Called when the parsing begins.

◆ begin_property()

void orcus::css_handler::begin_property ( )
inline

Called at the beginning of each property.

◆ end_block()

void orcus::css_handler::end_block ( )
inline

Called at the end of each block. A closing brace '}' marks the end of a block.

◆ end_parse()

void orcus::css_handler::end_parse ( )
inline

Called when the parsing ends.

◆ end_property()

void orcus::css_handler::end_property ( )
inline

Called at the end of each property.

◆ hsl()

void orcus::css_handler::hsl ( uint8_t  hue,
uint8_t  sat,
uint8_t  light 
)
inline

Called at each HSL color value of a property.

Parameters
huehue
satsaturation
lightlightness

◆ hsla()

void orcus::css_handler::hsla ( uint8_t  hue,
uint8_t  sat,
uint8_t  light,
double  alpha 
)
inline

Called at each HSL color value of a property with alpha transparency value.

Parameters
huehue
satsaturation
lightlightness
alphaalpha value

◆ property_name()

void orcus::css_handler::property_name ( const char *  p,
size_t  n 
)
inline

Called at each property name.

Parameters
ppointer to the char-array containing the property name string.
nlength of the property name string.

◆ rgb()

void orcus::css_handler::rgb ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
inline

Called at each RGB color value of a property.

Parameters
redvalue of red (0-255)
greenvalue of green (0-255)
bluevalue of blue (0-255)

◆ rgba()

void orcus::css_handler::rgba ( uint8_t  red,
uint8_t  green,
uint8_t  blue,
double  alpha 
)
inline

Called at each RGB color value of a property with alpha transparency value.

Parameters
redvalue of red (0-255)
greenvalue of green (0-255)
bluevalue of blue (0-255)
alphaalpha transparency value

◆ url()

void orcus::css_handler::url ( const char *  p,
size_t  n 
)
inline

Called at each URL value of a property.

Parameters
ppointer to the char-array containing the URL value string.
nlength of the URL value string.

◆ value()

void orcus::css_handler::value ( const char *  p,
size_t  n 
)
inline

Called at each ordinary property value string.

Parameters
ppointer to the char-array containing the value string.
nlength of the value string.