wxruby 1.9.5-i386-mswin32 → 1.9.7-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. data/lib/wx/classes/acceleratortable.rb +28 -0
  2. data/lib/wx/classes/animation.rb +18 -0
  3. data/lib/wx/classes/bitmap.rb +5 -0
  4. data/lib/wx/classes/busycursor.rb +12 -0
  5. data/lib/wx/classes/evthandler.rb +36 -21
  6. data/lib/wx/classes/functions.rb +44 -0
  7. data/lib/wx/classes/grid.rb +16 -7
  8. data/lib/wx/classes/htmlwindow.rb +8 -0
  9. data/lib/wx/classes/icon.rb +7 -0
  10. data/lib/wx/classes/iconbundle.rb +3 -0
  11. data/lib/wx/classes/image.rb +17 -0
  12. data/lib/wx/classes/imagelist.rb +3 -0
  13. data/lib/wx/classes/toolbartool.rb +4 -0
  14. data/lib/wx/classes/xmlresource.rb +21 -0
  15. data/lib/wx/keyword_ctors.rb +9 -6
  16. data/lib/wx/keyword_defs.rb +7 -0
  17. data/lib/wx/version.rb +1 -1
  18. data/lib/wxruby2.exp +0 -0
  19. data/lib/wxruby2.lib +0 -0
  20. data/lib/wxruby2.so +0 -0
  21. data/samples/aui/aui.rb +6 -10
  22. data/samples/bigdemo/ColorPanel.rbw +7 -9
  23. data/samples/bigdemo/GridSimple.rbw +7 -9
  24. data/samples/bigdemo/MDIDemo.rbw +7 -9
  25. data/samples/bigdemo/PopupMenu.rbw +7 -9
  26. data/samples/bigdemo/ShapedWindow.rbw +6 -10
  27. data/samples/bigdemo/Sizers.rbw +7 -9
  28. data/samples/bigdemo/bigdemo.rb +24 -25
  29. data/samples/bigdemo/demoTemplate.rbw +6 -10
  30. data/samples/bigdemo/run.rb +6 -10
  31. data/samples/bigdemo/wxArtProvider.rbw +6 -10
  32. data/samples/bigdemo/wxBitmapButton.rbw +42 -41
  33. data/samples/bigdemo/wxButton.rbw +7 -9
  34. data/samples/bigdemo/wxCalendarCtrl.rbw +41 -53
  35. data/samples/bigdemo/wxCheckBox.rbw +7 -9
  36. data/samples/bigdemo/wxCheckListBox.rbw +7 -9
  37. data/samples/bigdemo/wxChoice.rbw +7 -9
  38. data/samples/bigdemo/wxChoicebook.rbw +7 -9
  39. data/samples/bigdemo/wxColourDialog.rbw +7 -10
  40. data/samples/bigdemo/wxComboBox.rbw +7 -9
  41. data/samples/bigdemo/wxCursor.rbw +6 -10
  42. data/samples/bigdemo/wxDialog.rbw +7 -9
  43. data/samples/bigdemo/wxDirDialog.rbw +7 -10
  44. data/samples/bigdemo/wxDragImage.rbw +6 -10
  45. data/samples/bigdemo/wxFileDialog.rbw +7 -9
  46. data/samples/bigdemo/wxFileDialog_Save.rbw +7 -10
  47. data/samples/bigdemo/wxFindReplaceDialog.rbw +7 -10
  48. data/samples/bigdemo/wxFontDialog.rbw +7 -10
  49. data/samples/bigdemo/wxFrame.rbw +7 -9
  50. data/samples/bigdemo/wxGauge.rbw +7 -9
  51. data/samples/bigdemo/wxGenericDirCtrl.rbw +6 -10
  52. data/samples/bigdemo/wxGrid.rbw +7 -9
  53. data/samples/bigdemo/wxHtmlHelpController.rbw +6 -11
  54. data/samples/bigdemo/wxListBox.rbw +7 -9
  55. data/samples/bigdemo/wxListCtrl_virtual.rbw +7 -9
  56. data/samples/bigdemo/wxMDIWindows.rbw +7 -9
  57. data/samples/bigdemo/wxMenu.rbw +7 -9
  58. data/samples/bigdemo/wxMessageDialog.rbw +7 -10
  59. data/samples/bigdemo/wxMiniFrame.rbw +6 -10
  60. data/samples/bigdemo/wxMultipleChoiceDialog.rbw +7 -9
  61. data/samples/bigdemo/wxNotebook.rbw +7 -9
  62. data/samples/bigdemo/wxProgressDialog.rbw +7 -9
  63. data/samples/bigdemo/wxRadioBox.rbw +7 -9
  64. data/samples/bigdemo/wxRadioButton.rbw +7 -9
  65. data/samples/bigdemo/wxSashWindow.rbw +6 -10
  66. data/samples/bigdemo/wxScrolledMessageDialog.rbw +7 -9
  67. data/samples/bigdemo/wxScrolledWindow.rbw +7 -9
  68. data/samples/bigdemo/wxSingleChoiceDialog.rbw +7 -9
  69. data/samples/bigdemo/wxSlider.rbw +7 -9
  70. data/samples/bigdemo/wxSpinButton.rbw +7 -9
  71. data/samples/bigdemo/wxSpinCtrl.rbw +7 -9
  72. data/samples/bigdemo/wxSplitterWindow.rbw +7 -9
  73. data/samples/bigdemo/wxStaticBitmap.rbw +7 -9
  74. data/samples/bigdemo/wxStaticText.rbw +7 -9
  75. data/samples/bigdemo/wxStatusBar.rbw +7 -9
  76. data/samples/bigdemo/wxTextCtrl.rbw +7 -9
  77. data/samples/bigdemo/wxTextEntryDialog.rbw +7 -10
  78. data/samples/bigdemo/wxToggleButton.rbw +7 -9
  79. data/samples/bigdemo/wxToolBar.rbw +7 -9
  80. data/samples/bigdemo/wxTreeCtrl.rbw +7 -9
  81. data/samples/calendar/calendar.rb +6 -10
  82. data/samples/caret/caret.rb +6 -10
  83. data/samples/controls/controls.rb +6 -10
  84. data/samples/dialogs/dialogs.rb +10 -11
  85. data/samples/dragdrop/dragdrop.rb +177 -0
  86. data/samples/drawing/graphics_drawing.rb +6 -7
  87. data/samples/drawing/images.rb +5 -10
  88. data/samples/etc/activation.rb +4 -10
  89. data/samples/etc/choice.rb +5 -10
  90. data/samples/etc/miniframe.rb +5 -10
  91. data/samples/etc/sash.rb +5 -10
  92. data/samples/etc/scrollwin.rb +4 -10
  93. data/samples/etc/system_settings.rb +4 -10
  94. data/samples/etc/threaded.rb +4 -10
  95. data/samples/etc/wizard.rb +5 -10
  96. data/samples/event/event.rb +3 -5
  97. data/samples/grid/grid.rb +5 -9
  98. data/samples/grid/gridtablebase.rb +134 -0
  99. data/samples/html/html.rb +4 -10
  100. data/samples/listbook/listbook.rb +4 -11
  101. data/samples/mdi/mdi.rb +5 -10
  102. data/samples/media/mediactrl.rb +4 -10
  103. data/samples/minimal/minimal.rb +18 -26
  104. data/samples/minimal/nothing.rb +5 -10
  105. data/samples/opengl/cube.rb +8 -14
  106. data/samples/printing/printing.rb +5 -179
  107. data/samples/text/scintilla.rb +5 -10
  108. data/samples/text/textctrl.rb +27 -38
  109. data/samples/text/unicode.rb +6 -2
  110. data/samples/treectrl/treectrl.rb +4 -10
  111. data/samples/xrc/xrc_sample.rb +6 -17
  112. metadata +12 -2
@@ -1,17 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
- # wxRuby2 Sample Code. Copyright (c) 2004-2006 Kevin B. Smith
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
3
  # Freely reusable code: see SAMPLES-LICENSE.TXT for details
4
-
5
4
  begin
6
- require 'wx'
7
- rescue LoadError => no_wx_err
8
- begin
9
- require 'rubygems'
10
- require 'wx'
11
- rescue LoadError
12
- raise no_wx_err
13
- end
5
+ require 'rubygems'
6
+ rescue LoadError
14
7
  end
8
+ require 'wx'
9
+
15
10
  include Wx
16
11
 
17
12
 
@@ -1,17 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
- # wxRuby2 Sample Code. Copyright (c) 2004-2006 Kevin B. Smith
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
3
  # Freely reusable code: see SAMPLES-LICENSE.TXT for details
4
-
5
4
  begin
6
- require 'wx'
7
- rescue LoadError => no_wx_err
8
- begin
9
- require 'rubygems'
10
- require 'wx'
11
- rescue LoadError
12
- raise no_wx_err
13
- end
5
+ require 'rubygems'
6
+ rescue LoadError
14
7
  end
8
+ require 'wx'
15
9
 
16
10
  class InformativeTextCtrl < Wx::TextCtrl
17
11
  NEWLINE_CORRECTION_FACTOR = 0
@@ -19,8 +13,8 @@ class InformativeTextCtrl < Wx::TextCtrl
19
13
  # These text controls are multiline, and may have rich (coloured,
20
14
  # styled) text in them
21
15
  STYLE = Wx::TE_MULTILINE|Wx::TE_RICH|Wx::TE_RICH2
22
- def initialize(parent, text)
23
- super(parent, -1, text, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, STYLE)
16
+ def initialize(parent, text = '')
17
+ super(parent, :value => text, :style => STYLE)
24
18
  end
25
19
 
26
20
  # more ruby-ish
@@ -45,29 +39,28 @@ end
45
39
  class LogTextCtrl < Wx::TextCtrl
46
40
  STYLE = Wx::TE_READONLY|Wx::TE_MULTILINE
47
41
  def initialize(parent)
48
- super(parent, -1, '', Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, STYLE)
42
+ super(parent, :style => STYLE)
49
43
  end
50
44
  end
51
45
 
52
46
  class TextCtrlFrame < Wx::Frame
53
- def initialize(title, pos, size)
54
- super(nil, -1, title, pos, size)
47
+ def initialize(*args)
48
+ super(nil, *args)
55
49
 
56
- panel = Wx::Panel.new(self, -1)
50
+ panel = Wx::Panel.new(self)
57
51
  sizer = Wx::BoxSizer.new(Wx::VERTICAL)
58
52
 
59
- @textctrl = InformativeTextCtrl.new(panel, '')
53
+ @textctrl = InformativeTextCtrl.new(panel)
60
54
  populate_textctrl()
61
55
  sizer.add(@textctrl, 2, Wx::GROW|Wx::ALL, 2)
62
56
 
63
- button = Wx::Button.new(panel, -1, 'Get Info')
57
+ button = Wx::Button.new(panel, :label => 'Get Info')
64
58
  sizer.add(button, 0, Wx::ADJUST_MINSIZE|Wx::ALL, 2 )
65
- evt_button(button.get_id) { | e | on_click(e) }
59
+ evt_button button, :on_click
66
60
 
67
61
  @log = LogTextCtrl.new(panel)
68
62
  sizer.add(@log, 1, Wx::GROW|Wx::ALL, 2)
69
-
70
- panel.set_sizer( sizer )
63
+ panel.sizer = sizer
71
64
  end
72
65
 
73
66
  def populate_textctrl()
@@ -86,39 +79,35 @@ class TextCtrlFrame < Wx::Frame
86
79
  menu_file = Wx::Menu.new()
87
80
  menu_file.append(Wx::ID_EXIT, "E&xit\tAlt-X", "Quit this program")
88
81
  menu_bar.append(menu_file, "&File")
89
- evt_menu(Wx::ID_EXIT) { on_quit() }
82
+ evt_menu Wx::ID_EXIT, :on_quit
90
83
 
91
84
  menu_help = Wx::Menu.new()
92
85
  menu_help.append(Wx::ID_ABOUT, "&About...\tF1", "Show about dialog")
93
- evt_menu(Wx::ID_ABOUT) { on_about() }
86
+ evt_menu Wx::ID_ABOUT, :on_about
94
87
  menu_bar.append(menu_help, "&Help")
95
88
 
96
- set_menu_bar(menu_bar)
89
+ self.menu_bar = menu_bar
97
90
  end
98
91
 
99
- def on_click(e)
100
- @log.set_value( @textctrl.report() )
92
+ def on_click
93
+ @log.value = @textctrl.report
101
94
  end
102
95
 
103
- def on_quit()
104
- close(TRUE)
96
+ def on_quit
97
+ close
105
98
  end
106
99
 
107
- def on_about()
100
+ def on_about
108
101
  msg = sprintf("This is the About dialog of the textctrl sample.\n" \
109
102
  "Welcome to %s", Wx::VERSION_STRING)
110
103
  message_box(msg, "About Minimal", Wx::OK|Wx::ICON_INFORMATION, self)
111
104
  end
112
105
  end
113
106
 
114
- class RbApp < Wx::App
115
- def on_init()
116
- frame = TextCtrlFrame.new("TextCtrl demonstration",
117
- Wx::Point.new(50, 50),
118
- Wx::Size.new(450, 340) )
119
-
120
- frame.show(true)
121
- end
107
+ Wx::App.run do
108
+ frame = TextCtrlFrame.new( :title => "TextCtrl demonstration",
109
+ :pos => [ 50, 50 ],
110
+ :size => [ 450, 340 ] )
111
+ frame.show
122
112
  end
123
113
 
124
- RbApp.new().main_loop()
@@ -1,6 +1,10 @@
1
- # wxRuby2 Sample Code. Copyright (c) 2004-2006 Kevin B. Smith
1
+ #!/usr/bin/env ruby
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
2
3
  # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
-
4
+ begin
5
+ require 'rubygems'
6
+ rescue LoadError
7
+ end
4
8
  # Tell ruby this script is written in UTF-8 encoded text.
5
9
  $KCODE = 'u'
6
10
 
@@ -1,17 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
- # wxRuby2 Sample Code. Copyright (c) 2004-2006 Kevin B. Smith
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
3
  # Freely reusable code: see SAMPLES-LICENSE.TXT for details
4
-
5
4
  begin
6
- require 'wx'
7
- rescue LoadError => no_wx_err
8
- begin
9
- require 'rubygems'
10
- require 'wx'
11
- rescue LoadError
12
- raise no_wx_err
13
- end
5
+ require 'rubygems'
6
+ rescue LoadError
14
7
  end
8
+ require 'wx'
15
9
 
16
10
  # This sample shows off the features of the TreeCtrl widget. The actual
17
11
  # features vary somewhat across platforms; for example, the button
@@ -1,17 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
- # wxRuby2 Sample Code. Copyright (c) 2004-2006 Kevin B. Smith
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
3
  # Freely reusable code: see SAMPLES-LICENSE.TXT for details
4
-
5
4
  begin
6
- require 'wx'
7
- rescue LoadError => no_wx_err
8
- begin
9
- require 'rubygems'
10
- require 'wx'
11
- rescue LoadError
12
- raise no_wx_err
13
- end
5
+ require 'rubygems'
6
+ rescue LoadError
14
7
  end
8
+ require 'wx'
15
9
 
16
10
  # Basic Frame Class. This creates the dialog window
17
11
  class SimpleFrame < Wx::Frame
@@ -88,14 +82,9 @@ end
88
82
  class XrcApp < Wx::App
89
83
 
90
84
  def on_init
91
- # Create a resource handler
92
- $xml = Wx::XmlResource.get();
93
- $xml.init_all_handlers();
94
-
95
-
96
- # Load a resource file
85
+ # Get a new resources object
97
86
  xrc_file = File.join( File.dirname(__FILE__), 'samples.xrc' )
98
- $xml.load(xrc_file)
87
+ $xml = Wx::XmlResource.new(xrc_file)
99
88
 
100
89
  # Show the main frame.
101
90
  main = SimpleFrame.new()
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: wxruby
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.9.5
7
- date: 2008-03-10 00:00:00 -07:00
6
+ version: 1.9.7
7
+ date: 2008-05-14 00:00:00 -07:00
8
8
  summary: Ruby interface to the wxWidgets GUI library
9
9
  require_paths:
10
10
  - lib
@@ -38,9 +38,12 @@ files:
38
38
  - lib/wx/keyword_ctors.rb
39
39
  - lib/wx/keyword_defs.rb
40
40
  - lib/wx/version.rb
41
+ - lib/wx/classes/acceleratortable.rb
42
+ - lib/wx/classes/animation.rb
41
43
  - lib/wx/classes/app.rb
42
44
  - lib/wx/classes/artprovider.rb
43
45
  - lib/wx/classes/bitmap.rb
46
+ - lib/wx/classes/busycursor.rb
44
47
  - lib/wx/classes/checklistbox.rb
45
48
  - lib/wx/classes/choice.rb
46
49
  - lib/wx/classes/clientdc.rb
@@ -53,13 +56,16 @@ files:
53
56
  - lib/wx/classes/event.rb
54
57
  - lib/wx/classes/evthandler.rb
55
58
  - lib/wx/classes/font.rb
59
+ - lib/wx/classes/functions.rb
56
60
  - lib/wx/classes/gauge.rb
57
61
  - lib/wx/classes/grid.rb
58
62
  - lib/wx/classes/helpcontroller.rb
59
63
  - lib/wx/classes/htmlhelpcontroller.rb
60
64
  - lib/wx/classes/htmlwindow.rb
61
65
  - lib/wx/classes/icon.rb
66
+ - lib/wx/classes/iconbundle.rb
62
67
  - lib/wx/classes/image.rb
68
+ - lib/wx/classes/imagelist.rb
63
69
  - lib/wx/classes/listbox.rb
64
70
  - lib/wx/classes/listctrl.rb
65
71
  - lib/wx/classes/locale.rb
@@ -77,6 +83,7 @@ files:
77
83
  - lib/wx/classes/textctrl.rb
78
84
  - lib/wx/classes/texturlevent.rb
79
85
  - lib/wx/classes/timer.rb
86
+ - lib/wx/classes/toolbartool.rb
80
87
  - lib/wx/classes/treectrl.rb
81
88
  - lib/wx/classes/window.rb
82
89
  - lib/wx/classes/xmlresource.rb
@@ -86,6 +93,7 @@ files:
86
93
  - samples/caret
87
94
  - samples/controls
88
95
  - samples/dialogs
96
+ - samples/dragdrop
89
97
  - samples/drawing
90
98
  - samples/etc
91
99
  - samples/event
@@ -234,6 +242,7 @@ files:
234
242
  - samples/controls/icons/text.xpm
235
243
  - samples/dialogs/dialogs.rb
236
244
  - samples/dialogs/tips.txt
245
+ - samples/dragdrop/dragdrop.rb
237
246
  - samples/drawing/graphics_drawing.rb
238
247
  - samples/drawing/images.rb
239
248
  - samples/drawing/paperclip.png
@@ -247,6 +256,7 @@ files:
247
256
  - samples/etc/wizard.rb
248
257
  - samples/event/event.rb
249
258
  - samples/grid/grid.rb
259
+ - samples/grid/gridtablebase.rb
250
260
  - samples/html/html.rb
251
261
  - samples/listbook/listbook.rb
252
262
  - samples/listbook/listbook.xrc