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,68 +1,56 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
13
9
  require 'date'
14
10
 
15
11
  class TestPanel < Wx::Panel
16
- def initialize(parent, id, log)
17
- super(parent, id)
18
- @log = log
19
-
20
- date = DateTime.now
21
- cal = Wx::CalendarCtrl.new(self, -1, date, Wx::Point.new(25,50), Wx::DEFAULT_SIZE,
22
- Wx::CAL_SHOW_HOLIDAYS | Wx::CAL_SUNDAY_FIRST | Wx::CAL_SEQUENTIAL_MONTH_SELECTION)
23
-
24
- evt_calendar(cal.get_id()) {|event| on_cal_selected(event)}
25
-
26
- #b = Wx::Button.new(self, -1, "Destroy the Calendar", Wx::Point.new(250,50))
27
- #evt_button(b.get_id()) {|event| on_button(event)}
28
- @cal = cal
29
-
30
- # Set up control to display a set of holidays:
31
- evt_calendar_month(cal.get_id()) {|event| on_change_month(event)}
32
- @holidays = [[1,1], [10,31], [12,25]] #(these don't move around)
33
-
34
- end
35
-
36
- #def on_button(event)
37
- # @cal.destroy()
38
- # @cal = nil
39
- #end
12
+ attr_reader :cal
13
+
14
+ def initialize(parent, id, log)
15
+ super(parent, id)
16
+ @log = log
40
17
 
41
- def on_cal_selected(event)
42
- @log.write_text("on_cal_selected: " + event.get_date().strftime("%F"))
43
- end
18
+ date = DateTime.now
19
+ @cal = Wx::CalendarCtrl.new(self, :date => date, :pos => [ 25, 50 ],
20
+ :style => Wx::CAL_SHOW_HOLIDAYS|
21
+ Wx::CAL_SUNDAY_FIRST|
22
+ Wx::CAL_SEQUENTIAL_MONTH_SELECTION)
44
23
 
45
- # missing get_current_month() method
46
- def on_change_month(event)
47
- #~ cur_month = @cal.get_date().get_current_month() + 1
48
- #~ @holidays.each do |date|
49
- #~ if date[0] == cur_month
50
- #~ @cal.set_holiday(date[1])
51
- #~ end
52
- #~ end
53
- event.skip()
54
- end
24
+ evt_calendar cal, :on_cal_selected
25
+ # Set up control to display a set of holidays:
26
+ evt_calendar_month cal, :on_change_month
27
+ @holidays = [ [1,1], [10,31], [12,25] ] #(these don't move around)
28
+ end
29
+ def on_cal_selected(event)
30
+ @log.write_text( "on_cal_selected: " + event.date.strftime("%F") )
31
+ end
32
+
33
+ # missing get_current_month() method
34
+ def on_change_month(event)
35
+ #~ cur_month = @cal.get_date().get_current_month() + 1
36
+ #~ @holidays.each do |date|
37
+ #~ if date[0] == cur_month
38
+ #~ @cal.set_holiday(date[1])
39
+ #~ end
40
+ #~ end
41
+ event.skip()
42
+ end
55
43
  end
56
44
 
57
45
  module Demo
58
- def Demo.run(frame, nb, log)
59
- win = TestPanel.new(nb, -1, log)
60
- return win
61
- end
46
+ def Demo.run(frame, nb, log)
47
+ win = TestPanel.new(nb, -1, log)
48
+ return win
49
+ end
62
50
 
63
- def Demo.overview
64
- return "The calendar control allows the user to pick a date interactively. For this, it displays a window containing several parts: the control to pick the month and the year at the top (either or both of them may be disabled) and a month area below them which shows all the days in the month. The user can move the current selection using the keyboard and select the date (generating EVT_CALENDAR event) by pressing <Return> or double clicking it."
65
- end
51
+ def Demo.overview
52
+ return "The calendar control allows the user to pick a date interactively. For this, it displays a window containing several parts: the control to pick the month and the year at the top (either or both of them may be disabled) and a month area below them which shows all the days in the month. The user can move the current selection using the keyboard and select the date (generating EVT_CALENDAR event) by pressing <Return> or double clicking it."
53
+ end
66
54
  end
67
55
 
68
56
  if __FILE__ == $0
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  class TestCheckBox < Wx::Panel
15
13
  def initialize(parent, log)
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  class TestPanel < Wx::Panel
15
13
  def initialize(parent, log)
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  class TestChoice < Wx::Panel
15
13
  def initialize(parent, log)
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  class TestCB < Wx::Choicebook
15
13
  def initialize(parent, log)
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  module Demo
15
13
  def Demo.run(frame, nb, log)
@@ -19,7 +17,6 @@ module Demo
19
17
  data = dlg.get_colour_data().get_colour()
20
18
  log.write_text("You selected: (%d, %d, %d)" % [data.red, data.green, data.blue])
21
19
  end
22
- dlg.destroy()
23
20
  end
24
21
 
25
22
  def Demo.overview
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  class TestComboBox < Wx::Panel
15
13
 
@@ -1,17 +1,13 @@
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
+
10
+
15
11
 
16
12
  Cursors = [
17
13
  "Wx::CURSOR_ARROW",
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  class TestDialog < Wx::Dialog
15
13
  def initialize(parent, id, title)
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  module Demo
15
13
  def Demo.run(frame, nb, log)
@@ -17,7 +15,6 @@ module Demo
17
15
  if dlg.show_modal() == Wx::ID_OK
18
16
  log.write_text("You selected: " + dlg.get_path())
19
17
  end
20
- dlg.destroy()
21
18
  end
22
19
 
23
20
  def Demo.overview
@@ -1,17 +1,13 @@
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
+
10
+
15
11
 
16
12
  class DragPanel < Wx::Panel
17
13
 
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  $wildcard = "Ruby Source (*.rb)|*.rb|RubyW Source (*.rbw)|*.rbw|All files (*.*)|*.*"
15
13
 
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  $wildcard = "Ruby Source (*.rb)|*.rb|RubyW Source (*.rbw)|*.rbw|SPAM files (*.spam)|*.spam|Egg file (*.egg)|*.egg|All Files (*.*)|*.*"
15
13
 
@@ -22,7 +20,6 @@ module Demo
22
20
  path = dlg.get_path()
23
21
  log.write_text("You selected " + path)
24
22
  log.write_text("CWD: " + Dir.getwd())
25
- dlg.destroy()
26
23
  end
27
24
  end
28
25
 
@@ -1,15 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+ # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
3
+ # Freely reusable code: see SAMPLES-LICENSE.TXT for details
3
4
  begin
4
- require 'wx'
5
- rescue LoadError => no_wx_err
6
- begin
7
- require 'rubygems'
8
- require 'wx'
9
- rescue LoadError
10
- raise no_wx_err
11
- end
5
+ require 'rubygems'
6
+ rescue LoadError
12
7
  end
8
+ require 'wx'
9
+
10
+
13
11
 
14
12
  class TestPanel < Wx::Panel
15
13
  def initialize(parent, log)
@@ -62,7 +60,6 @@ class TestPanel < Wx::Panel
62
60
 
63
61
  def on_find_close(evt)
64
62
  @log.write_text("Wx::FindReplaceDialog closing...")
65
- evt.get_dialog().destroy()
66
63
  end
67
64
 
68
65
  end