NXP
/
rt1050_emwin_gui_demo
RT1050 GUI demo using emWin library
Embed:
(wiki syntax)
Show/hide line numbers
TEXT.h
00001 /********************************************************************* 00002 * SEGGER Microcontroller GmbH & Co. KG * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2016 SEGGER Microcontroller GmbH & Co. KG * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.38 - Graphical user interface for embedded applications ** 00013 All Intellectual Property rights in the Software belongs to SEGGER. 00014 emWin is protected by international copyright laws. Knowledge of the 00015 source code may not be used to write a similar product. This file may 00016 only be used in accordance with the following terms: 00017 00018 The software has been licensed to NXP Semiconductors USA, Inc. whose 00019 registered office is situated at 411 E. Plumeria Drive, San Jose, 00020 CA 95134, USA solely for the purposes of creating libraries for 00021 NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and 00022 distributed under the terms and conditions of the NXP End User License 00023 Agreement. 00024 Full source code is available at: www.segger.com 00025 00026 We appreciate your understanding and fairness. 00027 ---------------------------------------------------------------------- 00028 Licensing information 00029 00030 Licensor: SEGGER Microcontroller Systems LLC 00031 Licensed to: NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA 00032 Licensed SEGGER software: emWin 00033 License number: GUI-00186 00034 License model: emWin License Agreement, dated August 20th 2011 00035 Licensed product: - 00036 Licensed platform: NXP's ARM 7/9, Cortex-M0,M3,M4 00037 Licensed number of seats: - 00038 ---------------------------------------------------------------------- 00039 File : TEXT.h 00040 Purpose : TEXT include 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef TEXT_H 00045 #define TEXT_H 00046 00047 #include "WM.h" 00048 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */ 00049 #include "WIDGET.h" 00050 #include "GUI_Debug.h" 00051 00052 #if GUI_WINSUPPORT 00053 00054 #if defined(__cplusplus) 00055 extern "C" { /* Make sure we have C-declarations in C++ programs */ 00056 #endif 00057 00058 /************************************************************ 00059 * 00060 * #defines 00061 * 00062 ************************************************************* 00063 */ 00064 00065 /************************************************************ 00066 * 00067 * Create / Status flags 00068 */ 00069 #define TEXT_CF_LEFT GUI_TA_LEFT 00070 #define TEXT_CF_RIGHT GUI_TA_RIGHT 00071 #define TEXT_CF_HCENTER GUI_TA_HCENTER 00072 00073 #define TEXT_CF_VCENTER GUI_TA_VCENTER 00074 #define TEXT_CF_TOP GUI_TA_TOP 00075 #define TEXT_CF_BOTTOM GUI_TA_BOTTOM 00076 00077 00078 /********************************************************************* 00079 * 00080 * Public Types 00081 * 00082 ********************************************************************** 00083 00084 */ 00085 typedef WM_HMEM TEXT_Handle; 00086 00087 /********************************************************************* 00088 * 00089 * Create functions 00090 * 00091 ********************************************************************** 00092 */ 00093 TEXT_Handle TEXT_Create (int x0, int y0, int xSize, int ySize, int Id, int Flags, const char * s, int Align); 00094 TEXT_Handle TEXT_CreateAsChild (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, const char * s, int Align); 00095 TEXT_Handle TEXT_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, const char * pText); 00096 TEXT_Handle TEXT_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, const char * pText, int NumExtraBytes); 00097 TEXT_Handle TEXT_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); 00098 00099 /********************************************************************* 00100 * 00101 * The callback ... 00102 * 00103 * Do not call it directly ! It is only to be used from within an 00104 * overwritten callback. 00105 */ 00106 void TEXT_Callback(WM_MESSAGE * pMsg); 00107 00108 /********************************************************************* 00109 * 00110 * Member functions 00111 * 00112 ********************************************************************** 00113 */ 00114 00115 /* Methods changing properties */ 00116 00117 GUI_COLOR TEXT_GetBkColor (TEXT_Handle hObj); 00118 const GUI_FONT * TEXT_GetFont (TEXT_Handle hObj); 00119 int TEXT_GetNumLines (TEXT_Handle hObj); 00120 int TEXT_GetText (TEXT_Handle hObj, char * pDest, U32 BufferSize); 00121 int TEXT_GetTextAlign(TEXT_Handle hObj); 00122 GUI_COLOR TEXT_GetTextColor(TEXT_Handle hObj); 00123 int TEXT_GetUserData (TEXT_Handle hObj, void * pDest, int NumBytes); 00124 GUI_WRAPMODE TEXT_GetWrapMode (TEXT_Handle hObj); 00125 void TEXT_SetBkColor (TEXT_Handle hObj, GUI_COLOR Color); 00126 void TEXT_SetFont (TEXT_Handle hObj, const GUI_FONT * pFont); 00127 int TEXT_SetText (TEXT_Handle hObj, const char * s); 00128 void TEXT_SetTextAlign(TEXT_Handle hObj, int Align); 00129 void TEXT_SetTextColor(TEXT_Handle hObj, GUI_COLOR Color); 00130 int TEXT_SetUserData (TEXT_Handle hObj, const void * pSrc, int NumBytes); 00131 void TEXT_SetWrapMode (TEXT_Handle hObj, GUI_WRAPMODE WrapMode); 00132 00133 /********************************************************************* 00134 * 00135 * Managing default values 00136 * 00137 ********************************************************************** 00138 */ 00139 00140 const GUI_FONT * TEXT_GetDefaultFont (void); 00141 GUI_COLOR TEXT_GetDefaultTextColor(void); 00142 GUI_WRAPMODE TEXT_GetDefaultWrapMode (void); 00143 void TEXT_SetDefaultFont (const GUI_FONT * pFont); 00144 void TEXT_SetDefaultTextColor(GUI_COLOR Color); 00145 GUI_WRAPMODE TEXT_SetDefaultWrapMode (GUI_WRAPMODE WrapMode); 00146 00147 #if defined(__cplusplus) 00148 } 00149 #endif 00150 00151 #endif // GUI_WINSUPPORT 00152 #endif // TEXT_H 00153 00154 /*************************** End of file ****************************/
Generated on Tue Jul 12 2022 19:43:37 by 1.7.2