2022-04-07 18:46:57 +02:00

66 lines
6.3 KiB
C++

#include "python.h"
class PyTheme : public Theme {
public:
using Theme::Theme;
};
void register_theme(py::module &m) {
py::class_<Theme, ref<Theme>, PyTheme> theme(m, "Theme", D(Theme));
theme.def(py::init<NVGcontext *>(), D(Theme, Theme))
.def_readwrite("m_font_sans_regular", &Theme::m_font_sans_regular, D(Theme, m_font_sans_regular))
.def_readwrite("m_font_sans_bold", &Theme::m_font_sans_bold, D(Theme, m_font_sans_bold))
.def_readwrite("m_font_icons", &Theme::m_font_icons, D(Theme, m_font_icons))
.def_readwrite("m_font_mono_regular", &Theme::m_font_mono_regular, D(Theme, m_font_mono_regular))
.def_readwrite("m_icon_scale", &Theme::m_icon_scale, D(Theme, m_icon_scale))
.def_readwrite("m_standard_font_size", &Theme::m_standard_font_size, D(Theme, m_standard_font_size))
.def_readwrite("m_button_font_size", &Theme::m_button_font_size, D(Theme, m_button_font_size))
.def_readwrite("m_text_box_font_size", &Theme::m_text_box_font_size, D(Theme, m_text_box_font_size))
.def_readwrite("m_window_corner_radius", &Theme::m_window_corner_radius, D(Theme, m_window_corner_radius))
.def_readwrite("m_window_header_height", &Theme::m_window_header_height, D(Theme, m_window_header_height))
.def_readwrite("m_window_drop_shadow_size", &Theme::m_window_drop_shadow_size, D(Theme, m_window_drop_shadow_size))
.def_readwrite("m_button_corner_radius", &Theme::m_button_corner_radius, D(Theme, m_button_corner_radius))
.def_readwrite("m_tab_border_width", &Theme::m_tab_border_width, D(Theme, m_tab_border_width))
.def_readwrite("m_tab_inner_margin", &Theme::m_tab_inner_margin, D(Theme, m_tab_inner_margin))
.def_readwrite("m_tab_min_button_width", &Theme::m_tab_min_button_width, D(Theme, m_tab_min_button_width))
.def_readwrite("m_tab_max_button_width", &Theme::m_tab_max_button_width, D(Theme, m_tab_max_button_width))
.def_readwrite("m_tab_control_width", &Theme::m_tab_control_width, D(Theme, m_tab_control_width))
.def_readwrite("m_tab_button_horizontal_padding", &Theme::m_tab_button_horizontal_padding, D(Theme, m_tab_button_horizontal_padding))
.def_readwrite("m_tab_button_vertical_padding", &Theme::m_tab_button_vertical_padding, D(Theme, m_tab_button_vertical_padding))
.def_readwrite("m_drop_shadow", &Theme::m_drop_shadow, D(Theme, m_drop_shadow))
.def_readwrite("m_transparent", &Theme::m_transparent, D(Theme, m_transparent))
.def_readwrite("m_border_dark", &Theme::m_border_dark, D(Theme, m_border_dark))
.def_readwrite("m_border_light", &Theme::m_border_light, D(Theme, m_border_light))
.def_readwrite("m_border_medium", &Theme::m_border_medium, D(Theme, m_border_medium))
.def_readwrite("m_text_color", &Theme::m_text_color, D(Theme, m_text_color))
.def_readwrite("m_disabled_text_color", &Theme::m_disabled_text_color, D(Theme, m_disabled_text_color))
.def_readwrite("m_text_color_shadow", &Theme::m_text_color_shadow, D(Theme, m_text_color_shadow))
.def_readwrite("m_icon_color", &Theme::m_icon_color, D(Theme, m_icon_color))
.def_readwrite("m_button_gradient_top_focused", &Theme::m_button_gradient_top_focused, D(Theme, m_button_gradient_top_focused))
.def_readwrite("m_button_gradient_bot_focused", &Theme::m_button_gradient_bot_focused, D(Theme, m_button_gradient_bot_focused))
.def_readwrite("m_button_gradient_top_unfocused", &Theme::m_button_gradient_top_unfocused, D(Theme, m_button_gradient_top_unfocused))
.def_readwrite("m_button_gradient_bot_unfocused", &Theme::m_button_gradient_bot_unfocused, D(Theme, m_button_gradient_bot_unfocused))
.def_readwrite("m_button_gradient_top_pushed", &Theme::m_button_gradient_top_pushed, D(Theme, m_button_gradient_top_pushed))
.def_readwrite("m_button_gradient_bot_pushed", &Theme::m_button_gradient_bot_pushed, D(Theme, m_button_gradient_bot_pushed))
.def_readwrite("m_window_fill_unfocused", &Theme::m_window_fill_unfocused, D(Theme, m_window_fill_unfocused))
.def_readwrite("m_window_fill_focused", &Theme::m_window_fill_focused, D(Theme, m_window_fill_focused))
.def_readwrite("m_window_title_unfocused", &Theme::m_window_title_unfocused, D(Theme, m_window_title_unfocused))
.def_readwrite("m_window_title_focused", &Theme::m_window_title_focused, D(Theme, m_window_title_focused))
.def_readwrite("m_window_header_gradient_top", &Theme::m_window_header_gradient_top, D(Theme, m_window_header_gradient_top))
.def_readwrite("m_window_header_gradient_bot", &Theme::m_window_header_gradient_bot, D(Theme, m_window_header_gradient_bot))
.def_readwrite("m_window_header_sep_top", &Theme::m_window_header_sep_top, D(Theme, m_window_header_sep_top))
.def_readwrite("m_window_header_sep_bot", &Theme::m_window_header_sep_bot, D(Theme, m_window_header_sep_bot))
.def_readwrite("m_window_popup", &Theme::m_window_popup, D(Theme, m_window_popup))
.def_readwrite("m_window_popup_transparent", &Theme::m_window_popup_transparent, D(Theme, m_window_popup_transparent))
.def_readwrite("m_check_box_icon", &Theme::m_check_box_icon, D(Theme, m_check_box_icon))
.def_readwrite("m_message_information_icon", &Theme::m_message_information_icon, D(Theme, m_message_information_icon))
.def_readwrite("m_message_question_icon", &Theme::m_message_question_icon, D(Theme, m_message_question_icon))
.def_readwrite("m_message_warning_icon", &Theme::m_message_warning_icon, D(Theme, m_message_warning_icon))
.def_readwrite("m_message_alt_button_icon", &Theme::m_message_alt_button_icon, D(Theme, m_message_alt_button_icon))
.def_readwrite("m_message_primary_button_icon", &Theme::m_message_primary_button_icon, D(Theme, m_message_primary_button_icon))
.def_readwrite("m_popup_chevron_right_icon", &Theme::m_popup_chevron_right_icon, D(Theme, m_popup_chevron_right_icon))
.def_readwrite("m_popup_chevron_left_icon", &Theme::m_popup_chevron_left_icon, D(Theme, m_popup_chevron_left_icon))
.def_readwrite("m_text_box_up_icon", &Theme::m_text_box_up_icon, D(Theme, m_text_box_up_icon))
.def_readwrite("m_text_box_down_icon", &Theme::m_text_box_down_icon, D(Theme, m_text_box_down_icon));
}