NXP
/
rt1050_emwin_gui_demo
RT1050 GUI demo using emWin library
emwin/emWin_header/MULTIEDIT.h@0:dd702039127a, 2018-09-20 (annotated)
- Committer:
- alejandroRL
- Date:
- Thu Sep 20 19:16:34 2018 +0000
- Revision:
- 0:dd702039127a
emWin GUI Demo for RT1050
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
alejandroRL | 0:dd702039127a | 1 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 2 | * SEGGER Microcontroller GmbH & Co. KG * |
alejandroRL | 0:dd702039127a | 3 | * Solutions for real time microcontroller applications * |
alejandroRL | 0:dd702039127a | 4 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 5 | * * |
alejandroRL | 0:dd702039127a | 6 | * (c) 1996 - 2016 SEGGER Microcontroller GmbH & Co. KG * |
alejandroRL | 0:dd702039127a | 7 | * * |
alejandroRL | 0:dd702039127a | 8 | * Internet: www.segger.com Support: support@segger.com * |
alejandroRL | 0:dd702039127a | 9 | * * |
alejandroRL | 0:dd702039127a | 10 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 11 | |
alejandroRL | 0:dd702039127a | 12 | ** emWin V5.38 - Graphical user interface for embedded applications ** |
alejandroRL | 0:dd702039127a | 13 | All Intellectual Property rights in the Software belongs to SEGGER. |
alejandroRL | 0:dd702039127a | 14 | emWin is protected by international copyright laws. Knowledge of the |
alejandroRL | 0:dd702039127a | 15 | source code may not be used to write a similar product. This file may |
alejandroRL | 0:dd702039127a | 16 | only be used in accordance with the following terms: |
alejandroRL | 0:dd702039127a | 17 | |
alejandroRL | 0:dd702039127a | 18 | The software has been licensed to NXP Semiconductors USA, Inc. whose |
alejandroRL | 0:dd702039127a | 19 | registered office is situated at 411 E. Plumeria Drive, San Jose, |
alejandroRL | 0:dd702039127a | 20 | CA 95134, USA solely for the purposes of creating libraries for |
alejandroRL | 0:dd702039127a | 21 | NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and |
alejandroRL | 0:dd702039127a | 22 | distributed under the terms and conditions of the NXP End User License |
alejandroRL | 0:dd702039127a | 23 | Agreement. |
alejandroRL | 0:dd702039127a | 24 | Full source code is available at: www.segger.com |
alejandroRL | 0:dd702039127a | 25 | |
alejandroRL | 0:dd702039127a | 26 | We appreciate your understanding and fairness. |
alejandroRL | 0:dd702039127a | 27 | ---------------------------------------------------------------------- |
alejandroRL | 0:dd702039127a | 28 | Licensing information |
alejandroRL | 0:dd702039127a | 29 | |
alejandroRL | 0:dd702039127a | 30 | Licensor: SEGGER Microcontroller Systems LLC |
alejandroRL | 0:dd702039127a | 31 | Licensed to: NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA |
alejandroRL | 0:dd702039127a | 32 | Licensed SEGGER software: emWin |
alejandroRL | 0:dd702039127a | 33 | License number: GUI-00186 |
alejandroRL | 0:dd702039127a | 34 | License model: emWin License Agreement, dated August 20th 2011 |
alejandroRL | 0:dd702039127a | 35 | Licensed product: - |
alejandroRL | 0:dd702039127a | 36 | Licensed platform: NXP's ARM 7/9, Cortex-M0,M3,M4 |
alejandroRL | 0:dd702039127a | 37 | Licensed number of seats: - |
alejandroRL | 0:dd702039127a | 38 | ---------------------------------------------------------------------- |
alejandroRL | 0:dd702039127a | 39 | File : MULTIEDIT.h |
alejandroRL | 0:dd702039127a | 40 | Purpose : MULTIEDIT include |
alejandroRL | 0:dd702039127a | 41 | --------------------END-OF-HEADER------------------------------------- |
alejandroRL | 0:dd702039127a | 42 | */ |
alejandroRL | 0:dd702039127a | 43 | |
alejandroRL | 0:dd702039127a | 44 | #ifndef MULTIEDIT_H |
alejandroRL | 0:dd702039127a | 45 | #define MULTIEDIT_H |
alejandroRL | 0:dd702039127a | 46 | |
alejandroRL | 0:dd702039127a | 47 | #include "WM.h" |
alejandroRL | 0:dd702039127a | 48 | #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */ |
alejandroRL | 0:dd702039127a | 49 | |
alejandroRL | 0:dd702039127a | 50 | #if GUI_WINSUPPORT |
alejandroRL | 0:dd702039127a | 51 | |
alejandroRL | 0:dd702039127a | 52 | #if defined(__cplusplus) |
alejandroRL | 0:dd702039127a | 53 | extern "C" { /* Make sure we have C-declarations in C++ programs */ |
alejandroRL | 0:dd702039127a | 54 | #endif |
alejandroRL | 0:dd702039127a | 55 | |
alejandroRL | 0:dd702039127a | 56 | #define MULTIEDIT_CF_READONLY (1 << 0) |
alejandroRL | 0:dd702039127a | 57 | #define MULTIEDIT_CF_INSERT (1 << 2) |
alejandroRL | 0:dd702039127a | 58 | #define MULTIEDIT_CF_AUTOSCROLLBAR_V (1 << 3) |
alejandroRL | 0:dd702039127a | 59 | #define MULTIEDIT_CF_AUTOSCROLLBAR_H (1 << 4) |
alejandroRL | 0:dd702039127a | 60 | #define MULTIEDIT_CF_PASSWORD (1 << 5) |
alejandroRL | 0:dd702039127a | 61 | |
alejandroRL | 0:dd702039127a | 62 | #define MULTIEDIT_SF_READONLY MULTIEDIT_CF_READONLY |
alejandroRL | 0:dd702039127a | 63 | #define MULTIEDIT_SF_INSERT MULTIEDIT_CF_INSERT |
alejandroRL | 0:dd702039127a | 64 | #define MULTIEDIT_SF_AUTOSCROLLBAR_V MULTIEDIT_CF_AUTOSCROLLBAR_V |
alejandroRL | 0:dd702039127a | 65 | #define MULTIEDIT_SF_AUTOSCROLLBAR_H MULTIEDIT_CF_AUTOSCROLLBAR_H |
alejandroRL | 0:dd702039127a | 66 | #define MULTIEDIT_SF_PASSWORD MULTIEDIT_CF_PASSWORD |
alejandroRL | 0:dd702039127a | 67 | |
alejandroRL | 0:dd702039127a | 68 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 69 | * |
alejandroRL | 0:dd702039127a | 70 | * Color indices |
alejandroRL | 0:dd702039127a | 71 | */ |
alejandroRL | 0:dd702039127a | 72 | #define MULTIEDIT_CI_EDIT 0 |
alejandroRL | 0:dd702039127a | 73 | #define MULTIEDIT_CI_READONLY 1 |
alejandroRL | 0:dd702039127a | 74 | |
alejandroRL | 0:dd702039127a | 75 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 76 | * |
alejandroRL | 0:dd702039127a | 77 | * Public Types |
alejandroRL | 0:dd702039127a | 78 | * |
alejandroRL | 0:dd702039127a | 79 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 80 | */ |
alejandroRL | 0:dd702039127a | 81 | |
alejandroRL | 0:dd702039127a | 82 | typedef WM_HMEM MULTIEDIT_HANDLE; |
alejandroRL | 0:dd702039127a | 83 | |
alejandroRL | 0:dd702039127a | 84 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 85 | * |
alejandroRL | 0:dd702039127a | 86 | * Create functions |
alejandroRL | 0:dd702039127a | 87 | * |
alejandroRL | 0:dd702039127a | 88 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 89 | */ |
alejandroRL | 0:dd702039127a | 90 | 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); |
alejandroRL | 0:dd702039127a | 91 | 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); |
alejandroRL | 0:dd702039127a | 92 | MULTIEDIT_HANDLE MULTIEDIT_CreateIndirect(const GUI_WIDGET_CREATE_INFO* pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); |
alejandroRL | 0:dd702039127a | 93 | 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); |
alejandroRL | 0:dd702039127a | 94 | |
alejandroRL | 0:dd702039127a | 95 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 96 | * |
alejandroRL | 0:dd702039127a | 97 | * The callback ... |
alejandroRL | 0:dd702039127a | 98 | * |
alejandroRL | 0:dd702039127a | 99 | * Do not call it directly ! It is only to be used from within an |
alejandroRL | 0:dd702039127a | 100 | * overwritten callback. |
alejandroRL | 0:dd702039127a | 101 | */ |
alejandroRL | 0:dd702039127a | 102 | void MULTIEDIT_Callback(WM_MESSAGE * pMsg); |
alejandroRL | 0:dd702039127a | 103 | |
alejandroRL | 0:dd702039127a | 104 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 105 | * |
alejandroRL | 0:dd702039127a | 106 | * Member functions |
alejandroRL | 0:dd702039127a | 107 | * |
alejandroRL | 0:dd702039127a | 108 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 109 | */ |
alejandroRL | 0:dd702039127a | 110 | |
alejandroRL | 0:dd702039127a | 111 | int MULTIEDIT_AddKey (MULTIEDIT_HANDLE hObj, U16 Key); |
alejandroRL | 0:dd702039127a | 112 | int MULTIEDIT_AddText (MULTIEDIT_HANDLE hObj, const char * s); |
alejandroRL | 0:dd702039127a | 113 | void MULTIEDIT_EnableBlink (MULTIEDIT_HANDLE hObj, int Period, int OnOff); |
alejandroRL | 0:dd702039127a | 114 | int MULTIEDIT_GetCursorCharPos (MULTIEDIT_HANDLE hObj); |
alejandroRL | 0:dd702039127a | 115 | void MULTIEDIT_GetCursorPixelPos(MULTIEDIT_HANDLE hObj, int * pxPos, int * pyPos); |
alejandroRL | 0:dd702039127a | 116 | void MULTIEDIT_GetPrompt (MULTIEDIT_HANDLE hObj, char* sDest, int MaxNumChars); |
alejandroRL | 0:dd702039127a | 117 | int MULTIEDIT_GetTextSize (MULTIEDIT_HANDLE hObj); |
alejandroRL | 0:dd702039127a | 118 | void MULTIEDIT_GetText (MULTIEDIT_HANDLE hObj, char* sDest, int MaxNumChars); |
alejandroRL | 0:dd702039127a | 119 | int MULTIEDIT_GetUserData (MULTIEDIT_HANDLE hObj, void * pDest, int NumBytes); |
alejandroRL | 0:dd702039127a | 120 | void MULTIEDIT_SetTextAlign (MULTIEDIT_HANDLE hObj, int Align); |
alejandroRL | 0:dd702039127a | 121 | void MULTIEDIT_SetAutoScrollH (MULTIEDIT_HANDLE hObj, int OnOff); |
alejandroRL | 0:dd702039127a | 122 | void MULTIEDIT_SetAutoScrollV (MULTIEDIT_HANDLE hObj, int OnOff); |
alejandroRL | 0:dd702039127a | 123 | void MULTIEDIT_SetBkColor (MULTIEDIT_HANDLE hObj, unsigned Index, GUI_COLOR color); |
alejandroRL | 0:dd702039127a | 124 | void MULTIEDIT_SetCursorCharPos (MULTIEDIT_HANDLE hObj, int x, int y); /* Not yet implemented */ |
alejandroRL | 0:dd702039127a | 125 | void MULTIEDIT_SetCursorPixelPos(MULTIEDIT_HANDLE hObj, int x, int y); /* Not yet implemented */ |
alejandroRL | 0:dd702039127a | 126 | void MULTIEDIT_SetCursorOffset (MULTIEDIT_HANDLE hObj, int Offset); |
alejandroRL | 0:dd702039127a | 127 | void MULTIEDIT_SetHBorder (MULTIEDIT_HANDLE hObj, unsigned HBorder); |
alejandroRL | 0:dd702039127a | 128 | void MULTIEDIT_SetFocussable (MULTIEDIT_HANDLE hObj, int State); |
alejandroRL | 0:dd702039127a | 129 | void MULTIEDIT_SetFont (MULTIEDIT_HANDLE hObj, const GUI_FONT * pFont); |
alejandroRL | 0:dd702039127a | 130 | void MULTIEDIT_SetInsertMode (MULTIEDIT_HANDLE hObj, int OnOff); |
alejandroRL | 0:dd702039127a | 131 | void MULTIEDIT_SetBufferSize (MULTIEDIT_HANDLE hObj, int BufferSize); |
alejandroRL | 0:dd702039127a | 132 | void MULTIEDIT_SetMaxNumChars (MULTIEDIT_HANDLE hObj, unsigned MaxNumChars); |
alejandroRL | 0:dd702039127a | 133 | void MULTIEDIT_SetPrompt (MULTIEDIT_HANDLE hObj, const char* sPrompt); |
alejandroRL | 0:dd702039127a | 134 | void MULTIEDIT_SetReadOnly (MULTIEDIT_HANDLE hObj, int OnOff); |
alejandroRL | 0:dd702039127a | 135 | void MULTIEDIT_SetPasswordMode (MULTIEDIT_HANDLE hObj, int OnOff); |
alejandroRL | 0:dd702039127a | 136 | void MULTIEDIT_SetText (MULTIEDIT_HANDLE hObj, const char* s); |
alejandroRL | 0:dd702039127a | 137 | void MULTIEDIT_SetTextColor (MULTIEDIT_HANDLE hObj, unsigned Index, GUI_COLOR color); |
alejandroRL | 0:dd702039127a | 138 | int MULTIEDIT_SetUserData (MULTIEDIT_HANDLE hObj, const void * pSrc, int NumBytes); |
alejandroRL | 0:dd702039127a | 139 | void MULTIEDIT_SetWrapNone (MULTIEDIT_HANDLE hObj); |
alejandroRL | 0:dd702039127a | 140 | void MULTIEDIT_SetWrapChar (MULTIEDIT_HANDLE hObj); |
alejandroRL | 0:dd702039127a | 141 | void MULTIEDIT_SetWrapWord (MULTIEDIT_HANDLE hObj); |
alejandroRL | 0:dd702039127a | 142 | |
alejandroRL | 0:dd702039127a | 143 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 144 | * |
alejandroRL | 0:dd702039127a | 145 | * Macros for compatibility with older versions |
alejandroRL | 0:dd702039127a | 146 | * |
alejandroRL | 0:dd702039127a | 147 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 148 | */ |
alejandroRL | 0:dd702039127a | 149 | |
alejandroRL | 0:dd702039127a | 150 | #define MULTIEDIT_SetMaxLen(hObj, MaxLen) MULTIEDIT_SetBufferSize(hObj, MaxLen) |
alejandroRL | 0:dd702039127a | 151 | #define MULTIEDIT_GetStringSize MULTIEDIT_GetTextSize |
alejandroRL | 0:dd702039127a | 152 | |
alejandroRL | 0:dd702039127a | 153 | #if defined(__cplusplus) |
alejandroRL | 0:dd702039127a | 154 | } |
alejandroRL | 0:dd702039127a | 155 | #endif |
alejandroRL | 0:dd702039127a | 156 | |
alejandroRL | 0:dd702039127a | 157 | #endif // GUI_WINSUPPORT |
alejandroRL | 0:dd702039127a | 158 | #endif // MULTIEDIT_H |
alejandroRL | 0:dd702039127a | 159 | |
alejandroRL | 0:dd702039127a | 160 | /*************************** End of file ****************************/ |