wxruby 1.9.2-i386-mswin32 → 1.9.3-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. data/LICENSE +53 -53
  2. data/README +299 -299
  3. data/lib/wx/classes/app.rb +6 -0
  4. data/lib/wx/classes/checklistbox.rb +45 -30
  5. data/lib/wx/classes/clipboard.rb +16 -0
  6. data/lib/wx/classes/event.rb +5 -0
  7. data/lib/wx/classes/evthandler.rb +20 -10
  8. data/lib/wx/classes/grid.rb +38 -39
  9. data/lib/wx/classes/listctrl.rb +12 -0
  10. data/lib/wx/classes/mediactrl.rb +22 -0
  11. data/lib/wx/classes/menu.rb +6 -6
  12. data/lib/wx/classes/sound.rb +23 -0
  13. data/lib/wx/classes/styledtextctrl.rb +2 -2
  14. data/lib/wx/classes/treectrl.rb +26 -0
  15. data/lib/wx/keyword_ctors.rb +19 -5
  16. data/lib/wx/keyword_defs.rb +20 -0
  17. data/lib/wx/version.rb +1 -1
  18. data/lib/wx.rb +42 -42
  19. data/lib/wxruby2.exp +0 -0
  20. data/lib/wxruby2.lib +0 -0
  21. data/lib/wxruby2.so +0 -0
  22. data/samples/SAMPLES-LICENSE.TXT +17 -17
  23. data/samples/aui/aui.rb +8 -1
  24. data/samples/bigdemo/About.rbw +39 -39
  25. data/samples/bigdemo/ColorPanel.rbw +25 -25
  26. data/samples/bigdemo/GridSimple.rbw +80 -80
  27. data/samples/bigdemo/MDIDemo.rbw +59 -59
  28. data/samples/bigdemo/PopupMenu.rbw +151 -151
  29. data/samples/bigdemo/Sizers.rbw +545 -545
  30. data/samples/bigdemo/bigdemo.rb +826 -826
  31. data/samples/bigdemo/demoTemplate.rbw +37 -37
  32. data/samples/bigdemo/icons/choice.xpm +27 -27
  33. data/samples/bigdemo/icons/combo.xpm +27 -27
  34. data/samples/bigdemo/icons/copy.xpm +25 -25
  35. data/samples/bigdemo/icons/cut.xpm +24 -24
  36. data/samples/bigdemo/icons/gauge.xpm +27 -27
  37. data/samples/bigdemo/icons/help.xpm +25 -25
  38. data/samples/bigdemo/icons/list.xpm +27 -27
  39. data/samples/bigdemo/icons/mondrian.xpm +44 -44
  40. data/samples/bigdemo/icons/new.xpm +24 -24
  41. data/samples/bigdemo/icons/ogl.ico +0 -0
  42. data/samples/bigdemo/icons/ogl.xpm +45 -45
  43. data/samples/bigdemo/icons/open.xpm +26 -26
  44. data/samples/bigdemo/icons/paste.xpm +38 -38
  45. data/samples/bigdemo/icons/preview.xpm +26 -26
  46. data/samples/bigdemo/icons/print.xpm +26 -26
  47. data/samples/bigdemo/icons/radio.xpm +27 -27
  48. data/samples/bigdemo/icons/robert.xpm +415 -415
  49. data/samples/bigdemo/icons/save.xpm +25 -25
  50. data/samples/bigdemo/icons/smiles.xpm +39 -39
  51. data/samples/bigdemo/icons/smiley.xpm +42 -42
  52. data/samples/bigdemo/icons/stattext.xpm +24 -24
  53. data/samples/bigdemo/icons/test2.bmp +0 -0
  54. data/samples/bigdemo/icons/test2.xpm +79 -79
  55. data/samples/bigdemo/icons/text.xpm +27 -27
  56. data/samples/bigdemo/icons/tog1.xpm +38 -38
  57. data/samples/bigdemo/icons/tog2.xpm +38 -38
  58. data/samples/bigdemo/icons/wxwin16x16.xpm +25 -25
  59. data/samples/bigdemo/tips.txt +7 -7
  60. data/samples/bigdemo/utils.rb +11 -11
  61. data/samples/bigdemo/wxButton.rbw +66 -66
  62. data/samples/bigdemo/wxCalendarCtrl.rbw +72 -72
  63. data/samples/bigdemo/wxCheckBox.rbw +52 -52
  64. data/samples/bigdemo/wxCheckListBox.rbw +77 -77
  65. data/samples/bigdemo/wxChoice.rbw +49 -49
  66. data/samples/bigdemo/wxColourDialog.rbw +34 -34
  67. data/samples/bigdemo/wxComboBox.rbw +79 -79
  68. data/samples/bigdemo/wxDialog.rbw +92 -92
  69. data/samples/bigdemo/wxDirDialog.rbw +32 -32
  70. data/samples/bigdemo/wxFileDialog.rbw +39 -39
  71. data/samples/bigdemo/wxFileDialog_Save.rbw +38 -38
  72. data/samples/bigdemo/wxFindReplaceDialog.rbw +85 -85
  73. data/samples/bigdemo/wxFontDialog.rbw +176 -176
  74. data/samples/bigdemo/wxFrame.rbw +55 -55
  75. data/samples/bigdemo/wxGauge.rbw +73 -73
  76. data/samples/bigdemo/wxGrid.rbw +68 -68
  77. data/samples/bigdemo/wxListBox.rbw +142 -142
  78. data/samples/bigdemo/wxListCtrl_virtual.rbw +109 -109
  79. data/samples/bigdemo/wxMDIWindows.rbw +52 -52
  80. data/samples/bigdemo/wxMenu.rbw +238 -238
  81. data/samples/bigdemo/wxMessageDialog.rbw +30 -30
  82. data/samples/bigdemo/wxMultipleChoiceDialog.rbw +34 -34
  83. data/samples/bigdemo/wxNotebook.rbw +138 -138
  84. data/samples/bigdemo/wxProgressDialog.rbw +45 -45
  85. data/samples/bigdemo/wxRadioBox.rbw +74 -74
  86. data/samples/bigdemo/wxRadioButton.rbw +127 -127
  87. data/samples/bigdemo/wxSashWindow.rbw +94 -104
  88. data/samples/bigdemo/wxScrolledMessageDialog.rbw +59 -59
  89. data/samples/bigdemo/wxScrolledWindow.rbw +201 -201
  90. data/samples/bigdemo/wxSingleChoiceDialog.rbw +35 -35
  91. data/samples/bigdemo/wxSlider.rbw +44 -44
  92. data/samples/bigdemo/wxSpinButton.rbw +52 -52
  93. data/samples/bigdemo/wxSpinCtrl.rbw +53 -53
  94. data/samples/bigdemo/wxSplitterWindow.rbw +65 -65
  95. data/samples/bigdemo/wxStaticBitmap.rbw +53 -53
  96. data/samples/bigdemo/wxStaticText.rbw +57 -57
  97. data/samples/bigdemo/wxStatusBar.rbw +128 -128
  98. data/samples/bigdemo/wxTextCtrl.rbw +151 -151
  99. data/samples/bigdemo/wxTextEntryDialog.rbw +34 -34
  100. data/samples/bigdemo/wxToggleButton.rbw +51 -51
  101. data/samples/bigdemo/wxToolBar.rbw +133 -133
  102. data/samples/bigdemo/wxTreeCtrl.rbw +192 -192
  103. data/samples/calendar/calendar.rb +275 -275
  104. data/samples/caret/caret.rb +286 -286
  105. data/samples/caret/mondrian.xpm +44 -44
  106. data/samples/controls/controls.rb +1140 -1140
  107. data/samples/controls/get_item_sample.rb +87 -87
  108. data/samples/controls/icons/choice.xpm +27 -27
  109. data/samples/controls/icons/combo.xpm +27 -27
  110. data/samples/controls/icons/gauge.xpm +27 -27
  111. data/samples/controls/icons/list.xpm +27 -27
  112. data/samples/controls/icons/radio.xpm +27 -27
  113. data/samples/controls/icons/stattext.xpm +24 -24
  114. data/samples/controls/icons/text.xpm +27 -27
  115. data/samples/controls/mondrian.xpm +44 -44
  116. data/samples/dialogs/dialogs.rb +724 -724
  117. data/samples/dialogs/tips.txt +18 -18
  118. data/samples/drawing/graphics_drawing.rb +232 -0
  119. data/samples/{images → drawing}/images.rb +48 -48
  120. data/samples/{images → drawing}/paperclip.png +0 -0
  121. data/samples/etc/activation.rb +108 -108
  122. data/samples/etc/choice.rb +72 -72
  123. data/samples/etc/miniframe.rb +84 -84
  124. data/samples/etc/sash.rb +135 -135
  125. data/samples/etc/scrollwin.rb +116 -116
  126. data/samples/etc/system_settings.rb +258 -258
  127. data/samples/etc/wizard.rb +79 -79
  128. data/samples/grid/grid.rb +1 -0
  129. data/samples/listbook/listbook.rb +181 -181
  130. data/samples/listbook/listbook.xrc +370 -370
  131. data/samples/mdi/mdi.rb +87 -87
  132. data/samples/media/mediactrl.rb +173 -0
  133. data/samples/minimal/minimal.rb +85 -85
  134. data/samples/minimal/nothing.rb +21 -21
  135. data/samples/opengl/cube.rb +123 -0
  136. data/samples/sockets/SocketPackets.rb +27 -0
  137. data/samples/sockets/res/message-new.png +0 -0
  138. data/samples/sockets/res/user.png +0 -0
  139. data/samples/sockets/wxClient.rb +395 -0
  140. data/samples/sockets/wxServer.rb +422 -0
  141. data/samples/sockets/wxSocketGUI.rb +97 -0
  142. data/samples/text/textctrl.rb +124 -124
  143. data/samples/text/unicode.rb +238 -238
  144. data/samples/text/utf8.txt +14 -14
  145. data/samples/treectrl/treectrl.rb +1180 -1181
  146. data/samples/xrc/samples.xrc +46 -46
  147. data/samples/xrc/xrc_sample.rb +107 -107
  148. metadata +26 -9
  149. data/samples/images/Thumbs.db +0 -0
data/README CHANGED
@@ -1,299 +1,299 @@
1
- README for wxruby2
2
-
3
- Version 1.9.x
4
-
5
- This is wxruby2, the second generation of wxRuby, a library
6
- that allows Ruby programs to use the wxWidgets GUI toolkit.
7
- It is released under a permissive MIT-style license
8
- (see the LICENSE file for details).
9
-
10
- This version is a beta release, in preparation for a stable release of
11
- wxruby version 2.0.
12
-
13
- ------------------------FAQ---------------------------
14
-
15
- - What platforms and operating systems are supported in wxRuby2?
16
-
17
- Currently the following are fully supported:
18
-
19
- Windows NT/2000/XP/Vista (i686)
20
- OS X 10.3+ (i686 and PowerPc)
21
- Linux (i686 + AMD-64)
22
-
23
- It is unlikely that support for old Windows OS's (3.1, 95, 98, ME)
24
- will be added to wxRuby2 in the near future, as these operating
25
- systems have very limited support for Unicode.
26
-
27
- - Why would I choose wxruby over FXRuby, Ruby/GTK, or one of the other
28
- GUI toolkits? Isn't wxruby arriving "too late"?
29
-
30
- There are several great GUI toolkits available for Ruby, but we
31
- like wxruby better because it has a combination of features that no
32
- other toolkit has:
33
-
34
- - Cross-platform (MSWindows, Mac OS X, Linux)
35
- - Native widgets when possible
36
- - Provides a wide selection of widgets
37
- - Simple license that is compatible with proprietary and Free Software
38
- - Mature foundation (wxWidgets has been around for over 10 years)
39
-
40
- The really big feature is native widgets. The only other cross-platform
41
- toolkits that use native widgets are either limited (Tk) or expensive if
42
- you want to develop proprietary software (Qt). We are not saying that
43
- those toolkits are bad! Just that wxruby offers a unique set of
44
- features.
45
-
46
- - Why are native widgets important or helpful?
47
-
48
- For one thing, it means that end-users do not have to adjust to a
49
- "foreign" interface. It also ensures maximum compatibility with
50
- "assistive technology" such as screen readers for blind users.
51
- It also allows apps to respect any themes the user may have chosen
52
- through their operating system. No matter how hard a toolkit may try
53
- to emulate a particular UI, there will always be differences in the
54
- look or behavior.
55
-
56
- - How does wxruby2 relate to wxruby (and the wxruby 0.6.0 release)?
57
-
58
- wxruby2 is the "next generation" of wxruby. It is being developed
59
- by the same wxruby team, and is intended to replace the older
60
- code base. wxruby2 is built using SWIG, a powerful tool that makes
61
- it much easier to create and maintain wrappers around C/C++ libraries.
62
-
63
- - Why should I use wxruby2 instead of wxruby?
64
-
65
- First, because development on the original wxruby codebase has stopped.
66
- Everyone is working on wxruby2, so it will continue to improve. Beyond
67
- that, wxruby2 has these advantages over wxruby 0.6.0:
68
-
69
- - Available as binary gems for MSWindows, OS X, and Linux (GTK)
70
- - Support for more classes, and more methods within classes
71
- - Unicode support
72
- - Vastly improved support for OS X
73
- - Looks much better under Linux because it uses GTK+2
74
- - Simpler and more permissive license
75
- - Wraps wxWidgets 2.8.3 instead of the older 2.4 series
76
-
77
- - Is wxruby2 ready for "production" use?
78
-
79
- Yes, pretty much. This is a beta release, and there may be some bugs
80
- in some methods, or memory leaks. This release includes all the
81
- classes and features that are proposed for inclusion in wxruby 2.0.
82
-
83
- It is considerably more stable and fully-featured than the old 0.6.0
84
- release, which was never really stable enough for heavy-duty
85
- production use.
86
-
87
- - Does wxruby2 support the Xxx class?
88
-
89
- See the "Documentation" section of the README file, or check the
90
- wxruby web site: http://wxruby.org
91
-
92
- - How are the wxruby 0.6.0 and wxruby2 licenses different?
93
-
94
- wxruby 0.6.0 was released under the wxWindows license, which is a
95
- modified LGPL. It is a good, fair license, allowing use in both Free
96
- Software and proprietary applications. However, it is long and complex,
97
- and is more appropriate for compiled code. wxruby2 is available under a
98
- *very* simple MIT-style license, which allows just about any use with
99
- very few restrictions.
100
-
101
- - I am getting an error trying to compile wxruby2
102
-
103
- Please double-check the requirements. You may be using the wrong
104
- version of SWIG, wxWidgets, or some other tool. Double-check the
105
- instructions on the wxRuby wiki (http://wxruby.rubyforge.org/)
106
-
107
- If you need help, please ask your question on the wxruby mailing list
108
- (see the link at http://wxruby.org).
109
-
110
- - I am getting an error trying to run any wxruby2 application, such as
111
- the samples that are included in the gem.
112
-
113
- If you are using Linux, be sure you have configured your system to
114
- have RUBYOPT=-rubygems. This can be done in .bashrc or /etc/environment,
115
- depending on your distribution and preferences. [More details to follow].
116
-
117
- - Why aren't the wx network, file, date, database and other non-GUI
118
- classes supported?
119
-
120
- Because Ruby has its own versions of each of them, providing
121
- cross-platform abstractions of these functions with familiar syntax
122
- and methods. We assume you are writing your application in Ruby, so it
123
- makes sense to keep as much code as possible in Ruby. We have only
124
- wrapped the wx classes that are necessary to write GUI code.
125
-
126
- There may be some advantages to porting the Wx network classes into
127
- ruby, if they work better with multi-(native)-threaded code. This is
128
- currently under evaluation.
129
-
130
- - Why has it taken so long for wxruby2 to be released?
131
-
132
- Nobody is getting paid to develop wxruby, so each of the wxruby developers
133
- are limited in the amount of time they can dedicate to the project. We are
134
- always looking for more volunteers to help code, test, document, manage
135
- the bug list, handle publicity, or do other necessary chores.
136
-
137
- Wrapping wx is a big project that requires a wide variety of skills. As of
138
- August 2006, the wxRuby project has about 30,000 lines of code, including
139
- ruby, C++, and SWIG scripts. If we weren't using SWIG it would be far bigger.
140
-
141
-
142
- For more details, see the project home page:
143
- http://wxruby.org/
144
-
145
-
146
- ------------------------USING WXRUBY---------------------------
147
- INSTALLING:
148
-
149
- wxRuby is available as binary gems for MS Windows, Mac OS X, and Linux
150
- with GTK+ 2. Unless you wish to work on wxRuby itself, we strongly
151
- recommend installing the gem rather than building from source.
152
-
153
- REQUIREMENTS TO CREATE AND RUN WXRUBY APPS:
154
-
155
- - Ruby 1.8
156
- - MS Windows NT/2000/XP/Vista, Mac OS X 10.3+, or Linux with GTK+ 2,
157
-
158
- SAMPLES:
159
-
160
- There is a samples/ directory containing many small sample wxRuby apps
161
- that demonstrate how to use various classes. A few samples do not work
162
- across all platforms at this time.
163
-
164
- The bigdemo sample is fairly comprehensive, but not all of the
165
- sections work on all platforms.
166
-
167
-
168
- WRITING YOUR OWN WXRUBY APP:
169
-
170
- To use wxruby-swig in your app, use:
171
- require 'wx'
172
-
173
- samples/minimal.rb can be used as a template for creating your
174
- own wxruby application.
175
-
176
-
177
- DOCUMENTATION:
178
-
179
- - wxRuby-specific API documentation can be found here:
180
-
181
- http://wxruby.org/doc/
182
-
183
- (Note: This documentation is auto-generated from the C++ wxWidgets API
184
- docs. There are some broken links, some sample code in C++, and some
185
- sections which do not apply to ruby. The documentation is continually
186
- being improved.)
187
-
188
- - The latest version of the documentation can be downloaded from the
189
- wxRuby 'Files' section on Rubyforge.
190
-
191
- http://www.rubyforge.org/frs/?group_id=35
192
-
193
- - Tables summarizing which wx classes are and are not supported can
194
- be found here:
195
-
196
- http://wxruby.org/wiki/wiki.pl?ClassesSupportedByCategory
197
-
198
- - Most wxWidgets and wxPython tutorials and references can also be used, if
199
- you remember that wxRuby uses ruby_style_naming for methods and variables
200
- instead of MixedCase as used by wxWidgets.
201
-
202
-
203
-
204
- API DIFFERENCES FROM WXWIDGETS:
205
- - In many cases, wxRuby follows the lead of wxPython (or in some cases,
206
- wxPerl), adjusting certain method calls when the C++ style doesn't fit
207
- dynamic languages.
208
- - Since initialize is reserved in ruby, use SplitterWindow#init instead.
209
- - Many wx classes have not been wrapped because native ruby classes work
210
- as well or better. These include wxDateTime, wxString, networking
211
- classes, database classes.
212
- - log_message and log_status take a single string parameter,
213
- rather than a format string followed by additional values
214
- to be inserted. Use Ruby's sprintf if required.
215
- - ScreenDC extends DC on all platforms, unlike in C++ wx.
216
- This means that you cannot override any virtual methods that were
217
- defined in PaintDC or WindowDC in a ruby subclass of ScreenDC.
218
- [Need to verify if this is still true]
219
- - BusyCursor can be used in a Ruby block to ensure the original cursor
220
- is always restored.
221
-
222
- ----------------------COMPILING WXRUBY--------------------------
223
- REQUIREMENTS TO COMPILE/BUILD WXRUBY ITSELF
224
-
225
- - rake
226
- - SWIG, version 1.3.31. SWIG 1.3.29 or later may work; earlier version
227
- definitely won't
228
- - wxWidgets 2.8.x SDK. See further information on the wxruby website for
229
- recommended compile-time options for wxWidgets.
230
-
231
-
232
- OBTAINING THE SOURCE:
233
-
234
- Source code is hosted in Subversion at rubyforge.org. See the links on
235
- the wxruby web site (http://wxruby.org). Check out the wxruby2
236
- Subversion module (not the old wxruby module).
237
-
238
-
239
- BUILDING:
240
-
241
- From the top-level directory (typically wxruby2/),
242
- just start the rake build with the command:
243
-
244
- rake
245
-
246
- There is no ./configure step, nor do you need to run ruby extconf.rb.
247
-
248
-
249
- INSTALLING THE LIBRARY:
250
-
251
- You can install the library using:
252
- rake install
253
-
254
- Note that on some systems you may need to be "root" to do this.
255
- To manually install, copy all the files in the lib/ subdirectory
256
- to somewhere on your ruby library path, such as a ruby extensions
257
- directory.
258
-
259
-
260
- PORTING TO OTHER PLATFORMS
261
-
262
- Platform-dependent rakefiles are used to set up compiler-specific
263
- settings. The following platforms are currently fully supported:
264
-
265
- Mac OSX (gcc): rakemacosx.rb
266
- MS Windows (VC++): rakemswin.rb
267
- Linux (GTK2 + gcc): rakelinux.rb
268
-
269
- For other platforms, you may need to edit the appropriate
270
- platform-dependent rake file if your system is not yet supported, or if
271
- it is unusual. These files are found in the rake subdirectory:
272
-
273
- MS Windows BC++: rakebccwin.rb
274
- MS Windows MingGW: rakemingw.rb
275
- MS Windows Cygwin: rakecygwin.rb
276
- NetBSD: rakenetbsd.rb
277
-
278
- When editing a platform-dependent rakefile, you might
279
- merely need to set one or more of the following variables:
280
-
281
- $extra_cppflags
282
- $extra_ldflags
283
- $extra_objs
284
- $extra_libs
285
-
286
-
287
- CREDITS
288
-
289
- Kevin Smith set up the wxruby2 project using SWIG and did much of the
290
- work that still forms the core of the library in its present form. Over
291
- the years dozens of volunteers have contributed invaluable patches and
292
- new functionality. The list is too long to give here, but their
293
- contributions are recorded in the wxruby mailing list archives.
294
-
295
- -----------------------------------------------------------
296
-
297
- LEAD MAINTAINER:
298
- Alex Fenton
299
- alex at pressure dot to
1
+ README for wxruby2
2
+
3
+ Version 1.9.x
4
+
5
+ This is wxruby2, the second generation of wxRuby, a library
6
+ that allows Ruby programs to use the wxWidgets GUI toolkit.
7
+ It is released under a permissive MIT-style license
8
+ (see the LICENSE file for details).
9
+
10
+ This version is a beta release, in preparation for a stable release of
11
+ wxruby version 2.0.
12
+
13
+ ------------------------FAQ---------------------------
14
+
15
+ - What platforms and operating systems are supported in wxRuby2?
16
+
17
+ Currently the following are fully supported:
18
+
19
+ Windows NT/2000/XP/Vista (i686)
20
+ OS X 10.3+ (i686 and PowerPc)
21
+ Linux (i686 + AMD-64)
22
+
23
+ It is unlikely that support for old Windows OS's (3.1, 95, 98, ME)
24
+ will be added to wxRuby2 in the near future, as these operating
25
+ systems have very limited support for Unicode.
26
+
27
+ - Why would I choose wxruby over FXRuby, Ruby/GTK, or one of the other
28
+ GUI toolkits? Isn't wxruby arriving "too late"?
29
+
30
+ There are several great GUI toolkits available for Ruby, but we
31
+ like wxruby better because it has a combination of features that no
32
+ other toolkit has:
33
+
34
+ - Cross-platform (MSWindows, Mac OS X, Linux)
35
+ - Native widgets when possible
36
+ - Provides a wide selection of widgets
37
+ - Simple license that is compatible with proprietary and Free Software
38
+ - Mature foundation (wxWidgets has been around for over 10 years)
39
+
40
+ The really big feature is native widgets. The only other cross-platform
41
+ toolkits that use native widgets are either limited (Tk) or expensive if
42
+ you want to develop proprietary software (Qt). We are not saying that
43
+ those toolkits are bad! Just that wxruby offers a unique set of
44
+ features.
45
+
46
+ - Why are native widgets important or helpful?
47
+
48
+ For one thing, it means that end-users do not have to adjust to a
49
+ "foreign" interface. It also ensures maximum compatibility with
50
+ "assistive technology" such as screen readers for blind users.
51
+ It also allows apps to respect any themes the user may have chosen
52
+ through their operating system. No matter how hard a toolkit may try
53
+ to emulate a particular UI, there will always be differences in the
54
+ look or behavior.
55
+
56
+ - How does wxruby2 relate to wxruby (and the wxruby 0.6.0 release)?
57
+
58
+ wxruby2 is the "next generation" of wxruby. It is being developed
59
+ by the same wxruby team, and is intended to replace the older
60
+ code base. wxruby2 is built using SWIG, a powerful tool that makes
61
+ it much easier to create and maintain wrappers around C/C++ libraries.
62
+
63
+ - Why should I use wxruby2 instead of wxruby?
64
+
65
+ First, because development on the original wxruby codebase has stopped.
66
+ Everyone is working on wxruby2, so it will continue to improve. Beyond
67
+ that, wxruby2 has these advantages over wxruby 0.6.0:
68
+
69
+ - Available as binary gems for MSWindows, OS X, and Linux (GTK)
70
+ - Support for more classes, and more methods within classes
71
+ - Unicode support
72
+ - Vastly improved support for OS X
73
+ - Looks much better under Linux because it uses GTK+2
74
+ - Simpler and more permissive license
75
+ - Wraps wxWidgets 2.8.3 instead of the older 2.4 series
76
+
77
+ - Is wxruby2 ready for "production" use?
78
+
79
+ Yes, pretty much. This is a beta release, and there may be some bugs
80
+ in some methods, or memory leaks. This release includes all the
81
+ classes and features that are proposed for inclusion in wxruby 2.0.
82
+
83
+ It is considerably more stable and fully-featured than the old 0.6.0
84
+ release, which was never really stable enough for heavy-duty
85
+ production use.
86
+
87
+ - Does wxruby2 support the Xxx class?
88
+
89
+ See the "Documentation" section of the README file, or check the
90
+ wxruby web site: http://wxruby.org
91
+
92
+ - How are the wxruby 0.6.0 and wxruby2 licenses different?
93
+
94
+ wxruby 0.6.0 was released under the wxWindows license, which is a
95
+ modified LGPL. It is a good, fair license, allowing use in both Free
96
+ Software and proprietary applications. However, it is long and complex,
97
+ and is more appropriate for compiled code. wxruby2 is available under a
98
+ *very* simple MIT-style license, which allows just about any use with
99
+ very few restrictions.
100
+
101
+ - I am getting an error trying to compile wxruby2
102
+
103
+ Please double-check the requirements. You may be using the wrong
104
+ version of SWIG, wxWidgets, or some other tool. Double-check the
105
+ instructions on the wxRuby wiki (http://wxruby.rubyforge.org/)
106
+
107
+ If you need help, please ask your question on the wxruby mailing list
108
+ (see the link at http://wxruby.org).
109
+
110
+ - I am getting an error trying to run any wxruby2 application, such as
111
+ the samples that are included in the gem.
112
+
113
+ If you are using Linux, be sure you have configured your system to
114
+ have RUBYOPT=-rubygems. This can be done in .bashrc or /etc/environment,
115
+ depending on your distribution and preferences. [More details to follow].
116
+
117
+ - Why aren't the wx network, file, date, database and other non-GUI
118
+ classes supported?
119
+
120
+ Because Ruby has its own versions of each of them, providing
121
+ cross-platform abstractions of these functions with familiar syntax
122
+ and methods. We assume you are writing your application in Ruby, so it
123
+ makes sense to keep as much code as possible in Ruby. We have only
124
+ wrapped the wx classes that are necessary to write GUI code.
125
+
126
+ There may be some advantages to porting the Wx network classes into
127
+ ruby, if they work better with multi-(native)-threaded code. This is
128
+ currently under evaluation.
129
+
130
+ - Why has it taken so long for wxruby2 to be released?
131
+
132
+ Nobody is getting paid to develop wxruby, so each of the wxruby developers
133
+ are limited in the amount of time they can dedicate to the project. We are
134
+ always looking for more volunteers to help code, test, document, manage
135
+ the bug list, handle publicity, or do other necessary chores.
136
+
137
+ Wrapping wx is a big project that requires a wide variety of skills. As of
138
+ August 2006, the wxRuby project has about 30,000 lines of code, including
139
+ ruby, C++, and SWIG scripts. If we weren't using SWIG it would be far bigger.
140
+
141
+
142
+ For more details, see the project home page:
143
+ http://wxruby.org/
144
+
145
+
146
+ ------------------------USING WXRUBY---------------------------
147
+ INSTALLING:
148
+
149
+ wxRuby is available as binary gems for MS Windows, Mac OS X, and Linux
150
+ with GTK+ 2. Unless you wish to work on wxRuby itself, we strongly
151
+ recommend installing the gem rather than building from source.
152
+
153
+ REQUIREMENTS TO CREATE AND RUN WXRUBY APPS:
154
+
155
+ - Ruby 1.8
156
+ - MS Windows NT/2000/XP/Vista, Mac OS X 10.3+, or Linux with GTK+ 2,
157
+
158
+ SAMPLES:
159
+
160
+ There is a samples/ directory containing many small sample wxRuby apps
161
+ that demonstrate how to use various classes. A few samples do not work
162
+ across all platforms at this time.
163
+
164
+ The bigdemo sample is fairly comprehensive, but not all of the
165
+ sections work on all platforms.
166
+
167
+
168
+ WRITING YOUR OWN WXRUBY APP:
169
+
170
+ To use wxruby-swig in your app, use:
171
+ require 'wx'
172
+
173
+ samples/minimal.rb can be used as a template for creating your
174
+ own wxruby application.
175
+
176
+
177
+ DOCUMENTATION:
178
+
179
+ - wxRuby-specific API documentation can be found here:
180
+
181
+ http://wxruby.org/doc/
182
+
183
+ (Note: This documentation is auto-generated from the C++ wxWidgets API
184
+ docs. There are some broken links, some sample code in C++, and some
185
+ sections which do not apply to ruby. The documentation is continually
186
+ being improved.)
187
+
188
+ - The latest version of the documentation can be downloaded from the
189
+ wxRuby 'Files' section on Rubyforge.
190
+
191
+ http://www.rubyforge.org/frs/?group_id=35
192
+
193
+ - Tables summarizing which wx classes are and are not supported can
194
+ be found here:
195
+
196
+ http://wxruby.org/wiki/wiki.pl?ClassesSupportedByCategory
197
+
198
+ - Most wxWidgets and wxPython tutorials and references can also be used, if
199
+ you remember that wxRuby uses ruby_style_naming for methods and variables
200
+ instead of MixedCase as used by wxWidgets.
201
+
202
+
203
+
204
+ API DIFFERENCES FROM WXWIDGETS:
205
+ - In many cases, wxRuby follows the lead of wxPython (or in some cases,
206
+ wxPerl), adjusting certain method calls when the C++ style doesn't fit
207
+ dynamic languages.
208
+ - Since initialize is reserved in ruby, use SplitterWindow#init instead.
209
+ - Many wx classes have not been wrapped because native ruby classes work
210
+ as well or better. These include wxDateTime, wxString, networking
211
+ classes, database classes.
212
+ - log_message and log_status take a single string parameter,
213
+ rather than a format string followed by additional values
214
+ to be inserted. Use Ruby's sprintf if required.
215
+ - ScreenDC extends DC on all platforms, unlike in C++ wx.
216
+ This means that you cannot override any virtual methods that were
217
+ defined in PaintDC or WindowDC in a ruby subclass of ScreenDC.
218
+ [Need to verify if this is still true]
219
+ - BusyCursor can be used in a Ruby block to ensure the original cursor
220
+ is always restored.
221
+
222
+ ----------------------COMPILING WXRUBY--------------------------
223
+ REQUIREMENTS TO COMPILE/BUILD WXRUBY ITSELF
224
+
225
+ - rake
226
+ - SWIG, version 1.3.31. SWIG 1.3.29 or later may work; earlier version
227
+ definitely won't, nor will later versions such as 1.3.33
228
+ - wxWidgets 2.8.x SDK. See further information on the wxruby website for
229
+ recommended compile-time options for wxWidgets.
230
+
231
+
232
+ OBTAINING THE SOURCE:
233
+
234
+ Source code is hosted in Subversion at rubyforge.org. See the links on
235
+ the wxruby web site (http://wxruby.org). Check out the wxruby2
236
+ Subversion module (not the old wxruby module).
237
+
238
+
239
+ BUILDING:
240
+
241
+ From the top-level directory (typically wxruby2/),
242
+ just start the rake build with the command:
243
+
244
+ rake
245
+
246
+ There is no ./configure step, nor do you need to run ruby extconf.rb.
247
+
248
+
249
+ INSTALLING THE LIBRARY:
250
+
251
+ You can install the library using:
252
+ rake install
253
+
254
+ Note that on some systems you may need to be "root" to do this.
255
+ To manually install, copy all the files in the lib/ subdirectory
256
+ to somewhere on your ruby library path, such as a ruby extensions
257
+ directory.
258
+
259
+
260
+ PORTING TO OTHER PLATFORMS
261
+
262
+ Platform-dependent rakefiles are used to set up compiler-specific
263
+ settings. The following platforms are currently fully supported:
264
+
265
+ Mac OSX (gcc): rakemacosx.rb
266
+ MS Windows (VC++): rakemswin.rb
267
+ Linux (GTK2 + gcc): rakelinux.rb
268
+
269
+ For other platforms, you may need to edit the appropriate
270
+ platform-dependent rake file if your system is not yet supported, or if
271
+ it is unusual. These files are found in the rake subdirectory:
272
+
273
+ MS Windows BC++: rakebccwin.rb
274
+ MS Windows MingGW: rakemingw.rb
275
+ MS Windows Cygwin: rakecygwin.rb
276
+ NetBSD: rakenetbsd.rb
277
+
278
+ When editing a platform-dependent rakefile, you might
279
+ merely need to set one or more of the following variables:
280
+
281
+ $extra_cppflags
282
+ $extra_ldflags
283
+ $extra_objs
284
+ $extra_libs
285
+
286
+
287
+ CREDITS
288
+
289
+ Kevin Smith set up the wxruby2 project using SWIG and did much of the
290
+ work that still forms the core of the library in its present form. Over
291
+ the years dozens of volunteers have contributed invaluable patches and
292
+ new functionality. The list is too long to give here, but their
293
+ contributions are recorded in the wxruby mailing list archives.
294
+
295
+ -----------------------------------------------------------
296
+
297
+ LEAD MAINTAINER:
298
+ Alex Fenton
299
+ alex at pressure dot to
@@ -16,6 +16,12 @@ class Wx::App
16
16
  the_app.main_loop
17
17
  end
18
18
 
19
+ # This is a class method in Wx, but permit it to be an instance method
20
+ # in wxRuby
21
+ def is_main_loop_running
22
+ Wx::App.is_main_loop_running
23
+ end
24
+
19
25
  # This method handles failed assertions from within the WxWidgets C++
20
26
  # code. These messages are only generated by a DEBUG build of
21
27
  # WxRuby. Such messages usually indicate that the API is being used