Andrew Reed / Mbed OS CITY1082-i2c_master_wifi_mqtt
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers WIDGET_Effect.c Source File

WIDGET_Effect.c

00001 /*********************************************************************
00002 *                SEGGER Microcontroller GmbH                         *
00003 *        Solutions for real time microcontroller applications        *
00004 **********************************************************************
00005 *                                                                    *
00006 *        (c) 1996 - 2018  SEGGER Microcontroller GmbH                *
00007 *                                                                    *
00008 *        Internet: www.segger.com    Support:  support@segger.com    *
00009 *                                                                    *
00010 **********************************************************************
00011 
00012 ** emWin V5.48 - Graphical user interface for embedded applications **
00013 All  Intellectual Property rights  in the Software belongs to  SEGGER.
00014 emWin is protected by  international copyright laws.  Knowledge of the
00015 source code may not be used to write a similar product.  This file may
00016 only be used in accordance with the following terms:
00017 
00018 The software  has been licensed to  Cypress Semiconductor Corporation,
00019 whose registered  office is situated  at 198 Champion Ct. San Jose, CA 
00020 95134 USA  solely for the  purposes of creating  libraries for Cypress
00021 PSoC3 and  PSoC5 processor-based devices,  sublicensed and distributed
00022 under  the  terms  and  conditions  of  the  Cypress  End User License
00023 Agreement.
00024 Full source code is available at: www.segger.com
00025 
00026 We appreciate your understanding and fairness.
00027 ----------------------------------------------------------------------
00028 Licensing information
00029 Licensor:                 SEGGER Microcontroller Systems LLC
00030 Licensed to:              Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA
00031 Licensed SEGGER software: emWin
00032 License number:           GUI-00319
00033 License model:            Services and License Agreement, signed June 10th, 2009
00034 Licensed platform:        Any Cypress platform (Initial targets are: PSoC3, PSoC5)
00035 ----------------------------------------------------------------------
00036 Support and Update Agreement (SUA)
00037 SUA period:               2009-06-12 - 2022-07-27
00038 Contact to extend SUA:    sales@segger.com
00039 ----------------------------------------------------------------------
00040 File        : WIDGET_Effect.c
00041 Purpose     : Example demonstrating the use of a widget effects
00042 Requirements: WindowManager - (x)
00043               MemoryDevices - (x)
00044               AntiAliasing  - ( )
00045               VNC-Server    - ( )
00046               PNG-Library   - ( )
00047               TrueTypeFonts - ( )
00048 ----------------------------------------------------------------------
00049 */
00050 #include <stddef.h>
00051 #include <string.h>
00052 #include "GUI.h"
00053 #include "DIALOG.h"
00054 #include "PROGBAR.h"
00055 #include "LISTVIEW.h"
00056 
00057 /*********************************************************************
00058 *
00059 *       Defines
00060 *
00061 **********************************************************************
00062 */
00063 #define NUM_WIDGETS GUI_COUNTOF(_aID)
00064 
00065 //
00066 // Recommended memory to run the sample with adequate performance
00067 //
00068 #define RECOMMENDED_MEMORY (1024L * 30)
00069 
00070 /*********************************************************************
00071 *
00072 *       Static data
00073 *
00074 **********************************************************************
00075 */
00076 
00077 //
00078 // Dialog resource of main dialog box
00079 //
00080 static const GUI_WIDGET_CREATE_INFO _aDlgWidgets[] = {
00081   { WINDOW_CreateIndirect,    "",             0,                   0,   0, 499, 239, 0                         },
00082   { TEXT_CreateIndirect,      "Progress bar", GUI_ID_TEXT0,       10,   5, 100,  15, TEXT_CF_HCENTER           },
00083   { PROGBAR_CreateIndirect,   NULL,           GUI_ID_PROGBAR0,    10,  20, 100,  20                            },
00084   { TEXT_CreateIndirect,      "Button",       GUI_ID_TEXT0,       10,  50, 100,  15, TEXT_CF_HCENTER           },
00085   { BUTTON_CreateIndirect,    "Button",       GUI_ID_BUTTON0,     10,  65, 100,  20                            },
00086   { TEXT_CreateIndirect,      "Dropdown",     GUI_ID_TEXT0,       10,  95, 100,  15, TEXT_CF_HCENTER           },
00087   { DROPDOWN_CreateIndirect,  NULL,           GUI_ID_DROPDOWN0,   10, 110, 100,  65, DROPDOWN_CF_AUTOSCROLLBAR },
00088   { TEXT_CreateIndirect,      "Edit",         GUI_ID_TEXT0,      120,   5, 100,  15, TEXT_CF_HCENTER           },
00089   { EDIT_CreateIndirect,      NULL,           GUI_ID_EDIT0,      120,  20, 100,  20                            },
00090   { TEXT_CreateIndirect,      "Listbox",      GUI_ID_TEXT0,      120,  50, 100,  15, TEXT_CF_HCENTER           },
00091   { LISTBOX_CreateIndirect,   "",             GUI_ID_LISTBOX0,   120,  65, 100, 125, 0, 0                      },
00092   { TEXT_CreateIndirect,      "Listview",     GUI_ID_TEXT0,      230,   5, 100,  15, TEXT_CF_HCENTER           },
00093   { LISTVIEW_CreateIndirect,  NULL,           GUI_ID_LISTVIEW0,  230,  20, 100, 100, 0                         },
00094   { TEXT_CreateIndirect,      "Multiedit",    GUI_ID_TEXT0,      230, 130, 100,  15, TEXT_CF_HCENTER           },
00095   { MULTIEDIT_CreateIndirect, "",             GUI_ID_MULTIEDIT0, 230, 145, 100,  45, 0, 0                      },
00096   { TEXT_CreateIndirect,      "Scrollbars",   GUI_ID_TEXT0,      340,   5,  70,  15, TEXT_CF_HCENTER           },
00097   { SCROLLBAR_CreateIndirect, NULL,           GUI_ID_SCROLLBAR0, 340, 175,  70,  15, 0                         },
00098   { SCROLLBAR_CreateIndirect, NULL,           GUI_ID_SCROLLBAR1, 340,  20,  20, 140, SCROLLBAR_CF_VERTICAL     },
00099   { SCROLLBAR_CreateIndirect, NULL,           GUI_ID_SCROLLBAR2, 370,  20,  40, 140, SCROLLBAR_CF_VERTICAL     },
00100   { TEXT_CreateIndirect,      "Sliders",      GUI_ID_TEXT0,      420,   5,  70,  15, TEXT_CF_HCENTER           },
00101   { SLIDER_CreateIndirect,    NULL,           GUI_ID_SLIDER0,    420, 175,  70,  15, 0                         },
00102   { SLIDER_CreateIndirect,    NULL,           GUI_ID_SLIDER1,    420,  20,  20, 140, SLIDER_CF_VERTICAL        },
00103   { SLIDER_CreateIndirect,    NULL,           GUI_ID_SLIDER2,    450,  20,  40, 140, SLIDER_CF_VERTICAL        },
00104 };
00105 
00106 //
00107 // Dialog resource of options dialog box
00108 //
00109 static const GUI_WIDGET_CREATE_INFO _aDlgOptions[] = {
00110   { FRAMEWIN_CreateIndirect, "Effect", 0,             10, 30,  65, 95, 0                    },
00111   { CHECKBOX_CreateIndirect, NULL,     GUI_ID_CHECK0,  2,  2,   0,  0                       },
00112   { RADIO_CreateIndirect,    NULL,     GUI_ID_RADIO0,  0, 20,   0,  0, 0,            0x1003 },
00113   { TEXT_CreateIndirect,     "Auto",   GUI_ID_TEXT0,  22,  4, 100, 15, TEXT_CF_LEFT         },
00114   { TEXT_CreateIndirect,     "3D",     GUI_ID_TEXT0,  17, 22, 100, 15, TEXT_CF_LEFT         },
00115   { TEXT_CreateIndirect,     "Simple", GUI_ID_TEXT0,  17, 38, 100, 15, TEXT_CF_LEFT         },
00116   { TEXT_CreateIndirect,     "None",   GUI_ID_TEXT0,  17, 54, 100, 15, TEXT_CF_LEFT         },
00117 };
00118 
00119 //
00120 // Array of widget ID's
00121 //
00122 static int _aID[] = {
00123   GUI_ID_BUTTON0,    GUI_ID_EDIT0,     GUI_ID_LISTBOX0,   GUI_ID_PROGBAR0,   GUI_ID_LISTVIEW0,
00124   GUI_ID_MULTIEDIT0, GUI_ID_DROPDOWN0, GUI_ID_SCROLLBAR0, GUI_ID_SCROLLBAR1, GUI_ID_SCROLLBAR2,
00125   GUI_ID_SLIDER0,    GUI_ID_SLIDER1,   GUI_ID_SLIDER2
00126 };
00127 
00128 //
00129 // Array of widget handles
00130 //
00131 static WM_HWIN _ahWin[GUI_COUNTOF(_aID)];
00132 
00133 //
00134 // Makes it easier to access the array _ahWin
00135 //
00136 enum {
00137   BUTTON0,    EDIT0,     LISTBOX0,   PROGBAR0,   LISTVIEW0,
00138   MULTIEDIT0, DROPDOWN0, SCROLLBAR0, SCROLLBAR1, SCROLLBAR2,
00139   SLIDER0,    SLIDER1,   SLIDER2
00140 };
00141 
00142 //
00143 // Array of available effects
00144 //
00145 const WIDGET_EFFECT * _apEffect[] = {
00146   &WIDGET_Effect_3D,     
00147   &WIDGET_Effect_Simple, 
00148   &WIDGET_Effect_None
00149 };
00150 
00151 //
00152 // Array of strings used to label the frame window
00153 //
00154 const char * _asEffect[] = {
00155   "Widget effect: 3D",
00156   "Widget effect: Simple", 
00157   "Widget effect: None"
00158 };
00159 
00160 static WM_HWIN _hDlg;
00161 static WM_HWIN _hFrameWin;
00162 static int     _AutoMode = 1;
00163 
00164 /*********************************************************************
00165 *
00166 *       Static code
00167 *
00168 **********************************************************************
00169 */
00170 /*********************************************************************
00171 *
00172 *       _SetWidgetEffect
00173 *
00174 * Function description
00175 *   Sets the effect for the given widget and its child windows
00176 */
00177 static void _SetWidgetEffect(WM_HWIN hWin, const WIDGET_EFFECT * pEffect) {
00178   WM_HWIN hChild;
00179 
00180   if (hWin) {
00181     WIDGET_SetEffect(hWin, pEffect);
00182     //
00183     // Iterate over the child windows
00184     //
00185     hChild = WM_GetFirstChild(hWin);
00186     while (hChild) {
00187       WIDGET_SetEffect(hChild, pEffect);
00188       hChild = WM_GetNextSibling(hChild);
00189     }
00190   }
00191 }
00192 
00193 /*********************************************************************
00194 *
00195 *       _SetEffect
00196 */
00197 static void _SetEffect(int Index) {
00198   const WIDGET_EFFECT * pEffect;
00199   U32                   i;
00200 
00201   pEffect = _apEffect[Index];
00202   WIDGET_SetDefaultEffect(pEffect);
00203   FRAMEWIN_SetText(_hFrameWin, _asEffect[Index]);
00204   //
00205   // Iterate over all dialog widgets
00206   //
00207   for (i = 0; i < NUM_WIDGETS; i++) {
00208     _SetWidgetEffect(_ahWin[i], _apEffect[Index]);
00209   }
00210 }
00211 
00212 /*********************************************************************
00213 *
00214 *       _cbBkWindow
00215 */
00216 static void _cbBkWindow(WM_MESSAGE * pMsg) {
00217   switch (pMsg->MsgId) {
00218   case WM_PAINT:
00219     GUI_SetBkColor(GUI_BLUE);
00220     GUI_Clear();
00221     GUI_SetColor(GUI_WHITE);
00222     GUI_SetFont(&GUI_Font24_ASCII);
00223     GUI_DispStringHCenterAt("WIDGET_Effect - Sample", 160, 5);
00224     break;
00225   default:
00226     WM_DefaultProc(pMsg);
00227   }
00228 }
00229 
00230 /*********************************************************************
00231 *
00232 *       _cbCallbackWidgets
00233 *
00234 * Function description
00235 *   Initializes the widgets of the main dialog box
00236 */
00237 static void _cbCallbackWidgets(WM_MESSAGE * pMsg) {
00238   WM_HWIN hDlg;
00239   char    acBuffer[10];
00240   int     Len;
00241   U32     i;
00242   U32     j;
00243 
00244   hDlg = pMsg->hWin;
00245   switch (pMsg->MsgId) {
00246   case WM_INIT_DIALOG:
00247     //
00248     // Get handles of widgets
00249     //
00250     for (i = 0; i < NUM_WIDGETS; i++) {
00251       _ahWin[i] = WM_GetDialogItem(hDlg, _aID[i]);
00252     }
00253     //
00254     // Init dropdown widget
00255     //
00256     for (i = 0; i < 8; i++) {
00257       strcpy(acBuffer, "Item x");
00258       Len = strlen(acBuffer);
00259       acBuffer[Len - 1] = '1' + i;
00260       DROPDOWN_AddString(_ahWin[DROPDOWN0], acBuffer);
00261     }
00262     //
00263     // Init edit widget
00264     //
00265     EDIT_SetText(_ahWin[EDIT0], "Edit");
00266     //
00267     // Init listbox widget
00268     //
00269     LISTBOX_SetAutoScrollV(_ahWin[LISTBOX0], 1);
00270     for (i = 0; i < 4; i++) {
00271       strcpy(acBuffer, "Item x");
00272       Len = strlen(acBuffer);
00273       acBuffer[Len - 1] = '1' + i;
00274       LISTBOX_AddString(_ahWin[LISTBOX0], acBuffer);
00275     }
00276     //
00277     // Init listview widget
00278     //
00279     for (i = 0; i < 2; i++) {
00280       strcpy(acBuffer, "Col. x");
00281       Len = strlen(acBuffer);
00282       acBuffer[Len - 1] = '1' + i;
00283       LISTVIEW_AddColumn(_ahWin[LISTVIEW0], 40, acBuffer, GUI_TA_CENTER);
00284     }
00285     for (i = 0; i < 9; i++) {
00286       LISTVIEW_AddRow(_ahWin[LISTVIEW0], NULL);
00287       for (j = 0; j < LISTVIEW_GetNumColumns(_ahWin[LISTVIEW0]); j++) {
00288         strcpy(acBuffer, "Rx / Cx");
00289         acBuffer[1] = '1' + i;
00290         acBuffer[6] = '1' + j;
00291         LISTVIEW_SetItemText(_ahWin[LISTVIEW0], j, i, acBuffer);
00292       }
00293     }
00294     LISTVIEW_SetGridVis(_ahWin[LISTVIEW0], 1);
00295     SCROLLBAR_CreateAttached(_ahWin[LISTVIEW0], SCROLLBAR_CF_VERTICAL);
00296     //
00297     // Init multiedit widget
00298     //
00299     MULTIEDIT_SetText(_ahWin[MULTIEDIT0], "This text could be modified by the MULTIEDIT widget");
00300     MULTIEDIT_SetWrapWord(_ahWin[MULTIEDIT0]);
00301     MULTIEDIT_SetAutoScrollV(_ahWin[MULTIEDIT0], 1);
00302     //
00303     // Init progbar widget
00304     //
00305     WIDGET_SetEffect(_ahWin[PROGBAR0], &WIDGET_Effect_3D);
00306     break;
00307   default:
00308     WM_DefaultProc(pMsg);
00309   }
00310 }
00311 
00312 /*********************************************************************
00313 *
00314 *       _cbCallbackFramewin
00315 *
00316 * Function description
00317 *   Handles the scroll messages of the scrollbar
00318 */
00319 static void _cbCallbackFramewin(WM_MESSAGE * pMsg) {
00320   WM_SCROLL_STATE ScrollState;
00321   WM_HWIN         hDlg;
00322   int             xPos;
00323   int             yPos;
00324 
00325   hDlg = pMsg->hWin;
00326   switch (pMsg->MsgId) {
00327   case WM_NOTIFY_PARENT:
00328     if (pMsg->Data.v == WM_NOTIFICATION_VALUE_CHANGED) {
00329       if (pMsg->hWinSrc == WM_GetScrollbarH(hDlg)) {
00330         WM_GetScrollState(pMsg->hWinSrc, &ScrollState);
00331         xPos = WM_GetWindowOrgX(WM_GetParent(_hDlg)) - ScrollState.v;
00332         yPos = WM_GetWindowOrgY(_hDlg);
00333         WM_MoveTo(_hDlg, xPos, yPos);
00334       }
00335     }
00336     break;
00337   default:
00338     WM_DefaultProc(pMsg);
00339   }
00340 }
00341 
00342 /*********************************************************************
00343 *
00344 *       _cbCallbackOptions
00345 *
00346 * Function description
00347 *   Callback of the options dialog box, sets the widget effects
00348 */
00349 static void _cbCallbackOptions(WM_MESSAGE * pMsg) {
00350   WM_HWIN hItem;
00351   WM_HWIN hDlg;
00352 
00353   hDlg = pMsg->hWin;
00354   switch (pMsg->MsgId) {
00355   case WM_INIT_DIALOG:
00356     hItem = WM_GetDialogItem(hDlg, GUI_ID_CHECK0);
00357     CHECKBOX_Check(hItem);
00358     break;
00359   case WM_NOTIFY_PARENT:
00360     if (pMsg->Data.v == WM_NOTIFICATION_VALUE_CHANGED) {
00361       hItem = WM_GetDialogItem(hDlg, GUI_ID_RADIO0);
00362       if (pMsg->hWinSrc == hItem) {
00363         _SetEffect(RADIO_GetValue(hItem));
00364       }
00365     } else if (pMsg->Data.v == WM_NOTIFICATION_RELEASED) {
00366       hItem = WM_GetDialogItem(hDlg, GUI_ID_CHECK0);
00367       if (pMsg->hWinSrc == hItem) {
00368         _AutoMode = CHECKBOX_IsChecked(hItem);
00369       }
00370     }
00371     break;
00372   default:
00373     WM_DefaultProc(pMsg);
00374   }
00375 }
00376 
00377 /*********************************************************************
00378 *
00379 *       Public code
00380 *
00381 **********************************************************************
00382 */
00383 /*********************************************************************
00384 *
00385 *       MainTask
00386 */
00387 void MainTask(void) {
00388   WM_SCROLL_STATE ScrollState;
00389   GUI_RECT RectClient;
00390   GUI_RECT RectDlg;
00391   WM_HWIN  hDlgOptions;
00392   WM_HWIN  hScrollbar;
00393   WM_HWIN  hScroll;
00394   WM_HWIN  hWin;
00395   U32      IndexEffect;
00396   int      ButtonState;
00397   int      DropdownState;
00398   int      ProgbarValue;
00399   int      ProgbarInc;
00400   int      SliderValue;
00401   int      SliderInc;
00402   int      ScrollbarValue;
00403   int      ScrollbarInc;
00404   int      Index;
00405   int      Cnt;
00406   int      Inc;
00407   int      Vz;
00408 
00409   IndexEffect    = 0;
00410   ButtonState    = 0;
00411   DropdownState  = 0;
00412   ProgbarValue   = 0;
00413   ProgbarInc     = 1;
00414   SliderValue    = 0;
00415   SliderInc      = 1;
00416   ScrollbarValue = 0;
00417   ScrollbarInc   = 1;
00418   Cnt            = 0;
00419   Vz             = 1;
00420 
00421   GUI_Init();
00422   //
00423   // Check if recommended memory for the sample is available
00424   //
00425   if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
00426     GUI_ErrorOut("Not enough memory available."); 
00427     return;
00428   }
00429   GUI_CURSOR_Show();
00430   WM_SetCallback(WM_HBKWIN, _cbBkWindow);
00431   WM_SetCreateFlags(WM_CF_MEMDEV);  // Use memory devices on all windows to avoid flicker
00432   WM_EnableMemdev(WM_HBKWIN);       // Enable use of memory devices for desktop windows
00433   //
00434   // Create framewindow and set its properties
00435   //
00436   _hFrameWin = FRAMEWIN_CreateEx(0, 0, 320, 240, 0, WM_CF_SHOW, 0, 0, "", _cbCallbackFramewin);
00437   FRAMEWIN_SetMoveable(_hFrameWin, 1);
00438   FRAMEWIN_SetText(_hFrameWin, _asEffect[0]);
00439   FRAMEWIN_SetFont(_hFrameWin, &GUI_Font13B_ASCII);
00440   //
00441   // Create main dialog window as child from framewindows client window
00442   //
00443   _hDlg = GUI_CreateDialogBox(_aDlgWidgets, GUI_COUNTOF(_aDlgWidgets), _cbCallbackWidgets, WM_GetClientWindow(_hFrameWin), 0, 0);
00444   //
00445   // Attach scrollbar to framewindows client window and set its properties
00446   //
00447   hScrollbar = SCROLLBAR_CreateAttached(WM_GetClientWindow(_hFrameWin), 0);
00448   WM_GetWindowRectEx(_hDlg, &RectDlg);
00449   WM_GetClientRectEx(WM_GetClientWindow(_hFrameWin), &RectClient);
00450   SCROLLBAR_SetNumItems(hScrollbar, RectDlg.x1);
00451   SCROLLBAR_SetPageSize(hScrollbar, RectClient.x1);
00452   //
00453   // Create options dialog with 'stay on top' and 'moveable' attribute
00454   //
00455   hDlgOptions = GUI_CreateDialogBox(_aDlgOptions, GUI_COUNTOF(_aDlgOptions), _cbCallbackOptions, WM_HBKWIN, 0, 0);
00456   FRAMEWIN_SetMoveable(hDlgOptions, 1);
00457   WM_SetStayOnTop(hDlgOptions, 1);
00458   //
00459   // Main loop for modifying the widgets
00460   //
00461   while (1) {
00462     if (_AutoMode) {
00463       Cnt++;
00464       //
00465       // Modify progbar
00466       //
00467       if ((Cnt % 2) == 0) {
00468         ProgbarValue += ProgbarInc;
00469         if ((ProgbarValue == 110) || (ProgbarValue == -10)) {
00470           ProgbarInc *= -1;
00471         }
00472         PROGBAR_SetValue(_ahWin[PROGBAR0], ProgbarValue);
00473       }
00474       //
00475       // Modify slider
00476       //
00477       if ((Cnt % 2) == 0) {
00478         SliderValue += SliderInc;
00479         if ((SliderValue == 100) || (SliderValue == 0)) {
00480           SliderInc *= -1;
00481         }
00482         SLIDER_SetValue(_ahWin[SLIDER0], SliderValue);
00483         SLIDER_SetValue(_ahWin[SLIDER1], SliderValue);
00484         SLIDER_SetValue(_ahWin[SLIDER2], SliderValue);
00485       }
00486       //
00487       // Modify scrollbar
00488       //
00489       if ((Cnt % 3) == 0) {
00490         ScrollbarValue += ScrollbarInc;
00491         if ((ScrollbarValue == 90) || (ScrollbarValue == 0)) {
00492           ScrollbarInc *= -1;
00493         }
00494         SCROLLBAR_SetValue(_ahWin[SCROLLBAR0], ScrollbarValue);
00495         SCROLLBAR_SetValue(_ahWin[SCROLLBAR1], ScrollbarValue);
00496         SCROLLBAR_SetValue(_ahWin[SCROLLBAR2], ScrollbarValue);
00497       }
00498       //
00499       // Modify dropdown
00500       //
00501       if ((Cnt % 120) == 0) {
00502         DropdownState ^= 1;
00503         if (DropdownState) {
00504           DROPDOWN_Expand(_ahWin[DROPDOWN0]);
00505         } else {
00506           DROPDOWN_Collapse(_ahWin[DROPDOWN0]);
00507         }
00508       }
00509       //
00510       // Modify button
00511       //
00512       if ((Cnt % 40) == 0) {
00513         ButtonState ^= 1;
00514         BUTTON_SetPressed(_ahWin[BUTTON0], ButtonState);
00515       }
00516       //
00517       // Move window
00518       //
00519       if ((Cnt % 1200) == 0) {
00520         hScroll = WM_GetScrollbarH(WM_GetClientWindow(_hFrameWin));
00521         WM_GetScrollState(hScroll, &ScrollState);
00522         Inc = (ScrollState.NumItems - ScrollState.PageSize) / 2;
00523         ScrollState.v += Inc * Vz;
00524         if ((ScrollState.v >= Inc * 2) || (ScrollState.v <= 0)) {
00525           Vz *= -1;
00526         }
00527         SCROLLBAR_SetValue(hScroll, ScrollState.v);
00528       }
00529       //
00530       // Change effect
00531       //
00532       if ((Cnt % 400) == 0) {
00533         IndexEffect++;
00534         Index = IndexEffect % GUI_COUNTOF(_apEffect);
00535         _SetEffect(Index);
00536         hWin = WM_GetDialogItem(hDlgOptions, GUI_ID_RADIO0);
00537         RADIO_SetValue(hWin, Index);
00538       }
00539     }
00540     GUI_Delay(10);
00541   }
00542 }
00543 
00544 /*************************** End of file ****************************/