79 lines
1.5 KiB
C++
79 lines
1.5 KiB
C++
#ifndef STATICTEXT_H_
|
|
#define STATICTEXT_H_
|
|
|
|
#include "gType.h"
|
|
#include "GraphLow.h"
|
|
#include "GraphBase.h"
|
|
//#include "stdio.h"
|
|
//#include "stdlib.h"
|
|
//#include "string.h"
|
|
#include "my_string.h"
|
|
|
|
class TStaticText{
|
|
private:
|
|
u16 TextTop;
|
|
u16 TextLeftSpacing;
|
|
public:
|
|
struct{
|
|
int Width;
|
|
unsigned int Color;
|
|
}Border;
|
|
char Text[64];
|
|
int FontSize;
|
|
int DrawMode; //dmRaised=1 dmLowered=-1 dmNone=0
|
|
unsigned int Color;
|
|
unsigned int TextBGRColor;
|
|
unsigned int TextColor;
|
|
unsigned int Enable;
|
|
unsigned int Visible;
|
|
int TabOrder;
|
|
|
|
TRect Bound;
|
|
TPoint OwnerLeftTop; //Parrent Left Top;
|
|
TRect Content;
|
|
|
|
unsigned int Selected;
|
|
public:
|
|
TStaticText(){};
|
|
TStaticText(int aX, int aY, int aW, int aH, int OwnerX, int OwnerY,unsigned int aTextColor, unsigned int aBgColor){
|
|
Init(aX, aY, aW, aH, OwnerX, OwnerY, aTextColor, aBgColor);
|
|
};
|
|
void Init(int aX, int aY, int aW, int aH, int OwnerX, int OwnerY, unsigned int aTextColor, unsigned int aBgColor);
|
|
void SetText(const char *p, int aFontSize);
|
|
void SetText( char *cr, int aFontSize);
|
|
void SetTextLeftSpacing(unsigned int spc);
|
|
void SetEnable(void);
|
|
void SetDisable(void);
|
|
void TextClear(void);
|
|
void SelfDraw(void);
|
|
void TextDraw(void);
|
|
void FullRedraw(void);
|
|
void Show(void);
|
|
static void sShow(int aX, int aY, int aW, int aH, unsigned int aTc, char *Text);
|
|
static void sShow(int aX, int aY, int aW, int aH, unsigned int aTc, unsigned int aBc, char *Text);
|
|
static void sDrawDump(int aX, int aY, int aR, int aB, unsigned int aBc);
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|