ui_dragndrop.h

Go to the documentation of this file.
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_DRAGNDROP_H
00026 #define CLIENT_UI_UI_DRAGNDROP_H
00027 
00028 #include "../../shared/ufotypes.h"
00029 
00030 struct uiNode_s;
00031 struct item_s;
00032 
00033 typedef enum {
00034     DND_NOTHING,
00035     DND_SOMETHING,  
00036     DND_ITEM,
00037 } uiDNDType_t;
00038 
00039 /* management */
00040 void UI_DrawDragAndDrop(int mousePosX, int mousePosY);
00041 
00042 /* command */
00043 void UI_DNDDragItem(struct uiNode_s *node, const struct item_s *item);
00044 void UI_DNDDrop(void);
00045 void UI_DNDAbort(void);
00046 
00047 /*  getter */
00048 qboolean UI_DNDIsDragging(void);
00049 qboolean UI_DNDIsTargetNode(struct uiNode_s *node);
00050 qboolean UI_DNDIsSourceNode(struct uiNode_s *node);
00051 struct uiNode_s *UI_DNDGetTargetNode(void);
00052 struct uiNode_s *UI_DNDGetSourceNode(void);
00053 int UI_DNDGetType(void);
00054 struct item_s *UI_DNDGetItem(void);
00055 
00056 #endif

Generated by  doxygen 1.6.2