From a41f0db7dd81f4c9163965d252769cab7e430feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Fri, 27 Jun 2014 19:11:57 +0200 Subject: add way for adding/removing classes --- include/llmr/style/style_layer.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/llmr/style') diff --git a/include/llmr/style/style_layer.hpp b/include/llmr/style/style_layer.hpp index fe5d3c3a6f..b45982b794 100644 --- a/include/llmr/style/style_layer.hpp +++ b/include/llmr/style/style_layer.hpp @@ -5,11 +5,13 @@ #include #include #include +#include #include #include #include #include +#include namespace llmr { @@ -33,6 +35,15 @@ public: bool isBackground() const; + // Sets the list of classes and creates transitions to the currently applied values. + void setClasses(const std::vector &class_names, timestamp now, + const ClassPropertyTransition &defaultTransition); + +private: + // Applies all properties from a class, if they haven't been applied already. + void applyClassProperties(ClassID class_id, std::set &already_applied, + timestamp now, const ClassPropertyTransition &defaultTransition); + public: // The name of this layer. const std::string id; @@ -44,6 +55,12 @@ public: // Contains all style classes that can be applied to this layer. const std::map styles; +private: + // For every property, stores a list of applied property values, with + // optional transition times. + std::map appliedStyle; + +public: // Stores the evaluated, and cascaded styling information, specific to this // layer's type. StyleProperties style; -- cgit v1.2.1