|
| Panel (int x, int y, int width) |
|
| Panel (int width) |
|
| Panel (Panel &)=delete |
|
| Panel (Panel &&ref) |
|
void | set (int x, int y) |
| Set the panels X and Y screen position. More...
|
|
void | get (int &x, int &y) |
|
void | setTitle (std::unique_ptr< Line > T, int off=1) |
|
void | setStyle (BorderStyle bs) |
|
void | setColor (ANSIColor c) |
|
int | getWidth (void) |
|
int | getHeight (void) |
|
void | hide (void) |
|
void | show (void) |
|
void | addLine (std::unique_ptr< Line > l) |
|
bool | update (Door &d) |
| Updates a panel. More...
|
|
void | update (Door &d, int line) |
|
void | update (void) |
|
door::Goto | gotoEnd (void) |
|
std::unique_ptr< Line > | spacer_line (bool single) |
| Create a spacer line using block drawing characters. More...
|
|
void | lineSetBack (ANSIColor back) |
| Set background of all lines in the panel. More...
|
|
|
int | x |
|
int | y |
|
int | width |
|
BorderStyle | border_style |
|
ANSIColor | border_color |
|
std::vector< std::unique_ptr< Line > > | lines |
|
bool | hidden |
|
bool | shown_once |
|
std::unique_ptr< Line > | title |
|
int | offset |
|
◆ lineSetBack()
void door::Panel::lineSetBack |
( |
ANSIColor |
back | ) |
|
Set background of all lines in the panel.
- Parameters
-
◆ set()
void door::Panel::set |
( |
int |
xp, |
|
|
int |
yp |
|
) |
| |
Set the panels X and Y screen position.
- Parameters
-
[in] | xp,yp | new screen position |
◆ spacer_line()
std::unique_ptr< Line > door::Panel::spacer_line |
( |
bool |
single | ) |
|
Create a spacer line using block drawing characters.
Return a Line of single or double characters the width of the panel.
- Parameters
-
[in] | single | make single or double line |
- Returns
- std::unique_ptr<Line>
◆ update()
bool door::Panel::update |
( |
Door & |
d | ) |
|
Updates a panel.
returns True if something was changed (and cursor has moved) False, nothing to do, cursor is ok.
- Parameters
-
- Returns
- true
-
false
- Examples
- menu-example.cpp.
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Panel & |
p |
|
) |
| |
|
friend |
Output panel to stream.
This uses the Panel.x, Panel.y to render the panel using ANSI control codes. Border style is considered, and wether or not we are using unicode. Colors of the border, and lines use their color or their renderFunction.
- Parameters
-
- Returns
- std::ostream&
◆ lines
std::vector<std::unique_ptr<Line> > door::Panel::lines |
|
protected |
- Todo:
- Fix this to use shared_ptr. I don't think unique_ptr is the right way to go with this. I want to reuse things, and that means shared_ptr!
The documentation for this class was generated from the following files: