MHEG5  15.3.0
source/classes/inc/mh5listgroup.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  *******************************************************************************/
00033 #ifndef _MH5LISTGROUP_H_
00034 #define _MH5LISTGROUP_H_
00035 
00036 /*---includes for this file--------------------------------------------------*/
00037 #include "mh5tokengroup.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 struct sMHEG5PosList
00045 {
00046    MHEG5IntPair position;
00047    struct sMHEG5PosList *next;
00048 };
00049 
00050 typedef struct sMHEG5PosList MHEG5PosList;
00051 
00052 struct sMHEG5ItemList
00053 {
00054    MHEG5Int id;
00055    MH5GroupRef groupRef;
00056    MHEG5Bool itemSelectionStatus;
00057    MHEG5Int visibleIndex;           /* Internal flag */
00058    struct sMHEG5ItemList *next;
00059 };
00060 
00061 typedef struct sMHEG5ItemList MHEG5ItemList;
00062 
00063 typedef struct sMHEG5ListGroup
00064 {
00065    /* Base class */
00066    MHEG5TokenGroup tokenGroup;
00067 
00068    /* Exchanged attributes */
00069    MHEG5PosList *originalPositions;
00070    MHEG5Bool wrapAround;
00071    MHEG5Bool multipleSelection;
00072 
00073    /* Internal attributes */
00074    MHEG5PosList *positions;
00075    MHEG5ItemList *itemList;
00076    MHEG5Int firstItem;
00077 
00078    /* Engine data */
00079    MHEG5Int positionCount;
00080    MHEG5Int itemCount;
00081    MHEG5Bool firstItemVisible;
00082    MHEG5Bool lastItemVisible;
00083 } MHEG5ListGroup;
00084 
00085 /*---Global variable declarations for public use-----------------------------*/
00086 
00087 /*---Global Function prototypes for public use-------------------------------*/
00088 
00100 void MHEG5listGroupInit(MHEG5ListGroup *listGroup);
00101 
00102 
00110 void MHEG5listGroupFree(MHEG5ListGroup *listGroup);
00111 
00112 
00120 void MHEG5listGroupAddPosition(MHEG5ListGroup *listGroup, MHEG5Int x, MHEG5Int y);
00121 
00122 
00128 void MHEG5listGroupPrepare(MHEG5ListGroup *listGroup);
00129 
00130 
00136 void MHEG5listGroupActivate(MHEG5ListGroup *listGroup);
00137 
00138 
00144 void MHEG5listGroupDeactivate(MHEG5ListGroup *listGroup);
00145 
00146 
00152 void MHEG5listGroupDestruct(MHEG5ListGroup *listGroup);
00153 
00154 
00155 /*
00156      Actions
00157  */
00164 MHEG5ErrorCode MHEG5addItem(MHEG5Root *target, MHEG5GList *params);
00165 
00166 
00173 MHEG5ErrorCode MHEG5delItem(MHEG5Root *target, MHEG5GList *params);
00174 
00175 
00182 MHEG5ErrorCode MHEG5getListItem(MHEG5Root *target, MHEG5GList *params);
00183 
00184 
00191 MHEG5ErrorCode MHEG5getCellItem(MHEG5Root *target, MHEG5GList *params);
00192 
00193 
00200 MHEG5ErrorCode MHEG5getItemStatus(MHEG5Root *target, MHEG5GList *params);
00201 
00202 
00209 MHEG5ErrorCode MHEG5selectItem(MHEG5Root *target, MHEG5GList *params);
00210 
00211 
00218 MHEG5ErrorCode MHEG5deselectItem(MHEG5Root *target, MHEG5GList *params);
00219 
00220 
00227 MHEG5ErrorCode MHEG5toggleItem(MHEG5Root *target, MHEG5GList *params);
00228 
00229 
00236 MHEG5ErrorCode MHEG5scrollItems(MHEG5Root *target, MHEG5GList *params);
00237 
00238 
00245 MHEG5ErrorCode MHEG5setFirstItem(MHEG5Root *target, MHEG5GList *params);
00246 
00247 
00254 MHEG5ErrorCode MHEG5getFirstItem(MHEG5Root *target, MHEG5GList *params);
00255 
00256 
00263 MHEG5ErrorCode MHEG5getListSize(MHEG5Root *target, MHEG5GList *params);
00264 
00265 
00272 MHEG5ErrorCode MHEG5setCellPosition(MHEG5Root *target, MHEG5GList *params);
00273 
00274 
00275 /*
00276    Debug
00277  */
00278 #ifdef MH5PRINTOUT
00279 void MHEG5listGroupPrint(MHEG5ListGroup *listGroup, char *out);
00280 #endif
00281 
00282 #endif /*_MH5LISTGROUP_H_*/
 All Data Structures Files Functions Variables Typedefs Defines