reflexion 0.1.21 → 0.1.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.doc/ext/reflex/capture_event.cpp +6 -5
  3. data/.doc/ext/reflex/contact_event.cpp +18 -16
  4. data/.doc/ext/reflex/draw_event.cpp +10 -8
  5. data/.doc/ext/reflex/event.cpp +10 -10
  6. data/.doc/ext/reflex/focus_event.cpp +18 -17
  7. data/.doc/ext/reflex/frame_event.cpp +17 -17
  8. data/.doc/ext/reflex/key_event.cpp +227 -28
  9. data/.doc/ext/reflex/native.cpp +2 -0
  10. data/.doc/ext/reflex/pointer.cpp +158 -0
  11. data/.doc/ext/reflex/pointer_event.cpp +32 -91
  12. data/.doc/ext/reflex/scroll_event.cpp +14 -17
  13. data/.doc/ext/reflex/selector.cpp +8 -0
  14. data/.doc/ext/reflex/timer.cpp +9 -1
  15. data/.doc/ext/reflex/timer_event.cpp +4 -13
  16. data/.doc/ext/reflex/update_event.cpp +6 -5
  17. data/.doc/ext/reflex/view.cpp +57 -0
  18. data/.doc/ext/reflex/wheel_event.cpp +39 -22
  19. data/.doc/ext/reflex/window.cpp +24 -0
  20. data/VERSION +1 -1
  21. data/ext/reflex/capture_event.cpp +6 -5
  22. data/ext/reflex/contact_event.cpp +18 -16
  23. data/ext/reflex/draw_event.cpp +9 -7
  24. data/ext/reflex/event.cpp +11 -11
  25. data/ext/reflex/focus_event.cpp +18 -17
  26. data/ext/reflex/frame_event.cpp +16 -16
  27. data/ext/reflex/key_event.cpp +228 -28
  28. data/ext/reflex/native.cpp +2 -0
  29. data/ext/reflex/pointer.cpp +170 -0
  30. data/ext/reflex/pointer_event.cpp +31 -96
  31. data/ext/reflex/scroll_event.cpp +15 -18
  32. data/ext/reflex/selector.cpp +9 -0
  33. data/ext/reflex/timer.cpp +15 -6
  34. data/ext/reflex/timer_event.cpp +9 -19
  35. data/ext/reflex/update_event.cpp +6 -5
  36. data/ext/reflex/view.cpp +67 -3
  37. data/ext/reflex/wheel_event.cpp +40 -21
  38. data/ext/reflex/window.cpp +30 -3
  39. data/include/reflex/defs.h +140 -106
  40. data/include/reflex/event.h +232 -124
  41. data/include/reflex/pointer.h +107 -0
  42. data/include/reflex/ruby/pointer.h +41 -0
  43. data/include/reflex/ruby/view.h +9 -0
  44. data/include/reflex/ruby/window.h +9 -0
  45. data/include/reflex/selector.h +1 -1
  46. data/include/reflex/shape.h +2 -2
  47. data/include/reflex/view.h +6 -4
  48. data/include/reflex/window.h +10 -8
  49. data/lib/reflex/application.rb +3 -3
  50. data/lib/reflex/autoinit.rb +1 -1
  51. data/lib/reflex/button.rb +7 -7
  52. data/lib/reflex/capture_event.rb +7 -7
  53. data/lib/reflex/contact_event.rb +10 -10
  54. data/lib/reflex/draw_event.rb +2 -2
  55. data/lib/reflex/ellipse_shape.rb +2 -2
  56. data/lib/reflex/focus_event.rb +11 -11
  57. data/lib/reflex/frame_event.rb +5 -5
  58. data/lib/reflex/helper.rb +20 -20
  59. data/lib/reflex/image_view.rb +2 -2
  60. data/lib/reflex/key_event.rb +12 -12
  61. data/lib/reflex/model.rb +22 -22
  62. data/lib/reflex/model_owner.rb +7 -7
  63. data/lib/reflex/model_view.rb +1 -1
  64. data/lib/reflex/module.rb +5 -5
  65. data/lib/reflex/pointer.rb +107 -0
  66. data/lib/reflex/pointer_event.rb +16 -54
  67. data/lib/reflex/polygon_shape.rb +2 -2
  68. data/lib/reflex/reflex.rb +3 -3
  69. data/lib/reflex/scroll_event.rb +1 -1
  70. data/lib/reflex/selector.rb +4 -4
  71. data/lib/reflex/shape.rb +13 -13
  72. data/lib/reflex/style.rb +11 -11
  73. data/lib/reflex/style_length.rb +1 -1
  74. data/lib/reflex/text_view.rb +2 -2
  75. data/lib/reflex/timer.rb +2 -2
  76. data/lib/reflex/timer_event.rb +3 -2
  77. data/lib/reflex/update_event.rb +1 -1
  78. data/lib/reflex/view.rb +32 -32
  79. data/lib/reflex/wheel_event.rb +2 -10
  80. data/lib/reflex/window.rb +6 -6
  81. data/lib/reflex.rb +1 -0
  82. data/lib/reflexion.rb +17 -17
  83. data/reflex.gemspec +5 -5
  84. data/samples/reflexion/noise.rb +1 -1
  85. data/samples/tree.rb +1 -1
  86. data/src/event.cpp +792 -86
  87. data/src/event.h +47 -0
  88. data/src/image_view.cpp +2 -2
  89. data/src/ios/event.h +15 -3
  90. data/src/ios/event.mm +126 -11
  91. data/src/ios/view_controller.mm +50 -22
  92. data/src/ios/window.mm +1 -1
  93. data/src/osx/event.h +15 -4
  94. data/src/osx/event.mm +214 -24
  95. data/src/osx/native_window.mm +84 -17
  96. data/src/pointer.cpp +203 -0
  97. data/src/pointer.h +26 -0
  98. data/src/selector.cpp +1 -1
  99. data/src/shape.cpp +11 -13
  100. data/src/shape.h +1 -1
  101. data/src/view.cpp +205 -118
  102. data/src/view.h +5 -10
  103. data/src/window.cpp +334 -104
  104. data/src/window.h +22 -3
  105. data/src/world.cpp +6 -4
  106. data/test/helper.rb +3 -3
  107. data/test/test_application.rb +1 -1
  108. data/test/test_capture_event.rb +22 -6
  109. data/test/test_contact_event.rb +40 -0
  110. data/test/test_draw_event.rb +35 -0
  111. data/test/test_event.rb +33 -5
  112. data/test/test_focus_event.rb +34 -0
  113. data/test/test_frame_event.rb +38 -0
  114. data/test/test_has_frame.rb +11 -11
  115. data/test/test_key_event.rb +33 -0
  116. data/test/test_pointer.rb +149 -0
  117. data/test/test_pointer_event.rb +70 -104
  118. data/test/test_reflex.rb +1 -1
  119. data/test/test_scroll_event.rb +39 -0
  120. data/test/test_selector.rb +15 -8
  121. data/test/test_shape.rb +8 -8
  122. data/test/test_style.rb +13 -13
  123. data/test/test_style_length.rb +5 -5
  124. data/test/test_timer_event.rb +38 -0
  125. data/test/test_update_event.rb +29 -0
  126. data/test/test_view.rb +57 -30
  127. data/test/test_wheel_event.rb +40 -0
  128. data/test/test_window.rb +29 -27
  129. metadata +64 -35
@@ -4,10 +4,12 @@
4
4
  #define __REFLEX_EVENT_H__
5
5
 
6
6
 
7
+ #include <xot/pimpl.h>
7
8
  #include <rays/point.h>
8
9
  #include <rays/bounds.h>
9
10
  #include <rays/painter.h>
10
11
  #include <reflex/defs.h>
12
+ #include <reflex/pointer.h>
11
13
  #include <reflex/timer.h>
12
14
 
13
15
 
@@ -26,74 +28,129 @@ namespace Reflex
26
28
 
27
29
  Event ();
28
30
 
31
+ ~Event ();
32
+
29
33
  void block ();
30
34
 
31
35
  bool is_blocked () const;
32
36
 
33
- private:
37
+ double time () const;
38
+
39
+ struct Data;
34
40
 
35
- bool blocked;
41
+ Xot::PSharedImpl<Data> self;
42
+
43
+ protected:
44
+
45
+ Event (const Event* src);
36
46
 
37
47
  };// Event
38
48
 
39
49
 
40
- struct UpdateEvent : public Event
50
+ class UpdateEvent : public Event
41
51
  {
42
52
 
43
- double now;
53
+ public:
54
+
55
+ UpdateEvent ();
56
+
57
+ UpdateEvent (double now, float dt);
58
+
59
+ UpdateEvent dup () const;
44
60
 
45
- float dt;
61
+ double now () const;
46
62
 
47
- UpdateEvent (double now = 0, float dt = 0);
63
+ float dt () const;
64
+
65
+ struct Data;
66
+
67
+ Xot::PSharedImpl<Data> self;
68
+
69
+ private:
70
+
71
+ UpdateEvent (const UpdateEvent* src);
48
72
 
49
73
  };// UpdateEvent
50
74
 
51
75
 
52
- struct DrawEvent : public Event
76
+ class DrawEvent : public Event
53
77
  {
54
78
 
55
- View* view;
79
+ public:
80
+
81
+ DrawEvent ();
82
+
83
+ DrawEvent (float dt, float fps);
84
+
85
+ DrawEvent dup () const;
56
86
 
57
- Painter* painter;
87
+ Painter* painter ();
58
88
 
59
- Bounds bounds;
89
+ const Painter* painter () const;
60
90
 
61
- float dt, fps;
91
+ const Bounds& bounds () const;
62
92
 
63
- DrawEvent (float dt = 0, float fps = 0);
93
+ float dt () const;
94
+
95
+ float fps () const;
96
+
97
+ struct Data;
98
+
99
+ Xot::PSharedImpl<Data> self;
100
+
101
+ private:
102
+
103
+ DrawEvent (const DrawEvent* src);
64
104
 
65
105
  };// DrawEvent
66
106
 
67
107
 
68
- struct FrameEvent : public Event
108
+ class FrameEvent : public Event
69
109
  {
70
110
 
71
- Bounds frame;
111
+ public:
112
+
113
+ FrameEvent ();
114
+
115
+ FrameEvent (
116
+ const Bounds& frame,
117
+ coord dx, coord dy,
118
+ coord dwidth, coord dheight,
119
+ float angle, float dangle);
120
+
121
+ FrameEvent (
122
+ const Bounds& frame, const Bounds& prev_frame,
123
+ float angle, float prev_angle);
124
+
125
+ FrameEvent dup () const;
126
+
127
+ const Bounds& frame () const;
128
+
129
+ coord dx () const;
130
+
131
+ coord dy () const;
132
+
133
+ coord dwidth () const;
134
+
135
+ coord dheight () const;
72
136
 
73
- coord dx, dy;
137
+ float angle () const;
74
138
 
75
- union
76
- {
77
- struct {coord dwidth, dheight;};
139
+ float dangle () const;
78
140
 
79
- struct {coord dw, dh;};
80
- };
141
+ bool is_move () const;
81
142
 
82
- float angle, dangle;
143
+ bool is_resize () const;
83
144
 
84
- FrameEvent (
85
- const Bounds& frame = 0, coord dx = 0, coord dy = 0, coord dwidth = 0, coord dheight = 0,
86
- float angle = 0, float dangle = 0);
145
+ bool is_rotate () const;
87
146
 
88
- FrameEvent (
89
- const Bounds& frame, const Bounds& prev_frame,
90
- float angle = 0, float prev_angle = 0);
147
+ struct Data;
91
148
 
92
- bool is_move () const;
149
+ Xot::PSharedImpl<Data> self;
93
150
 
94
- bool is_resize () const;
151
+ private:
95
152
 
96
- bool is_rotate () const;
153
+ FrameEvent (const FrameEvent* src);
97
154
 
98
155
  };// FrameEvent
99
156
 
@@ -101,31 +158,29 @@ namespace Reflex
101
158
  struct ScrollEvent : public Event
102
159
  {
103
160
 
104
- union
105
- {
106
- struct {coord x, y, z;};
161
+ public:
162
+
163
+ ScrollEvent ();
107
164
 
108
- Coord3 scroll_;
109
- };
165
+ ScrollEvent (coord x, coord y, coord z, coord dx, coord dy, coord dz);
110
166
 
111
- union
112
- {
113
- struct {coord dx, dy, dz;};
167
+ ScrollEvent dup () const;
114
168
 
115
- Coord3 delta_;
116
- };
169
+ Point& scroll ();
117
170
 
118
- ScrollEvent ();
171
+ const Point& scroll () const;
119
172
 
120
- ScrollEvent (coord x, coord y, coord z, coord dx, coord dy, coord dz);
173
+ Point& dscroll ();
121
174
 
122
- Point& scroll ();
175
+ const Point& dscroll () const;
123
176
 
124
- const Point& scroll () const;
177
+ struct Data;
125
178
 
126
- Point& delta ();
179
+ Xot::PSharedImpl<Data> self;
127
180
 
128
- const Point& delta () const;
181
+ private:
182
+
183
+ ScrollEvent (const ScrollEvent* src);
129
184
 
130
185
  };// ScrollEvent
131
186
 
@@ -133,15 +188,29 @@ namespace Reflex
133
188
  struct FocusEvent : public Event
134
189
  {
135
190
 
136
- enum Type {NONE = 0, FOCUS, BLUR};
191
+ public:
192
+
193
+ enum Action {ACTION_NONE = 0, FOCUS, BLUR};
194
+
195
+ FocusEvent ();
196
+
197
+ FocusEvent (Action action, View* current, View* last);
198
+
199
+ FocusEvent dup () const;
200
+
201
+ Action action () const;
137
202
 
138
- Type type;
203
+ View* current () const;
139
204
 
140
- View *current, *last;
205
+ View* last () const;
141
206
 
142
- FocusEvent ();
207
+ struct Data;
143
208
 
144
- FocusEvent (Type type, View* current, View* last);
209
+ Xot::PSharedImpl<Data> self;
210
+
211
+ private:
212
+
213
+ FocusEvent (const FocusEvent* src);
145
214
 
146
215
  };// FocusEvent
147
216
 
@@ -149,70 +218,67 @@ namespace Reflex
149
218
  struct KeyEvent : public Event
150
219
  {
151
220
 
152
- enum Type {NONE = 0, DOWN, UP};
221
+ public:
153
222
 
154
- Type type;
223
+ enum Action {ACTION_NONE = 0, DOWN, UP};
155
224
 
156
- String chars;
225
+ KeyEvent ();
157
226
 
158
- int code;
227
+ KeyEvent (
228
+ Action action, const char* chars, int code,
229
+ uint modifiers = 0, int repeat = 0);
159
230
 
160
- uint modifiers;
231
+ KeyEvent dup () const;
161
232
 
162
- int repeat;
233
+ Action action () const;
163
234
 
164
- bool capture;
235
+ const char* chars () const;
165
236
 
166
- KeyEvent ();
237
+ int code () const;
167
238
 
168
- KeyEvent (
169
- Type type, const char* chars, int code,
170
- uint modifiers = 0, int repeat = 0);
239
+ uint modifiers () const;
171
240
 
172
- };// KeyEvent
241
+ int repeat () const;
173
242
 
243
+ bool is_captured () const;
174
244
 
175
- struct PointerEvent : public Event
176
- {
245
+ struct Data;
177
246
 
178
- enum Type {NONE = 0, DOWN, UP, MOVE};
247
+ Xot::PSharedImpl<Data> self;
179
248
 
180
- enum {MAX = 10};
249
+ private:
250
+
251
+ KeyEvent (const KeyEvent* src);
181
252
 
182
- Type type;
253
+ };// KeyEvent
183
254
 
184
- uint pointer_type;
185
255
 
186
- size_t size;
256
+ class PointerEvent : public Event
257
+ {
187
258
 
188
- uint modifiers, count;
259
+ public:
189
260
 
190
- bool drag, capture;
261
+ PointerEvent ();
191
262
 
192
- union
193
- {
194
- struct {coord x, y, z;};
263
+ PointerEvent (const Pointer* pointers, size_t size);
195
264
 
196
- Coord3 positions[MAX];
197
- };
265
+ PointerEvent dup () const;
198
266
 
199
- PointerEvent ();
267
+ size_t size () const;
200
268
 
201
- PointerEvent (
202
- Type type, uint pointer_type, coord x, coord y,
203
- uint modifiers = 0, uint count = 1, bool drag = false);
269
+ bool empty () const;
204
270
 
205
- PointerEvent (
206
- Type type, uint pointer_type, const Point* positions, size_t size,
207
- uint modifiers = 0, uint count = 1, bool drag = false);
271
+ bool is_captured () const;
208
272
 
209
- Point& position (size_t i = 0);
273
+ const Pointer& operator [] (size_t index) const;
210
274
 
211
- const Point& position (size_t i = 0) const;
275
+ struct Data;
212
276
 
213
- Point& operator [] (size_t i);
277
+ Xot::PSharedImpl<Data> self;
214
278
 
215
- const Point& operator [] (size_t i) const;
279
+ private:
280
+
281
+ PointerEvent (const PointerEvent* src);
216
282
 
217
283
  };// PointerEvent
218
284
 
@@ -220,35 +286,33 @@ namespace Reflex
220
286
  struct WheelEvent : public Event
221
287
  {
222
288
 
223
- union
224
- {
225
- struct {coord dx, dy, dz;};
289
+ public:
290
+
291
+ WheelEvent ();
226
292
 
227
- Coord3 delta_;
228
- };
293
+ WheelEvent (
294
+ coord x, coord y, coord z, coord dx, coord dy, coord dz,
295
+ uint modifiers = 0);
229
296
 
230
- union
231
- {
232
- struct {coord x, y, z;};
297
+ WheelEvent dup () const;
233
298
 
234
- Coord3 position_;
235
- };
299
+ Point& position ();
236
300
 
237
- uint modifiers;
301
+ const Point& position () const;
238
302
 
239
- WheelEvent ();
303
+ Point& dposition ();
240
304
 
241
- WheelEvent (
242
- coord dx, coord dy, coord dz, coord x = 0, coord y = 0, coord z = 0,
243
- uint modifiers = 0);
305
+ const Point& dposition () const;
244
306
 
245
- Point& position ();
307
+ uint modifiers () const;
246
308
 
247
- const Point& position () const;
309
+ struct Data;
248
310
 
249
- Point& delta ();
311
+ Xot::PSharedImpl<Data> self;
250
312
 
251
- const Point& delta () const;
313
+ private:
314
+
315
+ WheelEvent (const WheelEvent* src);
252
316
 
253
317
  };// WheelEvent
254
318
 
@@ -256,11 +320,25 @@ namespace Reflex
256
320
  struct CaptureEvent : public Event
257
321
  {
258
322
 
259
- uint begin, end;
323
+ public:
324
+
325
+ CaptureEvent ();
326
+
327
+ CaptureEvent (uint begin, uint end);
328
+
329
+ CaptureEvent dup () const;
330
+
331
+ uint begin () const;
332
+
333
+ uint end () const;
260
334
 
261
- CaptureEvent ();
335
+ struct Data;
262
336
 
263
- CaptureEvent (uint begin, uint end);
337
+ Xot::PSharedImpl<Data> self;
338
+
339
+ private:
340
+
341
+ CaptureEvent (const CaptureEvent* src);
264
342
 
265
343
  };// CaptureEvent
266
344
 
@@ -268,21 +346,35 @@ namespace Reflex
268
346
  struct TimerEvent : public Event
269
347
  {
270
348
 
271
- Timer::Ref timer;
349
+ public:
350
+
351
+ TimerEvent ();
352
+
353
+ TimerEvent (Timer* timer);
354
+
355
+ TimerEvent dup () const;
356
+
357
+ Timer* timer ();
358
+
359
+ const Timer* timer () const;
360
+
361
+ View* owner () const;
362
+
363
+ int id () const;
272
364
 
273
- TimerEvent (Timer* timer = NULL);
365
+ float interval () const;
274
366
 
275
- View* owner () const;
367
+ int count () const;
276
368
 
277
- int id () const;
369
+ bool is_finished () const;
278
370
 
279
- float interval () const;
371
+ struct Data;
280
372
 
281
- void set_count (int count);
373
+ Xot::PSharedImpl<Data> self;
282
374
 
283
- int count () const;
375
+ private:
284
376
 
285
- bool is_finished () const;
377
+ TimerEvent (const TimerEvent* src);
286
378
 
287
379
  };// TimerEvent
288
380
 
@@ -290,17 +382,33 @@ namespace Reflex
290
382
  struct ContactEvent : public Event
291
383
  {
292
384
 
293
- enum Type {NONE = 0, BEGIN, END};
385
+ public:
386
+
387
+ enum Action {ACTION_NONE = 0, BEGIN, END};
388
+
389
+ ContactEvent ();
390
+
391
+ ContactEvent (Action action, Shape* shape);
392
+
393
+ ContactEvent dup () const;
294
394
 
295
- Type type;
395
+ Action action () const;
296
396
 
297
- Shape* shape;
397
+ Shape* shape ();
298
398
 
299
- View* view;
399
+ const Shape* shape () const;
300
400
 
301
- ContactEvent ();
401
+ View* view ();
402
+
403
+ const View* view () const;
404
+
405
+ struct Data;
406
+
407
+ Xot::PSharedImpl<Data> self;
408
+
409
+ private:
302
410
 
303
- ContactEvent (Type type, Shape* shape);
411
+ ContactEvent (const ContactEvent* src);
304
412
 
305
413
  };// ContactEvent
306
414
 
@@ -0,0 +1,107 @@
1
+ // -*- c++ -*-
2
+ #pragma once
3
+ #ifndef __REFLEX_POINTER_H__
4
+ #define __REFLEX_POINTER_H__
5
+
6
+
7
+ #include <xot/pimpl.h>
8
+ #include <xot/util.h>
9
+ #include <rays/point.h>
10
+ #include <reflex/defs.h>
11
+
12
+
13
+ namespace Reflex
14
+ {
15
+
16
+
17
+ class Pointer
18
+ {
19
+
20
+ typedef Pointer This;
21
+
22
+ public:
23
+
24
+ typedef int ID;
25
+
26
+ enum Type
27
+ {
28
+
29
+ TYPE_NONE = 0,
30
+
31
+ MOUSE = Xot::bit(0),
32
+
33
+ MOUSE_LEFT = Xot::bit(1),
34
+
35
+ MOUSE_RIGHT = Xot::bit(2),
36
+
37
+ MOUSE_MIDDLE = Xot::bit(3),
38
+
39
+ TOUCH = Xot::bit(4),
40
+
41
+ PEN = Xot::bit(5),
42
+
43
+ };// Type
44
+
45
+ enum Action
46
+ {
47
+
48
+ ACTION_NONE = 0,
49
+
50
+ DOWN,
51
+
52
+ UP,
53
+
54
+ MOVE,
55
+
56
+ CANCEL,
57
+
58
+ STAY
59
+
60
+ };// Action
61
+
62
+ Pointer ();
63
+
64
+ Pointer (
65
+ ID id, uint type, Action action,
66
+ const Point& position, uint modifiers, uint click_count, bool drag,
67
+ double time);
68
+
69
+ Pointer (const This& obj);
70
+
71
+ Pointer& operator = (const This& obj);
72
+
73
+ ~Pointer ();
74
+
75
+ ID id () const;
76
+
77
+ uint type () const;
78
+
79
+ Action action () const;
80
+
81
+ const Point& position () const;
82
+
83
+ uint modifiers () const;
84
+
85
+ uint click_count () const;
86
+
87
+ bool is_drag () const;
88
+
89
+ double time () const;
90
+
91
+ const Pointer* prev () const;
92
+
93
+ operator bool () const;
94
+
95
+ bool operator ! () const;
96
+
97
+ struct Data;
98
+
99
+ Xot::PImpl<Data> self;
100
+
101
+ };// Pointer
102
+
103
+
104
+ }// Reflex
105
+
106
+
107
+ #endif//EOH
@@ -0,0 +1,41 @@
1
+ // -*- c++ -*-
2
+ #pragma once
3
+ #ifndef __REFLEX_RUBY_POINTER_H__
4
+ #define __REFLEX_RUBY_POINTER_H__
5
+
6
+
7
+ #include <rucy/rucy.h>
8
+ #include <rucy/class.h>
9
+ #include <rucy/extension.h>
10
+ #include <reflex/pointer.h>
11
+
12
+
13
+ namespace Reflex
14
+ {
15
+
16
+
17
+ Rucy::Class pointer_class ();
18
+ // class Reflex::Pointer
19
+
20
+
21
+ }// Reflex
22
+
23
+
24
+ RUCY_DECLARE_VALUE_FROM_TO(Reflex::Pointer)
25
+
26
+
27
+ namespace Rucy
28
+ {
29
+
30
+
31
+ template <> inline Class
32
+ get_ruby_class<Reflex::Pointer> ()
33
+ {
34
+ return Reflex::pointer_class();
35
+ }
36
+
37
+
38
+ }// Rucy
39
+
40
+
41
+ #endif//EOH
@@ -201,6 +201,15 @@ namespace Reflex
201
201
  Super::on_pointer_move(e);
202
202
  }
203
203
 
204
+ virtual void on_pointer_cancel (PointerEvent* e)
205
+ {
206
+ RUCY_SYM(on_pointer_cancel);
207
+ if (this->is_overridable())
208
+ this->value.call(on_pointer_cancel, Rucy::value(e));
209
+ else
210
+ Super::on_pointer_cancel(e);
211
+ }
212
+
204
213
  virtual void on_wheel (WheelEvent* e)
205
214
  {
206
215
  RUCY_SYM(on_wheel);
@@ -153,6 +153,15 @@ namespace Reflex
153
153
  Super::on_pointer_move(e);
154
154
  }
155
155
 
156
+ virtual void on_pointer_cancel (PointerEvent* e)
157
+ {
158
+ RUCY_SYM(on_pointer_cancel);
159
+ if (this->is_overridable())
160
+ this->value.call(on_pointer_cancel, Rucy::value(e));
161
+ else
162
+ Super::on_pointer_cancel(e);
163
+ }
164
+
156
165
  virtual void on_wheel (WheelEvent* e)
157
166
  {
158
167
  RUCY_SYM(on_wheel);
@@ -55,7 +55,7 @@ namespace Reflex
55
55
 
56
56
  const_iterator end () const;
57
57
 
58
- bool is_empty () const;
58
+ bool empty () const;
59
59
 
60
60
  friend bool operator == (const This& lhs, const This& rhs);
61
61