ObjectivelyMVC 0.1.0
Object oriented MVC framework for OpenGL, SDL2 and GNU C
|
Selectors are comprised of one or more SelectorSequences. More...
#include <Selector.h>
Public Member Functions | |
Class * | _Selector (void) |
The Selector archetype. More... | |
Order | compareTo (const Selector *self, const Selector *other) |
Compares this Selector to other , ordering by specificity. More... | |
void | enumerateSelection (const Selector *self, View *view, ViewEnumerator enumerator, ident data) |
Selects from view and applies the given ViewEnumerator to all matched Views. More... | |
Selector * | initWithRule (Selector *self, const char *rule) |
Initializes this Selector with the given rule. More... | |
_Bool | matchesView (const Selector *self, View *view) |
Array * | parse (const char *rules) |
Parses the null-terminated C string of Selector rules into an Array of Selectors. More... | |
Array * | select (const Selector *self, View *view) |
Data Fields | |
Object | object |
The superclass. More... | |
char * | rule |
The rule, as provided by the user. More... | |
Array * | sequences |
The sequences. More... | |
int | specificity |
The specificity. More... | |
Style * | style |
The Style. More... | |
Protected Attributes | |
SelectorInterface * | interface |
The interface. More... | |
Selectors are comprised of one or more SelectorSequences.
Definition at line 49 of file Selector.h.
Class * _Selector | ( | void | ) |
The Selector archetype.
Definition at line 398 of file Selector.c.
Compares this Selector to other
, ordering by specificity.
Definition at line 149 of file Selector.c.
void enumerateSelection | ( | const Selector * | self, |
View * | view, | ||
ViewEnumerator | enumerator, | ||
ident | data | ||
) |
Selects from view
and applies the given ViewEnumerator to all matched Views.
self | The Selector. |
view | The View to select from. |
enumerator | The ViewEnumerator to apply to matched Views. |
data | User data. |
Definition at line 166 of file Selector.c.
Initializes this Selector with the given rule.
self | The Selector. |
rule | The rule. |
NULL
on error. Definition at line 188 of file Selector.c.
Array * parse | ( | const char * | rules | ) |
Parses the null-terminated C string of Selector rules into an Array of Selectors.
rules | A null-terminated C string of Selector rules. |
Definition at line 274 of file Selector.c.
|
protected |
The interface.
Definition at line 60 of file Selector.h.
Object Selector::object |
The superclass.
Definition at line 54 of file Selector.h.
char* Selector::rule |
The rule, as provided by the user.
Definition at line 70 of file Selector.h.
Array* Selector::sequences |
The sequences.
Definition at line 65 of file Selector.h.
int Selector::specificity |
The specificity.
Definition at line 76 of file Selector.h.
Style* Selector::style |
The Style.
Definition at line 82 of file Selector.h.