Belle II Software development
|
Widget which contains the dynamic amount of TGLabel objects. More...
#include <MultilineWidget.h>
Public Member Functions | |
MultilineWidget (const TGWindow *p=0, const char *title=0, int line_count=0) | |
Create multiline widget with parent window p. | |
int | getLineCount () |
Return number of lines in widget. | |
void | setLineCount (int count) |
Add or remove lines depending on current line count. | |
void | removeLine (int line_id) |
Remove line with specified id. | |
void | removeLastLine () |
Removes last line from multiline widget and reduces line count. | |
void | setLine (int line_id, const char *text) |
Set content of the specified line to 'text'. | |
void | addLine (const char *text=0) |
Append line to multiline widget. | |
Private Attributes | |
std::vector< TGLabel * > | lines |
Content of multiline widget. | |
Widget which contains the dynamic amount of TGLabel objects.
Compared to TGTextView, this class allows to update lines frequently without without redrawing the entire text. There is no internal checks for the correctness of remove operations.
Definition at line 30 of file MultilineWidget.h.
MultilineWidget | ( | const TGWindow * | p = 0 , |
const char * | title = 0 , |
||
int | line_count = 0 |
||
) |
Create multiline widget with parent window p.
Definition at line 16 of file MultilineWidget.cc.
|
virtual |
Definition at line 27 of file MultilineWidget.cc.
void addLine | ( | const char * | text = 0 | ) |
Append line to multiline widget.
Definition at line 75 of file MultilineWidget.cc.
int getLineCount | ( | ) |
Return number of lines in widget.
Definition at line 34 of file MultilineWidget.cc.
void removeLastLine | ( | ) |
Removes last line from multiline widget and reduces line count.
Definition at line 62 of file MultilineWidget.cc.
void removeLine | ( | int | line_id | ) |
Remove line with specified id.
Definition at line 52 of file MultilineWidget.cc.
void setLine | ( | int | line_id, |
const char * | text | ||
) |
Set content of the specified line to 'text'.
Definition at line 66 of file MultilineWidget.cc.
void setLineCount | ( | int | count | ) |
Add or remove lines depending on current line count.
If the specified count is less than previous, lines are removed from the bottom of the widget.
Definition at line 39 of file MultilineWidget.cc.
|
private |
Content of multiline widget.
Definition at line 33 of file MultilineWidget.h.