dillo  3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
  Fossies Dox: dillo-3.0.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

CssSimpleSelector Class Reference

#include <css.hh>

Collaboration diagram for CssSimpleSelector:
[legend]

Public Types

enum  { ELEMENT_NONE = -1, ELEMENT_ANY = -2 }
 
enum  SelectType { SELECT_NONE, SELECT_CLASS, SELECT_PSEUDO_CLASS, SELECT_ID }
 

Public Member Functions

 CssSimpleSelector ()
 
 ~CssSimpleSelector ()
 
void setElement (int e)
 
void setSelect (SelectType t, const char *v)
 
lout::misc::SimpleVector< char * > * getClass ()
 
const char * getPseudoClass ()
 
const char * getId ()
 
int getElement ()
 
bool match (const DoctreeNode *node)
 Return whether simple selector matches at a given node of the document tree. More...
 
int specificity ()
 Return the specificity of the simple selector. More...
 
void print ()
 

Private Attributes

int element
 
char * pseudo
 
char * id
 
lout::misc::SimpleVector< char * > klass
 

Detailed Description

Definition at line 336 of file css.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ELEMENT_NONE 
ELEMENT_ANY 

Definition at line 343 of file css.hh.

◆ SelectType

Enumerator
SELECT_NONE 
SELECT_CLASS 
SELECT_PSEUDO_CLASS 
SELECT_ID 

Definition at line 348 of file css.hh.

Constructor & Destructor Documentation

◆ CssSimpleSelector()

CssSimpleSelector::CssSimpleSelector ( )

Definition at line 231 of file css.cc.

References element, ELEMENT_ANY, and pseudo.

◆ ~CssSimpleSelector()

CssSimpleSelector::~CssSimpleSelector ( )

Member Function Documentation

◆ getClass()

lout::misc::SimpleVector<char *>* CssSimpleSelector::getClass ( )
inline

Definition at line 359 of file css.hh.

References klass.

Referenced by CssStyleSheet::addRule().

◆ getElement()

int CssSimpleSelector::getElement ( )
inline

Definition at line 362 of file css.hh.

References element.

Referenced by CssStyleSheet::addRule().

◆ getId()

const char* CssSimpleSelector::getId ( )
inline

Definition at line 361 of file css.hh.

References id.

Referenced by CssStyleSheet::addRule().

◆ getPseudoClass()

const char* CssSimpleSelector::getPseudoClass ( )
inline

Definition at line 360 of file css.hh.

References pseudo.

Referenced by CssParser::parseSimpleSelector().

◆ match()

bool CssSimpleSelector::match ( const DoctreeNode node)

Return whether simple selector matches at a given node of the document tree.

Definition at line 267 of file css.cc.

References dStrAsciiCasecmp(), DoctreeNode::element, element, ELEMENT_ANY, lout::misc::SimpleVector< T >::get(), DoctreeNode::id, DoctreeNode::klass, klass, DoctreeNode::pseudo, pseudo, and lout::misc::SimpleVector< T >::size().

Referenced by CssSelector::match().

◆ print()

void CssSimpleSelector::print ( )

◆ setElement()

void CssSimpleSelector::setElement ( int  e)
inline

Definition at line 357 of file css.hh.

References element.

Referenced by CssParser::parseSimpleSelector().

◆ setSelect()

◆ specificity()

int CssSimpleSelector::specificity ( )

Return the specificity of the simple selector.

The result is used in CssSelector::specificity ().

Definition at line 298 of file css.cc.

References element, ELEMENT_ANY, klass, pseudo, and lout::misc::SimpleVector< T >::size().

Member Data Documentation

◆ element

int CssSimpleSelector::element
private

◆ id

char * CssSimpleSelector::id
private

Definition at line 339 of file css.hh.

Referenced by getId(), and CssParser::parseSimpleSelector().

◆ klass

lout::misc::SimpleVector<char *> CssSimpleSelector::klass
private

◆ pseudo

char* CssSimpleSelector::pseudo
private

The documentation for this class was generated from the following files: