forked from aseprite/aseprite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompound_style.h
More file actions
43 lines (31 loc) · 857 Bytes
/
compound_style.h
File metadata and controls
43 lines (31 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Aseprite CSS Library
// Copyright (C) 2013 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef CSS_COMPOUND_STYLE_H_INCLUDED
#define CSS_COMPOUND_STYLE_H_INCLUDED
#pragma once
#include "css/query.h"
#include "css/rule.h"
#include "css/state.h"
#include "css/stateful_style.h"
namespace css {
class Sheet;
class CompoundStyle {
public:
CompoundStyle(Sheet* sheet, const std::string& name);
~CompoundStyle();
void update();
const Value& operator[](const Rule& rule) const;
const Query& operator[](const States& states) const;
private:
typedef std::map<States, Query*> QueriesMap;
void deleteQueries();
Sheet* m_sheet;
std::string m_name;
Query m_normal;
mutable QueriesMap m_queries;
};
} // namespace css
#endif