Ruby rocks! HELP converting Ruby to C++?

Hello Ruby experts,

I spent a week doing http://rubyforge.org/projects/wxryplot/ in Ruby.
Granted, it is not much but the Ruby code works. I have spent a month
trying to do this same thing in C++ and I AM STUCK, help!.

I need to use legacy C++ code in a C++ environment on a Windows 2000
machine. I would like to request your expertise converting this simple Ruby
program to C++. In am using wxWidgets in C++. It may be easier to embed
this Ruby code into C++ however, it seems unnecessary to embed an entire
language (namely Ruby into C++) for such a simple program.

The following Ruby code is a whittled down version of
http://rubyforge.org/frs/?group_id=287. This code was written using Ruby
version 1.8.1-13 the accompanying wxRuby on a Windows 2000 machine.

[Begin Ruby code]
require 'wxruby'

class MyDrawingFrame < Wx::Frame
   def initialize(*args)
     super(*args)
     evt_paint {on_paint}
   end
   def on_paint
     paint do |dc|
       dc.clear
       dc.draw_line(10, 20, 100, 200) #draw single line
     end
   end
end

class MyApp < Wx::App
   def on_init()
     frame = MyDrawingFrame.new(nil, -1, 'MyFrame')
     frame.show()
   end
end

MyApp.new().main_loop()
[end Ruby code]

Any assistance or pointers would be greatly appreciated. So far, I have
tried but had little assistance from wx-users@lists.wxwidgets.org.

Thank you,

Todd

···

--
Todd Gardner
San Jose, CA 95128