ui_node_abstractscrollable.h

Go to the documentation of this file.
00001 
00006 /*
00007 Copyright (C) 2002-2010 UFO: Alien Invasion.
00008 
00009 This program is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU General Public License
00011 as published by the Free Software Foundation; either version 2
00012 of the License, or (at your option) any later version.
00013 
00014 This program is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00017 
00018 See the GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 
00024 */
00025 
00026 #ifndef CLIENT_UI_UI_NODE_ABSTRACTSCROLLABLE_H
00027 #define CLIENT_UI_UI_NODE_ABSTRACTSCROLLABLE_H
00028 
00029 #include "../../../shared/mathlib.h"
00030 
00031 struct uiBehaviour_s;
00032 struct uiAction_s;
00033 struct uiNode_s;
00034 
00038 typedef struct {
00039     int viewPos;            
00040     int viewSize;           
00041     int fullSize;           
00042 } uiScroll_t;
00043 
00044 qboolean UI_SetScroll(uiScroll_t *scroll, int viewPos, int viewSize, int fullSize);
00045 
00046 typedef struct {
00047     vec2_t cacheSize;       
00050     uiScroll_t scrollX;
00051     uiScroll_t scrollY;
00052 
00053     struct uiAction_s *onViewChange;    
00054 } abstractScrollableExtraData_t;
00055 
00056 qboolean UI_AbstractScrollableNodeIsSizeChange(struct uiNode_s *node);
00057 qboolean UI_AbstractScrollableNodeScrollY(struct uiNode_s *node, int offset);
00058 qboolean UI_AbstractScrollableNodeSetY(struct uiNode_s *node, int viewPos, int viewSize, int fullSize);
00059 
00060 void UI_RegisterAbstractScrollableNode(struct uiBehaviour_s *behaviour);
00061 
00062 #endif

Generated by  doxygen 1.6.2