13#if defined(LECUI_EXPORTS)
14#include "../widgets/widget.h"
16#include <liblec/lecui/widgets/widget.h>
21 namespace containers {
22#if defined(LECUI_EXPORTS)
23 class tab_pane_builder;
47 float _corner_radius_x = 5.f;
48 float _corner_radius_y = 5.f;
49 side _tab_side = side::top;
50 std::vector<std::string> _caption_reserve;
51 orientation _caption_orientation = orientation::horizontal;
53 color _color_tabs_border;
54 float _tabs_border = .5f;
55 std::string _selected;
58#if defined(LECUI_EXPORTS)
59 friend class tab_pane_builder;
60 friend class tab_builder;
83 std::string&
text()
override;
416 tab& operator=(
const tab&) =
delete;
418 friend class tab_builder;
424#if defined(lecui_helper)
426#define get_tab_pane(path) liblec::lecui::containers::tab_pane::get(*this, path)
429#define get_tab(path) liblec::lecui::containers::tab::get(*this, path)
RGBA color on a standard 0 to 255 scale. For the alpha channel 0 is transparent and 255 is opaque.
Definition: lecui.h:583
Page container.
Definition: page.h:32
Tab pane. To instantiate and add to a container use the add static method.
Definition: tab_pane.h:28
tab_pane & color_tabs(const color &color_tabs)
Set the fill color of the tabs.
color & color_fill() override
Get or set the fill color of the widget.
std::string & selected()
Get or set the selected tab.
color & color_text() override
Get or set the color of the widget's text.
float & font_size() override
Get or set the default widget font size in points, e.g. 9.0f.
tab_pane & corner_radius_y(const float &corner_radius_y)
Set the vertical radius of the corners.
tab_pane & caption_reserve(const std::vector< std::string > &caption_reserve)
Set the caption reserve property.
tab_pane & color_selected(const color &color_selected)
Set the widget's color when selected.
color & color_hot() override
Get or set the widget's color when the mouse is hovered over it.
tab_pane & color_disabled(const color &color_disabled)
Set the widget's color when it is disabled.
tab_pane & caption_orientation(const orientation &caption_orientation)
Set the orientation of the caption text.
tab_pane & color_tabs_border(const color &color_tabs_border)
Set the color of the tab borders.
float & border()
Get or set the thickness of the border.
tab_pane & tab_side(const side &tab_side)
Set the side on which to place the tab.
float & corner_radius_y()
Get or set the vertical radius of the corners.
bool operator==(const tab_pane ¶m)
Check whether tab pane specs are equal. Only those properties that require the widget resources to be...
std::string & text() override
Get or set the widget text.
tab_pane & rect(const lecui::rect &rect)
Set the position and dimensions of the widget.
float & corner_radius_x()
Get or set the horizontal radius of the corners.
lecui::rect & rect() override
Get or set the position and dimensions of the widget.
tab_pane & text(const std::string &text)
Set the widget's text.
orientation
Orientation of tab captions.
Definition: tab_pane.h:39
tab_pane & font_size(const float &font_size)
Set the widget's font size.
tab_pane & border(const float &border)
Set the thickness of the border.
tab_pane & cursor(const cursor_type cursor)
Set the mouse cursor to use when over the widget.
tab_pane & corner_radius_x(const float &corner_radius_x)
Set the horizontal radius of the corners.
orientation & caption_orientation()
Get or set the orientation of the caption text.
color & color_tabs()
Get or set the fill color of the tabs.
static tab_pane & add(containers::page &page, const std::string &alias=std::string(), const float &content_margin=10.f)
Make a tab pane.
tab_pane & tabs_border(const float &tabs_border)
Set the thickness of the tab borders.
std::vector< std::string > & caption_reserve()
Get or set the caption reserve property.
tab_pane()
Class constructor.
Definition: tab_pane.h:64
color & color_selected() override
Get or set the widget's color when selected.
tab_pane & tooltip(const std::string &tooltip)
Set the tooltip text.
cursor_type & cursor() override
Get or set the mouse cursor to use then over the widget.
color & color_border()
Get or set the color of the border.
tab_pane & color_text(const color &color_text)
Set the color of the widget's text.
color & color_disabled() override
Get or set the widget's color when it is disabled.
side & tab_side()
Get or set the side on which to place the tab.
static tab_pane & get(form &fm, const std::string &path)
Get the specifications of a pane.
tab_pane & font(const std::string &font)
Set the default widget font.
tab_pane & selected(const std::string &selected)
Set the selected tab.
tab_pane & on_resize(const resize_params &on_resize)
Set the behaviour of the widget when its container is resized.
resize_params & on_resize() override
Get or set the behaviour of the widget when its container is resized.
color & color_tabs_border()
Get or set the color of the tab borders.
std::string & font() override
Get or set the default widget font, e.g. "Georgia".
bool operator!=(const tab_pane ¶m)
Check whether tab pane specs are NOT equal. Only those properties that require the widget resources t...
side
The side to place the tabs on.
Definition: tab_pane.h:31
float & tabs_border()
Get or set the thickness of the tab borders.
std::string & tooltip() override
Get or set the widget's tooltip text.
tab_pane & color_hot(const color &color_hot)
Set the widget's color when the mouse is hovered over it.
tab_pane & color_fill(const color &color_fill)
Set the fill color of the widget.
tab_pane & color_border(const color &color_border)
Set the color of the border.
Tab container. To instantiate and add to a tab pane use the add static method.
Definition: tab_pane.h:353
static tab & get(form &fm, const std::string &path)
Get the tab container page of an existing tab.
const lecui::size size()
Get the size of the tab's page.
bool operator==(const tab ¶m)
Check whether two tabs are equal. Only those properties that require the widget resources to be re-cr...
tab(form &fm, const std::string &tab_name)
Class constructor.
widgets::badge_specs & badge() override
Get or set the badge specs.
tab & badge(const widgets::badge_specs &badge)
Set the badge specs.
bool operator!=(const tab ¶m)
Check whether two tabs are NOT equal. Only those properties that require the widget resources to be r...
static tab & add(containers::tab_pane &tp, const std::string &tab_name)
Create a pane.
Rectangle class.
Definition: lecui.h:158
Resize parameters.
Definition: lecui.h:363
Size of a rectangular structure.
Definition: lecui.h:117
@ right
Align text to the right.
@ left
Align text to the left edge.
@ bottom
Align paragraph to the bottom.
@ top
Align paragraph to the top.
Top level namespace for the liblec libraries.
Definition: appearance.h:19