Shellminator V3.0.1
Simple Terminal
|
This is an abstract object for graphics element creation. More...
#include <Shellminator-Screen.hpp>
Public Member Functions | |
virtual void | draw (bool noClear=false) |
Draw function. More... | |
virtual void | init (Shellminator *parent_p, Stream *channel_p) |
Init function. More... | |
virtual void | setOrigin (int x, int y) |
Origin of the top left corner. More... | |
virtual void | update (int width_p, int height_p) |
Update function. More... | |
virtual void | forceRedraw () |
int | left () |
Return the coordinate of the left column next to the object. More... | |
int | right () |
Return the coordinate of the right column next to the object. More... | |
int | up () |
Return the coordinate of the upper row next to the object. More... | |
int | down () |
Return the coordinate of the lower row next to the object. More... | |
Shellminator * | getParent () |
void | attachEndFunction (void(*end_func_p)(Shellminator *)) |
void | removeEndFunction () |
Public Attributes | |
int | row = 1 |
It is used by the grid layout. More... | |
int | column = 1 |
It is used by the grid layout. More... | |
int | columnSpan = 1 |
It is used by the grid layout. More... | |
int | rowSpan = 1 |
It is used by the grid layout. More... | |
ShellminatorScreen * | nextElement = NULL |
It is used by the grid layout. More... | |
void(*)(Shellminator *) | getEndFunction () |
Protected Attributes | |
Shellminator * | parent = NULL |
Pointer to the caller terminal object. More... | |
Stream * | channel = NULL |
int | width = 1 |
Actual width of the object. More... | |
int | height = 1 |
Actual height of the object. More... | |
int | originX = 1 |
X coordinate of the origin. More... | |
int | originY = 1 |
Y coordinate of the origin. More... | |
void(* | end_func )(Shellminator *) = NULL |
This is an abstract object for graphics element creation.
You can inherit from this object to create graphical object for the terminal.
Definition at line 47 of file Shellminator-Screen.hpp.
|
inline |
Definition at line 135 of file Shellminator-Screen.hpp.
|
inline |
Return the coordinate of the lower row next to the object.
Definition at line 109 of file Shellminator-Screen.hpp.
|
inlinevirtual |
Draw function.
This function is called by the caller terminal if redraw is requested. If you need to draw your screen, the requestRedraw function must be called on the parent terminal object. The reason for this is to save some CPU time and do not waste it to draw something unnecessarily.
Reimplemented in ShellminatorButton, ShellminatorLevelMeter, ShellminatorList, ShellminatorNotification, ShellminatorPlot, ShellminatorProgress, and ShellminatorScreenGrid.
Definition at line 58 of file Shellminator-Screen.hpp.
|
inlinevirtual |
Reimplemented in ShellminatorButton, ShellminatorLevelMeter, ShellminatorList, ShellminatorNotification, ShellminatorPlot, ShellminatorProgress, and ShellminatorScreenGrid.
Definition at line 97 of file Shellminator-Screen.hpp.
|
inline |
Definition at line 111 of file Shellminator-Screen.hpp.
|
inlinevirtual |
Init function.
This function is called by the host terminal, when the plot object gets registered to it. You can put all the initialisation section here.
parent_p | Pointer to the caller terminal object. |
channel_p | This is a pointer to a Stream object, which can be used to print the output data. |
channel_p
object instead of parent -> channel
method. This object can be a regular channel or a buffer accelerated one. The logic behind the buffering and flushing is handled by the caller terminal. Reimplemented in ShellminatorButton, ShellminatorLevelMeter, ShellminatorListDetailed, ShellminatorList, ShellminatorNotification, ShellminatorPlot, ShellminatorProgress, and ShellminatorScreenGrid.
Definition at line 70 of file Shellminator-Screen.hpp.
|
inline |
Return the coordinate of the left column next to the object.
Definition at line 100 of file Shellminator-Screen.hpp.
|
inline |
Definition at line 136 of file Shellminator-Screen.hpp.
|
inline |
Return the coordinate of the right column next to the object.
Definition at line 103 of file Shellminator-Screen.hpp.
|
inlinevirtual |
Origin of the top left corner.
You can specify a custom origin point for the object with this function.
x | X coordinate of the new origin( starts from 1 ). |
y | Y coordinate of the new origin( starts from 1 ). |
Definition at line 78 of file Shellminator-Screen.hpp.
|
inline |
Return the coordinate of the upper row next to the object.
Definition at line 106 of file Shellminator-Screen.hpp.
|
inlinevirtual |
Update function.
The update function must be used to process events and not to draw the objects. It is called much frequently than, the draw function. All the event handling should be done in the update function, including key and mouse detection along with various events.
width_p | The width of the screen area in characters. |
height_p | The height of the screen area in characters. |
Reimplemented in ShellminatorButton, ShellminatorLevelMeter, ShellminatorList, ShellminatorNotification, ShellminatorPlot, ShellminatorProgress, and ShellminatorScreenGrid.
Definition at line 94 of file Shellminator-Screen.hpp.
|
protected |
Definition at line 146 of file Shellminator-Screen.hpp.
int ShellminatorScreen::column = 1 |
It is used by the grid layout.
It specifies the column of the widget.
Definition at line 120 of file Shellminator-Screen.hpp.
int ShellminatorScreen::columnSpan = 1 |
It is used by the grid layout.
It specifies how many columns widget occupies.
Definition at line 124 of file Shellminator-Screen.hpp.
|
protected |
Definition at line 160 of file Shellminator-Screen.hpp.
|
inline |
Definition at line 138 of file Shellminator-Screen.hpp.
|
protected |
Actual height of the object.
Definition at line 152 of file Shellminator-Screen.hpp.
ShellminatorScreen* ShellminatorScreen::nextElement = NULL |
It is used by the grid layout.
The purpose of this is to create a 'chained' list of the used elements in the
Definition at line 133 of file Shellminator-Screen.hpp.
|
protected |
X coordinate of the origin.
Definition at line 155 of file Shellminator-Screen.hpp.
|
protected |
Y coordinate of the origin.
Definition at line 158 of file Shellminator-Screen.hpp.
|
protected |
Pointer to the caller terminal object.
Definition at line 144 of file Shellminator-Screen.hpp.
int ShellminatorScreen::row = 1 |
It is used by the grid layout.
It specifies the row of the widget.
Definition at line 116 of file Shellminator-Screen.hpp.
int ShellminatorScreen::rowSpan = 1 |
It is used by the grid layout.
It specifies how many rows widget occupies.
Definition at line 128 of file Shellminator-Screen.hpp.
|
protected |
Actual width of the object.
Definition at line 149 of file Shellminator-Screen.hpp.