当前位置: 首页>>代码示例>>C++>>正文


C++ TEXT_SetFont函数代码示例

本文整理汇总了C++中TEXT_SetFont函数的典型用法代码示例。如果您正苦于以下问题:C++ TEXT_SetFont函数的具体用法?C++ TEXT_SetFont怎么用?C++ TEXT_SetFont使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TEXT_SetFont函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: k_InitMenu

/**
  * @brief  Initializes the menu.
  * @param  None.
  * @retval None.
  */
void k_InitMenu(void) 
{
  uint8_t i = 0;
  WM_HWIN   hItem;
  ICONVIEW_Handle hIcon ;
  
  WM_SetCallback(WM_GetDesktopWindowEx(0), _cbBk);
  
  hIcon = ST_AnimatedIconView_CreateEx(0, 
                                       0, 
                                       LCD_GetXSize() - 0, 
                                       LCD_GetYSize() - 0, 
                                       WM_GetDesktopWindowEx(0), 
                                       WM_CF_SHOW | WM_CF_HASTRANS ,
                                       0,
                                       ID_ICONVIEW_MENU, 
                                       150, 
                                       180, 5, 5);  
  
  ST_AnimatedIconView_SetDualFont(hIcon, &GUI_FontLubalGraphXLtBT20, &GUI_FontITCAvantGardeStdBk20);
  
  ST_AnimatedIconView_SetSpace(hIcon, GUI_COORD_Y, 5);
  ST_AnimatedIconView_SetSpace(hIcon, GUI_COORD_X, 5);
  ST_AnimatedIconView_SetFrame(hIcon, GUI_COORD_Y, 10);
  ST_AnimatedIconView_SetFrame(hIcon, GUI_COORD_X, 5);
  
  ST_AnimatedIconView_SetTextColor(hIcon, ICONVIEW_CI_UNSEL, 0x00DCA939);
  ST_AnimatedIconView_SetBkColor(hIcon, ICONVIEW_CI_UNSEL, GUI_WHITE);
  ST_AnimatedIconView_SetBkColor(hIcon, ICONVIEW_CI_SEL, GUI_WHITE);
  ST_AnimatedIconView_SetSel(hIcon, -1);
  ST_AnimatedIconView_SetDualTextColor(hIcon, ICONVIEW_CI_SEL, 0x00DCA939, 0x00522000);  
  
  for (i = 0; i < k_ModuleGetNumber(); i++)
  {   
    ST_AnimatedIconView_AddIcon(hIcon, module_prop[i].module->open_icon, module_prop[i].module->close_icon, (char *)module_prop[i].module->name);
  } 
  
  hItem = TEXT_CreateEx(548, 360, 260, 20, WM_GetDesktopWindowEx(0), WM_CF_SHOW, TEXT_CF_LEFT, ID_FEATURES_FPU, "FPU : ON");
  TEXT_SetFont(hItem, GUI_FONT_13B_1);
  TEXT_SetTextColor(hItem, GUI_WHITE); 
  
  hItem = TEXT_CreateEx(548, 380, 260, 20, WM_GetDesktopWindowEx(0), WM_CF_SHOW, TEXT_CF_LEFT, ID_FEATURES_IC, "I-Cache : ON");
  TEXT_SetFont(hItem, GUI_FONT_13B_1);
  TEXT_SetTextColor(hItem, GUI_WHITE);     
  
  hItem = TEXT_CreateEx(548, 400, 260, 20, WM_GetDesktopWindowEx(0), WM_CF_SHOW, TEXT_CF_LEFT, ID_FEATURES_DC, "D-Cache : ON");
  TEXT_SetFont(hItem, GUI_FONT_13B_1);
  TEXT_SetTextColor(hItem, GUI_WHITE);  
  
  hItem = TEXT_CreateEx(548, 420, 260, 20, WM_GetDesktopWindowEx(0), WM_CF_SHOW, TEXT_CF_LEFT, ID_FEATURES_CPU, "MCU Load < 1%");
  TEXT_SetFont(hItem, GUI_FONT_13B_1);
  TEXT_SetTextColor(hItem, GUI_WHITE);  
  
  hItem = TEXT_CreateEx(548, 440, 260, 20, WM_GetDesktopWindowEx(0), WM_CF_SHOW, TEXT_CF_LEFT, ID_FEATURES_FREQ, "Clk : 200 MHz");
  TEXT_SetFont(hItem, GUI_FONT_13B_1);
  TEXT_SetTextColor(hItem, GUI_WHITE);    
  
}
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:63,代码来源:k_menu.c

示例2: _cbAlarmDialog

/**
  * @brief  Callback routine of the alarm dialog
  * @param  pMsg: pointer to a data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbAlarmDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
  int Id, NCode;
  char temp[50];
  uint8_t asec, amin, ahour;
  
  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:
    
    /* Initialization of 'Alarm' */
    hItem = pMsg->hWin;
    FRAMEWIN_SetFont(hItem, GUI_FONT_13HB_ASCII);
    
    hItem = WM_GetDialogItem(pMsg->hWin, ID_ALARM);
    TEXT_SetFont(hItem, GUI_FONT_13HB_ASCII);
    
    /* Initialization of 'Image' */
    hItem = WM_GetDialogItem(pMsg->hWin, ID_IMAGE_INFO);
    IMAGE_SetBitmap(hItem, &bmalarmclock);
    
    /* Initialization of 'Time' */
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TIME);
    ahour = RTC_AlarmStructure.RTC_AlarmTime.RTC_Hours;
    amin = RTC_AlarmStructure.RTC_AlarmTime.RTC_Minutes;
    asec = RTC_AlarmStructure.RTC_AlarmTime.RTC_Seconds;
    sprintf (temp, "%02d:%02d:%02d", ahour, amin, asec);
    TEXT_SetText(hItem, temp);
    TEXT_SetFont(hItem, GUI_FONT_24B_ASCII);
    TEXT_SetTextColor(hItem, GUI_BROWN);
    
    /* Initialization of 'Close' */
    hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_INFO_CLOSE);
    BUTTON_SetFont(hItem, GUI_FONT_13HB_ASCII);
    break;
    
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);    /* Id of widget */
    NCode = pMsg->Data.v;               /* Notification code */
    switch (NCode) {
    case WM_NOTIFICATION_RELEASED:      /* React only if released */
      switch (Id) {
      case ID_BUTTON_INFO_CLOSE:
        GUI_EndDialog(pMsg->hWin, 0);
        STM_EVAL_LEDOff(LED4);
        alarm_set=0;
        break;
      }
      break;
    }
    break;
    
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
开发者ID:descent,项目名称:STM32f429I-Discovery_Demo,代码行数:61,代码来源:demo_clock.c

示例3: Login_cbDialog

static void Login_cbDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
  int Id, NCode;
  // USER START (Optionally insert additional variables)
  // USER END

  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:
    //
	
    // Initialization of 'EDIT'
	 hItem = pMsg->hWin;
	  WINDOW_SetBkColor(pMsg->hWin,GUI_BLUE);
		hItem = WM_GetDialogItem(pMsg->hWin,GUI_ID_TEXT0);
	  TEXT_SetFont(hItem,GUI_FONT_32B_ASCII);
		TEXT_SetTextColor(hItem,GUI_WHITE);
		TEXT_SetTextAlign(hItem,TEXT_CF_HCENTER|TEXT_CF_VCENTER);
		hItem = WM_GetDialogItem(pMsg->hWin,GUI_ID_TEXT1);
	  TEXT_SetFont(hItem,GUI_FONT_13H_ASCII);
		TEXT_SetTextColor(hItem,GUI_GRAY);
		TEXT_SetTextAlign(hItem,TEXT_CF_BOTTOM|TEXT_CF_LEFT);
    // USER END
    break;
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id) {
			case GUI_ID_BUTTON0: // Notifications sent by 'Button'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
				GUI_EndDialog(pMsg->hWin,1);
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    // USER START (Optionally insert additional code for further Ids)
    // USER END
    }
    break;
  // USER START (Optionally insert additional message handling)
  // USER END
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
开发者ID:tongjingyu,项目名称:nxp-os,代码行数:53,代码来源:Login.c

示例4: _cbTitle

/**
  * @brief  Callback routine of desktop window title.
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbTitle(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
//	const void * pData;
//  U32          FileSize;

  switch (pMsg->MsgId) 
  {
		case WM_INIT_DIALOG:
			//
			// Initialization of 'Window'
			//
			hItem = pMsg->hWin;
			//WINDOW_SetBkColor(hItem, 0x00303030);
			WINDOW_SetBkColor(hItem, GUI_DARKGRAY);
			//
			// Initialization of 'Image'
			//
			hItem = WM_GetDialogItem(pMsg->hWin, ID_TITLE_IMAGE_0);
//			FileSize = sizeof(_acImage_LZYLogo40x20);
//			pData = (const void *)_acImage_LZYLogo40x20;
//			IMAGE_SetBMP(hItem, pData, FileSize);
			IMAGE_SetBitmap(hItem, &bmbmLZYLogo40x20);
			//
			// Initialization of 'Text'
			//
			hItem = WM_GetDialogItem(pMsg->hWin, ID_TITLE_TEXT_0);
			TEXT_SetTextAlign(hItem, GUI_TA_LEFT | GUI_TA_VCENTER);
			TEXT_SetFont(hItem, &GUI_FontHZ_Song_16);
			TEXT_SetTextColor(hItem, GUI_WHITE);
//			strcpy(temp, DEF_WT_NAME);
//			strcat(temp, " ");
//			strcat(temp, DEF_WT_MODEL);
//			TEXT_SetText(hItem, temp);
			//
			// Initialization of 'Text'
			//
			hItem = WM_GetDialogItem(pMsg->hWin, ID_TITLE_TEXT_1);
			TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
			//GUI_UC_SetEncodeUTF8();
			TEXT_SetFont(hItem, &GUI_FontHZ_Song_16);
			//TEXT_SetBkColor(hItem, GUI_DARKBLUE);
			TEXT_SetTextColor(hItem, GUI_WHITE);
			//TEXT_SetText(hItem, "主菜单");
			break;
			
		default:
			WM_DefaultProc(pMsg);
			break;
  }
}
开发者ID:wujun9959,项目名称:IMS,代码行数:55,代码来源:wt_task_gui.c

示例5: _cbCameraSettings

/**
  * @brief  Callback function of the Camera Settings page
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbCameraSettings(WM_MESSAGE * pMsg)
{
  WM_HWIN hItem;

  switch (pMsg->MsgId)
  {
  case WM_INIT_DIALOG:  
    /* Initialization of 'Brightness' */
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
    TEXT_SetFont(hItem, GUI_FONT_13B_1);
    TEXT_SetTextAlign(hItem, GUI_TA_RIGHT | GUI_TA_VCENTER);
    
    /* Initialization of 'Contrast' */
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1);
    TEXT_SetFont(hItem, GUI_FONT_13B_1);
    TEXT_SetTextAlign(hItem, GUI_TA_RIGHT | GUI_TA_VCENTER);
    
    /* Initialization of '-2   -1   0    1    2' */
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_3);
    TEXT_SetFont(hItem, GUI_FONT_13_1);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    
    /* Initialization of '-2   -1   0    1    2' */
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_4);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    
    hItem = WM_GetDialogItem(pMsg->hWin, ID_SLIDER_0);
    SLIDER_SetRange(hItem, 1, 5);
    SLIDER_SetNumTicks(hItem, 5);
    if(CameraSettings.b.brightness == 0) 
    {
      CameraSettings.b.brightness = 3;
    }
    SLIDER_SetValue(hItem, CameraSettings.b.brightness);
    
    hItem = WM_GetDialogItem(pMsg->hWin, ID_SLIDER_1);
    SLIDER_SetRange(hItem, 1, 5);
    SLIDER_SetNumTicks(hItem, 5);
    if(CameraSettings.b.contrast == 0) 
    {
      CameraSettings.b.contrast = 3;
    }
    SLIDER_SetValue(hItem, CameraSettings.b.contrast);
    break;
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:54,代码来源:camera_win.c

示例6: _cbDialog

static void _cbDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;

  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:

    hItem = pMsg->hWin;
    FRAMEWIN_SetText(hItem, "welcome");
    FRAMEWIN_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    FRAMEWIN_SetTitleVis(hItem, 0);
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetFont(hItem, GUI_FONT_20B_1);
    TEXT_SetTextColor(hItem, 0x000000FF);
    TEXT_SetText(hItem, "welcome to use our system");
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetFont(hItem, GUI_FONT_16B_1);
    TEXT_SetTextColor(hItem, 0x008000FF);
    TEXT_SetText(hItem, "The elderly assistant");
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_2);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetText(hItem, "Just a moment, please. ");
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_3);
    TEXT_SetText(hItem, "second");
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    // USER START (Optionally insert additional code for further widget initialization)
    // USER END
    break;
  // USER START (Optionally insert additional message handling)
  // USER END
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
开发者ID:ProsperousLi,项目名称:stm32EWIN,代码行数:48,代码来源:startUp.c

示例7: _cbFileControl

/**
  * @brief  Callback function of the File Control page
  * @param  pMsg: pointer to data structure of type WM_MESSAGE
  * @retval None
  */
static void _cbFileControl(WM_MESSAGE * pMsg)
{
  WM_HWIN hItem;
  int     NCode;
  int     Id;
  int     result;  
  
  switch (pMsg->MsgId)
  {
  case WM_INIT_DIALOG:
    /* Initialization of 'Brightness' */
    hItem = WM_GetDialogItem(pMsg->hWin, ID_FOLDER_CAPTION);
    TEXT_SetFont(hItem, GUI_FONT_13B_1);
    hItem = WM_GetDialogItem(pMsg->hWin, ID_FOLDER);
    EDIT_SetText(hItem, (char *)capture_folder);

    break;
    
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id)
    {
    case ID_BROWSE: /* Notifications sent by 'Radio' */
      switch(NCode)
      {
      case WM_NOTIFICATION_RELEASED:
        pFileInfo->pfGetData = k_GetData;
        pFileInfo->pMask = acMask_folder;
        BSP_SD_Init();
        SD_Configured = 1;
        
        chooser_select_folder = CHOOSEFILE_Create(CAMERA_hWin, 20, 20, 200, 150, apDrives, GUI_COUNTOF(apDrives), 0, "Select a folder", 0, pFileInfo);

        result = GUI_ExecCreatedDialog(chooser_select_folder);
        if (result == 0) 
        {  
          if(((pFileInfo->pRoot[0] == '0' ) || (pFileInfo->pRoot[0] == '1' )))
          {
            hItem = WM_GetDialogItem(hDialogFileControl, ID_FOLDER);
            EDIT_SetText(hItem, (char *)pFileInfo->pRoot);
            chooser_select_folder = 0;
            WM_InvalidateWindow(hDialogFileControl);
            WM_Paint(hDialogFileControl);
            strncpy((char *)(CAMERA_SAVE_PATH),pFileInfo->pRoot , FILEMGR_FULL_PATH_SIZE);
            strncpy((char *)capture_folder,pFileInfo->pRoot , FILEMGR_FULL_PATH_SIZE);
          }          
        }

        break;
      }
      break;
    }
    break;
    
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:65,代码来源:camera_win.c

示例8: _SetFont

/*********************************************************************
*
*       _SetFont
*/
static void _SetFont(WM_HWIN hDlg) {
  WM_HWIN hItem;
  int Index;
  hItem = WM_GetDialogItem(hDlg, GUI_ID_RADIO0);
  Index = RADIO_GetValue(hItem);
  hItem = WM_GetDialogItem(hDlg, GUI_ID_TEXT0);
  TEXT_SetFont(hItem, _apFont[Index]);
}
开发者ID:caicry,项目名称:uFrame,代码行数:12,代码来源:DIALOG_Count.c

示例9: _cbDialog

/*********************************************************************
*
*       _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
  int Id, NCode;
  // USER START (Optionally insert additional variables)
  // USER END

  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:
    //
    // Initialization of 'Demo'
    //
    hItem = pMsg->hWin;
    FRAMEWIN_SetText(hItem, "GUIBuilder Demo");
    FRAMEWIN_SetFont(hItem, GUI_FONT_24B_ASCII);
    FRAMEWIN_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    FRAMEWIN_SetTextColor(hItem, 0x00FF8000);
    SCROLLBAR_CreateAttached(hItem, 0);
    SCROLLBAR_CreateAttached(hItem, SCROLLBAR_CF_VERTICAL);
    //
    // Initialization of 'Text'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
    TEXT_SetText(hItem, "This is a text!");
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetTextColor(hItem, 0x00000000);
    TEXT_SetFont(hItem, GUI_FONT_16B_ASCII);
    // USER START (Optionally insert additional code for further widget initialization)
    // USER END
    break;
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id) {
    case ID_BUTTON_0: // Notifications sent by 'Button'
      switch(NCode) {
      case WM_NOTIFICATION_CLICKED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      case WM_NOTIFICATION_RELEASED:
        // USER START (Optionally insert code for reacting on notification message)
        // USER END
        break;
      // USER START (Optionally insert additional code for further notification handling)
      // USER END
      }
      break;
    // USER START (Optionally insert additional code for further Ids)
    // USER END
    }
    break;
  // USER START (Optionally insert additional message handling)
  // USER END
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
开发者ID:tongjingyu,项目名称:nxp-os,代码行数:62,代码来源:DemoDLG.c

示例10: resurs_panel_show

/*****************************
Initializacija paneli nalashtuvan resursu
*****************************/
void resurs_panel_show(void)
{
  if (Resurs_FrameWin == WM_UNATTACHED)
  {
    //Stvorjujemo FrameWin
    Resurs_FrameWin = FRAMEWIN_CreateEx(X0, Y0, X_SIZE, Y_SIZE, 0, WM_CF_HIDE, 0, ID_RESURS_FRAMEWIN, Resurs_panel_title.ptitle[sel_language], _cbEmpty);
    FRAMEWIN_SetFont(Resurs_FrameWin, &GUI_FontArialBold14_8_Unicode);
    FRAMEWIN_SetTextAlign(Resurs_FrameWin, GUI_TA_HCENTER);
    FRAMEWIN_SetBarColor(Resurs_FrameWin, 1, GUI_GREEN);
    FRAMEWIN_SetBarColor(Resurs_FrameWin, 0, GUI_LIGHTGRAY);
    FRAMEWIN_SetTextColor(Resurs_FrameWin, GUI_BLUE);  

#define COL_1_X         5
#define ROW_1_Y         10
#define HIGHT_Y         10
#define SHIFT_Y         (ROW_1_Y + HIGHT_Y)
#define WIDTH_X_T       165
#define WIDTH_X_V       80
#define SHIFT_X1        (WIDTH_X_T + 10)
#define SHIFT_X2        (SHIFT_X1 + WIDTH_X_V + 10)

    for (unsigned int i = 0; i < MAX_NUMBER_ITEMS_RESURS; i++)
    {
      Resurs_t[i] = TEXT_CreateEx(COL_1_X, ROW_1_Y + i*SHIFT_Y, WIDTH_X_T, HIGHT_Y, WM_GetClientWindow(Resurs_FrameWin), WM_CF_SHOW, TEXT_CF_LEFT | TEXT_CF_VCENTER, ID_RESURS_1_TITLE + i,  Resurs_title[i].ptitle[sel_language]);
      TEXT_SetFont(Resurs_t[i], &GUI_FontArialStandard14_8_Unicode);

      Resurs_v[i] = TEXT_CreateEx(COL_1_X + SHIFT_X1, ROW_1_Y + i*SHIFT_Y, WIDTH_X_V, HIGHT_Y, WM_GetClientWindow(Resurs_FrameWin), WM_CF_SHOW, TEXT_CF_LEFT | TEXT_CF_VCENTER, ID_RESURS_1_VALUE + i,  "");
      TEXT_SetFont(Resurs_v[i], &GUI_FontArialStandard14_8_Unicode);
    }
  
#undef COL_1_X
#undef ROW_1_Y
#undef HIGHT_Y
#undef SHIFT_Y
#undef WIDTH_X_T
#undef WIDTH_X_V
#undef SHIFT_X1
#undef SHIFT_X2

  }
  
  WM_BringToTop(Resurs_FrameWin);
  WM_ShowWindow(Resurs_FrameWin);
  
}
开发者ID:Flyagin,项目名称:BS-MRZV,代码行数:48,代码来源:Resurs_panel.c

示例11: InitDialog_Cus

void InitDialog_Cus(WM_MESSAGE * pMsg)
{
    WM_HWIN hWin = pMsg->hWin;
    //
    //GUI_ID_TEXT_USER
    //
    TEXT_SetFont(WM_GetDialogItem(hWin,GUI_ID_TEXT_USER),&GUI_FontHZ_SongTi_16);
	EDIT_SetFont(WM_GetDialogItem(hWin,GUI_ID_EDIT_USER),&GUI_FontHZ_SongTi_16);
	TEXT_SetFont(WM_GetDialogItem(hWin,GUI_ID_TEXT_MODLE),&GUI_FontHZ_SongTi_16);
	EDIT_SetMaxLen(WM_GetDialogItem(hWin,GUI_ID_EDIT_USER),500);
    //
    //GUI_ID_TEXT_E_PROD
    //
    TEXT_SetFont(WM_GetDialogItem(hWin,GUI_ID_TEXT_E_PROD),&GUI_FontHZ_SongTi_16);
	EDIT_SetFont(WM_GetDialogItem(hWin,GUI_ID_EDIT_E_PROD),&GUI_FontHZ_SongTi_16);
	EDIT_SetMaxLen(WM_GetDialogItem(hWin,GUI_ID_EDIT_E_PROD),500);
    //
    //GUI_ID_TEXT_MODLE
    //

	TEXT_SetFont(WM_GetDialogItem(hWin,GUI_ID_TEXT_L_PROD),&GUI_FontHZ_SongTi_16);
	EDIT_SetFont(WM_GetDialogItem(hWin,GUI_ID_EDIT_L_PROD),&GUI_FontHZ_SongTi_16);
	EDIT_SetMaxLen(WM_GetDialogItem(hWin,GUI_ID_EDIT_L_PROD),500);
    //
    //GUI_ID_TEXT0
    //
    TEXT_SetFont(WM_GetDialogItem(hWin,GUI_ID_TEXT_L_MODE),&GUI_FontHZ_SongTi_16);
    //
    //
    BUTTON_SetFont(WM_GetDialogItem(hWin,GUI_ID_BUTTON_HOME),&GUI_FontHZ_SongTi_16);

	EDIT_SetMaxLen(WM_GetDialogItem(hWin,GUI_ID_EDIT_L_MODE),500);
	EDIT_SetMaxLen(WM_GetDialogItem(hWin,GUI_ID_EDIT_MODLE),500);
    //
	EDIT_SetText(WM_GetDialogItem(hWin,GUI_ID_EDIT_USER),custormer.custorm);
	
	EDIT_SetText(WM_GetDialogItem(hWin,GUI_ID_EDIT_E_PROD),custormer.elevator_productor);

	EDIT_SetText(WM_GetDialogItem(hWin,GUI_ID_EDIT_MODLE),custormer.series_no);
	
	EDIT_SetText(WM_GetDialogItem(hWin,GUI_ID_EDIT_L_PROD),custormer.limitor_productor);
	
	EDIT_SetText(WM_GetDialogItem(hWin,GUI_ID_EDIT_L_MODE),custormer.limitor_series);
	
}
开发者ID:weimingtom,项目名称:stm32-gui,代码行数:45,代码来源:Custormer.c

示例12: _cbDialog

/*---------------------------------------------------------------------------*
 * Routine:     _cbDialog
 *---------------------------------------------------------------------------*
 * Description:
 *      Callback function used by emWin to process events for the active window.
 * Inputs:
 *      WM_MESSAGE *pMsg -- message structure for current dialog.
 *---------------------------------------------------------------------------*/
static void _cbDialog(WM_MESSAGE * pMsg)
{
    WM_HWIN hItem;
    int Id, NCode;
    T_keyboardMapping *p = G_keypadCurrentMapping;

    switch (pMsg->MsgId) {
        case WM_INIT_DIALOG:
            //
            // Initialization of 'Window'
            //
            hItem = pMsg->hWin;
            G_window = hItem;
            WINDOW_SetBkColor(hItem, KEYBOARD_BACKGROUND_COLOR);
            //BUTTON_SetDefaultBkColor(KEY_BACKGROUND_COLOR, BUTTON_CI_UNPRESSED);
            EDIT_SetDefaultFont(&KEYBOARD_DEFAULT_FONT);
            hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_BOX);
            EDIT_SetMaxLen(hItem, MAX_NUMBER_OF_CHARS);
            EDIT_SetText(hItem, G_textBox);
            EDIT_SetFont(hItem, &KEYBOARD_DEFAULT_FONT);
            G_textBoxIndex = EDIT_GetNumChars(hItem);
            hItem = WM_GetDialogItem(pMsg->hWin, ID_MESSAGE);
            TEXT_SetFont(hItem, &KEYBOARD_DEFAULT_FONT);
            TEXT_SetTextColor(hItem, GUI_BLACK);
            TEXT_SetBkColor(hItem, KEYBOARD_BACKGROUND_COLOR);
            TEXT_SetText(hItem, G_message);
            TEXT_SetTextAlign(hItem, GUI_TA_TOP);
            while (p->iID) {
                hItem = WM_GetDialogItem(pMsg->hWin, p->iID);
                BUTTON_SetFont(hItem, &KEYBOARD_DEFAULT_FONT);
                BUTTON_SetTextColor(hItem, BUTTON_CI_UNPRESSED, GUI_BLACK);
                BUTTON_SetTextColor(hItem, BUTTON_CI_PRESSED, GUI_BLACK);
                BUTTON_SetBkColor(hItem, BUTTON_CI_UNPRESSED,
                    KEY_BACKGROUND_COLOR);
                BUTTON_SetBkColor(hItem, BUTTON_CI_PRESSED, GUI_LIGHTGRAY);
                //BUTTON_SetSkin(hItem, BUTTON_SKIN_FLEX);
                p++;
            }
            WM_MakeModal(pMsg->hWin);
            setNewButtonText(pMsg, 0, 0);
            break;
        case WM_NOTIFY_PARENT:
            Id = WM_GetId(pMsg->hWinSrc);
            NCode = pMsg->Data.v;
            if (!IKeyboardHandleEvent(pMsg, NCode, Id)) {
                // Special cases go here
                // Nothing happens otherwise
            }
        case WM_POST_PAINT:
            // Make sure the all presses up til now are gone
            TouchscreenClearPresses();
            break;
        default:
            WM_DefaultProc(pMsg);
            break;
    }
}
开发者ID:EnricoGiordano1992,项目名称:Tesi,代码行数:65,代码来源:Keyboard.c

示例13: _cbFrameWinControl

/*********************************************************************
*
*       _cbFrameWinControl
*/
static void _cbFrameWinControl(WM_MESSAGE * pMsg) {
  WM_HWIN hItem;
  int     xSize;
  int     ySize;
  int     NCode;
  int     Id;

  switch (pMsg->MsgId) {
  case WM_KEY:
    WM_SendMessage(WM_HBKWIN, pMsg);
    break;
  case WM_INIT_DIALOG:
    hItem = WM_GetDialogItem(pMsg->hWin, GUI_ID_PROGBAR0);
    PROGBAR_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    PROGBAR_SetFont(hItem, &GUI_FontD6x8);
    hItem = WM_GetDialogItem(pMsg->hWin, GUI_ID_HALT);
    BUTTON_SetFocussable(hItem, 0);
    hItem = WM_GetDialogItem(pMsg->hWin, GUI_ID_NEXT);
    BUTTON_SetFocussable(hItem, 0);
    hItem = WM_GetDialogItem(pMsg->hWin, GUI_ID_TEXT0);
    TEXT_SetText(hItem, "Intro");
    TEXT_SetFont(hItem, &GUI_Font8_ASCII);
    break;
  case WM_PAINT:
    xSize = WM_GetWindowSizeX(pMsg->hWin);
    ySize = WM_GetWindowSizeY(pMsg->hWin);
    GUI_DrawGradientV(0, 0, xSize - 1, ySize - 1, 0xFFFFFF, 0xDCCEC0);
    break;
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch (NCode) {
    case WM_NOTIFICATION_RELEASED:
      switch (Id) {
      case GUI_ID_HALT:
        if (_Halt) {
          _Halt          = 0;
          _HaltTime      = GUI_GetTime() - _HaltTimeStart;
          WM_MakeModal(0);
        } else {
          _Halt          = 1;
          _HaltTimeStart = GUI_GetTime() - _HaltTime;
          WM_MakeModal(pMsg->hWin);
        }
        break;
      case GUI_ID_NEXT:
        _Next = 1;    // Will be set to 0 by GUIDEMO_GetNextState()
        _ClearHalt(); // Clear _Halt, so the next sample demonstrates immediately
        break;
      }
      break;
    }
    break;
  default:
    WM_DefaultProc(pMsg);
  }
}
开发者ID:PaxInstruments,项目名称:STM32CubeF4,代码行数:61,代码来源:GUIDEMO.c

示例14: _cbFileInfoDialog

/**
  * @brief  Callback routine of Info dialog
  * @param  pMsg: pointer to data structure of type WM_MESSAGE 
  * @retval None
  */
static void _cbFileInfoDialog(WM_MESSAGE * pMsg) {
  int     NCode;
  int     Id;
  WM_HWIN hItem;
  
  switch (pMsg->MsgId) {
  case WM_INIT_DIALOG:
    
    hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_OK_MESSAGE);
    WM_SetCallback(hItem, _cbButton_okMessage);
    
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_FILENAME);
    TEXT_SetFont(hItem, &GUI_FontAvantGarde32);
    
    hItem = WM_GetDialogItem(pMsg->hWin, (ID_TEXT_FILENAME+2));
    TEXT_SetFont(hItem, &GUI_FontAvantGarde32);    
    break;
        
  case WM_PAINT:    
    GUI_DrawBitmap(&bmwarning, 260, 60);
    break;
    
  case WM_NOTIFY_PARENT:
    Id    = WM_GetId(pMsg->hWinSrc);
    NCode = pMsg->Data.v;
    switch(Id) {
    case ID_BUTTON_OK_MESSAGE: /* Notifications sent by 'OK' */
      switch(NCode) {
      case WM_NOTIFICATION_RELEASED:
        GUI_EndDialog(pMsg->hWin, 0); 

        break;
      }
      break;
    }
    break;
  default:
    WM_DefaultProc(pMsg);
    break;
  }
}
开发者ID:Lembed,项目名称:STM32CubeF4-mirrors,代码行数:46,代码来源:video_player_win.c

示例15: InitDialog_Home

void InitDialog_Home(WM_MESSAGE * pMsg)
{
	int i;
    WM_HWIN hWin = pMsg->hWin;
    //
    //FRAMEWIN
    //
    for(i=GUI_ID_BUTTON0; i< GUI_ID_BUTTON6;i++)
	{
	BUTTON_SetFont(WM_GetDialogItem(hWin,i),&GUI_FontHZ_SongTi_16);
	}
    
    //
    //GUI_ID_TEXT0
    //
    TEXT_SetFont(WM_GetDialogItem(hWin,GUI_ID_TEXT0),&GUI_FontHZ_SongTi_16);
	TEXT_SetFont(WM_GetDialogItem(hWin,GUI_ID_TEXT1),&GUI_FontHZ_SongTi_16);
	TEXT_SetFont(WM_GetDialogItem(hWin,GUI_ID_TEXT2),&GUI_FontHZ_SongTi_16);
    //
    //GUI_ID_TEXT1
    //
    //
}
开发者ID:weimingtom,项目名称:stm32-gui,代码行数:23,代码来源:home.c


注:本文中的TEXT_SetFont函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。