lecui 1.0.0-alpha.20
lecui C++ user interface library
appearance.h
1//
2// appearance.h - appearance interface
3//
4// lecui user interface library, part of the liblec library
5// Copyright (c) 2019 Alec Musasa (alecmus at live dot com)
6//
7// Released under the MIT license. For full details see the
8// file LICENSE.txt
9//
10
11#pragma once
12
13#if defined(LECUI_EXPORTS)
14#include "form.h"
15#else
16#include <liblec/lecui/form.h>
17#endif
18
19namespace liblec {
20 namespace lecui {
22 enum class themes {
23 light,
24 dark,
25 };
26
29 enum class element {
30 form,
31 titlebar,
32 accent,
34 disabled,
35
36 scrollbar,
40
41
42 label,
47
48 button,
52
53 checkbox,
58
62
66
74
85
86 toggle,
87 toggle_on,
90
91 tree_view,
95
96 tab_pane,
100
101 pane,
103
104 image_view,
108
109 rectangle,
114
115 group,
117
118 slider,
125
133
134 combobox,
144
145 line,
146 line_hover,
148
149 icon,
151 icon_hot,
152 icon_text,
154
157
158 badge,
160 badge_text,
161 };
162
164 class lecui_api defaults {
165 public:
171 };
172
174 class lecui_api appearance {
175 public:
179
182
189
192 [[nodiscard]]
194
202 const lecui::color& color_hot,
203 const lecui::color& color_disabled,
204 const lecui::color& color_text);
205
208 bool& shadow();
209
212 bool get_shadow() const;
213
218 appearance& shadow(const bool& enable);
219
223
227
232
236
240
245
248 int& main_icon();
249
252 int get_main_icon() const;
253
257 appearance& main_icon(const int& main_icon);
258
261 int& mini_icon();
262
265 int get_mini_icon() const;
266
270 appearance& mini_icon(const int& mini_icon);
271
275
278 int get_caption_icon() const;
279
283 appearance& caption_icon(const int& caption_icon);
284
285 private:
286 class impl;
287 impl& _d;
288
289 // Default constructor and copying an object of this class are not allowed
290 appearance() = delete;
291 appearance(const appearance&) = delete;
292 appearance& operator=(const appearance&) = delete;
293 };
294 }
295}
Manipulate the form's appearance.
Definition: appearance.h:174
int & main_icon()
Get or set the ID of the main icon resource.
lecui::color & title_bar()
Get or set the background color of the title bar.
appearance & mini_icon(const int &mini_icon)
Set the ID of the small .ico resource.
int get_mini_icon() const
Get the ID of the small icon resource.
appearance & shadow(const bool &enable)
Set the form shadow property.
int & mini_icon()
Get or set the ID of the small icon resource.
appearance & theme(const lecui::color &color, const lecui::color &color_hot, const lecui::color &color_disabled, const lecui::color &color_text)
Set the theme color.
lecui::color & background()
Get or set the form's background color.
int get_main_icon() const
Get the ID of the main icon resource.
int get_caption_icon() const
Get the ID of the caption icon resource.
appearance & background(const lecui::color &color)
Set the form's background colors.
themes theme()
Get the preset theme.
lecui::color get_background() const
Get or the form's background color.
~appearance()
Class destructor.
int & caption_icon()
Get or set the ID of the caption icon resource.
appearance & theme(themes theme)
Set a preset theme.
lecui::color title_bar() const
Get the background color of the title bar.
appearance & title_bar(const lecui::color &color)
Set the background color of the titlebar.
bool get_shadow() const
Get the status of the form shadow.
appearance & main_icon(const int &main_icon)
Set the ID of the main .ico resource.
appearance(form &fm)
Class constructor.
bool & shadow()
Set or get the form shadow property.
appearance & caption_icon(const int &caption_icon)
Set the ID of the caption icon resource.
RGBA color on a standard 0 to 255 scale. For the alpha channel 0 is transparent and 255 is opaque.
Definition: lecui.h:583
lecui defaults class.
Definition: appearance.h:164
static lecui::color color(themes theme, element element)
Get default lecui color.
Form base class. The user must inherit from this class and call one of the two constructors from its ...
Definition: form.h:122
element
The element to color.
Definition: appearance.h:29
@ html_editor_selected
The border color of a selected html editor.
@ disabled
The color of disabled controls.
@ toggle_off
The background color of toggles when they're off.
@ tree_view_selected
The border color of a selected tree view.
@ button_selected
The border color of selected buttons.
@ progress_bar_unfilled
The color of the un-filled portion of the progress bar.
@ slider_tick
The color of a slider's tick lines.
@ tab_pane
The background color of tab panes.
@ slider
The background color of a slider.
@ tree_view_hover
The background color of tree view labels when the mouse is hovered over them.
@ tab_pane_border
The border color of tab panes.
@ slider_knob
The color of a slider's knob.
@ combobox_selected
The border color of a selected combobox.
@ pane_border
The border color of panes.
@ combobox_dropdown_arrow
The line color of the combobox dropdown arrow.
@ image_view_selected
The border color of a selected image view.
@ toggle_on
The background color of toggles when they're on.
@ table_view_row_hover
The color of a row when the mouse hovers over it.
@ combobox_dropdown_arrow_hot
The line color of the combobox dropdown when the mouse is hovered over it.
@ html_editor
The background color of html editors.
@ slider_border
The border color of a slider.
@ checkbox_tick
The color of checkbox ticks.
@ button_border
The color of button borders.
@ combobox_caret
The color of the cared in editable comboboxes.
@ scrollbar_hover
The fill color of scrollbars when the mouse hovers over them.
@ checkbox_border
The color of checkbox borders.
@ icon_border
The color of icon borders.
@ label_selected
The background color of selected labels.
@ table_view_text_header_hot
The color of table view header text when the mouse is hovered over it.
@ tab_pane_tabs
The background color of tabs.
@ image_view
The background color of image views.
@ toggle
The color of the toggle circle.
@ html_control_border
The border color of the html editor control pane.
@ image_view_border
The border color of image views.
@ html_control
The background color of the html editor control pane.
@ slider_selected
The border color of a slider's knob when the slider is selected.
@ text_field_border
The color of text field borders.
@ icon_description_text
The color of icon description text.
@ group_border
The border color of groups.
@ table_view_grid
The line color of table view grids.
@ table_view
The background color of table view odd rows.
@ combobox_dropdown_hot
The background color of a combobox dropdown when the mouse is hovered over it.
@ text_field_disabled
The color of a disabled text field.
@ text_field_prompt
The color of prompt text in a text field.
@ line
The color of lines.
@ strength_bar
The background color of strength bars.
@ badge_text
The color of badge text.
@ accent
The accent color.
@ tab_pane_selected_tab
The color of the bar that indicates the selected tab.
@ rectangle_border
The border color of rectangles.
@ combobox_editable
The background color of editable comboboxes.
@ text_field_selected
The border color of a selected text field.
@ table_view_text_selected
The border color of a selected table view.
@ line_selected
The color of a selected line.
@ combobox_border
The border color of comboboxes.
@ icon_hot
The background color of icons when the mouse is hovered over them.
@ label_disabled
The color of disabled labels (text color).
@ html_editor_caret
The color of the caret in the html editor.
@ scrollbar_border
The color of scrollbar borders.
@ label_pressed
The background color of labels when they are pressed.
@ text_field_input_error
The border color of a text field when an invalid input is detected.
@ scrollbar_pressed
The fill color of scrollbars when they are pressed.
@ combobox_dropdown
The background color of a combobox dropdown.
@ progress_bar_border
The color of progress bar borders.
@ progress_indicator_unfilled
The line color of the un-filled portion of progress indicators.
@ titlebar
The fill color of the form's title bar.
@ progress_indicator_text
The color of progress indicator text.
@ html_editor_disabled
The background color of disabled html editors.
@ table_view_header
The background color of table view headers.
@ checkbox
The fill color of checkboxes.
@ text_field_caret
The color of a text field caret.
@ line_hover
The color of lines when the mouse is hovered over them.
@ combobox
The background color of non-editable comboboxes.
@ slider_knob_border
The border color of a slider's knob.
@ table_view_text_header
The color of table view header text.
@ checkbox_hover
The fill color of checkboxes when the mouse hovers over them.
@ strength_bar_border
The border color of strength bars.
@ badge_border
The border color of badges.
@ icon
The background color of icons.
@ toggle_selected
The background color of toggle labels when the toggle is selected.
@ scrollbar
The fill color of scrollbars.
@ pane
The background color of panes.
@ checkbox_selected
The border color of selected checkboxes.
@ rectangle_border_hot
The border color of rectangles when the mouse is hovered over them.
@ button
The fill color of buttons.
@ label
The color of labels (text color).
@ label_hover
The background color of labels when the mouse hovers over them.
@ slider_knob_hot
The color of a slider's knob when the mouse is hovered over it.
@ html_editor_border
The border color of html editors.
@ rectangle
The background color of rectangles.
@ group
The background color of groups.
@ badge
The background color of badges.
@ table_view_alternate
The alternate color of table view even rows.
@ rectangle_selected
The border color of a selected rectangle.
@ button_hover
The color of buttons when the mouse hovers over them.
@ table_view_border
The color of a table view borders.
@ combobox_hover
The background color of comboboxes when the mouse is hovered over them.
@ accent_hover
The accent color on hover.
@ text_field
The fill color of text fields.
@ image_view_hover
The border color of image views when the mouse is hovered over them.
@ progress_bar
The color of the filled portion progress bars.
@ table_view_row_selected
The background color of a selected table view row.
@ tree_view_border
The color of tree view borders.
@ rectangle_hover
The background color of rectangles when the mouse is hovered over them.
@ icon_text
The color of icon main text.
@ tree_view
The background color of tree views.
@ progress_indicator
The line color of the filled portion of progress indicators (including the dot).
themes
Themes that are implemented within the library.
Definition: appearance.h:22
@ light
The default theme. Best in bright environments.
@ dark
Easier on the eyes in darker environments.
Top level namespace for the liblec libraries.
Definition: appearance.h:19