HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 
46  // Set up these parameters for receiving tests
47 
48  void setSourceXY(int x, int y)
49  { mySourceX = x; mySourceY = y; }
50 
51  int getSourceX() const
52  { return mySourceX; }
53 
54  int getSourceY() const
55  { return mySourceY; }
56 
57 private:
58 
59  int mySourceX;
60  int mySourceY;
61 
62 };
63 
64 #endif
65 
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2544
GLint y
Definition: glcorearb.h:102
void setSourceXY(int x, int y)
Definition: DD_Source.h:48
int64 exint
Definition: SYS_Types.h:109
int getSourceY() const
Definition: DD_Source.h:54
#define DD_API
Definition: DD_API.h:10
GLuint index
Definition: glcorearb.h:785
GLint GLenum GLint x
Definition: glcorearb.h:408
int getSourceX() const
Definition: DD_Source.h:51