diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syl_generic.h	Tue Apr 28 23:06:07 2009 +0000
@@ -0,0 +1,48 @@
+#ifndef SYL_GENERIC_H_
+#define SYL_GENERIC_H_
+
+#include <gui/view.h>
+#include "datum.h"
+#include "structs.h"
+
+class GenericView : public os::View
+{
+public:
+	GenericView(const os::Rect& cFrame, const os::String& cTitle, datum * widget_datum, worker_instance * instance);
+	void Paint(const os::Rect& cUpdateRect);
+	void DefaultPaint(const os::Rect& cUpdateRect);
+	void MouseMove( const os::Point& newPos, int code, uint32 buttons, os::Message* msg);
+	void MouseDown( const os::Point& pos, uint32 buttons);
+	void MouseUp( const os::Point& pos, uint32 buttons, os::Message* msg);
+//	void MakeFocus(bool give_focus);
+	void DoCallback(datum * worker, const os::Rect& rect, datum ** extra_params, int num_extra);
+	void ResetCallbacks();
+	datum * handler_dict;
+private:
+	void SetCallbacks();
+	datum * widget_datum;
+	datum * paint_worker;
+	datum * mousemove_worker;
+	datum * mousedown_worker;
+	datum * mouseup_worker;
+	worker_instance * instance;
+};
+
+typedef struct
+{
+	GenericView * view;
+	os::Rect update_rect;
+} generic_view_datum;
+
+#endif //SYL_GENERIC_H_
+
+
+
+
+
+
+
+
+
+
+