Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
Embed:
(wiki syntax)
Show/hide line numbers
MULTIEDIT.h
00001 /********************************************************************* 00002 * SEGGER Software GmbH * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2018 SEGGER Microcontroller GmbH * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.48 - 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 by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan 00019 for the purposes of creating libraries for its 00020 Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation 00021 under the terms and conditions of an End User 00022 License Agreement supplied with the libraries. 00023 Full source code is available at: www.segger.com 00024 00025 We appreciate your understanding and fairness. 00026 ---------------------------------------------------------------------- 00027 Licensing information 00028 Licensor: SEGGER Software GmbH 00029 Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan 00030 Licensed SEGGER software: emWin 00031 License number: GUI-00735 00032 License model: emWin License Agreement, signed February 27, 2018 00033 Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation 00034 ---------------------------------------------------------------------- 00035 Support and Update Agreement (SUA) 00036 SUA period: 2018-03-26 - 2019-03-27 00037 Contact to extend SUA: sales@segger.com 00038 ---------------------------------------------------------------------- 00039 File : MULTIEDIT.h 00040 Purpose : MULTIEDIT include 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef MULTIEDIT_H 00045 #define MULTIEDIT_H 00046 00047 #include "WM.h" 00048 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */ 00049 00050 #if GUI_WINSUPPORT 00051 00052 #if defined(__cplusplus) 00053 extern "C" { /* Make sure we have C-declarations in C++ programs */ 00054 #endif 00055 00056 #define MULTIEDIT_CF_READONLY (1 << 0) 00057 #define MULTIEDIT_CF_INSERT (1 << 2) 00058 #define MULTIEDIT_CF_AUTOSCROLLBAR_V (1 << 3) 00059 #define MULTIEDIT_CF_AUTOSCROLLBAR_H (1 << 4) 00060 #define MULTIEDIT_CF_PASSWORD (1 << 5) 00061 #define MULTIEDIT_CF_SHOWCURSOR (1 << 6) 00062 00063 #define MULTIEDIT_SF_READONLY MULTIEDIT_CF_READONLY 00064 #define MULTIEDIT_SF_INSERT MULTIEDIT_CF_INSERT 00065 #define MULTIEDIT_SF_AUTOSCROLLBAR_V MULTIEDIT_CF_AUTOSCROLLBAR_V 00066 #define MULTIEDIT_SF_AUTOSCROLLBAR_H MULTIEDIT_CF_AUTOSCROLLBAR_H 00067 #define MULTIEDIT_SF_PASSWORD MULTIEDIT_CF_PASSWORD 00068 00069 /********************************************************************* 00070 * 00071 * Color indices 00072 */ 00073 #define MULTIEDIT_CI_EDIT 0 00074 #define MULTIEDIT_CI_READONLY 1 00075 00076 /********************************************************************* 00077 * 00078 * Public Types 00079 * 00080 ********************************************************************** 00081 */ 00082 00083 typedef WM_HMEM MULTIEDIT_HANDLE; 00084 00085 /********************************************************************* 00086 * 00087 * Create functions 00088 * 00089 ********************************************************************** 00090 */ 00091 MULTIEDIT_HANDLE MULTIEDIT_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, int ExFlags, const char * pText, int MaxLen); 00092 MULTIEDIT_HANDLE MULTIEDIT_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int BufferSize, const char * pText); 00093 MULTIEDIT_HANDLE MULTIEDIT_CreateIndirect(const GUI_WIDGET_CREATE_INFO* pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); 00094 MULTIEDIT_HANDLE MULTIEDIT_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int BufferSize, const char * pText, int NumExtraBytes); 00095 00096 /********************************************************************* 00097 * 00098 * The callback ... 00099 * 00100 * Do not call it directly ! It is only to be used from within an 00101 * overwritten callback. 00102 */ 00103 void MULTIEDIT_Callback(WM_MESSAGE * pMsg); 00104 00105 /********************************************************************* 00106 * 00107 * Member functions 00108 * 00109 ********************************************************************** 00110 */ 00111 00112 int MULTIEDIT_AddKey (MULTIEDIT_HANDLE hObj, U16 Key); 00113 int MULTIEDIT_AddText (MULTIEDIT_HANDLE hObj, const char * s); 00114 void MULTIEDIT_EnableBlink (MULTIEDIT_HANDLE hObj, int Period, int OnOff); 00115 GUI_COLOR MULTIEDIT_GetBkColor (MULTIEDIT_HANDLE hObj, unsigned Index); 00116 int MULTIEDIT_GetCursorCharPos (MULTIEDIT_HANDLE hObj); 00117 void MULTIEDIT_GetCursorPixelPos(MULTIEDIT_HANDLE hObj, int * pxPos, int * pyPos); 00118 const GUI_FONT * MULTIEDIT_GetFont (MULTIEDIT_HANDLE hObj); 00119 void MULTIEDIT_GetPrompt (MULTIEDIT_HANDLE hObj, char* sDest, int MaxNumChars); 00120 void MULTIEDIT_GetText (MULTIEDIT_HANDLE hObj, char* sDest, int MaxNumChars); 00121 GUI_COLOR MULTIEDIT_GetTextColor (MULTIEDIT_HANDLE hObj, unsigned Index); 00122 int MULTIEDIT_GetTextSize (MULTIEDIT_HANDLE hObj); 00123 int MULTIEDIT_GetUserData (MULTIEDIT_HANDLE hObj, void * pDest, int NumBytes); 00124 void MULTIEDIT_SetTextAlign (MULTIEDIT_HANDLE hObj, int Align); 00125 void MULTIEDIT_SetAutoScrollH (MULTIEDIT_HANDLE hObj, int OnOff); 00126 void MULTIEDIT_SetAutoScrollV (MULTIEDIT_HANDLE hObj, int OnOff); 00127 void MULTIEDIT_SetBkColor (MULTIEDIT_HANDLE hObj, unsigned Index, GUI_COLOR color); 00128 void MULTIEDIT_SetCursorCharPos (MULTIEDIT_HANDLE hObj, int x, int y); /* Not yet implemented */ 00129 void MULTIEDIT_SetCursorPixelPos(MULTIEDIT_HANDLE hObj, int x, int y); /* Not yet implemented */ 00130 void MULTIEDIT_SetCursorOffset (MULTIEDIT_HANDLE hObj, int Offset); 00131 void MULTIEDIT_SetHBorder (MULTIEDIT_HANDLE hObj, unsigned HBorder); 00132 void MULTIEDIT_SetFocusable (MULTIEDIT_HANDLE hObj, int State); 00133 void MULTIEDIT_SetFont (MULTIEDIT_HANDLE hObj, const GUI_FONT * pFont); 00134 void MULTIEDIT_SetInsertMode (MULTIEDIT_HANDLE hObj, int OnOff); 00135 void MULTIEDIT_SetBufferSize (MULTIEDIT_HANDLE hObj, int BufferSize); 00136 void MULTIEDIT_SetMaxNumChars (MULTIEDIT_HANDLE hObj, unsigned MaxNumChars); 00137 void MULTIEDIT_SetPrompt (MULTIEDIT_HANDLE hObj, const char* sPrompt); 00138 void MULTIEDIT_SetReadOnly (MULTIEDIT_HANDLE hObj, int OnOff); 00139 void MULTIEDIT_SetPasswordMode (MULTIEDIT_HANDLE hObj, int OnOff); 00140 void MULTIEDIT_SetText (MULTIEDIT_HANDLE hObj, const char* s); 00141 void MULTIEDIT_SetTextColor (MULTIEDIT_HANDLE hObj, unsigned Index, GUI_COLOR color); 00142 int MULTIEDIT_SetUserData (MULTIEDIT_HANDLE hObj, const void * pSrc, int NumBytes); 00143 void MULTIEDIT_SetWrapNone (MULTIEDIT_HANDLE hObj); 00144 void MULTIEDIT_SetWrapChar (MULTIEDIT_HANDLE hObj); 00145 void MULTIEDIT_SetWrapWord (MULTIEDIT_HANDLE hObj); 00146 int MULTIEDIT_ShowCursor (MULTIEDIT_HANDLE hObj, unsigned OnOff); 00147 00148 #define MULTIEDIT_SetFocussable MULTIEDIT_SetFocusable 00149 00150 /********************************************************************* 00151 * 00152 * Macros for compatibility with older versions 00153 * 00154 ********************************************************************** 00155 */ 00156 00157 #define MULTIEDIT_SetMaxLen(hObj, MaxLen) MULTIEDIT_SetBufferSize(hObj, MaxLen) 00158 #define MULTIEDIT_GetStringSize MULTIEDIT_GetTextSize 00159 00160 #if defined(__cplusplus) 00161 } 00162 #endif 00163 00164 #endif // GUI_WINSUPPORT 00165 #endif // MULTIEDIT_H 00166 00167 /*************************** End of file ****************************/
Generated on Mon Mar 4 2024 07:48:13 by 1.7.2