本文整理汇总了C++中GUI_Clear函数的典型用法代码示例。如果您正苦于以下问题:C++ GUI_Clear函数的具体用法?C++ GUI_Clear怎么用?C++ GUI_Clear使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GUI_Clear函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _OnPaint_drowise
/**
* @brief Paints button
* @param hObj: button handle
* @retval None
*/
static void _OnPaint_drowise(BUTTON_Handle hObj) {
int Index;
GUI_SetBkColor(FRAMEWIN_GetDefaultClientColor());
GUI_Clear();
Index = (WIDGET_GetState(hObj) & BUTTON_STATE_PRESSED) ? 1 : 0;
if(Index)
{
GUI_DrawBitmap(&bmdes_water_sub, 0, 0);
}
else
{
GUI_DrawBitmap(&bmwater_sub, 0, 0);
}
}
示例2: _cbBkWindow
/*********************************************************************
*
* _cbBkWindow
*/
static void _cbBkWindow(WM_MESSAGE * pMsg) {
int xPos, yPos;
xPos = LCD_GetXSize() / 2 - bmSeggerLogoBlue.XSize/2;
yPos = LCD_GetYSize() / 2 - bmSeggerLogoBlue.YSize/2 ;
switch (pMsg->MsgId) {
case WM_PAINT:
//GUI_SelectLayer(LAYER);
GUI_SetBkColor(GUI_BLUE);
GUI_Clear();
GUI_SetColor(GUI_WHITE);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_DispStringHCenterAt("DIALOG_SliderColor - Sample", 160, 5);
GUI_DrawBitmap(&bmSeggerLogoBlue, xPos, yPos );
default:
WM_DefaultProc(pMsg);
}
}
示例3: _cbBkWindow
/*********************************************************************
*
* _cbBkWindow
*/
static void _cbBkWindow(WM_MESSAGE * pMsg) {
int i;
switch (pMsg->MsgId) {
case WM_PAINT:
GUI_SetBkColor(GUI_BLUE);
GUI_Clear();
GUI_SetColor(GUI_WHITE);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_DispStringHCenterAt("Counting Sample", 160, 5);
GUI_SetFont(&GUI_Font8x16);
for (i = 0; i < GUI_COUNTOF(_asExplain); i++) {
GUI_DispStringAt(_asExplain[i], 5, 40 + i * 16);
}
default:
WM_DefaultProc(pMsg);
}
}
示例4: GUIDEMO_Cursor
void GUIDEMO_Cursor(void) {
int i = 0;
GUIDEMO_ShowIntro("Cursor",
"\nuC/GUI supports"
"\nsoftware cursor");
GUI_SetBkColor(GUI_BLUE);
GUI_Clear();
_DispCursor();
GUIDEMO_Delay(2000);
GUIDEMO_NotifyStartNext();
GUI_CURSOR_Show();
for ( i = 0;(i < countof(_aCursor) && !GUIDEMO_CheckCancel()); i++) {
_MoveCursor(_aCursor[i]);
}
GUI_CURSOR_SetPosition(0,0);
GUI_CURSOR_Select(&GUI_CursorArrowM);
}
示例5: Paint
static void Paint(TERMINAL_Obj* pObj/*, GUI_RECT*pRect*/) {
char*s = (char*) WM_HMEM2Ptr(pObj->hpText);
GUI_RECT rClient;
GUI_DEBUG_LOG("TERMINAL: Paint(..)\n");
GUI_GetClientRect(&rClient);
/* Draw background */
GUI_SetBkColor (GUI_WHITE/*pObj->aBkColor[0]*/);
GUI_SetColor (GUI_BLACK /*pObj->aTextColor[0]*/);
GUI_Clear();
/* Draw the text */
{
GUI_RECT rText = rClient;
rText.x0 +=3;
// GUI_SetFont (pObj->pFont);
GUI_DispStringInRect(s, &rText, GUI_TA_LEFT);
}
}
示例6: _OnPaint_fullscreen
/**
* @brief Paints Full Screen button
* @param hObj: button handle
* @retval None
*/
static void _OnPaint_fullscreen(BUTTON_Handle hObj) {
int Index;
GUI_SetBkColor(FRAMEWIN_GetDefaultClientColor());
GUI_Clear();
Index = (WIDGET_GetState(hObj) & BUTTON_STATE_PRESSED) ? 1 : 0;
if(Index)
{
GUI_DrawBitmap(&bmwindowfullscreen, 0, 0);
}
else
{
GUI_DrawBitmap(&bmwindownofullscreen, 0, 0);
}
}
示例7: GUIDEMO_Graph
void GUIDEMO_Graph(void) {
#if GUIDEMO_LARGE
_YSize = (LCD_YSIZE - 100);
#else
_YSize = (LCD_YSIZE - 30);
#endif
GUIDEMO_ShowIntro("Drawing a graph",
"\nOptimized drawing routine"
"\nfor drawing graph data");
GUI_Clear();
_Label();
_DemoRandomGraph();
GUIDEMO_NotifyStartNext();
_DemoSineWave();
GUIDEMO_NotifyStartNext();
_DemoOrData();
}
示例8: _OnPaint_next
/**
* @brief Paints Next button
* @param hObj: button handle
* @retval None
*/
static void _OnPaint_next(BUTTON_Handle hObj) {
int Index;
GUI_SetBkColor(FRAMEWIN_GetDefaultClientColor());
GUI_Clear();
Index = (WIDGET_GetState(hObj) & BUTTON_STATE_PRESSED) ? 1 : 0;
if(Index)
{
GUI_DrawBitmap(&bmnext_pressed, 0, 0);
}
else
{
GUI_DrawBitmap(&bmnext_not_pressed, 0, 0);
}
}
示例9: _cbBkWindow
/*******************************************************************
*
* _cbBkWindow
*/
static void _cbBkWindow(WM_MESSAGE* pMsg) {
switch (pMsg->MsgId) {
case MSG_CHANGE_TEXT:
strcpy(_acInfoText, pMsg->Data.p);
case WM_PAINT:
GUI_SetBkColor(GUI_BLACK);
GUI_Clear();
GUI_SetColor(GUI_WHITE);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_DispStringHCenterAt("WindowManager - Sample", 160, 5);
GUI_SetFont(&GUI_Font8x16);
GUI_DispStringAt(_acInfoText, 5, 40);
break;
default:
WM_DefaultProc(pMsg);
}
}
示例10: _Main
/*********************************************************************
*
* _Main
*/
static void _Main(void) {
int xSize;
int ySize;
WM_SelectWindow(WM_HBKWIN);
GUI_Clear();
#if (GUI_SUPPORT_CURSOR | GUI_SUPPORT_TOUCH)
GUI_CURSOR_Show();
#endif
//
// Create and configure Control and Information window
//
xSize = LCD_GetXSize();
ySize = LCD_GetYSize();
_hDialogControl = GUI_CreateDialogBox(_aFrameWinControl, GUI_COUNTOF(_aFrameWinControl), &_cbFrameWinControl, WM_HBKWIN, xSize - CONTROL_SIZE_X, ySize - CONTROL_SIZE_Y);
_hDialogInfo = GUI_CreateDialogBox(_aFrameWinInfo, GUI_COUNTOF(_aFrameWinInfo), &_cbFrameWinInfo, WM_HBKWIN, (xSize >> 1) - 1, 0);
WM_HideWindow(_hDialogInfo);
//
// Show Intro
//
WM_InvalidateWindow(_hDialogControl);
WM_DisableMemdev(WM_HBKWIN);
GUI_Exec();
WM_EnableMemdev(WM_HBKWIN);
GUIDEMO_Intro();
//
// Run the demos
//
for (_iDemo = 0; _GUIDemoConfig.apFunc[_iDemo]; _iDemo++) {
_ClearHalt();
GUIDEMO_UpdateControlText();
(*_GUIDemoConfig.apFunc[_iDemo])();
_iDemoMinor = 0;
_Pressed = 0;
}
_iDemo = 0;
//
// Cleanup
//
WM_DeleteWindow(_hDialogControl);
WM_DeleteWindow(_hDialogInfo);
#if (GUI_SUPPORT_CURSOR | GUI_SUPPORT_TOUCH)
GUI_CURSOR_Hide();
#endif
}
示例11: _cbDemoCallback2
/*******************************************************************
*
* _cbDemoCallback2
*/
static void _cbDemoCallback2(WM_MESSAGE * pMsg) {
int x;
int y;
switch (pMsg->MsgId) {
case WM_PAINT:
GUI_SetBkColor(GUI_MAGENTA);
GUI_Clear();
GUI_SetColor(GUI_YELLOW);
GUI_SetFont(&GUI_FontComic18B_1);
x = WM_GetWindowSizeX(pMsg->hWin);
y = WM_GetWindowSizeY(pMsg->hWin);
GUI_DispStringHCenterAt("Window 2\nanother Callback", x / 2, (y / 4) - 18);
break;
default:
WM_DefaultProc(pMsg);
}
}
示例12: _OnPaint
/*********************************************************************
*
* _OnPaint
*/
static void _OnPaint(void) {
int xPos = 0;
GUI_RECT Rect;
GUI_SetBkColor(GUI_GRAY);
GUI_Clear();
WM_GetClientRect(&Rect);
Rect.x1 = HEADER_GetItemWidth(_hHeader, 0);
GUI_SetColor(GUI_RED);
GUI_FillRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1);
Rect.x0 = Rect.x1;
Rect.x1 += HEADER_GetItemWidth(_hHeader, 1);
GUI_SetColor(GUI_GREEN);
GUI_FillRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1);
Rect.x0 = Rect.x1;
Rect.x1 += HEADER_GetItemWidth(_hHeader, 2);
GUI_SetColor(GUI_BLUE);
GUI_FillRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1);
}
示例13: _OnPaint_repeat
/**
* @brief Paints repeat button
* @param repeat_status: repeat button status
* @retval None
*/
static void _OnPaint_repeat(uint32_t repeat_status) {
GUI_SetBkColor(FRAMEWIN_GetDefaultClientColor());
GUI_Clear();
if(PlayerSettings.b.repeat == REPEAT_NONE)
{
GUI_DrawBitmap(&bmrepeat_off, 0, 0);
}
else if(PlayerSettings.b.repeat == REPEAT_ONCE)
{
GUI_DrawBitmap(&bmrepeat1, 0, 0);
}
else if(PlayerSettings.b.repeat == REPEAT_ALL)
{
GUI_DrawBitmap(&bmrepeat_all, 0, 0);
}
}
示例14: _Main
static void _Main(void) {
WM_SelectWindow(WM_HBKWIN);
GUI_Clear();
WM_InvalidateWindow(_hDialogControl);
WM_DisableMemdev(WM_HBKWIN);
GUI_Exec();
WM_EnableMemdev(WM_HBKWIN);
GUIDEMO_Intro();
GUIDEMO_TransparentDialog();
GUIDEMO_Graph();
GUIDEMO_ColorBar();
_iDemo = 0;
WM_DeleteWindow(_hDialogControl);
}
示例15: _cbDesktop
/*********************************************************************
*
* _cbDesktop
*
* Purpose:
* This routine handles the drawing of the desktop window.
*/
static void _cbDesktop(WM_MESSAGE * pMsg) {
int i;
switch (pMsg->MsgId) {
case WM_PAINT:
GUI_SetBkColor(GUI_RED);
GUI_Clear();
GUI_SetFont(&GUI_Font24_ASCII);
GUI_DispStringHCenterAt(_aTitle, 160, 5);
GUI_DispNextLine();
GUI_SetFont(GUI_DEFAULT_FONT);
GUI_DispNextLine();
for (i = 0; i < GUI_COUNTOF(_apExplain); i++) {
GUI_DispStringHCenterAt(_apExplain[i], 160, GUI_GetDispPosY());
GUI_DispNextLine();
}
break;
}
}