lecui 1.0.0-alpha.20
lecui C++ user interface library
|
Status pane container. To instantiate and add to a container use the add static method. More...
#include <status_pane.h>
Public Member Functions | |
status_pane (form &fm, status_pane_specs specs) | |
Class constructor. More... | |
![]() | |
status_pane_base (form &fm, const std::string &alias) | |
Base class constructor. More... | |
virtual | ~status_pane_base () |
Base class destructor. | |
![]() | |
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_pane & | add (form &fm, status_pane_specs specs) |
Create a status pane. More... | |
static containers::status_pane & | get (form &fm, const std::string &alias) |
Get a reference to an existing status pane. More... | |
Additional Inherited Members | |
![]() | |
page (const page &)=delete | |
page & | operator= (const page &)=delete |
![]() | |
impl & | _d_page |
Reference to page implementation. | |
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.
liblec::lecui::containers::status_pane::status_pane | ( | form & | fm, |
status_pane_specs | specs | ||
) |
Class constructor.
fm | A reference to the form. |
specs | The status pane's specs. |
Never to be called directly. This is called interfally by the library when the add static method is called.
|
static |
Create a status pane.
fm | The form to place it in. |
specs | The specifications of 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.
|
static |
Get a reference to an existing status pane.
fm | The form the container is in. |
alias | The status pane alias, e.g. "status::right". |
Throws on failure. For faster coding and more readable code consider calling this static method through the helper macro provided (get_status_pane).