本文整理汇总了C++中GUI_Delay函数的典型用法代码示例。如果您正苦于以下问题:C++ GUI_Delay函数的具体用法?C++ GUI_Delay怎么用?C++ GUI_Delay使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GUI_Delay函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: _DemoButton
/*******************************************************************
*
* _DemoButton
*/
static void _DemoButton(void) {
BUTTON_Handle hButton;
int Stat = 0;
GUI_SetFont(&GUI_Font8x16);
GUI_DispStringHCenterAt("Click on phone button...", 160,80);
GUI_Delay(500);
/* Create the button */
hButton = BUTTON_Create(142, 100, 36, 40, GUI_ID_OK, WM_CF_SHOW);
/* Modify the button attributes */
BUTTON_SetBkColor(hButton, 1, GUI_RED);
BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_0, 2, 4);
BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_1, 2, 4);
/* Loop until button is pressed */
while(GUI_GetKey() != GUI_ID_OK) {
if (Stat ^= 1) {
BUTTON_SetState(hButton,
BUTTON_STATE_HASFOCUS | BUTTON_STATE_INACTIVE);
} else {
BUTTON_SetState(hButton,
BUTTON_STATE_HASFOCUS | BUTTON_STATE_PRESSED);
}
GUI_Delay(500);
}
/* Delete button object */
BUTTON_Delete(hButton);
GUI_ClearRect(0, 50, 319, 239);
GUI_Delay(1750);
}
开发者ID:byxob,项目名称:calendar,代码行数:32,代码来源:WIDGET_PhoneButton.c
示例2: _DemoListBox
/*******************************************************************
*
* _DemoListBox
*/
static void _DemoListBox(void) {
int i;
int Entries;
int ySize;
LISTBOX_Handle hListBox;
Entries = GUI_COUNTOF(_ListBox) - 1;
ySize = GUI_GetYDistOfFont(&GUI_Font13B_1) * Entries;
//
// Create the listbox
//
hListBox = LISTBOX_Create(_ListBox, 130, 80, 60, ySize, WM_CF_SHOW);
//
// Change current selection of the listbox
//
for (i = 0; i < Entries-1; i++) {
GUI_Delay(500);
LISTBOX_IncSel(hListBox);
WM_ExecIdle();
}
for (i = 0; i < Entries-1; i++) {
GUI_Delay(500);
LISTBOX_DecSel(hListBox);
WM_ExecIdle();
}
GUI_Delay(750);
//
// Delete listbox widget
//
LISTBOX_Delete(hListBox);
GUI_ClearRect(0, 50, 319, 239);
GUI_Delay(750);
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:37,代码来源:WIDGET_SimpleListBox.c
示例3: _DemoButton
/*******************************************************************
*
* _DemoButton
*/
static void _DemoButton(void) {
BUTTON_Handle hButton;
int Stat = 0;
GUI_SetFont(&GUI_Font8x16);
GUI_DispStringHCenterAt("Click on phone button...", 160,80);
GUI_Delay(500);
/* Create the button */
hButton = BUTTON_Create(142, 100, 36, 40, GUI_ID_OK, WM_CF_SHOW);
/* Modify the button attributes */
BUTTON_SetBkColor (hButton, 1, GUI_RED);
/* Loop until button is pressed */
while (1) {
BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_1, 2, 4);
BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_1, 2, 4);
if (!_Wait(50)) break;
BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_0, 2, 4);
BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_0, 2, 4);
if (!_Wait(45)) break;
BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_2, 2, 4);
BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_2, 2, 4);
if (!_Wait(50)) break;
BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_0, 2, 4);
BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_0, 2, 4);
if (!_Wait(45)) break;
}
BUTTON_SetBitmapEx(hButton, 0, &bm_1bpp_1, 2, 4);
BUTTON_SetBitmapEx(hButton, 1, &bm_1bpp_1, 2, 4);
GUI_ClearRect(0, 80, 319, 120);
GUI_DispStringHCenterAt("You have answered the telephone", 160, 145);
GUI_Delay(2000);
/* Delete button object */
BUTTON_Delete(hButton);
GUI_ClearRect(0, 50, 319, 239);
GUI_Delay(400);
}
开发者ID:huangfeng007,项目名称:ChuangKeUnion-1st,代码行数:39,代码来源:WIDGET_PhoneButton.c
示例4: _DemoCreateWindowAsChild
/*******************************************************************
*
* _DemoCreateWindowAsChild
Demonstrates the use of WM_CreateWindowAsChild
*/
static void _DemoCreateWindowAsChild(void) {
/* Create windows */
_ChangeInfoText("WM_CreateWindowAsChild()");
GUI_Delay(SPEED);
_hChild = WM_CreateWindowAsChild(10, 50, 145, 40, _hWindow2, WM_CF_SHOW | WM_CF_MEMDEV, _cbChild, 0);
GUI_Delay(SPEED);
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:13,代码来源:WM_Sample.c
示例5: GUIDEMO_Delay
int GUIDEMO_Delay(int t) {
int r = 0;
#if GUI_WINSUPPORT
int tRem, tEnd = GUI_GetTime() + t;
PROGBAR_Handle hProg;
WM_SetForegroundWindow(_ahButton[0]);
hProg = (t >100) ? PROGBAR_Create(_FrameWinPosX[1] + 10,
_FrameWinPosY[1] + 25,
_FrameWinSizeX[1] - 20,
7,
WM_CF_SHOW|WM_CF_STAYONTOP) : 0;
#if GUI_SUPPORT_MEMDEV
PROGBAR_EnableMemdev(hProg);
#endif
PROGBAR_SetMinMax(hProg, 0, t);
for (; tRem = tEnd - GUI_GetTime(), (tRem > 0) && !GUIDEMO_CheckCancel();) {
PROGBAR_SetValue(hProg, t - tRem);
WM_ExecIdle();
GUI_Delay(10);
}
PROGBAR_Delete(hProg);
_UpdateCmdWin();
WM_ExecIdle();
#else
GUI_Delay(t);
#endif
return r;
}
开发者ID:rttg125,项目名称:Intelligent-bedroom-system,代码行数:28,代码来源:GUIDEMO.c
示例6: _DemoResizeWindow
/*******************************************************************
*
* _DemoResizeWindow
Demonstrates the use of WM_ResizeWindow
*/
static void _DemoResizeWindow(void) {
int i, tm,tDiff;
_ChangeInfoText("WM_ResizeWindow()");
GUI_Delay(SPEED);
_LiftUp(30);
for (i = 0; i < 20; i++) {
tm = GUI_GetTime();
WM_ResizeWindow(_hWindow1, 1, 1);
WM_ResizeWindow(_hWindow2, -1, -1);
tDiff = 15 - (GUI_GetTime() - tm);
GUI_Delay(tDiff);
}
for (i = 0; i < 40; i++) {
tm = GUI_GetTime();
WM_ResizeWindow(_hWindow1, -1, -1);
WM_ResizeWindow(_hWindow2, 1, 1);
tDiff = 15 - (GUI_GetTime() - tm);
GUI_Delay(tDiff);
}
for (i = 0; i < 20; i++) {
tm = GUI_GetTime();
WM_ResizeWindow(_hWindow1, 1, 1);
WM_ResizeWindow(_hWindow2, -1, -1);
tDiff = 15 - (GUI_GetTime() - tm);
GUI_Delay(tDiff);
}
_LiftDown(30);
GUI_Delay(SPEED);
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:35,代码来源:WM_Sample.c
示例7: MainTask
/*********************************************************************
*
* MainTask
*/
void MainTask(void) {
GUI_Init();
//
// Check if recommended memory for the sample is available
//
if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
GUI_ErrorOut("Not enough memory available.");
return;
}
#if GUI_SUPPORT_MEMDEV
WM_SetCreateFlags(WM_CF_MEMDEV);
#endif
WM_SetCallback(WM_HBKWIN, &_cbBkWindow);
//
// Create message box and wait until it is closed
//
while (1) {
GUI_MessageBox("This text is shown\nin a message box",
"Caption/Title", GUI_MESSAGEBOX_CF_MOVEABLE);
GUI_Delay(750); // Wait for a short moment ...
GUI_MessageBox("New message !",
"Caption/Title", GUI_MESSAGEBOX_CF_MOVEABLE);
GUI_Delay(750);
}
}
开发者ID:Trietptm-on-Coding-Algorithms,项目名称:CodeLibrary,代码行数:29,代码来源:DIALOG_MessageBox.c
示例8: GUIDEMO_Delay
int GUIDEMO_Delay(int t) {
int r = 0;
#if GUI_WINSUPPORT
int tm, value;
#if GUIDEMO_LARGE
PROGBAR_Handle hProg;
#endif
WM_SetForegroundWindow(_ahButton[0]);
#if GUIDEMO_LARGE
hProg = (t >100) ? PROGBAR_CreateAsChild(10, 10, 60, 7, _ahInfoWin[1], 0,
WM_CF_SHOW | WM_CF_STAYONTOP| WM_CF_MEMDEV) : 0;
PROGBAR_SetMinMax(hProg, 0, t);
#endif
tm = GUI_GetTime();
do {
value = GUI_GetTime() - tm;
#if GUIDEMO_LARGE
PROGBAR_SetValue(hProg, value);
WM_ExecIdle();
#endif
GUI_Delay(10);
} while ((value < t) && !GUIDEMO_CheckCancel());
#if GUIDEMO_LARGE
PROGBAR_Delete(hProg);
#endif
_UpdateCmdWin();
WM_ExecIdle();
#else
GUI_Delay(t);
#endif
return r;
}
开发者ID:Mrho,项目名称:ucos-gui,代码行数:34,代码来源:GUIDEMO.c
示例9: _DrawPolygon
/*******************************************************************
*
* _DrawPolygon
Draws polygons of different shapes and colors
*/
static void _DrawPolygon(void) {
int y = 90;
/* clear display */
GUI_SetBkColor(GUI_BLACK);
GUI_Clear();
/* display text */
GUI_SetColor(GUI_WHITE);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_SetTextAlign(GUI_TA_HCENTER);
GUI_DispStringAt("DrawPolygon - Sample", 160, 5);
GUI_SetFont(&GUI_Font8x16);
GUI_DispStringAt("using", 5, 40);
GUI_DispStringAt("GUI_FillPolygon", 5, 55);
GUI_SetTextAlign(GUI_TA_HCENTER);
GUI_DispStringAt("Polygons of arbitrary shape\nin any color", 160, y + 90);
GUI_Delay(500);
/* draw filled polygons */
while (1) {
GUI_ClearRect(100, y, 220, y + 85);
GUI_SetColor(GUI_BLUE);
GUI_FillPolygon (&_aPointArrow[0], 7, 160, y + 80);
GUI_Delay(1000);
GUI_ClearRect(100, y, 220, y + 85);
GUI_SetColor(GUI_RED);
GUI_FillPolygon (&_aPointStar[0], 8, 160, y + 45);
GUI_Delay(1000);
GUI_ClearRect(100, y, 220, y + 85);
GUI_SetColor(GUI_GREEN);
GUI_FillPolygon(&_aPointHexagon[0], 6, 160, y + 45);
GUI_Delay(1000);
}
}
开发者ID:byxob,项目名称:calendar,代码行数:38,代码来源:2DGL_DrawPolygon.c
示例10: _DemoListBox
/*******************************************************************
*
* _DemoListBox
*/
void _DemoListBox(void) {
int i;
int Entries = GUI_COUNTOF(_ListBox) - 1;
LISTBOX_Handle hListBox;
int xSize = LCD_GetXSize();
//int ySize = GUI_GetYDistOfFont(&GUI_Font13B_1) * Entries;
int ySize = LCD_GetYSize();
/* Create the listbox */
hListBox = LISTBOX_Create(_ListBox, 0, 0, xSize, ySize, WM_CF_SHOW);
/* Change current selection of the listbox */
for (i = 0; i < Entries-1; i++) {
GUI_Delay(500);
LISTBOX_IncSel(hListBox);
WM_ExecIdle();
}
GUI_Delay(75000);
for (i = 0; i < Entries-1; i++) {
GUI_Delay(500);
LISTBOX_DecSel(hListBox);
WM_ExecIdle();
}
GUI_Delay(7500);
/* Delete listbox widget */
LISTBOX_Delete(hListBox);
GUI_ClearRect(0, 50, 319, 239);
GUI_Delay(750);
}
开发者ID:dadianxukong,项目名称:gps,代码行数:31,代码来源:WIDGET_SimpleListBox.c
示例11: CreateWindow
/*********************************************************************
*
* MainTask
*/
void CreateWindow(void) {
WM_HWIN hMultiPage;
WM_HWIN hFrameWin;
WM_HWIN hDialog;
//
// Check if recommended memory for the sample is available
//
if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
GUI_ErrorOut("Not enough memory available.");
return;
}
WM_SetCallback(WM_HBKWIN, _cbBkWindow);
//
// Create the frame window
//
hFrameWin = FRAMEWIN_Create("Sample", NULL, WM_CF_SHOW, 0, 0, 240, 152);
FRAMEWIN_SetClientColor(hFrameWin, GUI_GREEN);
FRAMEWIN_SetActive(hFrameWin, 1);
FRAMEWIN_SetMoveable(hFrameWin, 1);
//
// Create the MULTIPAGE widget
//
hMultiPage = MULTIPAGE_CreateEx(7, 6, 220, 120, WM_GetClientWindow(hFrameWin), WM_CF_SHOW, 0, 0);
GUI_Delay(500);
//
// Create and attach the MULTIPAGE dialog windows
//
hDialog = GUI_CreateDialogBox(_aDialogCreate1, GUI_COUNTOF(_aDialogCreate1), NULL, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 1");
GUI_Delay(500);
hDialog = GUI_CreateDialogBox(_aDialogCreate2, GUI_COUNTOF(_aDialogCreate2), NULL, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 2");
GUI_Delay(500);
hDialog = GUI_CreateDialogBox(_aDialogCreate3, GUI_COUNTOF(_aDialogCreate3), NULL, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 3");
GUI_Delay(500);
hDialog = GUI_CreateDialogBox(_aDialogCreate4, GUI_COUNTOF(_aDialogCreate4), _cbDialog4, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 4");
GUI_Delay(500);
hDialog = GUI_CreateDialogBox(_aDialogCreate5, GUI_COUNTOF(_aDialogCreate5), NULL, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 5");
GUI_Delay(500);
hDialog = GUI_CreateDialogBox(_aDialogCreate6, GUI_COUNTOF(_aDialogCreate6), NULL, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 6");
GUI_Delay(500);
//
// Demonstrate the use of MULTIPAGE_SetAlign
//
MULTIPAGE_SetAlign(hMultiPage, MULTIPAGE_ALIGN_RIGHT);
GUI_Delay(500);
MULTIPAGE_SetAlign(hMultiPage, MULTIPAGE_ALIGN_RIGHT | MULTIPAGE_ALIGN_BOTTOM);
GUI_Delay(500);
MULTIPAGE_SetAlign(hMultiPage, MULTIPAGE_ALIGN_LEFT | MULTIPAGE_ALIGN_BOTTOM);
while (1) {
GUI_Delay(100);
}
}
开发者ID:leyjere,项目名称:SLSF4,代码行数:63,代码来源:FramewinDLG.c
示例12: _DemoInvalidateWindow
/*******************************************************************
*
* _DemoInvalidateWindow
Demonstrates the use of WM_InvalidateWindow
*/
static void _DemoInvalidateWindow(void) {
_ChangeInfoText("WM_InvalidateWindow()");
_WindowColor1 = GUI_BLUE;
_FrameColor1 = GUI_GREEN;
GUI_Delay(SPEED);
WM_InvalidateWindow(_hWindow1);
GUI_Delay(SPEED);
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:14,代码来源:WM_Sample.c
示例13: MainTask
/*********************************************************************
*
* MainTask
*/
void MainTask(void) {
WM_HWIN hMultiPage;
WM_HWIN hFrameWin;
WM_HWIN hDialog;
//
// Enable use of memory devices
//
WM_SetCreateFlags(WM_CF_MEMDEV);
GUI_Init();
WM_SetCallback(WM_HBKWIN, _cbBkWindow);
//
// Create the frame window
//
hFrameWin = FRAMEWIN_Create("FrameWindow", NULL, WM_CF_SHOW, 40, 44, 240, 152);
FRAMEWIN_SetClientColor(hFrameWin, GUI_GREEN);
FRAMEWIN_SetActive(hFrameWin, 1);
FRAMEWIN_SetMoveable(hFrameWin, 1);
//
// Create the MULTIPAGE widget
//
hMultiPage = MULTIPAGE_CreateEx(7, 6, 220, 120, WM_GetClientWindow(hFrameWin), WM_CF_SHOW, 0, 0);
GUI_Delay(500);
//
// Create and attach the MULTIPAGE dialog windows
//
hDialog = GUI_CreateDialogBox(_aDialogCreate1, GUI_COUNTOF(_aDialogCreate1), NULL, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 1");
GUI_Delay(500);
hDialog = GUI_CreateDialogBox(_aDialogCreate2, GUI_COUNTOF(_aDialogCreate2), NULL, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 2");
GUI_Delay(500);
hDialog = GUI_CreateDialogBox(_aDialogCreate3, GUI_COUNTOF(_aDialogCreate3), NULL, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 3");
GUI_Delay(500);
hDialog = GUI_CreateDialogBox(_aDialogCreate4, GUI_COUNTOF(_aDialogCreate4), _cbDialog4, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 4");
GUI_Delay(500);
hDialog = GUI_CreateDialogBox(_aDialogCreate5, GUI_COUNTOF(_aDialogCreate5), NULL, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 5");
GUI_Delay(500);
hDialog = GUI_CreateDialogBox(_aDialogCreate6, GUI_COUNTOF(_aDialogCreate6), NULL, WM_UNATTACHED, 0, 0);
MULTIPAGE_AddPage(hMultiPage, hDialog, "Page 6");
GUI_Delay(500);
//
// Demonstrate the use of MULTIPAGE_SetAlign
//
MULTIPAGE_SetAlign(hMultiPage, MULTIPAGE_ALIGN_RIGHT);
GUI_Delay(500);
MULTIPAGE_SetAlign(hMultiPage, MULTIPAGE_ALIGN_RIGHT | MULTIPAGE_ALIGN_BOTTOM);
GUI_Delay(500);
MULTIPAGE_SetAlign(hMultiPage, MULTIPAGE_ALIGN_LEFT | MULTIPAGE_ALIGN_BOTTOM);
while (1) {
GUI_Delay(100);
}
}
开发者ID:xinshaochen,项目名称:emWin,代码行数:60,代码来源:WIDGET_Multipage.c
示例14: _DemoHideShowChild
/*******************************************************************
*
* _DemoHideShowChild
Demonstrates the use of WM_HideWindow and WM_ShowWindow
*/
static void _DemoHideShowChild(void) {
_ChangeInfoText("WM_HideWindow(Child)");
GUI_Delay(SPEED);
WM_HideWindow(_hChild);
GUI_Delay(SPEED);
_ChangeInfoText("WM_ShowWindow(Child)");
GUI_Delay(SPEED);
WM_ShowWindow(_hChild);
GUI_Delay(SPEED);
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:16,代码来源:WM_Sample.c
示例15: _DemoListView
/*********************************************************************
*
* _DemoListView
*/
static void _DemoListView(void) {
_ChangeMainText("LISTVIEW control without parent");
_ChangeInfoText("LISTVIEW_Create");
_hListView = LISTVIEW_Create(10, 80, 300, 89, 0, 1234, WM_CF_SHOW, 0);
GUI_Delay(SPEED / 2);
_Demo();
_ChangeInfoText("LISTVIEW_Delete");
LISTVIEW_Delete(_hListView);
GUI_Delay(SPEED);
}
开发者ID:caicry,项目名称:uFrame,代码行数:14,代码来源:WIDGET_ListView.c
示例16: _DemoCreateWindow
/*******************************************************************
*
* _DemoCreateWindow
Demonstrates the use of WM_CreateWindow
*/
static void _DemoCreateWindow(void) {
/* Set callback for background window */
_cbBkWindowOld = WM_SetCallback(WM_HBKWIN, _cbBkWindow);
/* Create windows */
_ChangeInfoText("WM_CreateWindow()");
GUI_Delay(SPEED);
_hWindow1 = WM_CreateWindow( 50, 70, 165, 100, WM_CF_SHOW | WM_CF_MEMDEV, _cbWindow1, 0);
GUI_Delay(SPEED/3);
_hWindow2 = WM_CreateWindow(105, 125, 165, 100, WM_CF_SHOW | WM_CF_MEMDEV, _cbWindow2, 0);
GUI_Delay(SPEED);
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:17,代码来源:WM_Sample.c
示例17: _ChangeInfoText
/*********************************************************************
*
* _ChangeInfoText
*/
static int _ChangeInfoText(const char* pString, int Delay) {
if (_hFrame) {
GUI_Delay(Delay * 0.75);
strcpy(_acInfoText, pString);
WM_InvalidateWindow(WM_HBKWIN);
}
if (_hFrame) {
GUI_Delay(Delay);
return 0;
}
return 1;
}
开发者ID:dadianxukong,项目名称:gps,代码行数:16,代码来源:WIDGET_Multiedit.c
示例18: _DemoSetDesktopColor
/*******************************************************************
*
* _DemoSetDesktopColor
Demonstrates the use of WM_SetDesktopColor
*/
static void _DemoSetDesktopColor(void) {
GUI_SetBkColor(GUI_BLUE);
GUI_Clear();
_DrawInfoText("WM_SetDesktopColor()");
GUI_Delay(SPEED*3/2);
WM_SetDesktopColor(GUI_BLACK);
GUI_Delay(SPEED/2);
/* Set background color and invalidate desktop color.
This is needed for the later redrawing demo. */
GUI_SetBkColor(GUI_BLACK);
WM_SetDesktopColor(GUI_INVALID_COLOR);
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:18,代码来源:WM_Sample.c
示例19: _DemoVScreen
/*********************************************************************
*
* _DemoVScreen
*/
static void _DemoVScreen(void) {
GUI_RECT Rect;
unsigned j;
int xSize;
int ySize;
int n;
int aDelay[] = { 20, 5 };
xSize = LCD_GetXSize();
ySize = LCD_GetYSize();
GUI_SetFont(&GUI_FontComic24B_ASCII);
GUI_SetTextMode(GUI_TM_TRANS);
Rect.x0 = 0;
Rect.y0 = 0;
Rect.x1 = xSize - 1;
Rect.y1 = ySize - 1;
GUI_SetColor(GUI_WHITE);
GUI_DispStringInRect("Default screen", &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER);
GUI_Delay(250);
Rect.y0 += ySize;
Rect.y1 += ySize;
GUI_DrawGradientV(Rect.x0, Rect.y0, Rect.x1, Rect.y1, 0xFFFFFF, 0x000000);
Rect.y1 -= ySize / 3;
GUI_SetColor(GUI_DARKGREEN);
GUI_DispStringInRect("Here is the virtual screen", &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER);
n = ySize / 5;
for (j = 0; j < GUI_COUNTOF(aDelay); j++) {
if (_Loop(0, 5, n, aDelay[j]) == 1) {
return;
}
GUI_SetOrg(0, ySize);
GUI_Delay(250);
if (_Loop(ySize, -5, n, aDelay[j]) == 1) {
return;
}
GUI_SetOrg(0, 0);
GUI_Delay(250);
if (GUIDEMO_CheckCancel()) {
return;
}
}
for (j = 0; j < 5; j++) {
GUI_SetOrg(0, ySize);
GUI_Delay(200);
GUI_SetOrg(0, 0);
GUI_Delay(200);
if (GUIDEMO_CheckCancel()) {
return;
}
}
GUIDEMO_Delay(1000);
}
开发者ID:fzzjoy,项目名称:SimulationTrial,代码行数:56,代码来源:GUIDEMO_VScreen.c
示例20: GUIDEMO_Messagebox
void GUIDEMO_Messagebox(void) {
GUI_COLOR Color;
GUIDEMO_ShowIntro("Message boxes",
"Message boxes" "\ncan easily be created");
Color = WM_SetDesktopColor(GUI_RED);
GUI_MessageBox("Message", "Text", 0);
GUI_Delay(1000);
GUI_MessageBox("2. Message", "Text", 0);
GUI_Delay(1000);
WM_SetDesktopColor(Color);
GUIDEMO_NotifyStartNext();
}
开发者ID:Arie001,项目名称:cortex-m3-applications.temperaturecontrolui,代码行数:13,代码来源:GUIDEMO_Messagebox.c
注:本文中的GUI_Delay函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论