24
24
class ctrlMultiline : public Window
28
/// Breite der Scrollbar
29
static const unsigned short SCROLLBAR_WIDTH = 20;
32
ctrlMultiline(Window *parent, unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, glArchivItem_Font *font, unsigned int format = 0);
34
//void AddText(const std::string& text, unsigned int color);
35
void AddString(const std::string& str, unsigned int color, bool scroll = true);
36
unsigned GetLineCount() { return unsigned(lines.size()); }
37
/// Gibt den index-ten Eintrag zur�ck
38
const std::string& GetLine(const unsigned index) const { return lines[index].str; }
39
void SetLine(const unsigned index, const std::string& str, unsigned int color);
41
/// Schaltet Box ein und aus
42
void EnableBox(const bool enable) { draw_box = enable; }
44
virtual bool Msg_LeftDown(const MouseCoords& mc);
45
virtual bool Msg_LeftUp(const MouseCoords& mc);
46
virtual bool Msg_WheelUp(const MouseCoords& mc);
47
virtual bool Msg_WheelDown(const MouseCoords& mc);
48
virtual bool Msg_MouseMove(const MouseCoords& mc);
51
virtual bool Draw_(void);
53
void Resize_(unsigned short width, unsigned short height);
58
glArchivItem_Font *font;
67
/// Die ganzen Strings
68
std::vector<Line> lines;
69
/// Anzahl der Zeilen, die in das Control passen
70
unsigned lines_in_control;
72
/// Soll die Box gezeichnet werden?
28
/// Breite der Scrollbar
29
static const unsigned short SCROLLBAR_WIDTH = 20;
32
ctrlMultiline(Window* parent, unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, glArchivItem_Font* font, unsigned int format = 0);
34
//void AddText(const std::string& text, unsigned int color);
35
void AddString(const std::string& str, unsigned int color, bool scroll = true);
36
unsigned GetLineCount() { return unsigned(lines.size()); }
37
/// Gibt den index-ten Eintrag zur�ck
38
const std::string& GetLine(const unsigned index) const { return lines[index].str; }
39
void SetLine(const unsigned index, const std::string& str, unsigned int color);
41
/// Schaltet Box ein und aus
42
void EnableBox(const bool enable) { draw_box = enable; }
44
virtual bool Msg_LeftDown(const MouseCoords& mc);
45
virtual bool Msg_LeftUp(const MouseCoords& mc);
46
virtual bool Msg_WheelUp(const MouseCoords& mc);
47
virtual bool Msg_WheelDown(const MouseCoords& mc);
48
virtual bool Msg_MouseMove(const MouseCoords& mc);
51
virtual bool Draw_(void);
53
void Resize_(unsigned short width, unsigned short height);
58
glArchivItem_Font* font;
67
/// Die ganzen Strings
68
std::vector<Line> lines;
69
/// Anzahl der Zeilen, die in das Control passen
70
unsigned lines_in_control;
72
/// Soll die Box gezeichnet werden?
76
76
#endif /// !CTRLMULTILINE_H_INCLUDED