ObjectivelyMVC 0.1.0
Object oriented MVC framework for OpenGL, SDL2 and GNU C
|
#include <Style.h>
Public Member Functions | |
Class * | _Style (void) |
The Style archetype. More... | |
void | addAttribute (Style *self, const char *attr, ident value) |
Adds or replaces the given attribute with value . More... | |
void | addAttributes (Style *self, const Dictionary *attributes) |
Adds or replaces the attribtues in attributes to this Style. More... | |
void | addBoolAttribute (Style *self, const char *attr, _Bool value) |
Adds or replaces the given attribute with value . More... | |
void | addCharactersAttribute (Style *self, const char *attr, const char *value) |
Adds or replaces the given attribute with value . More... | |
void | addColorAttribute (Style *self, const char *attr, const SDL_Color *value) |
Adds or replaces the given attribute with value . More... | |
void | addDoubleAttribute (Style *self, const char *attr, double value) |
Adds or replaces the given attribute with value . More... | |
void | addEnumAttribute (Style *self, const char *attr, const EnumName *names, int value) |
Adds or replaces the given attribute with value . More... | |
void | addFloatAttribute (Style *self, const char *attr, float value) |
Adds or replaces the given attribute with value . More... | |
void | addIntegerAttribute (Style *self, const char *attr, int value) |
Adds or replaces the given attribute with value . More... | |
void | addPointAttribute (Style *self, const char *attr, const SDL_Point *value) |
Adds or replaces the given attribute with value . More... | |
void | addRectangleAttribute (Style *self, const char *attr, const SDL_Rect *value) |
Adds or replaces the given attribute with value . More... | |
void | addSelector (Style *self, Selector *selector) |
Adds the given Selector to this Style. More... | |
void | addSizeAttribute (Style *self, const char *attr, const SDL_Size *value) |
Adds or replaces the given attribute with value . More... | |
ident | attributeValue (const Style *self, const char *attr) |
Style * | initWithAttributes (Style *self, const Dictionary *attributes) |
Initializes this Style with the given attributes. More... | |
Style * | initWithRules (Style *self, const char *rules) |
Initializes this Style with the given CSS selector rules. More... | |
_Bool | isComputedEqual (const Style *self, const Style *other) |
Performs a fast, rule-based comparison of this Style to the given Style. More... | |
Array * | parse (const char *css) |
Parses the null-terminated C string of CSS definitions into an Array of Styles. More... | |
void | removeAllAttributes (Style *self) |
Removes all attributes from this Style. More... | |
void | removeAttribute (Style *self, const char *attr) |
Removes the attribute with the given name. More... | |
Data Fields | |
Dictionary * | attributes |
Object | object |
The superclass. More... | |
Array * | selectors |
The Selectors. More... | |
Protected Attributes | |
StyleInterface * | interface |
The interface. More... | |
Class * _Style | ( | void | ) |
The Style archetype.
Definition at line 537 of file Style.c.
void addAttribute | ( | Style * | self, |
const char * | attr, | ||
ident | value | ||
) |
Adds or replaces the given attribute with value
.
self | The Style. |
attr | The attribute name. |
value | The attribute value. |
value
must be an Object and not a primitive. Definition at line 102 of file Style.c.
void addAttributes | ( | Style * | self, |
const Dictionary * | attributes | ||
) |
Adds or replaces the attribtues in attributes
to this Style.
self | The Style. |
attributes | The attributes. |
void addBoolAttribute | ( | Style * | self, |
const char * | attr, | ||
_Bool | value | ||
) |
Adds or replaces the given attribute with value
.
self | The Style. |
attr | The attribute name. |
value | The attribute value. |
Definition at line 130 of file Style.c.
void addCharactersAttribute | ( | Style * | self, |
const char * | attr, | ||
const char * | value | ||
) |
void addColorAttribute | ( | Style * | self, |
const char * | attr, | ||
const SDL_Color * | value | ||
) |
Adds or replaces the given attribute with value
.
self | The Style. |
attr | The attribute name. |
value | The attribute value. |
Definition at line 151 of file Style.c.
void addDoubleAttribute | ( | Style * | self, |
const char * | attr, | ||
double | value | ||
) |
Adds or replaces the given attribute with value
.
self | The Style. |
attr | The attribute name. |
value | The attribute value. |
Definition at line 173 of file Style.c.
void addEnumAttribute | ( | Style * | self, |
const char * | attr, | ||
const EnumName * | names, | ||
int | value | ||
) |
Adds or replaces the given attribute with value
.
self | The Style. |
attr | The attribute name. |
names | The EnumNames from which to derrive the attribute value. |
value | The attribute value. |
Definition at line 186 of file Style.c.
void addFloatAttribute | ( | Style * | self, |
const char * | attr, | ||
float | value | ||
) |
Adds or replaces the given attribute with value
.
self | The Style. |
attr | The attribute name. |
value | The attribute value. |
Definition at line 199 of file Style.c.
void addIntegerAttribute | ( | Style * | self, |
const char * | attr, | ||
int | value | ||
) |
Adds or replaces the given attribute with value
.
self | The Style. |
attr | The attribute name. |
value | The attribute value. |
void addPointAttribute | ( | Style * | self, |
const char * | attr, | ||
const SDL_Point * | value | ||
) |
Adds or replaces the given attribute with value
.
self | The Style. |
attr | The attribute name. |
value | The attribute value. |
Definition at line 215 of file Style.c.
void addRectangleAttribute | ( | Style * | self, |
const char * | attr, | ||
const SDL_Rect * | value | ||
) |
Adds or replaces the given attribute with value
.
self | The Style. |
attr | The attribute name. |
value | The attribute value. |
Definition at line 233 of file Style.c.
Adds or replaces the given attribute with value
.
self | The Style. |
attr | The attribute name. |
value | The attribute value. |
Definition at line 266 of file Style.c.
ident attributeValue | ( | const Style * | self, |
const char * | attr | ||
) |
self | The Style. |
attr | The attribute name. |
Initializes this Style with the given attributes.
self | The Style. |
attributes | The attributes. |
NULL
on error. Definition at line 292 of file Style.c.
Initializes this Style with the given CSS selector rules.
NULL
on error. Definition at line 308 of file Style.c.
Performs a fast, rule-based comparison of this Style to the given Style.
isEqual
. Definition at line 331 of file Style.c.
Array * parse | ( | const char * | css | ) |
Parses the null-terminated C string of CSS definitions into an Array of Styles.
css | The CSS definitions. |
Definition at line 274 of file Selector.c.
void removeAllAttributes | ( | Style * | self | ) |
void removeAttribute | ( | Style * | self, |
const char * | attr | ||
) |
Removes the attribute with the given name.
self | The Style. |
attr | The attribute name. |