Displaying 10 results from an estimated 10 matches for "internal_evt_with_id".
2007 May 29
0
[1035] trunk/wxruby2/swig/classes/EvtHandler.i: Removed a heap of redundant stuff that''s been #if 0''d for a while
...b_ary_new();
- rb_ary_push(callbacks, func);
-
- wxObject* userData = new wxRbCallback(func);
- wxObjectEventFunction function =
- (wxObjectEventFunction )&wxRbCallback::EventThunker;
- (cppSelf)->Connect(firstId, lastId, eventType, function, userData);
-}
-
-static VALUE internal_evt_with_id(int argc, VALUE *argv, VALUE self,
- wxEventType eventType)
-{
- if (argc != 1)
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
-
- int id = NUM2INT(argv[0]);
- //printf("evt_with_id(%d) %s\n", id, rb_block_given_p() ? "with...
2006 Jul 25
6
Wizards
Hi
Please find attached a set of patches and swig files to implement
Wizards for wxruby. Also a brief sample.
Quick q - the C declarations of evt_xxx_xxx methods and their attaching
to Ruby classes seems to be duplicated across Events.i and EvtHandler.i
- is one of these the right place to be adding them? or both?
Thanks
alex
_______________________________________________
2007 May 31
0
[1039] trunk/wxruby2/swig/Events.i: Remove some debugging output
...uot;> %constant const int wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK;
</span><span class="cx"> %constant const int wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK;
</span><span class="lines">@@ -280,7 +279,6 @@
</span><span class="cx"> static VALUE internal_evt_with_id(int argc, VALUE *argv, VALUE self,
</span><span class="cx"> wxEventType eventType)
</span><span class="cx"> {
</span><del>-        puts("Called internal_evt_with_id...
2007 May 31
0
[1038] trunk/wxruby2/swig/Events.i: Add missing EVT_COMMAND_TREE constants
...uot;> %constant const int wxEVT_GRID_CELL_LEFT_DCLICK; //1582)
</span><span class="cx"> %constant const int wxEVT_GRID_CELL_RIGHT_DCLICK; //1583)
</span><span class="lines">@@ -257,6 +280,7 @@
</span><span class="cx"> static VALUE internal_evt_with_id(int argc, VALUE *argv, VALUE self,
</span><span class="cx"> wxEventType eventType)
</span><span class="cx"> {
</span><ins>+        puts("Called internal_evt_with_id...
2006 Dec 20
0
[790] trunk/wxruby2/swig/classes: Added TextUrlEvent class and EvtHandler mapping
...quot;cx"> else if (event.IsKindOf(CLASSINFO(wxScintillaEvent)))
</span><span class="cx"> cEvent = cWxScintillaEvent.klass;
</span><span class="lines">@@ -810,7 +818,7 @@
</span><span class="cx"> return internal_evt_with_id(argc, argv, self, wxEVT_COMMAND_TEXT_MAXLEN);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#ifdef __WXMSW__
</del><ins>+#ifndef __WXMAC__
</ins><span class="cx"> static VALUE evt_text_url(...
2007 Jun 23
0
[1060] trunk/wxruby2/swig/fixevents.rb: Include some previously missing events, rehash and simplify
...       when 2
-                        func = "internal_evt_with_id"
-                when 3
-               &...
2007 Jun 23
0
[1064] trunk/wxruby2/swig/Events.i: Removed unused func, updated comments
...bsp     wxEventType eventType);
</ins><span class="cx">
</span><del>-void internal_connect(VALUE self, int firstId, int lastId,
- wxEventType eventType);
-
-
</del><span class="cx"> static VALUE internal_evt_with_id(int argc, VALUE *argv, VALUE self,
</span><span class="cx"> wxEventType eventType)
</span><span class="cx"> {
</span><span class="lines">@@ -359,17 +358,4 @@
</span><span class="cx"> return Qnil;
&...
2006 Dec 24
0
[802] trunk/wxruby2/swig/classes: Add support for MenuEvent (MENU_OPEN, MENU_CLOSE, MENU_HIGHLIGHT)
...nternal_evt_no_parameters(argc, argv, self, wxEVT_MENU_OPEN);
+}
+
+static VALUE evt_menu_close(int argc, VALUE *argv, VALUE self)
+{
+ return internal_evt_no_parameters(argc, argv, self, wxEVT_MENU_CLOSE);
+}
+
+static VALUE evt_menu_highlight(int argc, VALUE *argv, VALUE self)
+{
+ return internal_evt_with_id(argc, argv, self, wxEVT_MENU_HIGHLIGHT);
+}
+
+static VALUE evt_menu_highlight_all(int argc, VALUE *argv, VALUE self)
+{
+ return internal_evt_no_parameters(argc, argv, self, wxEVT_MENU_HIGHLIGHT_ALL);
+}
+
+
</ins><span class="cx"> // TODO: Add for ListEvent types? Is t...
2007 Jun 25
0
[1066] trunk/wxruby2/swig: Move EVT constants in swig/classes/Event.i; add a few missing ones
...mp;nbsp                             wxEventType eventType);
-
-static VALUE internal_evt_with_id(int argc, VALUE *argv, VALUE self,
- wxEventType eventType)
-{
- if (argc != 1)
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
-
- int id = NUM2INT(argv[0]);
-
- internal_connect(self, id, id, eventType);
- return Qnil;
-}
-
-static VA...
2007 Jun 25
0
[1067] trunk/wxruby2: Set up event handlers in Ruby rather than by post-processing SWIG output
...- evt_right_dclick(argc,argv,self);
- evt_leave_window(argc,argv,self);
- evt_enter_window(argc,argv,self);
- return evt_mousewheel(argc,argv,self);
-}
-FUNC_DEF
- next
- end
-
- func = case evt.type
- when 1 : "internal_evt_no_parameters"
- when 2 : "internal_evt_with_id"
- when 3 : "internal_evt_with_id_range"
- end
-
- out.puts "#ifdef __WXMSW__" if evt.windows_only?
- out.puts <<FUNC_DEF
-static VALUE #{evt.name.downcase}(int argc, VALUE *argv, VALUE self)
- { return #{func}(argc, argv, self, #{evt.wx_const}); }
-
-F...