DI-Guy SDK Documentation  13.7
diguyPluginMouseEvent.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2022 MAK Technologies, Inc.
4  ** All rights reserved.
5  *********************************************************************/
6 
7 
8 /*********************************************************************
9  **
10  *t diguyPluginMouseEvent
11  **
12  ** Objects of this type are passed into the plugin mouse
13  ** functions mouse_press(), mouse_drag(), mouse_release(),
14  ** and mouse_move().
15  */
16 
17 #ifndef __diguyPluginMouseEvent_H
18 #define __diguyPluginMouseEvent_H
19 
20 
21 #include <declspec_diguy.h>
22 
23 class diguyView;
24 
25 
26 /****************************************************************************/
27 class BDI_DECLSPEC_diguy diguyPluginMouseEvent
28 {
29 
30 public:
31 
32  /*l
33  *b Description:
34  **
35  ** This function returns the view in which the mouse event
36  ** took place.
37  **
38  *b Returns:
39  **
40  ** object of type diguyView
41  **
42  *b Callable From:
43  **
44  *- - C++
45  */
46  diguyView* get_view();
47 
48  /*l
49  *b Description:
50  **
51  ** This function returns the screen x coordinate at which the
52  ** mouse event took place.
53  **
54  *b Returns:
55  **
56  ** screen x coordinate
57  **
58  *b Callable From:
59  **
60  *- - C++
61  */
62  int get_x();
63 
64  /*l
65  *b Description:
66  **
67  ** This function returns the screen y coordinate at which the
68  ** mouse event took place.
69  **
70  *b Returns:
71  **
72  ** screen y coordinate
73  **
74  *b Callable From:
75  **
76  *- - C++
77  */
78  int get_y();
79 
80  /*l
81  *b Description:
82  **
83  ** This is an enumeration of the different button states
84  ** reported by get_button_state(). The values may be
85  ** OR-ed together. e.g., the value 0x21 would indicate
86  ** that the left mouse button was clicked while the ALT
87  ** was down.
88  **
89  *b Usable From:
90  **
91  *- - C++
92  *- - Script
93  */
94  enum {
95  BUTTON_STATE_LEFT = 0x0001,
96  BUTTON_STATE_RIGHT = 0x0002,
97  BUTTON_STATE_MIDDLE = 0x0004,
98  BUTTON_STATE_SHIFT = 0x0008,
99  BUTTON_STATE_CTRL = 0x0010,
100  BUTTON_STATE_ALT = 0x0020
101  };
102 
103  /*l
104  *b Description:
105  **
106  ** This function returns state of the mouse buttons when the
107  ** mouse event took place. Refer to the enumeration above
108  ** for possible values.
109  **
110  *b Returns:
111  **
112  ** OR-ed together state of mouse buttons
113  **
114  *b Callable From:
115  **
116  *- - C++
117  */
118  int get_button_state();
119 
124 #ifdef CPLUSPLUS_ONLY
125 
127  int x,
128  int y,
129  int button_state);
132 private:
133 
134  diguyView* m_view;
135  int m_x;
136  int m_y;
137  int m_button_state;
138 
139  friend class bdiScenarioPlugin;
140  friend class bdiScenarioEditor;
141 
142 #endif
143 
144 };
145 
146 
147 #endif /* __diguyPluginMouseEvent_H */
148 
149 
150 /*********************************************************************
151  ** Copyright (c) 1992-2022 MAK Technologies, Inc.
152  ** All rights reserved.
153  *********************************************************************/
154 
A view is a graphics window wherein the scenario and its characters are animated. Note that views hav...
Definition: diguyView.h:48
Definition: diguyPluginMouseEvent.h:23