Andrew Reed / Mbed OS CITY1082-i2c_master_wifi_mqtt
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MULTIEDIT.h Source File

MULTIEDIT.h

00001 /*********************************************************************
00002 *                SEGGER Microcontroller 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 to  Cypress Semiconductor Corporation,
00019 whose registered  office is situated  at 198 Champion Ct. San Jose, CA 
00020 95134 USA  solely for the  purposes of creating  libraries for Cypress
00021 PSoC3 and  PSoC5 processor-based devices,  sublicensed and distributed
00022 under  the  terms  and  conditions  of  the  Cypress  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 Licensor:                 SEGGER Microcontroller Systems LLC
00030 Licensed to:              Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA
00031 Licensed SEGGER software: emWin
00032 License number:           GUI-00319
00033 License model:            Services and License Agreement, signed June 10th, 2009
00034 Licensed platform:        Any Cypress platform (Initial targets are: PSoC3, PSoC5)
00035 ----------------------------------------------------------------------
00036 Support and Update Agreement (SUA)
00037 SUA period:               2009-06-12 - 2022-07-27
00038 Contact to extend SUA:    sales@segger.com
00039 ----------------------------------------------------------------------
00040 File        : MULTIEDIT.h
00041 Purpose     : MULTIEDIT include
00042 --------------------END-OF-HEADER-------------------------------------
00043 */
00044 
00045 #ifndef MULTIEDIT_H
00046 #define MULTIEDIT_H
00047 
00048 #include "WM.h"
00049 #include "DIALOG_Intern.h"      /* Req. for Create indirect data structure */
00050 
00051 #if GUI_WINSUPPORT
00052 
00053 #if defined(__cplusplus)
00054   extern "C" {     /* Make sure we have C-declarations in C++ programs */
00055 #endif
00056 
00057 #define MULTIEDIT_CF_READONLY        (1 << 0)
00058 #define MULTIEDIT_CF_INSERT          (1 << 2)
00059 #define MULTIEDIT_CF_AUTOSCROLLBAR_V (1 << 3)
00060 #define MULTIEDIT_CF_AUTOSCROLLBAR_H (1 << 4)
00061 #define MULTIEDIT_CF_PASSWORD        (1 << 5)
00062 #define MULTIEDIT_CF_SHOWCURSOR      (1 << 6)
00063 
00064 #define MULTIEDIT_SF_READONLY        MULTIEDIT_CF_READONLY
00065 #define MULTIEDIT_SF_INSERT          MULTIEDIT_CF_INSERT
00066 #define MULTIEDIT_SF_AUTOSCROLLBAR_V MULTIEDIT_CF_AUTOSCROLLBAR_V
00067 #define MULTIEDIT_SF_AUTOSCROLLBAR_H MULTIEDIT_CF_AUTOSCROLLBAR_H
00068 #define MULTIEDIT_SF_PASSWORD        MULTIEDIT_CF_PASSWORD
00069 
00070 /*********************************************************************
00071 *
00072 *       Color indices
00073 */
00074 #define MULTIEDIT_CI_EDIT     0
00075 #define MULTIEDIT_CI_READONLY 1
00076 
00077 /*********************************************************************
00078 *
00079 *                         Public Types
00080 *
00081 **********************************************************************
00082 */
00083 
00084 typedef WM_HMEM MULTIEDIT_HANDLE;
00085 
00086 /*********************************************************************
00087 *
00088 *                 Create functions
00089 *
00090 **********************************************************************
00091 */
00092 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);
00093 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);
00094 MULTIEDIT_HANDLE MULTIEDIT_CreateIndirect(const GUI_WIDGET_CREATE_INFO* pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
00095 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);
00096 
00097 /*********************************************************************
00098 *
00099 *       The callback ...
00100 *
00101 * Do not call it directly ! It is only to be used from within an
00102 * overwritten callback.
00103 */
00104 void MULTIEDIT_Callback(WM_MESSAGE * pMsg);
00105 
00106 /*********************************************************************
00107 *
00108 *                 Member functions
00109 *
00110 **********************************************************************
00111 */
00112 
00113 int              MULTIEDIT_AddKey           (MULTIEDIT_HANDLE hObj, U16 Key);
00114 int              MULTIEDIT_AddText          (MULTIEDIT_HANDLE hObj, const char * s);
00115 void             MULTIEDIT_EnableBlink      (MULTIEDIT_HANDLE hObj, int Period, int OnOff);
00116 GUI_COLOR        MULTIEDIT_GetBkColor       (MULTIEDIT_HANDLE hObj, unsigned Index);
00117 int              MULTIEDIT_GetCursorCharPos (MULTIEDIT_HANDLE hObj);
00118 void             MULTIEDIT_GetCursorPixelPos(MULTIEDIT_HANDLE hObj, int * pxPos, int * pyPos);
00119 const GUI_FONT * MULTIEDIT_GetFont          (MULTIEDIT_HANDLE hObj);
00120 void             MULTIEDIT_GetPrompt        (MULTIEDIT_HANDLE hObj, char* sDest, int MaxNumChars);
00121 void             MULTIEDIT_GetText          (MULTIEDIT_HANDLE hObj, char* sDest, int MaxNumChars);
00122 GUI_COLOR        MULTIEDIT_GetTextColor     (MULTIEDIT_HANDLE hObj, unsigned Index);
00123 int              MULTIEDIT_GetTextSize      (MULTIEDIT_HANDLE hObj);
00124 int              MULTIEDIT_GetUserData      (MULTIEDIT_HANDLE hObj, void * pDest, int NumBytes);
00125 void             MULTIEDIT_SetTextAlign     (MULTIEDIT_HANDLE hObj, int Align);
00126 void             MULTIEDIT_SetAutoScrollH   (MULTIEDIT_HANDLE hObj, int OnOff);
00127 void             MULTIEDIT_SetAutoScrollV   (MULTIEDIT_HANDLE hObj, int OnOff);
00128 void             MULTIEDIT_SetBkColor       (MULTIEDIT_HANDLE hObj, unsigned Index, GUI_COLOR color);
00129 void             MULTIEDIT_SetCursorCharPos (MULTIEDIT_HANDLE hObj, int x, int y);       /* Not yet implemented */
00130 void             MULTIEDIT_SetCursorPixelPos(MULTIEDIT_HANDLE hObj, int x, int y);       /* Not yet implemented */
00131 void             MULTIEDIT_SetCursorOffset  (MULTIEDIT_HANDLE hObj, int Offset);
00132 void             MULTIEDIT_SetHBorder       (MULTIEDIT_HANDLE hObj, unsigned HBorder);
00133 void             MULTIEDIT_SetFocusable     (MULTIEDIT_HANDLE hObj, int State);
00134 void             MULTIEDIT_SetFont          (MULTIEDIT_HANDLE hObj, const GUI_FONT * pFont);
00135 void             MULTIEDIT_SetInsertMode    (MULTIEDIT_HANDLE hObj, int OnOff);
00136 void             MULTIEDIT_SetBufferSize    (MULTIEDIT_HANDLE hObj, int BufferSize);
00137 void             MULTIEDIT_SetMaxNumChars   (MULTIEDIT_HANDLE hObj, unsigned MaxNumChars);
00138 void             MULTIEDIT_SetPrompt        (MULTIEDIT_HANDLE hObj, const char* sPrompt);
00139 void             MULTIEDIT_SetReadOnly      (MULTIEDIT_HANDLE hObj, int OnOff);
00140 void             MULTIEDIT_SetPasswordMode  (MULTIEDIT_HANDLE hObj, int OnOff);
00141 void             MULTIEDIT_SetText          (MULTIEDIT_HANDLE hObj, const char* s);
00142 void             MULTIEDIT_SetTextColor     (MULTIEDIT_HANDLE hObj, unsigned Index, GUI_COLOR color);
00143 int              MULTIEDIT_SetUserData      (MULTIEDIT_HANDLE hObj, const void * pSrc, int NumBytes);
00144 void             MULTIEDIT_SetWrapNone      (MULTIEDIT_HANDLE hObj);
00145 void             MULTIEDIT_SetWrapChar      (MULTIEDIT_HANDLE hObj);
00146 void             MULTIEDIT_SetWrapWord      (MULTIEDIT_HANDLE hObj);
00147 int              MULTIEDIT_ShowCursor       (MULTIEDIT_HANDLE hObj, unsigned OnOff);
00148 
00149 #define MULTIEDIT_SetFocussable MULTIEDIT_SetFocusable
00150 
00151 /*********************************************************************
00152 *
00153 *       Macros for compatibility with older versions
00154 *
00155 **********************************************************************
00156 */
00157 
00158 #define MULTIEDIT_SetMaxLen(hObj, MaxLen) MULTIEDIT_SetBufferSize(hObj, MaxLen)
00159 #define MULTIEDIT_GetStringSize           MULTIEDIT_GetTextSize
00160 
00161 #if defined(__cplusplus)
00162   }
00163 #endif
00164 
00165 #endif  // GUI_WINSUPPORT
00166 #endif  // MULTIEDIT_H
00167 
00168 /*************************** End of file ****************************/