lecui 1.0.0-alpha.20
lecui C++ user interface library
|
Tab container. To instantiate and add to a tab pane use the add static method. More...
#include <tab_pane.h>
Public Member Functions | |
tab (form &fm, const std::string &tab_name) | |
Class constructor. More... | |
bool | operator== (const tab ¶m) |
Check whether two tabs are equal. Only those properties that require the widget resources to be re-created are considered. More... | |
bool | operator!= (const tab ¶m) |
Check whether two tabs are NOT equal. Only those properties that require the widget resources to be re-created are considered. More... | |
widgets::badge_specs & | badge () override |
Get or set the badge specs. More... | |
tab & | badge (const widgets::badge_specs &badge) |
Set the badge specs. More... | |
const lecui::size | size () |
Get the size of the tab's page. More... | |
![]() | |
page (form &fm, const std::string &alias) | |
Page constructor. More... | |
virtual const size | size () |
Get the size of the page. More... | |
const bool | rendered () |
Check whether the page has been rendered. More... | |
virtual const lecui::size | change_in_size () |
Get the page's change in size. More... | |
void | scroll_vertically (const float &amount) |
Programmatically scroll the page vertically. More... | |
void | scroll_horizontally (const float &amount) |
Programmatically scroll the page horizontally. More... | |
![]() | |
bool | operator== (const badge_widget ¶m) |
Check whether two badges are equal. Only those badge properties that require the badge's resources to be re-created are considered. More... | |
bool | operator!= (const badge_widget ¶m) |
Check whether two badges are NOT equal. Only those badge properties that require the badge's resources to be re-created are considered. More... | |
virtual badge_specs & | badge ()=0 |
Get or set the widget's badge. More... | |
Static Public Member Functions | |
static tab & | add (containers::tab_pane &tp, const std::string &tab_name) |
Create a pane. More... | |
static tab & | get (form &fm, const std::string &path) |
Get the tab container page of an existing tab. More... | |
Friends | |
class | tab_builder |
Additional Inherited Members | |
![]() | |
page (const page &)=delete | |
page & | operator= (const page &)=delete |
![]() | |
impl & | _d_page |
Reference to page implementation. | |
![]() | |
badge_specs | _badge |
The badge's specs. | |
Tab container. To instantiate and add to a tab pane use the add static method.
Any widget can be added to this container. Consequently, recursion is fully supported, allowing tab panes within tabs that are themselves in another tab pane, to virtually any depth level that the memory of the computer the app is running on can permit.
liblec::lecui::containers::tab::tab | ( | form & | fm, |
const std::string & | tab_name | ||
) |
Class constructor.
fm | A reference to the form. |
tab_name | The tab's name. |
Never to be called directly. This is called interfally by the library when the add static method is called.
|
static |
Create a pane.
tp | A reference to the tab pane to place the tab in. |
tab_name | The in-page unique alias, e.g. "settings_pane". |
If an empty alias is given an internally generated random alias will be assigned.
|
overridevirtual |
Get or set the badge specs.
Implements liblec::lecui::widgets::badge_widget.
tab & liblec::lecui::containers::tab::badge | ( | const widgets::badge_specs & | badge | ) |
Set the badge specs.
badge | The badge specs. |
Get the tab container page of an existing tab.
fm | The form the container is in. |
path | The full path to the tab, e.g. "sample_page/settings_tab_pane/Options". |
Throws on failure. For faster coding and more readable code consider calling this static method through the helper macro provided (get_tab_page).
bool liblec::lecui::containers::tab::operator!= | ( | const tab & | param | ) |
Check whether two tabs are NOT equal. Only those properties that require the widget resources to be re-created are considered.
param | The tab to compare to. |
bool liblec::lecui::containers::tab::operator== | ( | const tab & | param | ) |
Check whether two tabs are equal. Only those properties that require the widget resources to be re-created are considered.
param | The tab to compare to. |
|
virtual |
Get the size of the tab's page.
The size is automatically determined by the library. It is important to note that any widgets added to a page, and any other container for that matter, only see the dimensions and coordinates of that container not those of the form or another container higher up the hierarchy. Dimensions and coordinates are local to a container.
Reimplemented from liblec::lecui::containers::page.