本文整理汇总了C++中GUI_SetColor函数的典型用法代码示例。如果您正苦于以下问题:C++ GUI_SetColor函数的具体用法?C++ GUI_SetColor怎么用?C++ GUI_SetColor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GUI_SetColor函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: _cbDemoCallback2
/*******************************************************************
*
* _cbDemoCallback2
*/
static void _cbDemoCallback2(WM_MESSAGE* pMsg) {
int x, 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);
}
}
开发者ID:ChijunShen,项目名称:wildfire_stm32_iso,代码行数:20,代码来源:GUIDEMO_WM.c
示例2: GUI_SetColor
/*****************************************************************************
* Function - DrawArrow
* DESCRIPTION:
*****************************************************************************/
void ScrollBar::DrawArrow(int xpos, int ypos, int heigh, int width, bool upwards)
{
GUI_SetColor(mpSliderFrame->GetFillingColour());
// Up arrow frame
U8 j = xpos;
for (U8 i = 0; i < heigh; i++)
{
if (i % 2 == 0)
{
j++;
}
GUI_DrawHLine((upwards ? ypos - i : ypos + i), j, width - j );
}
}
开发者ID:Strongc,项目名称:DC_source,代码行数:20,代码来源:ScrollBar.cpp
示例3: _cbChild
/*******************************************************************
*
* _cbChild
*/
static void _cbChild(WM_MESSAGE* pMsg) {
int x, y;
switch (pMsg->MsgId) {
case WM_PAINT:
GUI_SetBkColor(_ChildColor);
GUI_Clear();
GUI_SetColor(GUI_RED);
GUI_SetFont(&GUI_Font24_ASCII);
x = WM_GetWindowSizeX(pMsg->hWin);
y = WM_GetWindowSizeY(pMsg->hWin);
GUI_DispStringHCenterAt("Child window", x / 2, (y / 2) - 12);
break;
default:
WM_DefaultProc(pMsg);
}
}
开发者ID:ChijunShen,项目名称:wildfire_stm32_iso,代码行数:20,代码来源:GUIDEMO_WM.c
示例4: _cbBkWindow
/*********************************************************************
*
* _cbBkWindow
*/
static void _cbBkWindow(WM_MESSAGE * pMsg) {
switch (pMsg->MsgId) {
case WM_PAINT:
GUI_SetBkColor(GUI_WHITE);
GUI_Clear();
GUI_SetColor(GUI_BLACK);
GUI_SetFont(&GUI_Font24_ASCII);
default:
WM_DefaultProc(pMsg);
}
}
开发者ID:smithcts,项目名称:SMART_Rail_System,代码行数:20,代码来源:Slider_Menu_GUI.cpp
示例5: TskGuiProc
//#include "..\\User\\AppTask.h"
void TskGuiProc(void *p_arg)//30
{
volatile INT8U err;
TLOG("TskGuiProc start Prio=%02d\n",OSTCBCur->OSTCBPrio);
GUI_Initialize(); // 初始化LCM
GUI_SetColor(1, 0);//设置前景色和背景色的
DispLog(); // 显示LOG
RunMenuDemo(); // 显示菜单
for(;;)
{
OSTimeDly(OS_TICKS_PER_SEC);//
}
};
开发者ID:liuxizhen2009,项目名称:zlggui,代码行数:17,代码来源:GuiProc.c
示例6: Table
//.........这里部分代码省略.........
#include "bsp.h"
extern "C" {
#include "GUI.h"
#include "WM.h" // emWin Windows Manager
#include "DIALOG.h"
#include "SIM.h"
}
Q_DEFINE_THIS_FILE
// Active object class -------------------------------------------------------
class Table : public QActive {
private:
uint8_t m_fork[N_PHILO];
uint8_t m_isHungry[N_PHILO];
public:
Table();
private:
static QState initial(Table *me, QEvt const *e);
static QState ready (Table *me, QEvt const *e);
static QState serving(Table *me, QEvt const *e);
static QState paused (Table *me, QEvt const *e);
};
#define RIGHT(n_) ((uint8_t)(((n_) + (N_PHILO - 1)) % N_PHILO))
#define LEFT(n_) ((uint8_t)(((n_) + 1) % N_PHILO))
enum m_forkState { FREE, USED };
// Local objects -------------------------------------------------------------
static Table l_table; // local Table object
#ifdef Q_SPY
enum QSUserRecords {
PHILO_STAT = QS_USER,
TABLE_STAT
};
static uint8_t const l_onDialogGUI = 0U;
#endif
// Public-scope objects ------------------------------------------------------
QActive * const AO_Table = &l_table; // "opaque" AO pointer
// GUI definition ============================================================
static WM_HWIN l_hDlg;
static WM_CALLBACK *l_cb_WM_HBKWIN;
static const GUI_WIDGET_CREATE_INFO l_dialog[] = {
{ &FRAMEWIN_CreateIndirect, "Dining Philosopher Problem",
0, 30, 30, 260, 180, FRAMEWIN_CF_MOVEABLE },
{ &TEXT_CreateIndirect, "Philosopher 0",
GUI_ID_TEXT9, 50, 10, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "Philosopher 1",
GUI_ID_TEXT9, 50, 30, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "Philosopher 2",
GUI_ID_TEXT9, 50, 50, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "Philosopher 3",
GUI_ID_TEXT9, 50, 70, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "Philosopher 4",
GUI_ID_TEXT9, 50, 90, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "Table",
GUI_ID_TEXT9, 50, 110, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "thinking",
GUI_ID_TEXT0, 130, 10, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "thinking",
GUI_ID_TEXT1, 130, 30, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "thinking",
GUI_ID_TEXT2, 130, 50, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "thinking",
GUI_ID_TEXT3, 130, 70, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "thinking",
GUI_ID_TEXT4, 130, 90, 0, 0, TEXT_CF_LEFT },
{ &TEXT_CreateIndirect, "serving",
GUI_ID_TEXT5, 130, 110, 0, 0, TEXT_CF_LEFT },
{ &BUTTON_CreateIndirect,"PAUSE",
GUI_ID_BUTTON0, 160, 130, 80, 30 }
};
//..........................................................................*/
static void onMainWndGUI(WM_MESSAGE* pMsg) {
switch (pMsg->MsgId) {
case WM_PAINT: {
GUI_SetBkColor(GUI_GRAY);
GUI_Clear();
GUI_SetColor(GUI_BLACK);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_DispStringHCenterAt("Dining Philosophers - Demo", 160, 5);
break;
}
default: {
WM_DefaultProc(pMsg);
break;
}
}
}
开发者ID:QuantumLeaps,项目名称:qpcpp,代码行数:101,代码来源:table.cpp
示例7: _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_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);
}
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:20,代码来源:DIALOG_SliderColor.c
示例8: _DrawBkCircle
static void _DrawBkCircle(int DrawLogo) {
static GUI_MEMDEV_Handle hMemStretch;
GUI_MEMDEV_Handle hMemCircle, hMemGradient, hMemOld;
int xSize, ySize, i, CircleWidth;
U32 * pData;
if (hMemStretch == 0) {
xSize = LCD_GetXSize();
ySize = LCD_GetYSize();
CircleWidth = (CIRCLE_RADIUS << 1) + 1;
hMemCircle = GUI_MEMDEV_CreateFixed(0, 0, CircleWidth, CircleWidth, GUI_MEMDEV_NOTRANS, GUI_MEMDEV_APILIST_32, GUI_COLOR_CONV_8888);
hMemStretch = GUI_MEMDEV_CreateEx (0, 0, xSize, ySize, GUI_MEMDEV_NOTRANS);
hMemGradient = GUI_MEMDEV_CreateFixed(0, 0, 1, CIRCLE_RADIUS, GUI_MEMDEV_NOTRANS, GUI_MEMDEV_APILIST_32, GUI_COLOR_CONV_8888);
//
// Initialize background
//
hMemOld = GUI_MEMDEV_Select(hMemCircle);
GUI_SetBkColor(BK_COLOR_1);
GUI_Clear();
//
// Create Gradient
//
GUI_MEMDEV_Select(hMemGradient);
GUI_DrawGradientV(0, 0, 0, CIRCLE_RADIUS, BK_COLOR_0, BK_COLOR_1);
//
// Get color and draw circles
//
pData = (U32 *)GUI_MEMDEV_GetDataPtr(hMemGradient);
GUI_MEMDEV_Select(hMemCircle);
for (i = 0; i < CIRCLE_RADIUS; i++, pData++) {
GUI_SetColor(*pData);
GUI_DrawCircle(CIRCLE_RADIUS, CIRCLE_RADIUS, i);
}
//
// Stretch and display
//
GUI_MEMDEV_Select(hMemStretch);
GUI_MEMDEV_DrawPerspectiveX(hMemCircle, 0, 0, ySize, ySize, xSize, 0);
GUI_MEMDEV_Delete(hMemCircle);
GUI_MEMDEV_Delete(hMemGradient);
GUI_MEMDEV_Select(hMemOld);
}
GUI_MEMDEV_Write(hMemStretch);
if (DrawLogo) {
GUI_DrawBitmap(&bmSeggerLogo70x35, 5, 5);
}
}
开发者ID:EnricoGiordano1992,项目名称:Tesi,代码行数:47,代码来源:GUIDEMO.c
示例9: main
int main(void)
{
GUI_MEMDEV_Handle hMem0,hMem1;
SysTick_Config(180000);
SDRAM_Init();
LCD_Config();
GUI_Init();
GUI_SetFont(&GUI_Font32B_ASCII);
GUI_SetBkColor(GUI_BLUE);
GUI_SetColor(GUI_YELLOW);
GUI_Clear();
// GUI_DispStringAt("blacklight",0,100);
// GUIDEMO_Main();
hMem0 = GUI_MEMDEV_CreateFixed(0,0,100,50,GUI_MEMDEV_NOTRANS,GUI_MEMDEV_APILIST_32,GUI_COLOR_CONV_888);
hMem1 = GUI_MEMDEV_CreateFixed(0,0,100,50,GUI_MEMDEV_NOTRANS,GUI_MEMDEV_APILIST_32,GUI_COLOR_CONV_888);
GUI_MEMDEV_Select(hMem0);
GUI_Clear();
GUI_DispString("Text");
GUI_MEMDEV_CopyToLCDAt(hMem0,0,0);
while(1)
{
GUI_MEMDEV_Select(hMem1);
GUI_MEMDEV_DrawPerspectiveX(hMem0,0,0,50,50-50*i/100,100-100*i/100,25*i/100);
GUI_MEMDEV_CopyToLCDAt(hMem1,i,50+i);
GUI_Delay(10);
GUI_MEMDEV_Select(hMem1);
GUI_Clear();
GUI_MEMDEV_CopyToLCDAt(hMem1,i,50+i);
i+=1;
if(i>100)
{
i=0;
}
}
while(1);
}
开发者ID:dydynfnf,项目名称:lool-lens,代码行数:46,代码来源:main.c
示例10: 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);
}
}
开发者ID:byxob,项目名称:calendar,代码行数:17,代码来源:Terminal.c
示例11: ShowKeyPadString
void ShowKeyPadString(char* STR)
{
GUI_SetFont(Upper_Font);
GUI_SetColor(GW_BLACKV);
GUI_SetBkColor(GW_WHITE);
/*Clear 27 chars*/
GUI_SetTextAlign(GUI_TA_LEFT);
GUI_GotoXY(73,97);
//GUI_DispChars(' ',41);//For Clear String
GUI_DispChars(' ',50);//For Clear String
/*Clear channel mark area.*/
GUI_SetBkColor(GW_WHITE);
GUI_SetTextAlign(GUI_TA_CENTER);
GUI_GotoXY(161,97);
GUI_DispChar(' ');//For Clear String
GUI_DispStringAt(STR,162,97);
}
开发者ID:yaochein,项目名称:yao_1000,代码行数:17,代码来源:Keypadm.c
示例12: _cbBk
/*********************************************************************
*
* _cbBk
*/
static void _cbBk(WM_MESSAGE * pMsg) {
int xSize, ySize;
switch (pMsg->MsgId) {
case WM_PAINT:
xSize = LCD_GetXSize();
ySize = LCD_GetYSize();
GUI_DrawGradientV(0, 0, xSize, ySize, GUI_BLUE, GUI_BLACK);
GUI_SetColor(GUI_WHITE);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringHCenterAt("WIDGET_Spinbox - Sample", 160, 5);
break;
default:
WM_DefaultProc(pMsg);
}
}
开发者ID:dadianxukong,项目名称:gps,代码行数:21,代码来源:WIDGET_Spinbox.c
示例13: App_Task1
static void App_Task1(void *p_arg)
{
(void)p_arg;
LED_GPIO_Conf();
GUI_Init();
GUI_SetBkColor(GUI_RED);
GUI_SetColor(GUI_BLUE);
GUI_Clear();
while(1)
{
LED0(On);
OSTimeDly(500);
LED0(Off);
OSTimeDly(500);
MainTask();
}
}
开发者ID:captain168,项目名称:SY_STM32F407_ucOSii_emwin,代码行数:17,代码来源:main.c
示例14: Hello_MSG
void Hello_MSG(void) {
GUI_SetColor(GUI_BLUE);
GUI_SetFont(&GUI_Font16_1);
GUI_DispStringHCenterAt("Oscyloskop cyfrowy v1.1" , 240, 150);
GUI_DispStringHCenterAt("Adrian Kurylak" , 240, 175);
GUI_DispStringHCenterAt("Politechnika Wroclawska" , 240, 200);
GUI_SetFont(&GUI_Font32_1);
GUI_DispStringHCenterAt("Inicjalizacja" , 240, 120);
osDelay(250);
GUI_DispStringHCenterAt("Inicjalizacja." , 240, 120);
osDelay(500);
GUI_DispStringHCenterAt("Inicjalizacja.." , 240, 120);
osDelay(500);
GUI_DispStringHCenterAt("Inicjalizacja..." , 240, 120);
osDelay(750);
}
开发者ID:AdrK,项目名称:STM32F7_ADC_DMA_LCD,代码行数:17,代码来源:TH_GUI.c
示例15: _UserDraw
static void _UserDraw(WM_HWIN hWin, int Stage) {
if (Stage == GRAPH_DRAW_LAST)
{
char acText[] = "Flow Rate L/s";
GUI_RECT Rect;
GUI_RECT RectInvalid;
int FontSizeY;
GUI_SetFont(&GUI_Font13_ASCII);
FontSizeY = GUI_GetFontSizeY();
WM_GetInsideRect(&Rect);
WM_GetInvalidRect(hWin, &RectInvalid);
Rect.x1 = Rect.x0 + FontSizeY;
GUI_SetColor(GUI_RED);
GUI_DispStringInRectEx(acText, &Rect, GUI_TA_HCENTER, strlen(acText), GUI_ROTATE_CCW);
}
}
开发者ID:FXRer,项目名称:STM32F4_DISCOVERY,代码行数:17,代码来源:win.c
示例16: main
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration----------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_CRC_Init();
MX_USART1_UART_Init();
// MX_RTC_Init(); /**< 重新用cube生成工程时 注释掉此函数 再下载 */
/* USER CODE BEGIN 2 */
rtc_init(); /**< 使用改造后的初始化函数实现备份掉电时的数据 */
GUI_Init();
GUI_UC_SetEncodeUTF8();
GUI_SetFont(&GUI_Font24B_1);
GUI_SetBkColor(GUI_BLACK);
GUI_SetColor(GUI_GREEN);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
RTC_display_current_time(20, 170);
RTC_display_current_date(120, 170);
}
/* USER CODE END 3 */
}
开发者ID:ZBT1314douhao,项目名称:STM32F107VCT6,代码行数:46,代码来源:main.c
示例17: _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);
}
}
开发者ID:piyushpandey013,项目名称:ucGUI,代码行数:21,代码来源:WM_Sample.c
示例18: test_gui
/*******************************************************************************
* Function Name : testgui
* Description : GUI测试函数,初化后,显示数据
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void test_gui(void)
{
int i;
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC, ENABLE);
GUI_Init();
GUI_Initialized = 1;
GUI_DispChars('/', 53);
for( i= 0; i < 240; i += 8)
{
GUI_DispCharAt('/', 312, i);
GUI_DispCharAt('/', 1, i);
}
GUI_DispChars('/', 52);
GUI_SetFont(&GUI_Font24B_ASCII);
GUI_SetColor(GUI_RED);
GUI_DispStringAt("This is a test program!",10,110);
}
开发者ID:TIMCHENY,项目名称:STM32F107Board-rttproject,代码行数:24,代码来源:testgui.c
示例19: _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);
}
}
开发者ID:caicry,项目名称:uFrame,代码行数:21,代码来源:DIALOG_Count.c
示例20: _cbWindow1
static void _cbWindow1(WM_MESSAGE* pMsg) {
int x, y,d;
switch (pMsg->MsgId) {
case WM_PAINT:
// GUI_SetBkColor(_WindowColor1);
// GUI_SetColor(GUI_WHITE);
// GUI_SetFont(&GUI_Font24_ASCII);
if(curbuttonid != -1)
{
GUI_SetColor(GUI_WHITE);
GUI_SetBkColor(GUI_BLUE);
GUI_SetFont(&GUI_FontHZ12);
GUI_Clear();
x = WM_GetWindowSizeX(pMsg->hWin);
y = WM_GetWindowSizeY(pMsg->hWin);
GUI_DispStringHCenterAt(pButton[curbuttonid].desc, x / 2, (y / 2) + 30);
}
break;
case WM_NOTIFY_PARENT:
//#define WM_NOTIFICATION_CLICKED 1
//#define WM_NOTIFICATION_RELEASED 2
if(pMsg->Data.v == WM_NOTIFICATION_RELEASED)
{
x = WM_GetWindowSizeX(pMsg->hWin);
y = WM_GetWindowSizeY(pMsg->hWin);
d = GetButtonID(pMsg->hWinSrc);
GUI_Clear();
GUI_DispStringHCenterAt(pButton[d].desc, x / 2, (y / 2) + 30);
curbuttonid = d;
if(pButton[d].ExeProg)
{
//OSTaskCreate (pButton[d].ExeProg,pMsg->hWin, &TaskStk[TASK_STK_SIZE-1],20);
printf("new 1 task\n");
pButton[d].ExeProg(pMsg->hWin,0,0);
// CREATE_TASK(&aTCB[0],pButton[d].title,pButton[d].ExeProg,80,Stack_0);
}
}
break;
default:
WM_DefaultProc(pMsg);
}
}
开发者ID:HackLinux,项目名称:jz4725,代码行数:45,代码来源:Desktop.c
注:本文中的GUI_SetColor函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论