RT1050 GUI demo using emWin library

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MULTIEDIT.h Source File

MULTIEDIT.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        : 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 
00062 #define MULTIEDIT_SF_READONLY        MULTIEDIT_CF_READONLY
00063 #define MULTIEDIT_SF_INSERT          MULTIEDIT_CF_INSERT
00064 #define MULTIEDIT_SF_AUTOSCROLLBAR_V MULTIEDIT_CF_AUTOSCROLLBAR_V
00065 #define MULTIEDIT_SF_AUTOSCROLLBAR_H MULTIEDIT_CF_AUTOSCROLLBAR_H
00066 #define MULTIEDIT_SF_PASSWORD        MULTIEDIT_CF_PASSWORD
00067 
00068 /*********************************************************************
00069 *
00070 *       Color indices
00071 */
00072 #define MULTIEDIT_CI_EDIT     0
00073 #define MULTIEDIT_CI_READONLY 1
00074 
00075 /*********************************************************************
00076 *
00077 *                         Public Types
00078 *
00079 **********************************************************************
00080 */
00081 
00082 typedef WM_HMEM MULTIEDIT_HANDLE;
00083 
00084 /*********************************************************************
00085 *
00086 *                 Create functions
00087 *
00088 **********************************************************************
00089 */
00090 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);
00091 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);
00092 MULTIEDIT_HANDLE MULTIEDIT_CreateIndirect(const GUI_WIDGET_CREATE_INFO* pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
00093 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);
00094 
00095 /*********************************************************************
00096 *
00097 *       The callback ...
00098 *
00099 * Do not call it directly ! It is only to be used from within an
00100 * overwritten callback.
00101 */
00102 void MULTIEDIT_Callback(WM_MESSAGE * pMsg);
00103 
00104 /*********************************************************************
00105 *
00106 *                 Member functions
00107 *
00108 **********************************************************************
00109 */
00110 
00111 int  MULTIEDIT_AddKey           (MULTIEDIT_HANDLE hObj, U16 Key);
00112 int  MULTIEDIT_AddText          (MULTIEDIT_HANDLE hObj, const char * s);
00113 void MULTIEDIT_EnableBlink      (MULTIEDIT_HANDLE hObj, int Period, int OnOff);
00114 int  MULTIEDIT_GetCursorCharPos (MULTIEDIT_HANDLE hObj);
00115 void MULTIEDIT_GetCursorPixelPos(MULTIEDIT_HANDLE hObj, int * pxPos, int * pyPos);
00116 void MULTIEDIT_GetPrompt        (MULTIEDIT_HANDLE hObj, char* sDest, int MaxNumChars);
00117 int  MULTIEDIT_GetTextSize      (MULTIEDIT_HANDLE hObj);
00118 void MULTIEDIT_GetText          (MULTIEDIT_HANDLE hObj, char* sDest, int MaxNumChars);
00119 int  MULTIEDIT_GetUserData      (MULTIEDIT_HANDLE hObj, void * pDest, int NumBytes);
00120 void MULTIEDIT_SetTextAlign     (MULTIEDIT_HANDLE hObj, int Align);
00121 void MULTIEDIT_SetAutoScrollH   (MULTIEDIT_HANDLE hObj, int OnOff);
00122 void MULTIEDIT_SetAutoScrollV   (MULTIEDIT_HANDLE hObj, int OnOff);
00123 void MULTIEDIT_SetBkColor       (MULTIEDIT_HANDLE hObj, unsigned Index, GUI_COLOR color);
00124 void MULTIEDIT_SetCursorCharPos (MULTIEDIT_HANDLE hObj, int x, int y);       /* Not yet implemented */
00125 void MULTIEDIT_SetCursorPixelPos(MULTIEDIT_HANDLE hObj, int x, int y);       /* Not yet implemented */
00126 void MULTIEDIT_SetCursorOffset  (MULTIEDIT_HANDLE hObj, int Offset);
00127 void MULTIEDIT_SetHBorder       (MULTIEDIT_HANDLE hObj, unsigned HBorder);
00128 void MULTIEDIT_SetFocussable    (MULTIEDIT_HANDLE hObj, int State);
00129 void MULTIEDIT_SetFont          (MULTIEDIT_HANDLE hObj, const GUI_FONT * pFont);
00130 void MULTIEDIT_SetInsertMode    (MULTIEDIT_HANDLE hObj, int OnOff);
00131 void MULTIEDIT_SetBufferSize    (MULTIEDIT_HANDLE hObj, int BufferSize);
00132 void MULTIEDIT_SetMaxNumChars   (MULTIEDIT_HANDLE hObj, unsigned MaxNumChars);
00133 void MULTIEDIT_SetPrompt        (MULTIEDIT_HANDLE hObj, const char* sPrompt);
00134 void MULTIEDIT_SetReadOnly      (MULTIEDIT_HANDLE hObj, int OnOff);
00135 void MULTIEDIT_SetPasswordMode  (MULTIEDIT_HANDLE hObj, int OnOff);
00136 void MULTIEDIT_SetText          (MULTIEDIT_HANDLE hObj, const char* s);
00137 void MULTIEDIT_SetTextColor     (MULTIEDIT_HANDLE hObj, unsigned Index, GUI_COLOR color);
00138 int  MULTIEDIT_SetUserData      (MULTIEDIT_HANDLE hObj, const void * pSrc, int NumBytes);
00139 void MULTIEDIT_SetWrapNone      (MULTIEDIT_HANDLE hObj);
00140 void MULTIEDIT_SetWrapChar      (MULTIEDIT_HANDLE hObj);
00141 void MULTIEDIT_SetWrapWord      (MULTIEDIT_HANDLE hObj);
00142 
00143 /*********************************************************************
00144 *
00145 *       Macros for compatibility with older versions
00146 *
00147 **********************************************************************
00148 */
00149 
00150 #define MULTIEDIT_SetMaxLen(hObj, MaxLen) MULTIEDIT_SetBufferSize(hObj, MaxLen)
00151 #define MULTIEDIT_GetStringSize           MULTIEDIT_GetTextSize
00152 
00153 #if defined(__cplusplus)
00154   }
00155 #endif
00156 
00157 #endif  // GUI_WINSUPPORT
00158 #endif  // MULTIEDIT_H
00159 
00160 /*************************** End of file ****************************/