00001 00005 /* 00006 Copyright (C) 2002-2010 UFO: Alien Invasion. 00007 00008 This program is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU General Public License 00010 as published by the Free Software Foundation; either version 2 00011 of the License, or (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 00017 See the GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 00023 */ 00024 00025 #ifndef CLIENT_UI_UI_NODE_ABSTRACTOPTION_H 00026 #define CLIENT_UI_UI_NODE_ABSTRACTOPTION_H 00027 00028 #include "../../../shared/shared.h" 00029 #include "ui_node_abstractscrollable.h" 00030 00031 struct uiAction_s; 00032 00033 typedef struct { 00034 /* link to shared data (can be used if internal data is null) */ 00035 int dataId; 00036 int versionId; 00037 void* cvar; 00039 /* information */ 00040 int count; 00041 int lineHeight; 00042 00043 uiScroll_t scrollY; 00045 struct uiAction_s *onViewChange; 00046 } abstractOptionExtraData_t; 00047 00048 struct uiNode_s; 00049 struct uiBehaviour_s; 00050 00051 void UI_RegisterAbstractOptionNode(struct uiBehaviour_s *behaviour); 00052 void UI_OptionNodeSortOptions(struct uiNode_s *node); 00053 struct uiNode_s* UI_AbstractOptionGetFirstOption(uiNode_t * node); 00054 const char *UI_AbstractOptionGetCurrentValue(uiNode_t * node); 00055 void UI_AbstractOptionSetCurrentValue(uiNode_t * node, const char *value); 00056 00057 #endif