Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXEvent.h
1 /********************************************************************************
2 * *
3 * F O X E v e n t S t u f f *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2022 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXEVENT_H
22 #define FXEVENT_H
23 
24 namespace FX {
25 
26 
28 enum {
29  SHIFTMASK = 0x001,
30  CAPSLOCKMASK = 0x002,
31  CONTROLMASK = 0x004,
32 #ifdef __APPLE__
33  ALTMASK = 0x2000,
34  METAMASK = 0x10,
35 #else
36  ALTMASK = 0x008,
37  METAMASK = 0x040,
38 #endif
39  NUMLOCKMASK = 0x010,
40  SCROLLLOCKMASK = 0x0E0,
41  LEFTBUTTONMASK = 0x100,
42  MIDDLEBUTTONMASK = 0x200,
43  RIGHTBUTTONMASK = 0x400
44  };
45 
46 
48 enum {
49  LEFTBUTTON = 1,
50  MIDDLEBUTTON = 2,
51  RIGHTBUTTON = 3
52  };
53 
54 
56 enum {
57  CROSSINGNORMAL,
58  CROSSINGGRAB,
59  CROSSINGUNGRAB
60  };
61 
62 
64 enum {
65  VISIBILITYTOTAL,
66  VISIBILITYPARTIAL,
67  VISIBILITYNONE
68  };
69 
70 
72 enum {
73  SEL_NONE,
74  SEL_KEYPRESS,
75  SEL_KEYRELEASE,
76  SEL_LEFTBUTTONPRESS,
77  SEL_LEFTBUTTONRELEASE,
78  SEL_MIDDLEBUTTONPRESS,
79  SEL_MIDDLEBUTTONRELEASE,
80  SEL_RIGHTBUTTONPRESS,
81  SEL_RIGHTBUTTONRELEASE,
82  SEL_MOTION,
83  SEL_ENTER,
84  SEL_LEAVE,
85  SEL_FOCUSIN,
86  SEL_FOCUSOUT,
87  SEL_KEYMAP,
88  SEL_UNGRABBED,
89  SEL_PAINT,
90  SEL_CREATE,
91  SEL_DESTROY,
92  SEL_UNMAP,
93  SEL_MAP,
94  SEL_CONFIGURE,
95  SEL_SELECTION_LOST,
96  SEL_SELECTION_GAINED,
97  SEL_SELECTION_REQUEST,
98  SEL_RAISED,
99  SEL_LOWERED,
100  SEL_CLOSE,
101  SEL_DELETE,
102  SEL_MINIMIZE,
103  SEL_RESTORE,
104  SEL_MAXIMIZE,
105  SEL_UPDATE,
106  SEL_COMMAND,
107  SEL_CLICKED,
108  SEL_DOUBLECLICKED,
109  SEL_TRIPLECLICKED,
110  SEL_MOUSEWHEEL,
111  SEL_CHANGED,
112  SEL_VERIFY,
113  SEL_DESELECTED,
114  SEL_SELECTED,
115  SEL_INSERTED,
116  SEL_REPLACED,
117  SEL_DELETED,
118  SEL_OPENED,
119  SEL_CLOSED,
120  SEL_EXPANDED,
121  SEL_COLLAPSED,
122  SEL_BEGINDRAG,
123  SEL_ENDDRAG,
124  SEL_DRAGGED,
125  SEL_LASSOED,
126  SEL_TIMEOUT,
127  SEL_SIGNAL,
128  SEL_CLIPBOARD_LOST,
129  SEL_CLIPBOARD_GAINED,
130  SEL_CLIPBOARD_REQUEST,
131  SEL_CHORE,
132  SEL_FOCUS_SELF,
133  SEL_FOCUS_RIGHT,
134  SEL_FOCUS_LEFT,
135  SEL_FOCUS_DOWN,
136  SEL_FOCUS_UP,
137  SEL_FOCUS_NEXT,
138  SEL_FOCUS_PREV,
139  SEL_DND_ENTER,
140  SEL_DND_LEAVE,
141  SEL_DND_DROP,
142  SEL_DND_MOTION,
143  SEL_DND_REQUEST,
144  SEL_IO_READ,
145  SEL_IO_WRITE,
146  SEL_IO_EXCEPT,
147  SEL_PICKED,
148  SEL_QUERY_TIP,
149  SEL_QUERY_HELP,
150  SEL_DOCKED,
151  SEL_FLOATED,
152  SEL_SPACEBALLMOTION,
153  SEL_SPACEBALLBUTTONPRESS,
154  SEL_SPACEBALLBUTTONRELEASE,
155  SEL_SESSION_NOTIFY,
156  SEL_SESSION_CLOSED,
157  SEL_COPYDATA,
158  SEL_IME_START,
159  SEL_IME_END,
160  SEL_LAST
161  };
162 
163 
165 struct FXAPI FXEvent {
166  FXuint type;
167  FXuint time;
168  FXint win_x;
169  FXint win_y;
170  FXint root_x;
171  FXint root_y;
172  FXint state;
173  FXint code;
175  FXint last_x;
176  FXint last_y;
177  FXint click_x;
178  FXint click_y;
179  FXint rootclick_x;
180  FXint rootclick_y;
181  FXuint click_time;
182  FXint click_button;
183  FXint click_count;
184  FXint values[6];
185  FXbool moved;
187  FXbool synthetic;
188  FXDragType target;
189 
191  FXEvent(FXuint t=SEL_NONE){
192  type=t;
193  time=0;
194  win_x=0;
195  win_y=0;
196  root_x=0;
197  root_y=0;
198  state=0;
199  code=0;
200  last_x=0;
201  last_y=0;
202  click_x=0;
203  click_y=0;
204  rootclick_x=0;
205  rootclick_y=0;
206  click_time=0;
207  click_button=0;
208  click_count=0;
209  values[0]=0;
210  values[1]=0;
211  values[2]=0;
212  values[3]=0;
213  values[4]=0;
214  values[5]=0;
215  moved=false;
216  rect.x=0;
217  rect.y=0;
218  rect.w=0;
219  rect.h=0;
220  synthetic=false;
221  target=0;
222  }
223  };
224 
225 
226 }
227 
228 #endif
FXint root_y
Root x-coord.
Definition: FXEvent.h:171
FXint win_x
Time of last event.
Definition: FXEvent.h:168
FXint click_count
Mouse button pressed.
Definition: FXEvent.h:183
Rectangle.
Definition: FXRectangle.h:32
FXDragType target
True if synthetic expose event.
Definition: FXEvent.h:188
FXint rootclick_y
Root-relative x-coord of mouse press.
Definition: FXEvent.h:180
FXint state
Root y-coord.
Definition: FXEvent.h:172
FXint last_x
Text of keyboard event.
Definition: FXEvent.h:175
FXint click_y
Window-relative x-coord of mouse press.
Definition: FXEvent.h:178
FXint last_y
Window-relative x-coord of previous mouse location.
Definition: FXEvent.h:176
FXint click_button
Time of mouse button press.
Definition: FXEvent.h:182
FXString text
Button, Keysym, or mode; DDE Source.
Definition: FXEvent.h:174
FXint code
Mouse button and modifier key state.
Definition: FXEvent.h:173
Definition: FX4Splitter.h:28
FXuint click_time
Root-relative y-coord of mouse press.
Definition: FXEvent.h:181
FOX Event.
Definition: FXEvent.h:165
FXbool moved
Valuators from space ball.
Definition: FXEvent.h:185
FXuint time
Event type.
Definition: FXEvent.h:167
FXbool synthetic
Rectangle.
Definition: FXEvent.h:187
FXRectangle rect
Moved cursor since press.
Definition: FXEvent.h:186
FXint click_x
Window-relative y-coord of previous mouse location.
Definition: FXEvent.h:177
FXEvent(FXuint t=SEL_NONE)
Target drag type being requested.
Definition: FXEvent.h:191
FXint root_x
Window-relative y-coord.
Definition: FXEvent.h:170
FXint win_y
Window-relative x-coord.
Definition: FXEvent.h:169
FXint rootclick_x
Window-relative y-coord of mouse press.
Definition: FXEvent.h:179
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp