當前位置: 首頁>>代碼示例>>C++>>正文


C++ GUI_Delay函數代碼示例

本文整理匯總了C++中GUI_Delay函數的典型用法代碼示例。如果您正苦於以下問題:C++ GUI_Delay函數的具體用法?C++ GUI_Delay怎麽用?C++ GUI_Delay使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GUI_Delay函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的GUI_Delay函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。