|
psychic-ui 0.0.0
|
Public Member Functions | |
| bool | matches (const Div *component) const |
| bool | direct () const |
| int | depth () const |
| const std::string & | tag () const |
| const std::string & | id () const |
| const std::vector< std::string > & | classes () const |
| const std::unordered_set< Pseudo > & | pseudo () const |
| const StyleSelector * | next () const |
| int | weight () const |
Static Public Member Functions | |
| static std::unique_ptr< StyleSelector > | fromSelector (const std::string &selector) |
Protected Member Functions | |
| bool | matches (const Div *component, bool expand) const |
Protected Attributes | |
| bool | _direct {false} |
| int | _depth {0} |
| std::string | _tag {} |
| std::string | _id {} |
| std::vector< std::string > | _classes {} |
| std::unordered_set< Pseudo > | _pseudo {} |
| std::unique_ptr< StyleSelector > | _next {nullptr} |
|
protected |
Internal match method This method allows expanding the search to the parent, it is hidden as we don't want the end user calling it directly as the first level of matching must not expand since we optimized by retrieving the parent's computed style instead of walking back up the hierarchy for every possible style declaration. We assume that the parent is current.
| component | |
| expand | bool - Expand the search to the parent |
| int psychic_ui::StyleSelector::weight | ( | ) | const |
Computes the selector's weight This is used when trying to figure out selectors priority