Ordered token list for managing the class attribute.
More...
#include <svg.hpp>
|
|
| ClassList (std::string &value) |
| |
|
| ClassList (const std::string &value) |
| |
| bool | contains (const std::string &token) const |
| |
| ClassList & | add (const std::string &token) |
| |
| ClassList & | remove (const std::string &token) |
| |
| bool | toggle (const std::string &token) |
| |
| ClassList & | set (const std::string &class_names) |
| |
| ClassList & | clear () |
| |
| std::string | str () const |
| |
| std::vector< std::string > | tokens () const |
| |
Ordered token list for managing the class attribute.
◆ add()
| ClassList & SVG::ClassList::add |
( |
const std::string & |
token | ) |
|
|
inline |
Add a class token if it does not already exist
◆ clear()
◆ contains()
| bool SVG::ClassList::contains |
( |
const std::string & |
token | ) |
const |
|
inline |
Return true when the class token exists
◆ remove()
| ClassList & SVG::ClassList::remove |
( |
const std::string & |
token | ) |
|
|
inline |
Remove a class token if it exists
◆ set()
| ClassList & SVG::ClassList::set |
( |
const std::string & |
class_names | ) |
|
|
inline |
Replace the class attribute with a whitespace-normalized token list
◆ str()
| std::string SVG::ClassList::str |
( |
| ) |
const |
|
inline |
Return normalized class text
◆ toggle()
| bool SVG::ClassList::toggle |
( |
const std::string & |
token | ) |
|
|
inline |
Add a missing token or remove an existing token, returning true when present
◆ tokens()
| std::vector< std::string > SVG::ClassList::tokens |
( |
| ) |
const |
|
inline |
Return the current tokens in order
The documentation for this class was generated from the following file: