#define RECOMMENDED_MEMORY (1024L * 5)
void demo_show()
{
if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
GUI_ErrorOut("Not enough memory available.");
return;
}
GUI_SetBkColor(GUI_BLUE);
GUI_Clear();
GUI_SetBkColor(GUI_YELLOW);
GUI_ClearRect(20, 20, 60, 60);
GUI_SetColor(GUI_RED);
GUI_DrawRect(20,80,70,130);
GUI_DrawGradientRoundedV(20, 140, 70, 190, 10, 0x0000FF, 0x00FFFF);
GUI_SetBkColor(GUI_BLUE);
GUI_SetColor(GUI_WHITE);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_DispStringHCenterAt("WIDGET_SimpleButton - Sample", 160, 5);
while (1)
{
BUTTON_Handle hButton;
GUI_SetFont(&GUI_Font8x16);
GUI_DispStringHCenterAt("Click on button...", 160, 90);
hButton = BUTTON_Create(110, 110, 100, 40, GUI_ID_OK, WM_CF_SHOW);
BUTTON_SetText(hButton, "Click me...");
BUTTON_SetFont(hButton, &GUI_Font8x16);
}
}
|