MHEG5  15.3.0
source/classes/inc/mh5entryfield.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2004 Ocean Blue Software Ltd
00004  * Copyright © 2000 Koninklijke Philips Electronics N.V
00005  *
00006  * This file is part of a DTVKit Software Component
00007  * You are permitted to copy, modify or distribute this file subject to the terms
00008  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00009  * 
00010  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00011  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00012  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00013  * 
00014  * If you or your organisation is not a member of DTVKit then you have access
00015  * to this source code outside of the terms of the licence agreement
00016  * and you are expected to delete this and any associated files immediately.
00017  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00018  *******************************************************************************/
00031 #ifndef _MH5ENTRYFIELD_H_
00032 #define _MH5ENTRYFIELD_H_
00033 
00034 /*---includes for this file--------------------------------------------------*/
00035 #include "mh5text.h"
00036 #include "mh5interactible.h"
00037 #include "mheg5_keypress.h"
00038 
00039 /*---Constant and macro definitions for public use---------------------------*/
00040 
00041 /*---Enumerations for public use---------------------------------------------*/
00042 
00043 /*---Global type defs for public use-----------------------------------------*/
00044 typedef struct
00045 {
00046    /* Base classes */
00047    MHEG5Text text;
00048    MHEG5Interactible interactible;
00049 
00050    /* Exchanged attributes */
00051    enum {mh5alpha, mh5numeric, mh5any, mh5listed} inputType;
00052    MHEG5String charList;
00053    MHEG5Bool obscuredInput;
00054    MHEG5Int maxlength;
00055 
00056    /* Internal attributes */
00057    MHEG5Int entryPoint;
00058    MHEG5Bool overwriteMode;
00059 } MHEG5Entryfield;
00060 
00061 typedef enum { CURSOR_INSERT, CURSOR_REPLACE } entryfieldCursor_t;
00062 
00063 /*---Global variable declarations for public use-----------------------------*/
00064 
00065 /*---Global Function prototypes for public use-------------------------------*/
00066 
00077 void MHEG5entryfieldInit(MHEG5Entryfield *entryfield);
00078 
00079 
00087 void MHEG5entryfieldFree(MHEG5Entryfield *entryfield);
00088 
00089 
00090 /*
00091     Internal behaviours
00092  */
00093 void MHEG5entryfieldPrepare(MHEG5Entryfield *entryfield);
00094 void MHEG5entryfieldActivate(MHEG5Entryfield *entryfield);
00095 void MHEG5entryfieldDeactivate(MHEG5Entryfield *entryfield);
00096 void MHEG5entryfieldDestruct(MHEG5Entryfield *entryfield);
00097 
00098 
00099 void MHEG5entryfieldInsert(MHEG5Entryfield *entryfield, unsigned short c);
00100 
00101 /*
00102    Actions
00103  */
00104 MHEG5ErrorCode MHEG5setOverwriteMode(MHEG5Root *target, MHEG5GList *params);
00105 MHEG5ErrorCode MHEG5getOverwriteMode(MHEG5Root *target, MHEG5GList *params);
00106 MHEG5ErrorCode MHEG5setEntryPoint(MHEG5Root *target, MHEG5GList *params);
00107 MHEG5ErrorCode MHEG5getEntryPoint(MHEG5Root *target, MHEG5GList *params);
00108 
00114 void MHEG5entryfieldBACKSPACE(MHEG5Entryfield *entryfield);
00115 
00116 
00122 void MHEG5entryfieldLEFT(MHEG5Entryfield *entryfield);
00123 
00124 
00130 void MHEG5entryfieldRIGHT(MHEG5Entryfield *entryfield);
00131 
00132 
00138 void MHEG5entryfieldSELECT(MHEG5Entryfield *entryfield);
00139 
00140 
00146 void MHEG5entryfieldEXIT(MHEG5Entryfield *entryfield);
00147 
00148 void MHEG5entryfieldUserInput(MHEG5Entryfield *entryfield, E_MHEG5_KEY ui);
00149 
00150 /*
00151    Debug
00152  */
00153 #ifdef MH5PRINTOUT
00154 void MHEG5entryfieldPrint(MHEG5Entryfield *entryfield, char *out);
00155 #endif
00156 
00157 #endif /*_MH5ENTRYFIELD_H_*/
 All Data Structures Files Functions Variables Typedefs Defines