Modified:
/CppCore.wiki
=======================================
--- /CppCore.wiki Thu Oct 15 14:28:24 2009
+++ /CppCore.wiki Thu Oct 15 14:36:30 2009
@@ -1,4 +1,5 @@
#summary New C++ Core
+<wiki:toc/>
= Introduction =
@@ -12,7 +13,7 @@
And new python module are needed :
* PyOpenGL - Opengl functions into python
-= Todo =
+== Todo ==
* Core: implement graphx package into core
* Core: implement vector, and replace pos2d with vector
@@ -45,6 +46,57 @@
cd pymtcore
make test
}}}
+
+= Migrate from full-Python version =
+
+== Events dispatching ==
+
+
+
+=== callbacks ===
+
+Callbacks always have a "data" tuple/list. You must extract yourself
parameters from data tuple/list.
+
+Before:
+{{{
+def on_move(self, x, y):
+ print 'widget moved to', x, y
+}}}
+
+After:
+{{{
+def on_move(self, data):
+ x, y = data
+ print 'widget moved to', x, y
+}}}
+
+=== register_event_type() ==
+
+Before:
+{{{
+self.register_event_type('on_gesture')
+}}}
+
+After:
+{{{
+def dispatch_event_internal(self, event_name, data):
+ if event_name == 'on_gesture':
+ return self.on_gesture(data)
+ return super(MTGestureWidget,
self).dispatch_event_internal(event_name, data)
+}}}
+
+=== push_handlers() ===
+
+Before:
+{{{
+self.push_handlers(on_press=my_onpress_callback,
on_release=my_onrelease_callback)
+}}}
+
+After:
+{{{
+self.connect('on_press', my_onpress_callback)
+self.connect('on_release', my_onrelease_callback)
+}}}
= Performances tests =
In early stage, here is a rapid test: