Page manager class.
More...
#include <page.h>
◆ page_manager()
liblec::lecui::page_manager::page_manager |
( |
form & |
fm | ) |
|
Page manager constructor.
- Parameters
-
fm | A reference to the form. |
◆ add()
containers::page & liblec::lecui::page_manager::add |
( |
const std::string & |
alias | ) |
|
Add a page to the form.
- Parameters
-
alias | The in-form unique alias, e.g. "home_page". |
- Returns
- A reference to the page container.
throws on failure, but ensure to not attempt to add a page that already exists. Use an if statement guard as follows: if (!exists()){ add(); }.
◆ close()
void liblec::lecui::page_manager::close |
( |
const std::string & |
path | ) |
|
Close a container.
- Parameters
-
path | The full path to the container, e.g. "home_page/task_pane". |
◆ current()
std::string liblec::lecui::page_manager::current |
( |
| ) |
|
Get the name of the currently displayed page.
- Returns
- The name of the page that is currently displayed, and an empty string if there is no page displayed.
◆ exists()
bool liblec::lecui::page_manager::exists |
( |
const std::string & |
alias | ) |
|
Check if a page exists.
- Parameters
-
alias | The in-form unique alias, e.g. "home_page". |
- Returns
- True if the page has been created, else false.
◆ get()
Get the page container of an existing page.
- Parameters
-
fm | The form the page is in. |
alias | The in-form unique alias, e.g. "home_page". |
- Returns
- A reference to the page container.
Throws on failure. For faster coding and more readable code consider calling this static method through the helper macro provided (get_page), unless if already using an in-class page_manager instance.
◆ previous()
std::string liblec::lecui::page_manager::previous |
( |
| ) |
|
Get the name of the page that was displayed before the current page.
- Returns
- The name of the page that was displayed before the current one, and an empty string if the current page is the root.
◆ show()
void liblec::lecui::page_manager::show |
( |
const std::string & |
alias | ) |
|
Show a page.
- Parameters
-
alias | The in-form unique alias, e.g. "home_page". |
This method is only applicable to form pages and not panes and tab panes even though they are also containers. To manipulate the visibility of the other containers use the widget_manager::show method instead.
The documentation for this class was generated from the following file: