bWidgets
Core widget toolkit designed for Blender
bwWidgetBaseStyle.h
Go to the documentation of this file.
1#pragma once
2
3#include "bwColor.h"
4
5namespace bWidgets {
6
7enum class TextAlignment;
8class bwStyleProperties;
9
15 public:
17
18 void registerProperties(bwStyleProperties& style_properties);
19
20 auto backgroundColor() const -> const bwColor&;
21 auto textColor() const -> const bwColor&;
22 auto borderColor() const -> const bwColor&;
23 auto decorationColor() const -> const bwColor&;
24 auto shadeTop() const -> float;
25 auto shadeBottom() const -> float;
26
27 auto isBorderVisible() const -> bool;
28
33
34 int shade_top{0};
36 0}; // TODO could make this a char - or support gradient for background_color even.
37 enum TextAlignment text_alignment; // Default value set in constructor.
38 unsigned int roundbox_corners; // Default value set in constructor.
40 0.0f}; // TODO Utility function for calculating final radius (roundbox_radius * dpi_fac).
41};
42
43} // namespace bWidgets
Definition: bwColor.h:5
Manage a list of properties (bwStyleProperty instances).
Definition: bwStyleProperties.h:77
Properties for typical widgets with roundbox corners.
Definition: bwWidgetBaseStyle.h:14
bwColor border_color
Definition: bwWidgetBaseStyle.h:31
float corner_radius
Definition: bwWidgetBaseStyle.h:39
bwWidgetBaseStyle()
Definition: bwWidgetBaseStyle.cc:10
bwColor decoration_color
Definition: bwWidgetBaseStyle.h:32
enum TextAlignment text_alignment
Definition: bwWidgetBaseStyle.h:37
unsigned int roundbox_corners
Definition: bwWidgetBaseStyle.h:38
auto textColor() const -> const bwColor &
Definition: bwWidgetBaseStyle.cc:37
int shade_bottom
Definition: bwWidgetBaseStyle.h:35
auto backgroundColor() const -> const bwColor &
Definition: bwWidgetBaseStyle.cc:32
int shade_top
Definition: bwWidgetBaseStyle.h:34
void registerProperties(bwStyleProperties &style_properties)
Definition: bwWidgetBaseStyle.cc:19
auto decorationColor() const -> const bwColor &
Definition: bwWidgetBaseStyle.cc:47
auto borderColor() const -> const bwColor &
Definition: bwWidgetBaseStyle.cc:42
auto shadeBottom() const -> float
Definition: bwWidgetBaseStyle.cc:57
bwColor text_color
Definition: bwWidgetBaseStyle.h:30
auto isBorderVisible() const -> bool
Definition: bwWidgetBaseStyle.cc:62
bwColor background_color
Definition: bwWidgetBaseStyle.h:29
auto shadeTop() const -> float
Definition: bwWidgetBaseStyle.cc:52
Definition: bwContext.h:3
TextAlignment
Definition: bwPainter.h:27