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