mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 18:46:29 +03:00
41 lines
966 B
C++
41 lines
966 B
C++
#ifndef EE_UI_CSS_STYLESHEETSELECTOR_HPP
|
|
#define EE_UI_CSS_STYLESHEETSELECTOR_HPP
|
|
|
|
#include <eepp/core.hpp>
|
|
#include <eepp/ui/css/stylesheetselectorrule.hpp>
|
|
|
|
namespace EE { namespace UI { namespace CSS {
|
|
|
|
class StyleSheetElement;
|
|
|
|
class EE_API StyleSheetSelector {
|
|
public:
|
|
StyleSheetSelector();
|
|
|
|
explicit StyleSheetSelector( const std::string& selectorName );
|
|
|
|
const std::string& getName() const;
|
|
|
|
const std::string& getPseudoClass() const;
|
|
|
|
const Uint32& getSpecificity() const;
|
|
|
|
bool matches( StyleSheetElement * element ) const;
|
|
|
|
const bool& isCacheable() const;
|
|
protected:
|
|
std::string mName;
|
|
std::string mPseudoClass;
|
|
Uint32 mSpecificity;
|
|
std::vector<StyleSheetSelectorRule> mSelectorRules;
|
|
bool mCacheable;
|
|
|
|
void addSelectorRule(std::string& buffer, StyleSheetSelectorRule::PatternMatch& curPatternMatch, const StyleSheetSelectorRule::PatternMatch & newPatternMatch );
|
|
|
|
void parseSelector( std::string selector );
|
|
};
|
|
|
|
}}}
|
|
|
|
#endif
|