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

Status pane container. To instantiate and add to a container use the add static method. More...

#include <status_pane.h>

Inheritance diagram for liblec::lecui::containers::status_pane:
liblec::lecui::containers::status_pane_base liblec::lecui::containers::page

Public Member Functions

 status_pane (form &fm, status_pane_specs specs)
 Class constructor. More...
 
- Public Member Functions inherited from liblec::lecui::containers::status_pane_base
 status_pane_base (form &fm, const std::string &alias)
 Base class constructor. More...
 
virtual ~status_pane_base ()
 Base class destructor.
 
- Public Member Functions inherited from liblec::lecui::containers::page
 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...
 

Static Public Member Functions

static status_paneadd (form &fm, status_pane_specs specs)
 Create a status pane. More...
 
static containers::status_paneget (form &fm, const std::string &alias)
 Get a reference to an existing status pane. More...
 

Additional Inherited Members

- Protected Member Functions inherited from liblec::lecui::containers::page
 page (const page &)=delete
 
pageoperator= (const page &)=delete
 
- Protected Attributes inherited from liblec::lecui::containers::page
impl & _d_page
 Reference to page implementation.
 

Detailed Description

Status pane container. To instantiate and add to a container use the add static method.

Any widget can be added to this container. Consequently, recursion is fully supported, allowing other containers to be added to status panes, to virtually any depth level that the memory of the computer the app is running on can permit. However, it is recommended to limit the number of widgets within status panes as these panes persist throughout the runtime of the app, and are visible in all pages. Keep the contents of status panes minimal and straightforward as a good gui design principle. Note that it is recommended to add all status panes before adding any pages so that the pages can return dimensions that factor for the status panes.

Constructor & Destructor Documentation

◆ status_pane()

liblec::lecui::containers::status_pane::status_pane ( form fm,
status_pane_specs  specs 
)

Class constructor.

Parameters
fmA reference to the form.
specsThe status pane's specs.

Never to be called directly. This is called interfally by the library when the add static method is called.

Member Function Documentation

◆ add()

static status_pane & liblec::lecui::containers::status_pane::add ( form fm,
status_pane_specs  specs 
)
static

Create a status pane.

Parameters
fmThe form to place it in.
specsThe specifications of the status pane.
Returns
A reference to the status pane.

Status panes are transparent by default, and have no scroll bars. A background can be added by using a rectangle widget. Ensure that there is a maximum of one pane per location. Readding a status pane in a given location leads to undefined behavior, i.e. a maximum of one left, one right, one top and one bottom status pane. If you need to split the content of a given pane simply add regular panes within it like you with any other container. However, keep in mind that regular panes come with scroll bars. In fact, if you need a status pane with scroll bars you can simply add a single pane that fills the status pane entirely and you will have the desired effect.

◆ get()

static containers::status_pane & liblec::lecui::containers::status_pane::get ( form fm,
const std::string &  alias 
)
static

Get a reference to an existing status pane.

Parameters
fmThe form the container is in.
aliasThe status pane alias, e.g. "status::right".
Returns
A reference to the status pane.

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


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