/******************************************************************* * * _DemoListBoxAsChild */ static void _DemoListBoxAsChild(void) { FRAMEWIN_Handle hFrame; LISTBOX_Handle hListBox; /* Display titel */ GUI_SetBkColor(0xB00000); GUI_SetColor(0xFFFFFF); GUI_SetFont(&GUI_Font24_ASCII); GUI_DispStringHCenterAt("Listbox as child - Sample", 160, 5); GUI_Delay(SPEED / 2); /* Create framewin */ GUI_SetFont(&GUI_Font8x16); GUI_SetTextAlign(GUI_TA_LEFT); GUI_DispStringAtCEOL("using", 5, 40); GUI_DispStringAtCEOL("FRAMEWIN_Create", 5, 55); GUI_Delay(SPEED); hFrame = FRAMEWIN_Create("List box", NULL, WM_CF_SHOW, 100, 80, 120, 140); FRAMEWIN_SetFont(hFrame, &GUI_Font16B_ASCII); FRAMEWIN_SetActive(hFrame, 1); GUI_Delay(SPEED * 0.75); /* Create listbox */ GUI_DispStringAtCEOL("LISTBOX_CreateAsChild", 5, 55); GUI_Delay(SPEED); hListBox = LISTBOX_CreateAsChild(_ListBox, WM_GetClientWindow(hFrame), 0, 0, 0, 0, WM_CF_SHOW); GUI_Delay(SPEED * 0.75); /* Show serveral functions of listbox */ _ShowSeveralFunctions(hListBox); /* Delete framewin widget */ GUI_DispStringAtCEOL("FRAMEWIN_Delete", 5, 55); GUI_Delay(SPEED); FRAMEWIN_Delete(hFrame); GUI_Delay(SPEED * 0.75); /* Clear display */ GUI_Clear(); GUI_Delay(SPEED * 1.5); }
/******************************************************************* * * _DemoDropDownAsChild */ static void _DemoDropDownAsChild(void) { WM_HWIN hFrame; WM_HWIN hDropDown; /* Display titel */ GUI_SetBkColor(0xB00000); GUI_SetColor(0xFFFFFF); GUI_SetFont(&GUI_Font24_ASCII); GUI_DispStringHCenterAt("Dropdown as child - Sample", 160, 5); GUI_Delay(SPEED / 2); /* Create framewin */ GUI_SetFont(&GUI_Font8x16); GUI_SetTextAlign(GUI_TA_LEFT); GUI_DispStringAtCEOL("using", 5, 40); GUI_DispStringAtCEOL("FRAMEWIN_Create", 5, 55); GUI_Delay(SPEED); hFrame = FRAMEWIN_Create("DropDown", NULL, WM_CF_SHOW, 80, 80, 160, 140); FRAMEWIN_SetFont(hFrame, &GUI_Font16B_ASCII); FRAMEWIN_SetActive(hFrame, 1); GUI_Delay(SPEED * 0.75); /* Create listbox */ GUI_DispStringAtCEOL("DROPDOWN_CreateEx", 5, 55); GUI_Delay(SPEED); hDropDown = DROPDOWN_CreateEx(20, 20, 120, 65, WM_GetClientWindow(hFrame), WM_CF_SHOW, 0, 0); GUI_Delay(SPEED * 0.75); /* Show serveral functions of listbox */ _ShowSeveralFunctions(hDropDown); /* Delete framewin widget */ GUI_DispStringAtCEOL("FRAMEWIN_Delete", 5, 55); GUI_Delay(SPEED); FRAMEWIN_Delete(hFrame); GUI_Delay(SPEED * 0.75); /* Clear display */ GUI_Clear(); GUI_Delay(SPEED * 1.5); }
void startUp_Window(void) { WM_HWIN hWin = CreateFramewin_startUp(); GUI_Delay(5000); FRAMEWIN_Delete(hWin); startSetTime_Window(); //char *second = "123"; }
/********************************************************************* * * _DemoHeaderFrameWin */ static void _DemoHeaderFrameWin(void) { FRAMEWIN_Handle hFrameWin; _ChangeMainText("HEADER control inside a FRAMEWIN"); hFrameWin = FRAMEWIN_Create("Title", _cbWindow, WM_CF_SHOW, 10, 80, 300, 140); FRAMEWIN_SetActive(hFrameWin, 1); _hHeader = HEADER_CreateAttached(WM_GetClientWindow(hFrameWin), 1234, 0); _Demo(); FRAMEWIN_Delete(hFrameWin); }
/********************************************************************* * * GUIDEMO_DemoFrameWin */ void GUIDEMO_DemoFrameWin(void) { FRAMEWIN_Handle hFrame; LISTBOX_Handle hListBox; int xSize = LCD_GetXSize(); int ySize = LCD_GetYSize(); int i, x, y, w, h; const GUI_FONT* pFont = &GUI_FontComic18B_1; GUI_COLOR DesktopColorOld; #if GUIDEMO_LARGE GUIDEMO_ShowIntro("Frame Window & Listbox", NULL); #else GUIDEMO_ShowIntro("Frame Window\n & Listbox", NULL); #endif DesktopColorOld = GUIDEMO_SetBkColor(GUI_RED); DesktopColorOld = WM_SetDesktopColor(DesktopColorOld); /* Automatically update desktop window */ x = BORDER; #if GUIDEMO_LARGE y = 75; #else y = BORDER; #endif w = xSize - x - BORDER; h = ySize - y - BORDER; if (w > 140) { w = 140; } if (h > 120) { h = 120; } hFrame = FRAMEWIN_Create("Select language", NULL, WM_CF_SHOW, x, y, w, h); FRAMEWIN_SetActive(hFrame, 1); FRAMEWIN_SetMoveable(hFrame, 1); FRAMEWIN_AddMaxButton(hFrame, FRAMEWIN_BUTTON_RIGHT, 0); FRAMEWIN_AddMinButton(hFrame, FRAMEWIN_BUTTON_RIGHT, 1); FRAMEWIN_SetFont(hFrame, &GUI_Font13_ASCII); hListBox = LISTBOX_CreateAsChild(_asLang, WM_GetClientWindow(hFrame), 0, 0, 0, 0, WM_CF_SHOW | WM_SF_ANCHOR_LEFT | WM_SF_ANCHOR_TOP | WM_SF_ANCHOR_RIGHT | WM_SF_ANCHOR_BOTTOM); WM_SetFocus(hListBox); LISTBOX_SetFont(hListBox, pFont); GUIDEMO_Wait(); for (i = 0; (i < 10) && !GUIDEMO_CheckCancel(); i++) { LISTBOX_IncSel(hListBox); GUIDEMO_Delay(250); } for (i = 0; (i < 10) && !GUIDEMO_CheckCancel(); i++) { LISTBOX_DecSel(hListBox); GUIDEMO_Delay(250); } GUIDEMO_Delay(500); LISTBOX_Delete(hListBox); FRAMEWIN_Delete(hFrame); WM_SetDesktopColor(DesktopColorOld); }
void startSetTime_Window(void) { WM_HWIN hWin = startSetTime(); while(1) { GUI_Delay(100); if (index == 1) { FRAMEWIN_Delete(hWin); ButtonUse_Demo(); break; } } }