Initial commit
This commit is contained in:
120
MyCode/Gui/LiteIconOverView.h
Normal file
120
MyCode/Gui/LiteIconOverView.h
Normal file
@@ -0,0 +1,120 @@
|
||||
#ifndef LITEICONOVERVIEW_H_
|
||||
#define LITEICONOVERVIEW_H_
|
||||
|
||||
#include "gType.h"
|
||||
#include "GraphBase.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "my_string.h"
|
||||
#include "MainCtl.h"
|
||||
#include "Device.h"
|
||||
#include "EpDevice.h"
|
||||
#include "DevProperty.h"
|
||||
|
||||
#define dLISTVIEW_TYPE_DUMP 0
|
||||
#define dLISTVIEW_TYPE_SYS 1
|
||||
#define dLISTVIEW_TYPE_EP 2
|
||||
#define dLISTVIEW_TYPE_PORT 3
|
||||
#define dLISTVIEW_TYPE_HANDCTL 4
|
||||
#define dLISTVIEW_TYPE_DIRECTCTL 5
|
||||
|
||||
#define dLISTVIEW_STYLE_LIST 0
|
||||
#define dLISTVIEW_STYLE_ICON 1
|
||||
#define dLISTVIEW_VSCOLLBAR_WIDTH 20
|
||||
|
||||
//For Device View or Edit
|
||||
class TLiteIconOverView{
|
||||
public:
|
||||
struct{
|
||||
unsigned int ItemsCount;
|
||||
int SelectedIndex;
|
||||
int SelectedCol;
|
||||
int SelectedRow;
|
||||
//unsigned short x1List[20];
|
||||
unsigned short y1List[20];
|
||||
//unsigned short x2List[20];
|
||||
unsigned short y2List[20];
|
||||
}View1;
|
||||
char Text[68];
|
||||
unsigned char ExistTab[6][10];
|
||||
short cx,cy;
|
||||
|
||||
TStaticText Caption;
|
||||
unsigned int ViewPath;
|
||||
u32 Color;
|
||||
TPoint OwnerLeftTop; //ParrentLeftTop;
|
||||
TRect Bound;
|
||||
TRect Content;
|
||||
|
||||
struct{
|
||||
unsigned char Path;
|
||||
unsigned char iType;
|
||||
}ItemsP0[128];
|
||||
|
||||
unsigned char ItemsP0Count;
|
||||
unsigned char SelPath0;
|
||||
unsigned char SelRootType;
|
||||
|
||||
unsigned char RootCircuitCount;
|
||||
private:
|
||||
void LoadPath0Item(TRootDevice *pItem);
|
||||
void LoadPath1Item(TEpDevice *pItem);
|
||||
|
||||
void DrawVScrollBar_ListView(void);
|
||||
void DrawVScrollBar_IconView(void);
|
||||
TGuiMsgReturn QueryKeyIn(unsigned char aKey);
|
||||
TGuiMsgReturn EditKeyIn(unsigned char aKey);
|
||||
|
||||
public:
|
||||
TLiteIconOverView(){};
|
||||
TLiteIconOverView(int x1, int y1, int aW, int aH, int OwnerX, int OwnerY, u32 aColor){
|
||||
Init(x1, y1, aW, aH, OwnerX, OwnerY, aColor);
|
||||
}
|
||||
void Init(int x1, int y1, int aW, int aH, int OwnerX, int OwnerY, u32 aColor);
|
||||
void SetIconPosition(void);
|
||||
|
||||
void RenderBackGround(void);
|
||||
void RenderBackGround(unsigned int aClr);
|
||||
void DrawSelf(void);
|
||||
void DrawList(void);
|
||||
void Show(void);
|
||||
void ReDraw(void);
|
||||
void DrawCaption(void);
|
||||
void RenderContent(void);
|
||||
void DrawStateIdf_0(void);
|
||||
void DrawStateIdf_1(void);
|
||||
void DrawSel();
|
||||
void DrawRootItemsCount();
|
||||
|
||||
TGuiMsgReturn KeyIn(unsigned char aKey);
|
||||
|
||||
void ClearPath(void);
|
||||
void ClearPath1(void);
|
||||
void LoadPath0(void);
|
||||
void LoadPath1(void);
|
||||
|
||||
void FindNearP0();
|
||||
|
||||
void FullRePaint(void);
|
||||
void RePaint(void);
|
||||
void FullRedraw(int Prm);
|
||||
|
||||
void CalcSelPath0();
|
||||
|
||||
int ExtRequst(unsigned char Prm){return 0;}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user