C++ SDK Reference  12.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguyPluginMouseEvent.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) 1992-2013 Boston Dynamics
4  * ALL RIGHTS RESERVED.
5  *
6  * These coded instructions, statements, and computer programs
7  * contain unpublished proprietary information of Boston Dynamics
8  * and are protected by Copyright Laws of the United States.
9  * They may not be used, duplicated, or disclosed in any form, in
10  * whole or in part, without the prior written consent from Boston
11  * Dynamics.
12  *
13  * RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the government is subject
15  * to restrictions as set forth in FAR 52.227.19(c)(2) or
16  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
17  * Computer Software clause at DFARS 252.227-7013 and/or in
18  * similar or successor clauses in the FAR, or the DOD or NASA
19  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
20  * Commercial Computer Software--Restricted Rights at 48 CFR
21  * 52.227-19, as applicable. Unpublished-rights reserved under
22  * the Copyright Laws of the United States.
23  * Contractor/Manufacturer is:
24  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
25  */
26 
27 
28 /*********************************************************************
29  **
30  *t diguyPluginMouseEvent
31  **
32  ** Objects of this type are passed into the plugin mouse
33  ** functions mouse_press(), mouse_drag(), mouse_release(),
34  ** and mouse_move().
35  */
36 
37 #ifndef __diguyPluginMouseEvent_H
38 #define __diguyPluginMouseEvent_H
39 
40 
41 #include <declspec_diguy.h>
42 
43 class diguyView;
44 
45 
46 /****************************************************************************/
47 class BDI_DECLSPEC_diguy diguyPluginMouseEvent
48 {
49 
50 public:
51 
52  /*l
53  *b Description:
54  **
55  ** This function returns the view in which the mouse event
56  ** took place.
57  **
58  *b Returns:
59  **
60  ** object of type diguyView
61  **
62  *b Callable From:
63  **
64  *- - C++
65  */
66  diguyView* get_view();
67 
68  /*l
69  *b Description:
70  **
71  ** This function returns the screen x coordinate at which the
72  ** mouse event took place.
73  **
74  *b Returns:
75  **
76  ** screen x coordinate
77  **
78  *b Callable From:
79  **
80  *- - C++
81  */
82  int get_x();
83 
84  /*l
85  *b Description:
86  **
87  ** This function returns the screen y coordinate at which the
88  ** mouse event took place.
89  **
90  *b Returns:
91  **
92  ** screen y coordinate
93  **
94  *b Callable From:
95  **
96  *- - C++
97  */
98  int get_y();
99 
100  /*l
101  *b Description:
102  **
103  ** This is an enumeration of the different button states
104  ** reported by get_button_state(). The values may be
105  ** OR-ed together. e.g., the value 0x21 would indicate
106  ** that the left mouse button was clicked while the ALT
107  ** was down.
108  **
109  *b Usable From:
110  **
111  *- - C++
112  *- - Script
113  */
114  enum {
115  BUTTON_STATE_LEFT = 0x0001,
116  BUTTON_STATE_RIGHT = 0x0002,
117  BUTTON_STATE_MIDDLE = 0x0004,
118  BUTTON_STATE_SHIFT = 0x0008,
119  BUTTON_STATE_CTRL = 0x0010,
120  BUTTON_STATE_ALT = 0x0020
121  };
122 
123  /*l
124  *b Description:
125  **
126  ** This function returns state of the mouse buttons when the
127  ** mouse event took place. Refer to the enumeration above
128  ** for possible values.
129  **
130  *b Returns:
131  **
132  ** OR-ed together state of mouse buttons
133  **
134  *b Callable From:
135  **
136  *- - C++
137  */
138  int get_button_state();
139 
144 #ifdef CPLUSPLUS_ONLY
145 
147  int x,
148  int y,
149  int button_state);
151 
152 private:
154  diguyView* m_view;
155  int m_x;
156  int m_y;
157  int m_button_state;
158 
159  friend class bdiScenarioPlugin;
160  friend class bdiScenarioEditor;
161 
162 #endif
163 
164 };
165 
166 
167 #endif /* __diguyPluginMouseEvent_H */
168 
169 
170 /*
171  * Copyright (C) 1992-2013 Boston Dynamics
172  * ALL RIGHTS RESERVED.
173  *
174  * These coded instructions, statements, and computer programs
175  * contain unpublished proprietary information of Boston Dynamics
176  * and are protected by Copyright Laws of the United States.
177  * They may not be used, duplicated, or disclosed in any form, in
178  * whole or in part, without the prior written consent from Boston
179  * Dynamics.
180  *
181  * RESTRICTED RIGHTS LEGEND
182  * Use, duplication, or disclosure by the government is subject
183  * to restrictions as set forth in FAR 52.227.19(c)(2) or
184  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
185  * Computer Software clause at DFARS 252.227-7013 and/or in
186  * similar or successor clauses in the FAR, or the DOD or NASA
187  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
188  * Commercial Computer Software--Restricted Rights at 48 CFR
189  * 52.227-19, as applicable. Unpublished-rights reserved under
190  * the Copyright Laws of the United States.
191  * Contractor/Manufacturer is:
192  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
193  */
194