ImFusion SDK 4.3
StyleSheet Class Reference

#include <AnatomyPlugin/include/ImFusion/AnatomyPlugin/StyleSheet.h>

Class for managing a logically grouped set of style rules. More...

+ Inheritance diagram for StyleSheet:

Detailed Description

Class for managing a logically grouped set of style rules.

Holds a list of style rules together with a boolean enabled attribute and a name.

Classes

class  StyleRule
 Single "style" entry consisting of a selector (that matches a subset of objects) and a set of property-value pairs (a Properties instance declaration) This is the fundamental build block of styling in the anatomy plugin. More...
 

Public Member Functions

 StyleSheet (const std::string &name="")
 Constructor that creates a single (empty) Style sheet.
 
void appendOrModify (const Selector &sel, const std::function< void(Properties &)> &f)
 
void appendOrModify (const SelectorElem &sel, const std::function< void(Properties &)> &f)
 
bool appendOrModify (const std::optional< Selector > &sel, const std::function< void(Properties &)> &f)
 
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
 
const SubPropertyList< StyleRule > & styleRules () const
 
- Public Member Functions inherited from Configurable
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
 
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Public Attributes

Parameter< bool > p_enabled = {"enabled", true, this}
 
Parameter< std::stringp_name = {"name", "", this}
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Protected Attributes

SubPropertyList< StyleRulep_styleRules {"styleRules", {}, this}
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ configure()

void configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from Configurable.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close