mousetrap v0.2.0
Loading...
Searching...
No Matches
mousetrap::StyleClass Class Reference

class that collects css information More...

#include <style_manager.hpp>

Public Member Functions

 StyleClass (const std::string &name)
 construct with name
 
 StyleClass (detail::StyleClassInternal *internal)
 construct from internal
 
 ~StyleClass ()
 destructor
 
 operator NativeObject () const
 expose as native object
 
std::string get_name () const
 get unique name
 
std::string serialize () const
 export as string
 
void set_property (StyleClassTarget target, const std::string &property, const std::string &value)
 set property of target
 
void set_property (const std::string &property, const std::string &value)
 set property of self
 
std::string get_property (StyleClassTarget target, const std::string &property) const
 get property of target
 
std::string get_property (const std::string &property) const
 get property of target
 

Detailed Description

class that collects css information

Constructor & Destructor Documentation

◆ StyleClass() [1/2]

mousetrap::StyleClass::StyleClass ( const std::string &  name)

construct with name

Parameters
uniquename

◆ StyleClass() [2/2]

mousetrap::StyleClass::StyleClass ( detail::StyleClassInternal *  internal)

construct from internal

Parameters
internal

Member Function Documentation

◆ get_name()

std::string mousetrap::StyleClass::get_name ( ) const

◆ get_property() [1/2]

std::string mousetrap::StyleClass::get_property ( const std::string &  property) const

get property of target

Parameters
target
propertycss property name
Returns
css property value as string, or ""

References get_property().

◆ get_property() [2/2]

std::string mousetrap::StyleClass::get_property ( StyleClassTarget  target,
const std::string &  property 
) const

get property of target

Parameters
target
propertycss property name
Returns
css property value as string, or ""

Referenced by get_property().

◆ serialize()

std::string mousetrap::StyleClass::serialize ( ) const

export as string

Returns
valid css class definition

Referenced by mousetrap::StyleManager::add_style_class().

◆ set_property() [1/2]

void mousetrap::StyleClass::set_property ( const std::string &  property,
const std::string &  value 
)

set property of self

Parameters
propertycss property name
valuecss property value

References set_property().

◆ set_property() [2/2]

void mousetrap::StyleClass::set_property ( StyleClassTarget  target,
const std::string &  property,
const std::string &  value 
)

set property of target

Parameters
target
propertycss property name
valuecss property value

Referenced by set_property().


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