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 #include <UT/UT_NonCopyable.h>
19 
21 {
22 public:
23  DD_Source();
24  virtual ~DD_Source();
25 
27 
28  // Generalized query method to retrieve data items
29  // from the source (dragged object)
30  // 0 = not available
31  // 1 = available
32  // -1 = reject and abort search (eg dragging onto source object)
33 
34  virtual void *getSourceData(const char *label, exint index = 0) = 0;
35 
36  // Similar to above, but subclass to avoid calculating the actual value
37  virtual int hasSourceData(const char *label);
38 
39  // Mechanism to allow the source to modify itself
40  // whether or not its currently being accepted (change cursors, etc).
41 
42  virtual void saveDragDropState();
43  virtual void dragDropAccepted(bool onoff);
44  virtual void restoreDragDropState();
45 
46  // Set up these parameters for receiving tests
47  void setSourceXY(int x, int y)
48  { mySourceX = x; mySourceY = y; }
49  void setDragDropModifiers(int modifiers)
50  { myDragDropModifiers = modifiers; }
51 
52  int getSourceX() const
53  { return mySourceX; }
54  int getSourceY() const
55  { return mySourceY; }
57  { return myDragDropModifiers; }
58 
59 private:
60  int mySourceX;
61  int mySourceY;
62  int myDragDropModifiers;
63 };
64 
65 #endif
66 
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
int64 exint
Definition: SYS_Types.h:125
GLint y
Definition: glcorearb.h:103
void setSourceXY(int x, int y)
Definition: DD_Source.h:47
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
int getSourceY() const
Definition: DD_Source.h:54
GLint GLenum GLint x
Definition: glcorearb.h:409
#define DD_API
Definition: DD_API.h:10
GLuint index
Definition: glcorearb.h:786
void setDragDropModifiers(int modifiers)
Definition: DD_Source.h:49
int getSourceX() const
Definition: DD_Source.h:52
int getDragDropModifiers() const
Definition: DD_Source.h:56