ui_dragndrop.h File Reference

#include "../../shared/ufotypes.h"
Include dependency graph for ui_dragndrop.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  uiDNDType_t { DND_NOTHING, DND_SOMETHING, DND_ITEM }

Functions

void UI_DrawDragAndDrop (int mousePosX, int mousePosY)
 Draw to dragging object and catch mouse move event.
void UI_DNDDragItem (struct uiNode_s *node, const struct item_s *item)
void UI_DNDDrop (void)
 Drop the object at the current position.
void UI_DNDAbort (void)
 Drop the object at the current position.
qboolean UI_DNDIsDragging (void)
 Return true if we are dragging something.
qboolean UI_DNDIsTargetNode (struct uiNode_s *node)
 Return true if the requested node is the current target of the DND.
qboolean UI_DNDIsSourceNode (struct uiNode_s *node)
 Return true if the requested node is the source of the DND.
struct uiNode_sUI_DNDGetTargetNode (void)
 Return target of the DND.
struct uiNode_sUI_DNDGetSourceNode (void)
 Return source of the DND.
int UI_DNDGetType (void)
 Return the current type of the dragging object, else DND_NOTHING.
struct item_sUI_DNDGetItem (void)

Detailed Description

Definition in file ui_dragndrop.h.


Enumeration Type Documentation

Enumerator:
DND_NOTHING 
DND_SOMETHING 

Untyped object

DND_ITEM 

Definition at line 33 of file ui_dragndrop.h.


Function Documentation

void UI_DNDAbort ( void   ) 
void UI_DNDDragItem ( struct uiNode_s node,
const struct item_s item 
)
void UI_DNDDrop ( void   ) 
struct item_s* UI_DNDGetItem ( void   )  [read]
struct uiNode_s* UI_DNDGetSourceNode ( void   )  [read]

Return source of the DND.

Definition at line 95 of file ui_dragndrop.c.

References UI_DNDIsDragging().

Referenced by UI_BaseInventoryNodeDNDEnter(), and UI_ContainerNodeDNDEnter().

struct uiNode_s* UI_DNDGetTargetNode ( void   )  [read]

Return target of the DND.

Definition at line 86 of file ui_dragndrop.c.

References UI_DNDIsDragging().

Referenced by UI_ContainerNodeDNDFinished().

int UI_DNDGetType ( void   ) 

Return the current type of the dragging object, else DND_NOTHING.

Definition at line 78 of file ui_dragndrop.c.

References objectType.

Referenced by UI_BaseInventoryNodeDNDEnter(), UI_BaseInventoryNodeDraw(), UI_ContainerNodeDNDEnter(), and UI_ContainerNodeDraw().

qboolean UI_DNDIsDragging ( void   ) 
qboolean UI_DNDIsSourceNode ( struct uiNode_s node  ) 

Return true if the requested node is the source of the DND.

Definition at line 68 of file ui_dragndrop.c.

References qfalse, and UI_DNDIsDragging().

Referenced by UI_ContainerNodeDrawFreeSpace().

qboolean UI_DNDIsTargetNode ( struct uiNode_s node  ) 

Return true if the requested node is the current target of the DND.

Definition at line 58 of file ui_dragndrop.c.

References qfalse, and UI_DNDIsDragging().

Referenced by UI_ContainerNodeDraw().

void UI_DrawDragAndDrop ( int  mousePosX,
int  mousePosY 
)

Draw to dragging object and catch mouse move event.

Definition at line 229 of file ui_dragndrop.c.

References uiNode_s::color, DND_ITEM, objectType, oldMousePosX, oldMousePosY, positionAcceptDND, qfalse, scale, UI_DNDMouseMove(), UI_DrawItem(), and VectorSet.

Referenced by UI_DrawCursor().


Generated by  doxygen 1.6.2