[wiki.pymt] push by - Edited wiki page through web user interface. on 2009-10-15 21:36 GMT

0 views
Skip to first unread message

codesite...@google.com

unread,
Oct 15, 2009, 5:36:52 PM10/15/09
to pymt-c...@googlegroups.com
Revision: 9f185707f3
Author: txprog
Date: Thu Oct 15 14:36:30 2009
Log: Edited wiki page through web user interface.
http://code.google.com/p/pymt/source/detail?repo=wiki&r=9f185707f3

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:

Reply all
Reply to author
Forward
0 new messages