本文整理汇总了C++中GUI_DispStringAt函数的典型用法代码示例。如果您正苦于以下问题:C++ GUI_DispStringAt函数的具体用法?C++ GUI_DispStringAt怎么用?C++ GUI_DispStringAt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GUI_DispStringAt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MainTask
/********************************************************************
*
* MainTask
*/
void MainTask(void) {
GUI_MEMDEV_Handle hMem;
GUI_Init();
_Explain(); /* Explain the sample */
GUI_SetFont(&GUI_Font16B_ASCII);
GUI_SetColor(GUI_WHITE);
GUI_DispStringAt("Screen output:", 5, 59);
_Draw(); /* Draw "Preview" on the screen */
/* Create and select a memory device with 1bpp color conversion (B/W) */
hMem = GUI_MEMDEV_CreateFixed(0, 75, 320, 64, 0,
GUI_MEMDEV_APILIST_1, /* Used API list */
GUI_COLOR_CONV_1); /* Black/white color conversion */
GUI_MEMDEV_Select(hMem);
_Draw(); /* Call the same routine as before for drawing into memory device */
GUI_MEMDEV_Select(0); /* Switch back from memory device to the display */
GUI_SetFont(&GUI_Font16B_ASCII);
GUI_SetColor(GUI_WHITE);
GUI_DispStringAt("Printer output:", 5, 154);
_SendToPrinter(hMem, 170);
/* Cleanup, end-of sample */
GUI_MEMDEV_Delete(hMem);
while(1) {
GUI_Exec();
}
}
示例2: mostraElencoMancanti
void mostraElencoMancanti() {
char msg[35];
int k=0,c=0,j=0;
GUI_DispStringAt( "Nella scatola manca:", 0, 20);
Nodo_t *temp = listaTagMancanti;
while (temp!=NULL) {
for (k=0; k<maxR; k++) {
uint8_t tempTag[4];
for (c=0;c<4;c++){
tempTag[c] = l_tabellaMedicine[k][c];
}
if (confronta_tag(temp->info,tempTag)==1) {
for (c=0;c<35;c++){
msg[c] = l_tabellaMedicine[k][c+4];
GUI_DispStringAt(msg, 0, 20*j+40);
}
j++;
break;
}
}
temp = temp->prox;
}
showTime();
}
示例3: _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);
}
}
示例4: GUIDEMO_Circle
void GUIDEMO_Circle(void) {
int XSize = LCD_GetXSize();
int YSize = LCD_GetYSize();
GUIDEMO_ShowIntro("Circles",
"\nArbitrary circles"
"\nand arcs.");
GUI_Clear();
GUI_SetFont(&GUI_Font8x16);
GUI_SetColor(GUI_WHITE);
#if GUIDEMO_LARGE
GUI_DispStringAt("Circle", 0, 0);
#endif
GUI_FillCircle (XSize / 2, YSize / 2, 50);
GUIDEMO_Wait();
GUI_SetDrawMode(GUI_DM_XOR);
GUI_FillCircle (XSize / 2, YSize / 2, 60);
GUI_SetDrawMode(0);
GUIDEMO_Wait();
#if GUI_SUPPORT_AA
#if GUIDEMO_LARGE
GUIDEMO_ShowInfo("Circles with\nAntialiasing");
#endif
GUI_Clear();
GUI_SetColor(GUI_WHITE);
#if GUIDEMO_LARGE
GUI_DispStringAt("Antialiased\ncircle", 0, 0);
#endif
GUI_AA_FillCircle(XSize / 2, YSize / 2, 47);
GUIDEMO_Wait();
#endif
}
示例5: _cbBkWindow
/*******************************************************************
*
* _cbBkWindow
*/
static void _cbBkWindow(WM_MESSAGE* pMsg) {
switch (pMsg->MsgId) {
case MSG_CHANGE_MAIN_TEXT:
strcpy(_acMainText, pMsg->Data.p);
WM_InvalidateWindow(pMsg->hWin);
break;
case MSG_CHANGE_INFO_TEXT:
strcpy(_acInfoText, pMsg->Data.p);
WM_InvalidateWindow(pMsg->hWin);
break;
case WM_PAINT:
GUI_SetBkColor(GUI_BLACK);
GUI_Clear();
GUI_SetColor(GUI_WHITE);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_DispStringHCenterAt("LISTVIEW Widget - Sample", 160, 5);
GUI_SetFont(&GUI_Font8x16);
GUI_DispStringAt(_acMainText, 5, 40);
GUI_SetFont(&GUI_Font8x8);
GUI_DispStringAt(_acInfoText, 5, 60);
break;
default:
WM_DefaultProc(pMsg);
}
}
示例6: GUIDEMO_HardwareInfo
void GUIDEMO_HardwareInfo(void) {
#if (LCD_CONTROLLER == 1375) | (LCD_CONTROLLER == 13705) | (LCD_CONTROLLER == 1386) | (LCD_CONTROLLER == 13806)
GUIDEMO_ShowIntro("Hardware info", "" );
GUI_Clear();
#if GUIDEMO_LARGE
GUI_SetFont(&GUI_FontComic24B_ASCII);
#else
GUI_SetFont(&GUI_FontComic18B_ASCII);
#endif
GUIDEMO_SetColor(GUI_WHITE);
#if (LCD_CONTROLLER == 1375) | (LCD_CONTROLLER == 13705)
#if GUIDEMO_LARGE
GUI_DispStringAt("EPSON 13705\n", 10, 65 );
#else
GUI_DispStringHCenterAt("EPSON 13705\n", LCD_XSIZE >> 1, LCD_YSIZE / 14);
#endif
_Show("On chip VRAM", "80 kb");
_Show("Max. colors", "4096 (4 bit per color)");
_Show("Display types", "Mono / color / TFT");
_Show("LUT", "256 index colors");
#elif (LCD_CONTROLLER == 1386) | (LCD_CONTROLLER == 13806)
#if GUIDEMO_LARGE
GUI_DispStringAt("EPSON 13806\n", 10, 65 );
#else
GUI_DispStringHCenterAt("EPSON 13806\n", LCD_XSIZE >> 1, LCD_YSIZE / 14);
#endif
_Show("On chip VRAM", "1200 kb");
_Show("Max. colors", "65536 (up to 16 bpp)");
_Show("Display types", "Mono / color / TFT (analog / digital)");
_Show("LUT", "256 index colors");
#endif
GUIDEMO_Delay(1500);
#endif
}
示例7: _cbFrameWinVideo
/*********************************************************************
*
* _cbFrameWinVideo
*/
static void _cbFrameWinVideo(WM_MESSAGE* pMsg) {
switch (pMsg->MsgId) {
case WM_PAINT:
if (_IsCompletelyVis) {
GUI_SetBkColor(GUI_DARKGREEN);
GUI_Clear();
GUI_SetColor(GUI_WHITE);
GUI_DispStringAt("Completely visible", 5, 5);
} else {
GUI_SetBkColor(GUI_GRAY);
GUI_Clear();
GUI_SetColor(GUI_WHITE);
GUI_DispStringAt("Not completely visible", 5, 5);
}
break;
case WM_NOTIFY_VIS_CHANGED:
{
WM_HWIN hWin;
int IsCompletelyVis;
hWin = WM_GetClientWindow(pMsg->hWin);
IsCompletelyVis = WM_IsCompletelyVisible(hWin);
if (_IsCompletelyVis != IsCompletelyVis) {
_IsCompletelyVis = IsCompletelyVis;
WM_InvalidateWindow(hWin); /* Only required if content changes if partially hidden */
}
}
break;
default:
WM_DefaultProc(pMsg);
}
}
示例8: _cbBkWin
/*********************************************************************
*
* _cbBkWin
*/
static void _cbBkWin(WM_MESSAGE* pMsg) {
switch(pMsg->MsgId) {
case WM_PAINT:
GUI_SetBkColor(GUI_BLACK);
GUI_Clear();
GUI_SetColor(0x0060FF);
GUI_DispStringAt("PaintCount (Early):", 0, 0);
GUI_DispDecAt(_PaintCount1, 120, 0, 5);
GUI_SetColor(0x00FFC0);
GUI_DispStringAt("PaintCount (Late):", 0, 12);
GUI_DispDecAt(_PaintCount2, 120, 12, 5);
break;
case WM_NOTIFY_PARENT:
if (pMsg->Data.v == WM_NOTIFICATION_RELEASED) {
if (pMsg->hWinSrc == _hBut1) {
WM_InvalidateWindow(_hWin1);
WM_InvalidateWindow(_hWin2);
} else if (pMsg->hWinSrc == _hBut2) {
_PaintCount1 = 0;
_PaintCount2 = 0;
WM_InvalidateWindow(pMsg->hWin);
}
}
break;
default:
WM_DefaultProc(pMsg);
}
}
示例9: Display_Welcome
void Display_Welcome(void)
{
GUI_SetBkColor(GUI_BLACK);
GUI_Clear();
DisplayBattery();
GUI_SetColor(GUI_CYAN);
GUI_DispStringAt("欢迎使用",24,20);
GUI_DispStringAt("UHF RFID读写器",6,40);
}
示例10: _cbSysInfo
/**
* 函 数 名: _cbSysInfo(WM_MESSAGE* pMsg)
* 描 述: 显示系统信息
* 参 数: pMsg
* 返 回 值: 无
*/
void _cbSysInfo(WM_MESSAGE* pMsg)
{
BUTTON_Handle ReurnButton;
WM_HWIN hWin = pMsg->hWin;
switch (pMsg->MsgId)
{
case WM_CREATE:
/* 设置聚焦*/
WM_SetFocus(hWin);
/* 创建返回按键按钮 */
ReurnButton = BUTTON_CreateEx(118,174,94, 52, hWin, WM_CF_SHOW, 0, SYS_INFO_BUTTON_RETURN);
BUTTON_SetBitmapEx(ReurnButton,BUTTON_BI_UNPRESSED, &bmSys_return_xg, 0 ,0);
BUTTON_SetBitmapEx(ReurnButton,BUTTON_BI_PRESSED, &bmSys_return, 0 ,0);
break;
case WM_KEY:
/* 按下某个键后发送到当前包含焦点的窗口*/
switch (((WM_KEY_INFO*)(pMsg->Data.p))->Key)
{
case GUI_KEY_ESCAPE:
GUI_EndDialog(hWin, 1);
break;
case GUI_KEY_TAB:
WM_SetFocusOnNextChild(hWin);
break;
}
break;
case WM_PAINT:
GUI_SetBkColor(BK_COLOR_2);
GUI_Clear();
GUI_UC_SetEncodeNone();
GUI_SetFont(&GUI_FontHZ16);
GUI_DispStringAt("MODEL:7H3DFDM-FW ",30,20);
GUI_DispStringAt("VERSION: V0.01",30,50);
GUI_DispStringAt("SYSINFO: IN TEST ",30,80);
GUI_DispStringAt(__DATE__ " " __TIME__,50,110);
GUI_UC_SetEncodeUTF8();
//_ShowBMPEx("1.bmp");
break;
case WM_NOTIFY_PARENT:
if (pMsg->Data.v == WM_NOTIFICATION_RELEASED)
{
int Id = WM_GetId(pMsg->hWinSrc);
switch (Id)
{
case SYS_INFO_BUTTON_RETURN:
_DeleteFrame();
_CreateFrame(&_cbSysSet);
break;
}
}
break;
default:
WM_DefaultProc(pMsg);
}
}
示例11: Display_Serianet_Mark
void Display_Serianet_Mark(void)
{
GUI_SetBkColor(GUI_BLACK);
GUI_Clear();
DisplayBattery();
GUI_SetColor(GUI_MAGENTA);
GUI_DispStringAt("串口透传模式", 12, 20);
GUI_DispStringAt("Serianet", 24,040);
}
示例12: main_ui
void main_ui(void)
{
#if 0
_MY_GetTouchPos();
#endif
GUI_SetBkColor(GUI_BLACK);
GUI_SetColor(GUI_WHITE);
GUI_DispStringAt("Hello World!", 30, 200);
GUI_DispStringAt("Hello emWin!", 30, 216);
GUI_DrawRoundedRect(0,0,200,200,5);
GUI_DrawRoundedFrame(2,2,180,20,5,2);
}
示例13: DIGITAL_drawBackground
void DIGITAL_drawBackground(struct tm *t)
{
drawDate(t);
/* Initialize the current time */
drawNumber(t->tm_hour, TIME_ROW, HOUR_COL);
drawNumber(t->tm_min, TIME_ROW, MINUTE_COL);
drawNumber(t->tm_sec, TIME_ROW, SECOND_COL);
GUI_DispStringAt(":", 6 * 8, TIME_ROW);
GUI_DispStringAt(":", 9 * 8, TIME_ROW);
}
示例14: GUIDEMO_Intro
void GUIDEMO_Intro(void) {
int xCenter = LCD_GET_XSIZE() / 2;
int y;
char acText[50] = "Version of uC/GUI: ";
strcat(acText, GUI_GetVersionString());
GUI_SetBkColor(GUI_BLUE);
GUI_SetColor(GUI_LIGHTRED);
GUI_Clear();
GUI_SetFont(&GUI_Font24B_1);
GUI_DispStringHCenterAt("uC/GUI", xCenter, y= 15);
GUI_SetColor(GUI_WHITE);
GUI_SetFont(&GUI_Font13H_ASCII);
GUI_DispStringHCenterAt("Universal graphic software"
"\nfor embedded applications"
, xCenter, y += 30);
GUI_SetColor(GUI_LIGHTRED);
GUI_SetFont(&GUI_Font16_ASCII);
GUI_DispStringHCenterAt("Any CPU - Any LCD - Any Application"
, xCenter, y += 40);
GUI_SetFont(&GUI_Font10S_ASCII);
GUI_DispStringHCenterAt("Compiled " __DATE__ " "__TIME__, xCenter, y += 25);
GUI_SetFont(&GUI_Font13HB_1);
GUI_SetColor(GUI_WHITE);
GUI_DispStringHCenterAt(acText, xCenter, y += 21);
GUI_SetFont(&GUI_FontComic18B_1);
GUI_SetColor(GUI_WHITE);
GUI_DispStringHCenterAt("www.micrium.com", LCD_GET_XSIZE() / 2, LCD_GET_YSIZE() - 40);
GUI_DrawBitmap(&bmMicriumLogo, (LCD_GET_XSIZE() - bmMicriumLogo.XSize) / 2, 150);
GUI_SetFont(&GUI_Font10S_ASCII);
GUI_DispStringAt("GUI_OS: ", 0,210); GUI_DispDecMin(GUI_OS);
GUI_DispStringAt("GUI_ALLOC_SIZE: ",0, 220); GUI_DispDecMin(GUI_ALLOC_SIZE);
GUI_DispStringAt("Compiler: "
#ifdef _MSC_VER
"Microsoft"
#elif defined (NC308)
"Mitsubishi NC308"
#elif defined (NC30)
"Mitsubishi NC30"
#elif defined (__TID__)
#if (((__TID__ >>8) &0x7f) == 48) /* IAR MC80 */
"IAR M32C"
#elif (((__TID__ >>8) &0x7f) == 85) /* IAR V850 */
"IAR V850"
#else /* IAR MC16 */
"IAR M32C"
#endif
#else
"Unknown"
#endif
,0, 230);
GUIDEMO_Delay(5000);
}
示例15: MainTask
/*********************************************************************
*
* MainTask
*/
void MainTask(void) {
GUI_Init();
GUI_Clear();
GUI_SetFont(&GUI_Font20_1);
GUI_DispStringAt("Hello world!", (LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2);
while(1);
}