|
#include "DIALOG.h"
extern GUI_CONST_STORAGE GUI_FONT GUI_Fontfont28;
extern GUI_CONST_STORAGE GUI_FONT GUI_Fontfont24;
extern GUI_CONST_STORAGE GUI_FONT GUI_Fontfont18;
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
#define ID_FRAMEWIN_0 (GUI_ID_USER + 0x00)
#define ID_TEXT_0 (GUI_ID_USER + 0x02)
#define ID_TEXT_1 (GUI_ID_USER + 0x04)
#define ID_TEXT_2 (GUI_ID_USER + 0x06)
#define ID_TEXT_3 (GUI_ID_USER + 0x08)
#define ID_TEXT_4 (GUI_ID_USER + 0x0C)
// USER START (Optionally insert additional defines)
// USER END
/*********************************************************************
*
* Static data
*
**********************************************************************
*/
// USER START (Optionally insert additional static data)
// USER END
/*********************************************************************
*
* _aDialogCreate
*/
static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] =
{
{ FRAMEWIN_CreateIndirect, "Framewin", ID_FRAMEWIN_0, 0, 0, 800, 480, 0, 0, 0},
{ TEXT_CreateIndirect, "Text0", ID_TEXT_0, 2, 1, 159, 40, 0, 100, 0 },
{ TEXT_CreateIndirect, "Text1", ID_TEXT_1, 340, 50, 30, 150, 0, 100, 0 },
{ TEXT_CreateIndirect, "Text2", ID_TEXT_2, 408, 50, 30, 150, 0, 100, 0 },
{ TEXT_CreateIndirect, "Text3", ID_TEXT_3, 340, 232, 30, 150, 0, 100, 0 },
{ TEXT_CreateIndirect, "Text4", ID_TEXT_4, 408, 232, 30, 150, 0, 100, 0 },
//{ GRAPH_CreateIndirect, "Graph0", ID_GRAPH_0, 75, 35, 253, 180, 0, 0x0, 0},
//{ GRAPH_CreateIndirect, "Graph1", ID_GRAPH_1, 450, 35, 253, 180, 0, 0x0, 0},
//{ GRAPH_CreateIndirect, "Graph2", ID_GRAPH_2, 75, 217, 253, 180, 0, 0x0, 0},
//{ GRAPH_CreateIndirect, "Graph3", ID_GRAPH_3, 450, 217, 253, 180, 0, 0x0, 0},
};
/*********************************************************************
*
* Static code
*
**********************************************************************
*/
// USER START (Optionally insert additional static code)
// USER END
/*********************************************************************
*
* _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg) {
WM_HWIN hItem;
GUI_UC_SetEncodeUTF8();
// USER START (Optionally insert additional variables)
// USER END
switch (pMsg->MsgId) {
case WM_INIT_DIALOG:
//
// Initialization of 'Framewin'
//
//初始化FRAMEWIN
hItem = pMsg->hWin;
FRAMEWIN_SetTitleHeight(hItem, 80);
FRAMEWIN_SetText(hItem, "参数曲线");
FRAMEWIN_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
FRAMEWIN_SetFont(hItem, &GUI_Fontfont28);
FRAMEWIN_SetTextColor(hItem, 0x00000000);
//
// Initialization of 'Text0'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
TEXT_SetText(hItem, "上下键翻页");
TEXT_SetTextColor(hItem, 0x00000000);
TEXT_SetFont(hItem, &GUI_Fontfont18);
TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
//
// Initialization of 'Text1'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1);
TEXT_SetText(hItem, "高\n压\n曲\n线");
TEXT_SetTextColor(hItem, 0x00000000);
TEXT_SetFont(hItem, &GUI_Fontfont24);
TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
//
// Initialization of 'Text2'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_2);
TEXT_SetText(hItem, "脉\n搏\n波");
TEXT_SetTextColor(hItem, 0x00000000);
TEXT_SetFont(hItem, &GUI_Fontfont24);
TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
//
// Initialization of 'Text3'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_3);
TEXT_SetText(hItem, "低\n压\n曲\n线");
TEXT_SetTextColor(hItem, 0x00000000);
TEXT_SetFont(hItem, &GUI_Fontfont24);
TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
//
// Initialization of 'Text4'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_4);
TEXT_SetText(hItem, "脉\n率\n曲\n线");
TEXT_SetTextColor(hItem, 0x00000000);
TEXT_SetFont(hItem, &GUI_Fontfont24);
TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
// USER START (Optionally insert additional code for further widget initialization)
// USER END
break;
case WM_KEY:
switch (((WM_KEY_INFO*)(pMsg->Data.p))->Key)
{
case GUI_KEY_ENTER:
GUI_EndDialog(pMsg->hWin,0);
User1_historicaldata();
break;
case GUI_KEY_ESCAPE:
GUI_EndDialog(pMsg->hWin,0);
CreateFramewin1();
break;
}
break;
// USER START (Optionally insert additional message handling)
// USER END
default:
WM_DefaultProc(pMsg);
break;
}
}
/*********************************************************************
*
* Public code
*
**********************************************************************
*/
/*********************************************************************
*
* CreateFramewin
*/
WM_HWIN User6_historicaldata(void);
WM_HWIN User6_historicaldata(void) {
WM_HWIN hWin;
hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, WM_HBKWIN, 10, 9);
return hWin;
}
|
|