lecui 1.0.0-alpha.20
lecui C++ user interface library
Static Public Member Functions | List of all members
liblec::lecui::widgets::html_view Class Reference

HTML view widget. To instantiate and add to a container use the add static method. More...

#include <html_view.h>

Inheritance diagram for liblec::lecui::widgets::html_view:
liblec::lecui::widgets::html_editor liblec::lecui::widgets::widget

Static Public Member Functions

static html_editoradd (containers::page &page, const std::string &alias=std::string())
 Add an html view to a container. More...
 
static html_editorget (form &fm, const std::string &path)
 Get the specifications of an html view. More...
 
- Static Public Member Functions inherited from liblec::lecui::widgets::html_editor
static html_editoradd (containers::page &page, const std::string &alias=std::string())
 Add an html editor to a container. More...
 
static html_editorget (form &fm, const std::string &path)
 Get the specifications of an html editor. More...
 

Additional Inherited Members

- Public Types inherited from liblec::lecui::widgets::widget
enum class  cursor_type { arrow , hand , caret }
 Mouse cursor type. More...
 
- Public Member Functions inherited from liblec::lecui::widgets::html_editor
 html_editor ()
 Constructor.
 
bool operator== (const html_editor &param)
 Check whether widget specs are equal. Only those properties that require the widget resources to be re-created are considered. More...
 
bool operator!= (const html_editor &param)
 Check whether widget specs are NOT equal. Only those properties that require the widget resources to be re-created are considered. More...
 
std::string & text () override
 Get or set the widget text. More...
 
html_editortext (const std::string &text)
 Set the widget's text. More...
 
std::string & tooltip () override
 Get or set the widget's tooltip text. More...
 
html_editortooltip (const std::string &tooltip)
 Set the tooltip text. More...
 
lecui::rectrect () override
 Get or set the position and dimensions of the widget. More...
 
html_editorrect (const lecui::rect &rect)
 Set the position and dimensions of the widget. More...
 
resize_paramson_resize () override
 Get or set the behaviour of the widget when its container is resized. More...
 
html_editoron_resize (const resize_params &on_resize)
 Set the behaviour of the widget when its container is resized. More...
 
cursor_typecursor () override
 Get or set the mouse cursor to use then over the widget. More...
 
html_editorcursor (const cursor_type cursor)
 Set the mouse cursor to use when over the widget. More...
 
std::string & font () override
 Get or set the default widget font, e.g. "Georgia". More...
 
html_editorfont (const std::string &font)
 Set the default widget font. More...
 
float & font_size () override
 Get or set the default widget font size in points, e.g. 9.0f. More...
 
html_editorfont_size (const float &font_size)
 Set the widget's font size. More...
 
colorcolor_text () override
 Get or set the color of the widget's text. More...
 
html_editorcolor_text (const color &color_text)
 Set the color of the widget's text. More...
 
colorcolor_fill () override
 Get or set the fill color of the widget. More...
 
html_editorcolor_fill (const color &color_fill)
 Set the fill color of the widget. More...
 
colorcolor_hot () override
 Get or set the widget's color when the mouse is hovered over it. More...
 
html_editorcolor_hot (const color &color_hot)
 Set the widget's color when the mouse is hovered over it. More...
 
colorcolor_selected () override
 Get or set the widget's color when selected. More...
 
html_editorcolor_selected (const color &color_selected)
 Set the widget's color when selected. More...
 
colorcolor_disabled () override
 Get or set the widget's color when it is disabled. More...
 
html_editorcolor_disabled (const color &color_disabled)
 Set the widget's color when it is disabled. More...
 
float & border ()
 Get or set the thickness of the border. More...
 
html_editorborder (const float &border)
 Set the thickness of the border. More...
 
float & control_border ()
 Get or set the thickness of the control pane border. More...
 
html_editorcontrol_border (const float &control_border)
 Set the thickness of the control border. More...
 
colorcolor_border ()
 Get or set the color of the border. More...
 
html_editorcolor_border (const color &color_border)
 Set the color of the border. More...
 
float & corner_radius_x ()
 Get or set the horizontal radius of the corners. More...
 
html_editorcorner_radius_x (const float &corner_radius_x)
 Set the horizontal radius of the corners. More...
 
float & corner_radius_y ()
 Get or set the vertical radius of the corners. More...
 
html_editorcorner_radius_y (const float &corner_radius_y)
 Set the vertical radius of the corners. More...
 
colorcolor_caret ()
 Get or set the color of the caret. More...
 
html_editorcolor_caret (const color &color_caret)
 Set the color of the caret. More...
 
colorcolor_control_border ()
 Get or set the color of the html control pane border. More...
 
html_editorcolor_control_border (const color &color_control_border)
 Set the color of the html control pane border. More...
 
colorcolor_control_fill ()
 Get or set the fill color of the control. More...
 
html_editorcolor_control_fill (const color &color_control_fill)
 Set the fill color of the control. More...
 
text_alignmentalignment ()
 Get or set the text alignment. More...
 
html_editoralignment (const text_alignment &alignment)
 Set the text alignment. More...
 
- Public Member Functions inherited from liblec::lecui::widgets::widget
 widget ()
 Widget constructor.
 
virtual ~widget ()
 Widget descructor.
 
bool operator== (const widget &param)
 Check whether widget's basic specifications are equal. Only those properties that require the widget's basic resources to be re-created are considered. More...
 
bool operator!= (const widget &param)
 Check whether widget's basic specifications are NOT equal. Only those properties that require the widget's basic resources to be re-created are considered. More...
 
virtual std::string & text ()=0
 Get or set the widget text. More...
 
virtual std::string & tooltip ()=0
 Get or set the widget's tooltip text. More...
 
virtual lecui::rectrect ()=0
 Get or set the position and dimensions of the widget. More...
 
virtual resize_paramson_resize ()=0
 Get or set the behaviour of the widget when its container is resized. More...
 
virtual cursor_typecursor ()=0
 Get or set the mouse cursor to use then over the widget. More...
 
virtual std::string & font ()=0
 Get or set the default widget font, e.g. "Georgia". More...
 
virtual float & font_size ()=0
 Get or set the default widget font size in points, e.g. 9.0f. More...
 
virtual colorcolor_text ()=0
 Get or set the color of the widget's text. More...
 
virtual colorcolor_fill ()=0
 Get or set the fill color of the widget. More...
 
virtual colorcolor_hot ()=0
 Get or set the widget's color when the mouse is hovered over it. More...
 
virtual colorcolor_selected ()=0
 Get or set the widget's color when selected. More...
 
virtual colorcolor_disabled ()=0
 Get or set the widget's color when it's disabled. More...
 
basic_eventsevents ()
 Widget events. More...
 
const std::string & alias ()
 The widget's alias, either user defined or automatically generated by the library. More...
 
- Protected Attributes inherited from liblec::lecui::widgets::widget
std::string _text
 The widget's text.
 
std::string _tooltip
 The widget's tooltip text.
 
lecui::rect _rect
 The widget's rectangle.
 
resize_params _on_resize = { 0.f, 0.f, 0.f, 0.f }
 The widget's behaviour when container is resized.
 
cursor_type _cursor = cursor_type::arrow
 The widget's cursor.
 
std::string _font = "Segoe UI"
 The widget's font.
 
float _font_size = 9.f
 The widget's font size.
 
color _color_text = { 0, 0, 0, 255 }
 The color of the widget's text.
 
color _color_fill = { 0, 120, 170, 255 }
 The fill color of the widget.
 
color _color_hot = { 0, 120, 170, 255 }
 The color to indicate when the mouse hovers over the widget.
 
color _color_selected = { 0, 120, 170, 30 }
 The color to indicate when the widget is selected.
 
color _color_disabled = { 180, 180, 180, 255 }
 The color to indicate when the widget is disabled.
 

Detailed Description

HTML view widget. To instantiate and add to a container use the add static method.

Recommended size with defaults is a minimum of 320x215px.

Member Function Documentation

◆ add()

static html_editor & liblec::lecui::widgets::html_view::add ( containers::page page,
const std::string &  alias = std::string() 
)
static

Add an html view to a container.

Parameters
pageThe container to place the widget in.
aliasThe in-page unique alias, e.g. "review_content".
Returns
A reference to the widget specifications.

If an empty alias is given an internally generated random alias will be assigned.

◆ get()

static html_editor & liblec::lecui::widgets::html_view::get ( form fm,
const std::string &  path 
)
static

Get the specifications of an html view.

Parameters
fmA reference to the form.
pathThe full path to the widget, e.g. "login_page/credentials_pane/email_text".
Returns
A reference to the widget specifications.

Throws on failure. For faster coding and more readable code consider calling this static method through the helper macro provided.


The documentation for this class was generated from the following file: