From alex at pressure.to Wed Jul 12 16:22:41 2006 From: alex at pressure.to (Alex Fenton) Date: Wed, 12 Jul 2006 21:22:41 +0100 Subject: [Wxruby-users] SWIGging clipboard Message-ID: <44B55A11.9000300@pressure.to> Hi all I'm having a go at porting the Clipboard and DnD classes, going OK, but have hit a snag where I could use your help. I've added several relevant classes, but now I have on OS X missing symbols: wxDataObjectBase::GetDataHere(wxDataFormat const&, void*) const wxDataObjectBase::GetDataSize(wxDataFormat const&) const DataObjectBase is an internal base class for DataObject. It's defined in the platform-neutral wx/dataobj.h, which has class WXDLLEXPORT wxDataObjectBase { ... // get the (total) size of data for the given format virtual size_t GetDataSize(const wxDataFormat& format) const = 0; // copy raw data (in the specified format) to the provided buffer, return // true if data copied successfully, false otherwise virtual bool GetDataHere(const wxDataFormat& format, void *buf) const = 0; wx/dataobj.h then includes a platform-specific header file; on OS X, the relevant content is: class WXDLLEXPORT wxDataObject : public wxDataObjectBase with no further declaration of GetDataSize in there, except later in derived classes (eg DataObjectSimple) I'm a bit stuck as to what's going on here - is the missing symbol b/c there's no Ruby class called DataObjectBase? Is there some way I can work round this. TIA alex From sean.m.long at gmail.com Wed Jul 19 02:41:12 2006 From: sean.m.long at gmail.com (Sean Long) Date: Tue, 18 Jul 2006 23:41:12 -0700 Subject: [Wxruby-users] small patch for wxWindow::GetTextExtent Message-ID: I have not worked on wxRuby2 for awhile and decided to download the latest CVS HEAD and saw that it still had a problem with wxWindow::GetTextExtent (in my case showing up when editing Grid cells). So I copied the method signature from the wxDC::GetTextExtent which seems to be working, changed 2 variable names and made the typemap the same as used for wxDC. Well in my program editing grid cells does not crash anymore. This patch also has the global function wxGetKeyState added, which needed a few typemaps as well. The list has been pretty quiet is anyone else working on anything? Sean -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.patch Type: application/octet-stream Size: 3415 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060718/27517dce/attachment.obj From sean.m.long at gmail.com Wed Jul 19 12:16:08 2006 From: sean.m.long at gmail.com (Sean Long) Date: Wed, 19 Jul 2006 09:16:08 -0700 Subject: [Wxruby-users] small patch for wxWindow::GetTextExtent In-Reply-To: References: Message-ID: Here is a cleaner patch with the proper directory name, has been awhile since I made a patch. :) Sean On 7/18/06, Sean Long wrote: > I have not worked on wxRuby2 for awhile and decided to download the > latest CVS HEAD and saw that it still had a problem with > wxWindow::GetTextExtent (in my case showing up when editing Grid > cells). So I copied the method signature from the wxDC::GetTextExtent > which seems to be working, changed 2 variable names and made the > typemap the same as used for wxDC. Well in my program editing grid > cells does not crash anymore. > > This patch also has the global function wxGetKeyState added, which > needed a few typemaps as well. > > > The list has been pretty quiet is anyone else working on anything? > > > Sean > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.patch Type: application/octet-stream Size: 3078 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060719/34e3469f/attachment.obj From wxruby at qualitycode.com Mon Jul 24 00:38:49 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 24 Jul 2006 00:38:49 -0400 Subject: [Wxruby-users] small patch for wxWindow::GetTextExtent In-Reply-To: References: Message-ID: <1153715929.11068.4.camel@localhost.localdomain> Thanks. I'm in the middle of a construction project. I'll try to take a look at this sometime later this week. Kevin On Wed, 2006-07-19 at 09:16 -0700, Sean Long wrote: > Here is a cleaner patch with the proper directory name, has been > awhile since I made a patch. :) > > Sean > > On 7/18/06, Sean Long wrote: > > I have not worked on wxRuby2 for awhile and decided to download the > > latest CVS HEAD and saw that it still had a problem with > > wxWindow::GetTextExtent (in my case showing up when editing Grid > > cells). So I copied the method signature from the wxDC::GetTextExtent > > which seems to be working, changed 2 variable names and made the > > typemap the same as used for wxDC. Well in my program editing grid > > cells does not crash anymore. > > > > This patch also has the global function wxGetKeyState added, which > > needed a few typemaps as well. > > > > > > The list has been pretty quiet is anyone else working on anything? > > > > > > Sean > > > > > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From alex at pressure.to Mon Jul 24 14:59:36 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 24 Jul 2006 19:59:36 +0100 Subject: [Wxruby-users] small patch for wxWindow::GetTextExtent In-Reply-To: References: Message-ID: <44C51898.1090700@pressure.to> Sean Long wrote: > Well in my program editing grid cells does not crash anymore. Thanks for the patch, works for me too on the system_settings sample. > The list has been pretty quiet is anyone else working on anything? Haven't done a lot for last month or two, new job, world cup and unusually nice british weather. I've been working on a set of syntax extensions to Wx to reduce some of the C++-ish verbosity. http://rubyforge.org/cgi-bin/viewvc.cgi/weft-qda/lib/wx_extensions/all.rb?revision=1.2&root=weft-qda Using all the extensions I get about a 30%+ reduction in LOC, plus (I hope) more readable code. I'll bundle and release when I've fixed a few bugs in layout.rb (which provides easier API to use Sizers). Whenever wxruby gets mentioned on c.l.r. there always seems to be lots of interest - I'm keen to put in some time to push out an alpha release soon. I've updated the wiki to include info on installing wxruby2, and perhaps I could help by updating the bugs/feature request list so we know what's blocking us getting a release out. I'd suggest archiving any bugs relating to 0.6.0, and reducing the priority of anything except show-stoppers. Let me know if this would be helpful. cheers alex From alex at pressure.to Mon Jul 24 16:31:09 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 24 Jul 2006 21:31:09 +0100 Subject: [Wxruby-users] small Window.i patch Message-ID: <44C52E0D.4030702@pressure.to> Hi Attached a small patch to Window.i which prevents it crashing when find_window_by_name, find_window_by_id or find_window_by_label should return nil. This fixes this bug (which I think was originally posted to wxruby 0.6.0) http://rubyforge.org/tracker/index.php?func=detail&aid=634&group_id=35&atid=218 cheers alex -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: window_i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060724/bb0e728d/attachment.pl From sean.m.long at gmail.com Mon Jul 24 17:20:00 2006 From: sean.m.long at gmail.com (Sean Long) Date: Mon, 24 Jul 2006 14:20:00 -0700 Subject: [Wxruby-users] small patch for wxWindow::GetTextExtent In-Reply-To: <44C51898.1090700@pressure.to> References: <44C51898.1090700@pressure.to> Message-ID: > I've been working on a set of syntax > extensions to Wx to reduce some of the C++-ish verbosity. > Using all the extensions I get about a 30%+ reduction in LOC, plus (I > hope) more readable code. I'll bundle and release when I've fixed a few > bugs in layout.rb (which provides easier API to use Sizers). I am interested in the extensions when you have them ready. > Whenever wxruby gets mentioned on c.l.r. there always seems to be lots > of interest I can not think of what c.l.r is can you fill me in? > I've updated the wiki to include info on installing wxruby2, and perhaps > I could help by updating the bugs/feature request list so we know what's > blocking us getting a release out. I'd suggest archiving any bugs > relating to 0.6.0, and reducing the priority of anything except > show-stoppers. Let me know if this would be helpful. I think having a list of goals for a release would really help focus the few developers we have. Maybe if we have a release it will catch the eye of a developer or two who can then help move the project along. I think we should not spend any time on the old wxRuby 0.6 unless it is a critical bug, from my perspective the wxRuby2 code has exceeded the old code base in usability. Sean From alex at pressure.to Mon Jul 24 17:38:43 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 24 Jul 2006 22:38:43 +0100 Subject: [Wxruby-users] small patch for wxWindow::GetTextExtent In-Reply-To: References: <44C51898.1090700@pressure.to> Message-ID: <44C53DE3.8010804@pressure.to> Sean Long wrote: > I am interested in the extensions when you have them ready. Thanks. The link gives an idea of the different behaviours that are implemented so far. >> Whenever wxruby gets mentioned on c.l.r. there always seems to be lots >> of interest >> > > I can not think of what c.l.r is can you fill me in? > comp.lang.ruby newsgroup > I think having a list of goals for a release would really help focus > the few developers we have. Maybe if we have a release it will catch > the eye of a developer or two who can then help move the project > along. > Definitely. I know we're short of person-time, so even just getting people (esp on Windows using a binary) to report bugs against a release version would really help I think. > I think we should not spend any time on the old wxRuby 0.6 unless it > is a critical bug, from my perspective the wxRuby2 code has exceeded > the old code base in usability. > Ditto. Kevin - perhaps you could add me as a member of wxruby on rubyforge, just with access to tracker items and documents only. I'll start by checking the bugs and feature requests and marking any that relate to 0.6.0 as 'old'. cheers alex From alex at pressure.to Mon Jul 24 18:46:11 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 24 Jul 2006 23:46:11 +0100 Subject: [Wxruby-users] MiniFrame.i Message-ID: <44C54DB3.3090902@pressure.to> Hi Another little patch, adding MiniFrame (a frame with small title bar and buttons which doesn't appear in the desktop taskbar). Also a sample - not very interesting, happy to roll this into something else if that's better. cheers alex -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: MiniFrame.i Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060724/fb1d707a/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: miniframe.rb Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060724/fb1d707a/attachment-0001.pl From sean.m.long at gmail.com Tue Jul 25 02:00:06 2006 From: sean.m.long at gmail.com (Sean Long) Date: Mon, 24 Jul 2006 23:00:06 -0700 Subject: [Wxruby-users] MiniFrame.i In-Reply-To: <44C54DB3.3090902@pressure.to> References: <44C54DB3.3090902@pressure.to> Message-ID: That code compiled nice for me on OS X and worked fine. The only problem I see is that VERSION_STRING is not defined. wxWidgets 2.6.3 swig 1.3.29 iMac Intel OS X 10.4.7 Sean On 7/24/06, Alex Fenton wrote: > Hi > > Another little patch, adding MiniFrame (a frame with small title bar and > buttons which doesn't appear in the desktop taskbar). > > Also a sample - not very interesting, happy to roll this into something > else if that's better. > > cheers > alex > > > # Copyright 2004-2005 by Kevin Smith > # released under the MIT-style wxruby2 license > > %include "../common.i" > > %module(directors="1") wxMiniFrame > > %{ > #include > %} > > %import "include/wxObject.h" > %import "include/wxEvtHandler.h" > %import "include/wxWindow.h" > %import "include/wxFrame.h" > > > %include "include/wxMiniFrame.h" > > require 'wx' > > class MyFrame < Wx::Frame > def initialize(title, pos, size, style = Wx::DEFAULT_FRAME_STYLE) > super(nil, -1, title, pos, size, style) > > > menuFile = Wx::Menu.new() > helpMenu = Wx::Menu.new() > helpMenu.append(Wx::ID_ABOUT, "&About...\tF1", "Show about dialog") > menuFile.append(Wx::ID_EXIT, "E&xit\tAlt-X", "Quit this program") > menuBar = Wx::MenuBar.new() > menuBar.append(menuFile, "&File") > menuBar.append(helpMenu, "&Help") > set_menu_bar(menuBar) > > create_status_bar(2) > set_status_text("Welcome to wxRuby!") > > evt_menu(Wx::ID_EXIT) { onQuit } > evt_menu(Wx::ID_ABOUT) { onAbout } > m = Wx::MiniFrame.new(nil, -1, 'Mini Frame') > m.show() > > end > > def onQuit > close(Wx::TRUE) > end > > def onAbout > msg = sprintf("This is the About dialog of the miniframe sample.\n" \ > "Welcome to %s", VERSION_STRING) > > message_box(msg, "About MiniFrame", OK | ICON_INFORMATION, self) > > end > end > > class RbApp < Wx::App > def on_init > frame = MyFrame.new("Mini Frame wxRuby App", > Wx::Point.new(50, 50), > Wx::Size.new(450, 340)) > > frame.show(TRUE) > > end > end > > app = RbApp.new > app.main_loop() > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > From alex at pressure.to Tue Jul 25 02:43:47 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 25 Jul 2006 07:43:47 +0100 Subject: [Wxruby-users] MiniFrame.i In-Reply-To: References: <44C54DB3.3090902@pressure.to> Message-ID: <44C5BDA3.40206@pressure.to> Sean Long wrote: > That code compiled nice for me on OS X and worked fine. The only > problem I see is that VERSION_STRING is not defined. > Oops, thanks, revised sample attached. > wxWidgets 2.6.3 > swig 1.3.29 > iMac Intel OS X 10.4.7 > So it is possible to compile wxruby2 on 10.4 - just checking b/c there's a bug filed against it. http://rubyforge.org/tracker/index.php?func=detail&aid=4633&group_id=35&atid=218 But it looks there like the submitter was using an old 2.5 release of wx. cheers alex > Sean > > On 7/24/06, Alex Fenton wrote: > >> Hi >> >> Another little patch, adding MiniFrame (a frame with small title bar and >> buttons which doesn't appear in the desktop taskbar). >> >> Also a sample - not very interesting, happy to roll this into something >> else if that's better. >> >> cheers >> alex >> >> >> # Copyright 2004-2005 by Kevin Smith >> # released under the MIT-style wxruby2 license >> >> %include "../common.i" >> >> %module(directors="1") wxMiniFrame >> >> %{ >> #include >> %} >> >> %import "include/wxObject.h" >> %import "include/wxEvtHandler.h" >> %import "include/wxWindow.h" >> %import "include/wxFrame.h" >> >> >> %include "include/wxMiniFrame.h" >> >> require 'wx' >> >> class MyFrame < Wx::Frame >> def initialize(title, pos, size, style = Wx::DEFAULT_FRAME_STYLE) >> super(nil, -1, title, pos, size, style) >> >> >> menuFile = Wx::Menu.new() >> helpMenu = Wx::Menu.new() >> helpMenu.append(Wx::ID_ABOUT, "&About...\tF1", "Show about dialog") >> menuFile.append(Wx::ID_EXIT, "E&xit\tAlt-X", "Quit this program") >> menuBar = Wx::MenuBar.new() >> menuBar.append(menuFile, "&File") >> menuBar.append(helpMenu, "&Help") >> set_menu_bar(menuBar) >> >> create_status_bar(2) >> set_status_text("Welcome to wxRuby!") >> >> evt_menu(Wx::ID_EXIT) { onQuit } >> evt_menu(Wx::ID_ABOUT) { onAbout } >> m = Wx::MiniFrame.new(nil, -1, 'Mini Frame') >> m.show() >> >> end >> >> def onQuit >> close(Wx::TRUE) >> end >> >> def onAbout >> msg = sprintf("This is the About dialog of the miniframe sample.\n" \ >> "Welcome to %s", VERSION_STRING) >> >> message_box(msg, "About MiniFrame", OK | ICON_INFORMATION, self) >> >> end >> end >> >> class RbApp < Wx::App >> def on_init >> frame = MyFrame.new("Mini Frame wxRuby App", >> Wx::Point.new(50, 50), >> Wx::Size.new(450, 340)) >> >> frame.show(TRUE) >> >> end >> end >> >> app = RbApp.new >> app.main_loop() >> >> >> _______________________________________________ >> wxruby-users mailing list >> wxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wxruby-users >> >> >> > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: miniframe.rb Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060725/cf9e23ac/attachment.pl From sean.m.long at gmail.com Tue Jul 25 02:45:08 2006 From: sean.m.long at gmail.com (Sean Long) Date: Mon, 24 Jul 2006 23:45:08 -0700 Subject: [Wxruby-users] Added class wxNumberEntryDialog Message-ID: I am trying to figure out why the Wx::get_number_from_user() function is not working in the caret demo when the parent is set to self, when set to nil it works fine. While playing around with it I added wxNumberEntryDialog, which it wraps, to see if the problem is in wxNumberEntryDialog or get_number_from_user. They both have the same problem so it is in wxNumberEntryDialog. Still have not found the problem but we got a new class out of it. Sean -------------- next part -------------- A non-text attachment was scrubbed... Name: NumberEntryDialog.i Type: application/octet-stream Size: 367 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060724/a661f387/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: wxNumberEntryDialog.h Type: application/octet-stream Size: 656 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060724/a661f387/attachment-0001.obj From sean.m.long at gmail.com Tue Jul 25 02:49:31 2006 From: sean.m.long at gmail.com (Sean Long) Date: Mon, 24 Jul 2006 23:49:31 -0700 Subject: [Wxruby-users] MiniFrame.i In-Reply-To: <44C5BDA3.40206@pressure.to> References: <44C54DB3.3090902@pressure.to> <44C5BDA3.40206@pressure.to> Message-ID: > So it is possible to compile wxruby2 on 10.4 - just checking b/c there's > a bug filed against it. > > http://rubyforge.org/tracker/index.php?func=detail&aid=4633&group_id=35&atid=218 > > But it looks there like the submitter was using an old 2.5 release of wx. I have had no troubles compiling on 10.4, with ppc or intel. Well I did have a problem once when I forgot to update to 2.6.3 and tried compiling with 2.6.2. I think the version of wx used and the version of Swig are the two biggest potential problem areas. Sean From alex at pressure.to Tue Jul 25 15:22:07 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 25 Jul 2006 20:22:07 +0100 Subject: [Wxruby-users] Wizards Message-ID: <44C66F5F.6040106@pressure.to> 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 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Events.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060725/c548ea3f/attachment-0008.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: EvtHandler.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060725/c548ea3f/attachment-0009.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fixevents.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060725/c548ea3f/attachment-0010.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: WizardPage.i Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060725/c548ea3f/attachment-0011.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: WizardEvent.i Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060725/c548ea3f/attachment-0012.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Wizard.i Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060725/c548ea3f/attachment-0013.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: WizardPageSimple.i Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060725/c548ea3f/attachment-0014.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wizard.rb Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060725/c548ea3f/attachment-0015.pl From sean.m.long at gmail.com Tue Jul 25 16:40:47 2006 From: sean.m.long at gmail.com (Sean Long) Date: Tue, 25 Jul 2006 13:40:47 -0700 Subject: [Wxruby-users] Wizards In-Reply-To: <44C66F5F.6040106@pressure.to> References: <44C66F5F.6040106@pressure.to> Message-ID: > Please find attached a set of patches and swig files to implement > Wizards for wxruby. Also a brief sample. Have not tried it yet, but a very cool feature to add. > 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? That code is pretty messy right now and if I recall pieces from both locations are used. In the TODO file the following item is listed. - Eliminate massive duplication between swig/Events.i and swig/classes/EvtHandler.i (probably by deleting what's in Event.i). Probably also should rename Events.i to avoid confusion with swig/classes/Event.i. I brought up this same question when I have to mess around with adding events. Sean > Thanks > alex > > > Index: wxruby2/swig/Events.i > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/Events.i,v > retrieving revision 1.7 > diff -b -u -r1.7 Events.i > --- wxruby2/swig/Events.i 4 Sep 2005 16:47:54 -0000 1.7 > +++ wxruby2/swig/Events.i 25 Jul 2006 19:17:10 -0000 > @@ -559,6 +559,31 @@ > return internal_evt_with_id(argc, argv, self, wxEVT_GRID_EDITOR_CREATED); > } > > +static VALUE evt_wizard_page_changed(int argc, VALUE *argv, VALUE self) > +{ > + return internal_evt_with_id(argc, argv, self, wxEVT_WIZARD_PAGE_CHANGED); > +} > + > +static VALUE evt_wizard_page_changing(int argc, VALUE *argv, VALUE self) > +{ > + return internal_evt_with_id(argc, argv, self, wxEVT_WIZARD_PAGE_CHANGING); > +} > + > +static VALUE evt_wizard_cancel(int argc, VALUE *argv, VALUE self) > +{ > + return internal_evt_with_id(argc, argv, self, wxEVT_WIZARD_CANCEL); > +} > + > +static VALUE evt_wizard_help(int argc, VALUE *argv, VALUE self) > +{ > + return internal_evt_with_id(argc, argv, self, wxEVT_WIZARD_HELP); > +} > + > +static VALUE evt_wizard_finished(int argc, VALUE *argv, VALUE self) > +{ > + return internal_evt_with_id(argc, argv, self, wxEVT_WIZARD_FINISHED); > +} > + > %} > > > @@ -665,6 +690,11 @@ > rb_define_method(cWxEvtHandler.klass, "evt_grid_cmd_range_select", VALUEFUNC(evt_grid_cmd_range_select), -1); > rb_define_method(cWxEvtHandler.klass, "evt_grid_editor_created", VALUEFUNC(evt_grid_editor_created), -1); > rb_define_method(cWxEvtHandler.klass, "evt_grid_cmd_editor_created", VALUEFUNC(evt_grid_cmd_editor_created), -1); > + rb_define_method(cWxEvtHandler.klass, "evt_wizard_page_changed", VALUEFUNC(evt_wizard_page_changed), -1); > + rb_define_method(cWxEvtHandler.klass, "evt_wizard_page_changing", VALUEFUNC(evt_wizard_page_changing), -1); > + rb_define_method(cWxEvtHandler.klass, "evt_wizard_cancel", VALUEFUNC(evt_wizard_cancel), -1); > + rb_define_method(cWxEvtHandler.klass, "evt_wizard_help", VALUEFUNC(evt_wizard_help), -1); > + rb_define_method(cWxEvtHandler.klass, "evt_wizard_finished", VALUEFUNC(evt_wizard_finished), -1); > %} > > > > Index: wxruby2/swig/classes/EvtHandler.i > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/EvtHandler.i,v > retrieving revision 1.20 > diff -b -u -r1.20 EvtHandler.i > --- wxruby2/swig/classes/EvtHandler.i 29 Apr 2006 21:25:37 -0000 1.20 > +++ wxruby2/swig/classes/EvtHandler.i 25 Jul 2006 19:17:33 -0000 > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > %} > > %module(directors="1") wxEvtHandler > @@ -52,6 +53,7 @@ > extern swig_class cWxSplitterEvent; > extern swig_class cWxMoveEvent; > extern swig_class cWxListEvent; > +extern swig_class cWxWizardEvent; > > static const wxEventType *calendarEvents[] = > { > @@ -229,6 +231,16 @@ > (const wxEventType *)0 > }; > > +static const wxEventType *wizardEvents[] = > +{ > + &wxEVT_WIZARD_PAGE_CHANGED, > + &wxEVT_WIZARD_PAGE_CHANGING, > + &wxEVT_WIZARD_CANCEL, > + &wxEVT_WIZARD_HELP, > + &wxEVT_WIZARD_FINISHED, > + (const wxEventType *)0 > +}; > + > //IMPLEMENT_ABSTRACT_CLASS(wxRbCallback, wxObject); > > class wxRbCallback : public wxObject > @@ -287,6 +299,8 @@ > cEvent = cWxMoveEvent.klass; > else if(event.IsKindOf(CLASSINFO(wxListEvent))) > cEvent = cWxListEvent.klass; > + else if(event.IsKindOf(CLASSINFO(wxWizardEvent))) > + cEvent = cWxWizardEvent.klass; > else if(event.IsKindOf(CLASSINFO(wxCommandEvent))) > cEvent = cWxCommandEvent.klass; > > @@ -878,6 +892,30 @@ > return internal_evt_with_id(argc, argv, self, wxEVT_GRID_EDITOR_CREATED); > } > > +static VALUE evt_wizard_page_changed(int argc, VALUE *argv, VALUE self) > +{ > + return internal_evt_with_id(argc, argv, self, wxEVT_WIZARD_PAGE_CHANGED); > +} > + > +static VALUE evt_wizard_page_changing(int argc, VALUE *argv, VALUE self) > +{ > + return internal_evt_with_id(argc, argv, self, wxEVT_WIZARD_PAGE_CHANGING); > +} > + > +static VALUE evt_wizard_cancel(int argc, VALUE *argv, VALUE self) > +{ > + return internal_evt_with_id(argc, argv, self, wxEVT_WIZARD_CANCEL); > +} > + > +static VALUE evt_wizard_help(int argc, VALUE *argv, VALUE self) > +{ > + return internal_evt_with_id(argc, argv, self, wxEVT_WIZARD_HELP); > +} > + > +static VALUE evt_wizard_finished(int argc, VALUE *argv, VALUE self) > +{ > + return internal_evt_with_id(argc, argv, self, wxEVT_WIZARD_FINISHED); > +} > // TODO: Add for ListEvent types? Is this needed? > > %} > @@ -986,6 +1024,12 @@ > rb_define_method(cWxEvtHandler.klass, "evt_grid_cmd_range_select", VALUEFUNC(evt_grid_cmd_range_select), -1); > rb_define_method(cWxEvtHandler.klass, "evt_grid_editor_created", VALUEFUNC(evt_grid_editor_created), -1); > rb_define_method(cWxEvtHandler.klass, "evt_grid_cmd_editor_created", VALUEFUNC(evt_grid_cmd_editor_created), -1); > + rb_define_method(cWxEvtHandler.klass, "evt_wizard_page_changed", VALUEFUNC(evt_wizard_page_changed), -1); > + rb_define_method(cWxEvtHandler.klass, "evt_wizard_page_changing", VALUEFUNC(evt_wizard_page_changing), -1); > + rb_define_method(cWxEvtHandler.klass, "evt_wizard_cancel", VALUEFUNC(evt_wizard_cancel), -1); > + rb_define_method(cWxEvtHandler.klass, "evt_wizard_help", VALUEFUNC(evt_wizard_help), -1); > + rb_define_method(cWxEvtHandler.klass, "evt_wizard_finished", VALUEFUNC(evt_wizard_finished), -1); > + > %} > > #endif > > Index: wxruby2/swig/fixevents.rb > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/fixevents.rb,v > retrieving revision 1.5 > diff -b -u -r1.5 fixevents.rb > --- wxruby2/swig/fixevents.rb 13 Sep 2005 01:36:31 -0000 1.5 > +++ wxruby2/swig/fixevents.rb 25 Jul 2006 19:16:51 -0000 > @@ -16,8 +16,7 @@ > 'EVT_DIALUP', > 'EVT_SASH', > 'EVT_TASKBAR', > - 'EVT_TOGGLEBUTTON', > - 'EVT_WIZARD', > + 'EVT_TOGGLEBUTTON' > ] > > File.open(ARGV[0], "a") do | out | > > # Copyright 2004-2005 by Kevin Smith > # released under the MIT-style wxruby2 license > > %include "../common.i" > > %module(directors="1") wxWizardPage > > %{ > #include > %} > > // no ctor b/c of abstract methods > %ignore wxWizardPage::wxWizardPage(wxWizard* parent , const wxBitmap& bitmap = wxNullBitmap, const wxChar *resource = NULL); > > > > %import "include/wxObject.h" > %import "include/wxEvtHandler.h" > %import "include/wxWindow.h" > %import "include/wxPanel.h" > > %include "include/wxWizardPage.h" > > > # Copyright 2004-2005 by Kevin Smith > # released under the MIT-style wxruby2 license > > %include "../common.i" > > %module(directors="1") wxWizardEvent > > %{ > #include > %} > > %import "include/wxObject.h" > %import "include/wxEvent.h" > %import "include/wxCommandEvent.h" > %import "include/wxNotifyEvent.h" > > %include "include/wxWizardEvent.h" > > # Copyright 2004-2005 by Kevin Smith > # released under the MIT-style wxruby2 license > > %include "../common.i" > > %module(directors="1") wxWizard > > %{ > #include > %} > > %import "include/wxObject.h" > %import "include/wxEvtHandler.h" > %import "include/wxWindow.h" > %import "include/wxPanel.h" > %import "include/wxDialog.h" > > %include "include/wxWizard.h" > > # Copyright 2004-2005 by Kevin Smith > # released under the MIT-style wxruby2 license > > %include "../common.i" > > %module(directors="1") wxWizardPageSimple > > %{ > #include > %} > > %import "include/wxObject.h" > %import "include/wxEvtHandler.h" > %import "include/wxWindow.h" > %import "include/wxPanel.h" > %import "include/wxWizardPage.h" > > %include "include/wxWizardPageSimple.h" > > require 'wx' > > class MyFrame < Wx::Frame > def initialize(title, pos, size, style = Wx::DEFAULT_FRAME_STYLE) > super(nil, -1, title, pos, size, style) > > > menuFile = Wx::Menu.new() > helpMenu = Wx::Menu.new() > helpMenu.append(Wx::ID_ABOUT, "&About...\tF1", "Show about dialog") > menuFile.append(Wx::ID_EXIT, "E&xit\tAlt-X", "Quit this program") > menuBar = Wx::MenuBar.new() > menuBar.append(menuFile, "&File") > menuBar.append(helpMenu, "&Help") > set_menu_bar(menuBar) > > create_status_bar(2) > set_status_text("Welcome to wxRuby!") > s = Wx::StaticText.new(self, -1, 'The Wizard has completed') > > > evt_menu(Wx::ID_EXIT) { onQuit } > evt_menu(Wx::ID_ABOUT) { onAbout } > w = Wx::Wizard.new(self, -1, 'The WxRuby Wizard') > p1 = Wx::WizardPageSimple.new(w) > s = Wx::StaticText.new(p1, -1, 'This is the first page') > p2 = Wx::WizardPageSimple.new(w, p1) > p1.set_next(p2) > s = Wx::StaticText.new(p2, -1, 'This is the second page') > p3 = Wx::WizardPageSimple.new(w, p2) > p2.set_next(p3) > s = Wx::StaticText.new(p3, -1, 'This is the final page') > > evt_wizard_page_changed(w.get_id) { p "page changed" } > evt_wizard_page_changing(w.get_id) { p "page changing" } > evt_wizard_help(w.get_id) { p "wizard help" } > evt_wizard_cancel(w.get_id) { p "wizard cancelled" } > evt_wizard_finished(w.get_id) { p "wizard finished" } > > > w.run_wizard(p1) > end > > def onQuit > close(Wx::TRUE) > end > > def onAbout > msg = sprintf("This is the About dialog of the wizard sample.\n" \ > "Welcome to %s", Wx::VERSION_STRING) > message_box(msg, "About Wizard", Wx::OK|Wx::ICON_INFORMATION, self) > end > end > > class RbApp < Wx::App > def on_init > frame = MyFrame.new("Wizard wxRuby App", > Wx::Point.new(50, 50), > Wx::Size.new(450, 340)) > > frame.show(TRUE) > > end > end > > app = RbApp.new > app.main_loop() > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > >