Belle II Software development
MultilineWidget.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11//STL
12#include <vector>
13
14//Root
15#include <TGFrame.h>
16
17class TGLabel;
18
19namespace Belle2 {
30 class MultilineWidget : public TGGroupFrame {
31 private:
33 std::vector<TGLabel*> lines;
34
35 public:
39 MultilineWidget(const TGWindow* p = 0, const char* title = 0, int line_count = 0);
40 virtual ~MultilineWidget();
41
45 int getLineCount();
51 void setLineCount(int count);
55 void removeLine(int line_id);
59 void removeLastLine();
63 void setLine(int line_id, const char* text);
67 void addLine(const char* text = 0);
68 };
70}
Widget which contains the dynamic amount of TGLabel objects.
void setLine(int line_id, const char *text)
Set content of the specified line to 'text'.
void removeLine(int line_id)
Remove line with specified id.
void removeLastLine()
Removes last line from multiline widget and reduces line count.
int getLineCount()
Return number of lines in widget.
std::vector< TGLabel * > lines
Content of multiline widget.
void addLine(const char *text=0)
Append line to multiline widget.
void setLineCount(int count)
Add or remove lines depending on current line count.
Abstract base class for different kinds of events.