ultimatepp/rainbow/CoreGl/Console.h
cxl f0e42f8693 reorganizing repo
git-svn-id: svn://ultimatepp.org/upp/trunk@9214 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2015-11-22 19:53:58 +00:00

51 lines
971 B
C

#ifndef _CoreGl_Console_h_
#define _CoreGl_Console_h_
#include "ControlPanel.h"
#include "Scrollbar.h"
NAMESPACE_UPP
struct Console : Ctrl
{
Ctrl* parent;
SlimScrollBar sb;
SlimButton clear;
struct LineInfo : Moveable<LineInfo> {
Color ink;
String text;
};
bool init;
bool resize;
Point pos;
Point tl;
Size rs;
int currLine;
int scrollLine;
int maxLine;
VectorMap<int, LineInfo> fixedText;
Vector<LineInfo> floatText;
void Init(Ctrl& parent);
void SetConsoleRect(int x, int y, int cx = -1, int cy = -1);
virtual void Paint(Draw& w);
virtual void LeftDown(Point p, dword keys);
virtual void LeftUp(Point p, dword keys);
virtual void MouseMove(Point p, dword keys);
virtual void Layout();
void Log(int line, const char* text, Color ink = White);
void Log(const char* text, Color ink = White);
void SetLines(int lines);
void Show(bool b = true);
void Clear();
typedef Console CLASSNAME;
Console();
};
END_UPP_NAMESPACE
#endif