Shellminator V3.0.1
Simple Terminal
|
#include <Shellminator-Notification.hpp>
Public Member Functions | |
ShellminatorNotification () | |
Empty constructor. More... | |
ShellminatorNotification (const char *text_p) | |
void | init (Shellminator *parent_p, Stream *channel_p) override |
Init function. More... | |
void | draw (bool noClear=false) override |
Draw function. More... | |
void | update (int width_p, int height_p) override |
Update function. More... | |
void | forceRedraw () override |
void | setText (const char *text_p) |
![]() | |
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 () |
Protected Attributes | |
bool | redraw = true |
This flag shows that redraw is necessary. More... | |
const char * | text = NULL |
int | textWidth = 0 |
int | textHeight = 0 |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
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 () |
Definition at line 54 of file Shellminator-Notification.hpp.
ShellminatorNotification::ShellminatorNotification | ( | ) |
Empty constructor.
Definition at line 36 of file Shellminator-Notification.cpp.
ShellminatorNotification::ShellminatorNotification | ( | const char * | text_p | ) |
Definition at line 42 of file Shellminator-Notification.cpp.
|
overridevirtual |
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 from ShellminatorScreen.
Definition at line 104 of file Shellminator-Notification.cpp.
|
overridevirtual |
Reimplemented from ShellminatorScreen.
Definition at line 198 of file Shellminator-Notification.cpp.
|
overridevirtual |
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 from ShellminatorScreen.
Definition at line 73 of file Shellminator-Notification.cpp.
void ShellminatorNotification::setText | ( | const char * | text_p | ) |
Definition at line 46 of file Shellminator-Notification.cpp.
|
overridevirtual |
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 from ShellminatorScreen.
Definition at line 79 of file Shellminator-Notification.cpp.
|
protected |
This flag shows that redraw is necessary.
In this implementation redraw is only required when the screen is resized.
Definition at line 104 of file Shellminator-Notification.hpp.
|
protected |
Definition at line 106 of file Shellminator-Notification.hpp.
|
protected |
Definition at line 108 of file Shellminator-Notification.hpp.
|
protected |
Definition at line 107 of file Shellminator-Notification.hpp.