HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DD_Source.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: DD_Source.h
7  *
8  * COMMENTS:
9  *
10  *
11  */
12 
13 #ifndef __DD_Source_
14 #define __DD_Source_
15 
16 #include "DD_API.h"
17 #include "DD_ChoiceList.h"
18 
20 {
21 
22 public:
23 
24  DD_Source();
25  virtual ~DD_Source();
26 
27  // Generalized query method to retrieve data items
28  // from the source (dragged object)
29  // 0 = not available
30  // 1 = available
31  // -1 = reject and abort search (eg dragging onto source object)
32 
33  virtual void *getSourceData(const char *label, exint index = 0) = 0;
34 
35  // Similar to above, but subclass to avoid calculating the actual value
36  virtual int hasSourceData(const char *label);
37 
38  // Mechanism to allow the source to modify itself
39  // whether or not its currently being accepted (change cursors, etc).
40 
41  virtual void saveDragDropState();
42  virtual void dragDropAccepted(bool onoff);
43  virtual void restoreDragDropState();
44 
45  // Set up these parameters for receiving tests
46  void setSourceXY(int x, int y)
47  { mySourceX = x; mySourceY = y; }
48  void setDragDropModifiers(int modifiers)
49  { myDragDropModifiers = modifiers; }
50 
51  int getSourceX() const
52  { return mySourceX; }
53  int getSourceY() const
54  { return mySourceY; }
56  { return myDragDropModifiers; }
57 
58 private:
59  int mySourceX;
60  int mySourceY;
61  int myDragDropModifiers;
62 };
63 
64 #endif
65 
int64 exint
Definition: SYS_Types.h:125
GLint GLenum GLint x
Definition: glcorearb.h:409
void setSourceXY(int x, int y)
Definition: DD_Source.h:46
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
int getSourceY() const
Definition: DD_Source.h:53
#define DD_API
Definition: DD_API.h:10
GLuint index
Definition: glcorearb.h:786
void setDragDropModifiers(int modifiers)
Definition: DD_Source.h:48
int getSourceX() const
Definition: DD_Source.h:51
int getDragDropModifiers() const
Definition: DD_Source.h:55
GLint y
Definition: glcorearb.h:103