/********************************************************************* * * ExecAbout */ void ExecAbout(void) { _hPrevWin = WM_GetFocussedWindow(); GUI_SetOrg(0, 480); GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbCallback, 0, 0, 0); GUI_SetOrg(0, 0); }
/********************************************************************* * * MainTask */ void MainTask(void) { WM_SetCreateFlags(WM_CF_MEMDEV); // Use memory devices on all windows to avoid flicker GUI_Init(); // // Check if recommended memory for the sample is available // if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) { GUI_ErrorOut("Not enough memory available."); return; } AzimuthalMotor.dutyCycle(0); AzimuthalMotor.start(); VerticalMotor.dutyCycle(0); VerticalMotor.start(); ClawMotor.dutyCycle(0); ClawMotor.start(); WM_SetCallback(WM_HBKWIN, _cbBkWindow); while (1) { GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbCallback, 0, 0, 0); GUI_Delay(1000); } }
/*---------------------------------------------------------------------------* * Routine: keyboard *---------------------------------------------------------------------------* * Description: * Start the keyboard dialog and stay here until closed. * Inputs: * char* aData -- string to hold current value and to pass back new value. * char* message -- String to tell the type of data being entered. * TUInt16 aNumChars -- number of expected characters to return. * TUInt8 aShowKeys -- integer to disable keys, used for serial number. * Outputs: * TUInt16 -- return code of how dialog closes. *---------------------------------------------------------------------------*/ TUInt16 Keyboard(char* aData, char* message, TUInt16 aNumChars, TUInt8 aShowKeys) { TUInt8 returnCode; G_enteringData = ETrue; G_showKeys = aShowKeys; G_maxKeys = aNumChars; if (!G_isActive) { G_isActive = ETrue; G_keypadCurrentMapping = G_keyboardMappingUppercase; memcpy((void*)G_textBox, (void*)aData, MAX_NUMBER_OF_CHARS); G_message = message; while (G_enteringData) { returnCode = GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, 0, 0, 0); } G_isActive = EFalse; if (returnCode) { memcpy((void*)aData, (void*)G_textBox, G_textBoxIndex + 1); return G_textBoxIndex; } } return 0; //Text entry canceled }
/********************************************************************* * * ExecCalibration */ void ExecCalibration(void) { _hPrevWin = WM_GetFocussedWindow(); GUI_SetOrg(0, 480); TEXT_SetDefaultTextColor(GUI_BLACK); GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbCallback, 0, 0, 0); GUI_SetOrg(0, 0); }
// USER START (Optionally insert additional public code) void MainTask (void) { GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0); CreateWindow (); while(1){ GUI_Delay (10); } }
/********************************************************************* * * MainTask */ void MainTask(void) { GUI_Init(); WM_SetCallback(WM_HBKWIN, _cbBkWindow); WM_SetCreateFlags(WM_CF_MEMDEV); // Use memory devices on all windows to avoid flicker while (1) { GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbCallback, 0, 0, 0); GUI_Delay(1000); } }
/********************************************************************* * * MainTask */ void MainTask(void) { int Index; 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_SetDesktopColor(GUI_BLACK); // // Initialize the temperature arrays // _InitRandomData(_aTemp1, GUI_COUNTOF(_aTemp1)); _InitRandomData(_aTemp2, GUI_COUNTOF(_aTemp2)); // // Execute the intro dialog // GUI_ExecDialogBox(_aDialogIntro, GUI_COUNTOF(_aDialogIntro), _cbDialogIntro, WM_HBKWIN, 0, 0); // // Execute the color and the temperature dialog // _hDialogColor = GUI_CreateDialogBox(_aDialogColor, GUI_COUNTOF(_aDialogColor), _cbDialogColor, WM_HBKWIN, 0, 0); _hDialogMain = GUI_CreateDialogBox(_aDialogMain, GUI_COUNTOF(_aDialogMain), _cbDialogMain, WM_HBKWIN, 0, 0); // // Add new temperatures... // Index = GUI_COUNTOF(_aTemp1) - 1; while (1) { WM_HWIN hItem; GUI_Delay(100); // Wait a while // // Shift the color arrays // memmove(_aTemp1, _aTemp1 + 1, sizeof(_aTemp1) - 2); memmove(_aTemp2, _aTemp2 + 1, sizeof(_aTemp2) - 2); // // Add new values // _aTemp1[Index] = _GetRandomValue(_aTemp1[Index - 1]); _aTemp2[Index] = _GetRandomValue(_aTemp2[Index - 1]); // // Update windows // hItem = WM_GetClientWindow(WM_GetDialogItem(_hDialogMain, ID_TEMPERATURE)); WM_InvalidateWindow(hItem); _SetProgbarValue(GUI_ID_PROGBAR0, _aTemp1[Index]); _SetProgbarValue(GUI_ID_PROGBAR1, _aTemp2[Index]); } }
/********************************************************************* * * MainTask */ void MainTask(void) { GUI_Init(); WM_SetCallback(WM_HBKWIN, &_cbBkWindow); WM_SetCreateFlags(WM_CF_MEMDEV); /* Use memory devices on all windows to avoid flicker */ while (1) { _MultiSel = 0; _OwnerDrawn = 1; GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbCallback, 0, 0, 0); GUI_Delay(1000); } }
/********************************************************************* * * MainTask */ void MainTask(void) { GUI_Init(); while(1) { GUI_DispStringHCenterAt("WIDGET_Window sample\nshows how to use a WINDOW widget", 160, 5); GUI_ExecDialogBox(_aDialog, GUI_COUNTOF(_aDialog), _cbDialog, WM_HBKWIN, 30, 30); GUI_Clear(); GUI_DispStringHCenterAt("Dialog has been closed", 160, 5); GUI_Delay(1000); GUI_Clear(); } }
void MainTask(void) { GUI_Init(); /* Use memory devices for all windows */ WM_SetCreateFlags(WM_CF_MEMDEV); WM_EnableMemdev(WM_HBKWIN); WM_SetDesktopColor(GUI_GREEN); while(1) { _Font = 0; _Color = 0; _pcbCallback = 0; GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, 0, 0, 0); GUI_Delay(1000); } }
void MainTask(void) { int XSize, YSize; #if GUI_SUPPORT_MEMDEV WM_SetCreateFlags(WM_CF_MEMDEV); #endif GUI_Init(); XSize = LCD_GetXSize(); YSize = LCD_GetYSize(); GUI_DrawBitmap(&bmLogoBitmap, (XSize - bmLogoBitmap.XSize) / 2, (YSize - bmLogoBitmap.YSize) / 3); GUI_SetFont(&GUI_Font24B_ASCII); GUI_DispStringHCenterAt("www.segger.com", XSize / 2, (YSize - bmLogoBitmap.YSize) / 3 + bmLogoBitmap.YSize + 10); GUI_Delay(1000); WM_SetDesktopColor(GUI_BLACK); /* Not required since desktop is not visible */ GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbCallback, 0, 0, 0); }
/********************************************************************* * * MainTask */ void MainTask(void) { WM_HWIN hNumPad; GUI_Init(); WM_SetCallback(WM_HBKWIN, _cbDesktop); hNumPad = GUI_CreateDialogBox(_aDialogNumPad, GUI_COUNTOF(_aDialogNumPad), _cbDialogNumPad, WM_HBKWIN, 0, 0); /* Create the numpad dialog */ WM_SetStayOnTop(hNumPad, 1); while (1) { GUI_ExecDialogBox(_aDialogUser, GUI_COUNTOF(_aDialogUser), _cbDialogUser, WM_HBKWIN, 0, 0); /* Execute the user dialog */ GUI_Delay(1000); } }
/********************************************************************* * * MainTask */ void MainTask(void) { int Index; GUI_Init(); #if GUI_SUPPORT_MEMDEV WM_SetCreateFlags(WM_CF_MEMDEV); #endif WM_SetDesktopColor(GUI_BLACK); // // Initialize the temperature arrays // _InitRandomData(_aTemp1, GUI_COUNTOF(_aTemp1)); _InitRandomData(_aTemp2, GUI_COUNTOF(_aTemp2)); // // Execute the intro dialog // GUI_ExecDialogBox(_aDialogIntro, GUI_COUNTOF(_aDialogIntro), _cbDialogIntro, WM_HBKWIN, 0, 0); // // Execute the color and the temperature dialog // _hDialogColor = GUI_CreateDialogBox(_aDialogColor, GUI_COUNTOF(_aDialogColor), _cbDialogColor, WM_HBKWIN, 0, 0); _hDialogMain = GUI_CreateDialogBox(_aDialogMain, GUI_COUNTOF(_aDialogMain), _cbDialogMain, WM_HBKWIN, 0, 0); // // Add new temperatures... // Index = GUI_COUNTOF(_aTemp1) - 1; while (1) { WM_HWIN hItem; GUI_Delay(100); // Wait a while // // Shift the color arrays // memmove(_aTemp1, _aTemp1 + 1, sizeof(_aTemp1) - 2); memmove(_aTemp2, _aTemp2 + 1, sizeof(_aTemp2) - 2); // // Add new values // _aTemp1[Index] = _GetRandomValue(_aTemp1[Index - 1]); _aTemp2[Index] = _GetRandomValue(_aTemp2[Index - 1]); // // Update windows // hItem = WM_GetClientWindow(WM_GetDialogItem(_hDialogMain, ID_TEMPERATURE)); WM_InvalidateWindow(hItem); _SetProgbarValue(GUI_ID_PROGBAR0, _aTemp1[Index]); _SetProgbarValue(GUI_ID_PROGBAR1, _aTemp2[Index]); } }
/********************************************************************* * * MainTask */ void MainTask(void) { GUI_Init(); // // Use memory devices for all windows // #if GUI_SUPPORT_MEMDEV WM_SetCreateFlags(WM_CF_MEMDEV); WM_EnableMemdev(WM_HBKWIN); #endif WM_SetDesktopColor(GUI_GREEN); while(1) { _Font = _Color = 0; GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, 0, 0, 0); GUI_Delay(1000); } }
/********************************************************************* * * 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 FRAMEWIN_SetDefaultSkin(FRAMEWIN_SKIN_FLEX); BUTTON_SetDefaultSkin(BUTTON_SKIN_FLEX); RADIO_SetDefaultSkin(RADIO_SKIN_FLEX); CHECKBOX_SetDefaultSkin(CHECKBOX_SKIN_FLEX); HEADER_SetDefaultSkin(HEADER_SKIN_FLEX); GUI_CURSOR_Show(); WM_SetCallback(WM_HBKWIN, _cbBkWin); while (1) { GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, 0, 0, 0); GUI_Delay(1000); } }
// USER START (Optionally insert additional public code) void ExecCreateTestFrame(void) { GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0); }
WM_HWIN ExecModbus_Master_testWindow(void) { WM_HWIN hWin; hWin = GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0); return hWin; }
WM_HWIN ExecSensor_Control(void) { WM_HWIN hWin; hWin = GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0); return hWin; }
WM_HWIN ExecMenu_window(void) { WM_HWIN hWin = GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0); return hWin; }
int num_dialog(WM_HWIN hWin) { int set_num; set_num = GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbCallback, hWin, 320, 80);// GUI_ExecDialogBox return set_num; }