MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5entryfield.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
31 #ifndef _MH5ENTRYFIELD_H_
32 #define _MH5ENTRYFIELD_H_
33 
34 /*---includes for this file--------------------------------------------------*/
35 #include "mh5text.h"
36 #include "mh5interactible.h"
37 #include "mheg5_keypress.h"
38 
39 /*---Constant and macro definitions for public use---------------------------*/
40 
41 /*---Enumerations for public use---------------------------------------------*/
42 
43 /*---Global type defs for public use-----------------------------------------*/
44 typedef struct
45 {
46  /* Base classes */
47  MHEG5Text text;
48  MHEG5Interactible interactible;
49 
50  /* Exchanged attributes */
51  enum {mh5alpha, mh5numeric, mh5any, mh5listed} inputType;
52  MHEG5String charList;
53  MHEG5Bool obscuredInput;
54  MHEG5Int maxlength;
55 
56  /* Internal attributes */
57  MHEG5Int entryPoint;
58  MHEG5Bool overwriteMode;
60 
61 typedef enum { CURSOR_INSERT, CURSOR_REPLACE } entryfieldCursor_t;
62 
63 /*---Global variable declarations for public use-----------------------------*/
64 
65 /*---Global Function prototypes for public use-------------------------------*/
66 
77 void MHEG5entryfieldInit(MHEG5Entryfield *entryfield);
78 
79 
87 void MHEG5entryfieldFree(MHEG5Entryfield *entryfield);
88 
89 
90 /*
91  Internal behaviours
92  */
93 void MHEG5entryfieldPrepare(MHEG5Entryfield *entryfield);
97 
98 
99 void MHEG5entryfieldInsert(MHEG5Entryfield *entryfield, unsigned short c);
100 
101 /*
102  Actions
103  */
104 MHEG5ErrorCode MHEG5setOverwriteMode(MHEG5Root *target, MHEG5GList *params);
105 MHEG5ErrorCode MHEG5getOverwriteMode(MHEG5Root *target, MHEG5GList *params);
106 MHEG5ErrorCode MHEG5setEntryPoint(MHEG5Root *target, MHEG5GList *params);
107 MHEG5ErrorCode MHEG5getEntryPoint(MHEG5Root *target, MHEG5GList *params);
108 
114 void MHEG5entryfieldBACKSPACE(MHEG5Entryfield *entryfield);
115 
116 
122 void MHEG5entryfieldLEFT(MHEG5Entryfield *entryfield);
123 
124 
130 void MHEG5entryfieldRIGHT(MHEG5Entryfield *entryfield);
131 
132 
138 void MHEG5entryfieldSELECT(MHEG5Entryfield *entryfield);
139 
140 
146 void MHEG5entryfieldEXIT(MHEG5Entryfield *entryfield);
147 
148 void MHEG5entryfieldUserInput(MHEG5Entryfield *entryfield, E_MHEG5_KEY ui);
149 
150 /*
151  Debug
152  */
153 #ifdef MH5PRINTOUT
154 void MHEG5entryfieldPrint(MHEG5Entryfield *entryfield, char *out);
155 #endif
156 
157 #endif /*_MH5ENTRYFIELD_H_*/
Definition: mh5entryfield.h:44
void MHEG5entryfieldInit(MHEG5Entryfield *entryfield)
<Function description>="">
Definition: mh5entryfield.c:266
Definition: mh5base.h:82
Implement the MHEG5 Interactible Class. Defines functionality associated with an interaction behaviou...
MHEG5ErrorCode MHEG5getOverwriteMode(MHEG5Root *target, MHEG5GList *params)
Retrieve the overwrite mode of the entryfield Implementation of the GetOverwriteMode action of the en...
Definition: mh5entryfield.c:459
Implement the MHEG5 Text Class 36 Text Class Defines attributes and behaviour of pieces of textual in...
MHEG5ErrorCode MHEG5setEntryPoint(MHEG5Root *target, MHEG5GList *params)
Set the entrypoint for the entryfield Implementation of the SetEntryPoint action of the entryfield cl...
Definition: mh5entryfield.c:504
void MHEG5entryfieldDestruct(MHEG5Entryfield *entryfield)
Destruct a entryfield object.
Definition: mh5entryfield.c:405
void MHEG5entryfieldFree(MHEG5Entryfield *entryfield)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5entryfield.c:281
Definition: mh5base.h:169
void MHEG5entryfieldBACKSPACE(MHEG5Entryfield *entryfield)
Perform action of backspace key on interacting Entryfield.
Definition: mh5entryfield.c:591
void MHEG5entryfieldDeactivate(MHEG5Entryfield *entryfield)
Apply the deactivation behaviour of the entryfield class. As this class has no own deactivation behav...
Definition: mh5entryfield.c:389
Definition: mh5text.h:59
void MHEG5entryfieldLEFT(MHEG5Entryfield *entryfield)
Perform action of left arrow key on interacting Entryfield.
Definition: mh5entryfield.c:626
Definition: mh5interactible.h:44
void MHEG5entryfieldActivate(MHEG5Entryfield *entryfield)
Apply the activation behaviour of the entryfield class. As this class has no own activation behaviour...
Definition: mh5entryfield.c:369
void MHEG5entryfieldEXIT(MHEG5Entryfield *entryfield)
Perform action of exit key on interacting Entryfield.
Definition: mh5entryfield.c:669
MHEG5ErrorCode MHEG5setOverwriteMode(MHEG5Root *target, MHEG5GList *params)
Set the overwrite mode of the entryfield to the new value of the parameter Implementation of the SetO...
Definition: mh5entryfield.c:425
Key press interface with MHEG5 engine.
void MHEG5entryfieldSELECT(MHEG5Entryfield *entryfield)
Perform action of select key on interacting Entryfield.
Definition: mh5entryfield.c:652
Definition: mh5root.h:43
MHEG5ErrorCode MHEG5getEntryPoint(MHEG5Root *target, MHEG5GList *params)
Retrieve the current entrypoint of the entryfield Implementation of the GetEntryPoint action of the e...
Definition: mh5entryfield.c:550
void MHEG5entryfieldRIGHT(MHEG5Entryfield *entryfield)
Perform action of right arrow key on interacting Entryfield.
Definition: mh5entryfield.c:639
void MHEG5entryfieldUserInput(MHEG5Entryfield *entryfield, E_MHEG5_KEY ui)
Test user input and perform required actions.
Definition: mh5entryfield.c:806
void MHEG5entryfieldInsert(MHEG5Entryfield *entryfield, unsigned short c)
Add the character |c| to the Entryfield.
Definition: mh5entryfield.c:211
void MHEG5entryfieldPrepare(MHEG5Entryfield *entryfield)
Apply the preparation behaviour of the entryfield class Apply the preparation behaviour of the entryf...
Definition: mh5entryfield.c:321