bWidgets
Core widget toolkit designed for Blender
bwStyle.h
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <string>
5
6namespace bWidgets {
7
8class bwWidget;
9
10class bwStyle {
11 public:
12 enum class TypeID {
13 CLASSIC,
14 CLASSIC_CSS,
15 FLAT_GREY,
16 FLAT_DARK,
17 FLAT_LIGHT,
18
19 BUILTIN_TOT,
20
21 // STYLE_CUSTOM, // For the future
22 };
23
24 struct StyleType {
26 std::string name;
27 };
28
29 virtual ~bwStyle() = default;
30
31 virtual void setWidgetStyle(bwWidget& widget) = 0;
32 virtual void polish(bwWidget&);
33
34 static unsigned int s_default_widget_size_hint;
35
37 float dpi_fac{1.0f};
38
39 protected:
41};
42
43} // namespace bWidgets
Definition: bwStyle.h:10
bwStyle(TypeID type_id)
Definition: bwStyle.cc:9
virtual void polish(bwWidget &)
Definition: bwStyle.cc:13
float dpi_fac
Definition: bwStyle.h:37
virtual ~bwStyle()=default
TypeID type_id
Definition: bwStyle.h:36
virtual void setWidgetStyle(bwWidget &widget)=0
static unsigned int s_default_widget_size_hint
Definition: bwStyle.h:34
TypeID
Definition: bwStyle.h:12
Abstract base class that all widgets derive from.
Definition: bwWidget.h:22
Definition: bwContext.h:3
Definition: bwStyle.h:24
TypeID type_id
Definition: bwStyle.h:25
std::string name
Definition: bwStyle.h:26