ui_node_abstractscrollbar.c

Go to the documentation of this file.
00001 
00008 /*
00009 Copyright (C) 2002-2010 UFO: Alien Invasion.
00010 
00011 This program is free software; you can redistribute it and/or
00012 modify it under the terms of the GNU General Public License
00013 as published by the Free Software Foundation; either version 2
00014 of the License, or (at your option) any later version.
00015 
00016 This program is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00019 
00020 See the GNU General Public License for more details.
00021 
00022 You should have received a copy of the GNU General Public License
00023 along with this program; if not, write to the Free Software
00024 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00025 
00026 */
00027 
00028 #include "../ui_nodes.h"
00029 #include "ui_node_abstractscrollbar.h"
00030 
00031 #define EXTRADATA_TYPE abstractScrollbarExtraData_t
00032 
00033 static const value_t properties[] = {
00034     /* Current position of the scroll. Image of the <code>viewpos</code> from <code>abstractscrollable</code> node. */
00035     {"current", V_INT, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, pos),  MEMBER_SIZEOF(EXTRADATA_TYPE, pos)},
00036     /* Image of the <code>viewsize</code> from <code>abstractscrollable</code> node. */
00037     {"viewsize", V_INT, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, viewsize),  MEMBER_SIZEOF(EXTRADATA_TYPE, viewsize)},
00038     /* Image of the <code>fullsize</code> from <code>abstractscrollable</code> node. */
00039     {"fullsize", V_INT, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, fullsize),  MEMBER_SIZEOF(EXTRADATA_TYPE, fullsize)},
00040 
00041     /* If true, hide the scroll when the position is 0 and can't change (when <code>viewsize</code> >= <code>fullsize</code>). */
00042     {"hidewhenunused", V_BOOL, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, hideWhenUnused),  MEMBER_SIZEOF(EXTRADATA_TYPE, hideWhenUnused)},
00043 
00044     /* Callback value set when before calling onChange. It is used to know the change apply by the user
00045      * @Deprecated
00046      */
00047     {"lastdiff", V_INT, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, lastdiff),  MEMBER_SIZEOF(EXTRADATA_TYPE, lastdiff)},
00048 
00049     {NULL, V_NULL, 0, 0}
00050 };
00051 
00052 void UI_RegisterAbstractScrollbarNode (uiBehaviour_t *behaviour)
00053 {
00054     behaviour->name = "abstractscrollbar";
00055     behaviour->isAbstract = qtrue;
00056     behaviour->properties = properties;
00057     behaviour->extraDataSize = sizeof(EXTRADATA_TYPE);
00058 }

Generated by  doxygen 1.6.2