comparison syl_generic.h @ 0:76568becd6d6

Rhope Alpha 2a source import
author Mike Pavone <pavone@retrodev.com>
date Tue, 28 Apr 2009 23:06:07 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:76568becd6d6
1 #ifndef SYL_GENERIC_H_
2 #define SYL_GENERIC_H_
3
4 #include <gui/view.h>
5 #include "datum.h"
6 #include "structs.h"
7
8 class GenericView : public os::View
9 {
10 public:
11 GenericView(const os::Rect& cFrame, const os::String& cTitle, datum * widget_datum, worker_instance * instance);
12 void Paint(const os::Rect& cUpdateRect);
13 void DefaultPaint(const os::Rect& cUpdateRect);
14 void MouseMove( const os::Point& newPos, int code, uint32 buttons, os::Message* msg);
15 void MouseDown( const os::Point& pos, uint32 buttons);
16 void MouseUp( const os::Point& pos, uint32 buttons, os::Message* msg);
17 // void MakeFocus(bool give_focus);
18 void DoCallback(datum * worker, const os::Rect& rect, datum ** extra_params, int num_extra);
19 void ResetCallbacks();
20 datum * handler_dict;
21 private:
22 void SetCallbacks();
23 datum * widget_datum;
24 datum * paint_worker;
25 datum * mousemove_worker;
26 datum * mousedown_worker;
27 datum * mouseup_worker;
28 worker_instance * instance;
29 };
30
31 typedef struct
32 {
33 GenericView * view;
34 os::Rect update_rect;
35 } generic_view_datum;
36
37 #endif //SYL_GENERIC_H_
38
39
40
41
42
43
44
45
46
47
48