wxruby3 0.9.0.pre.beta.9-x64-mingw-ucrt → 0.9.0.pre.beta.11-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/ext/wxbase32u_gcc_custom.dll +0 -0
  3. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  4. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  5. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  6. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  7. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  8. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  9. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  10. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  11. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  12. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  13. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  14. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  15. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  16. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  17. data/lib/wx/core/bitmap.rb +7 -0
  18. data/lib/wx/core/choice.rb +3 -0
  19. data/lib/wx/core/combobox.rb +3 -0
  20. data/lib/wx/core/controlwithitems.rb +98 -2
  21. data/lib/wx/core/data_object.rb +74 -6
  22. data/lib/wx/core/icon.rb +7 -1
  23. data/lib/wx/core/imagelist.rb +11 -0
  24. data/lib/wx/core/listbox.rb +3 -0
  25. data/lib/wx/core/point.rb +21 -10
  26. data/lib/wx/core/real_point.rb +21 -10
  27. data/lib/wx/core/rect.rb +2 -2
  28. data/lib/wx/core/size.rb +12 -5
  29. data/lib/wx/doc/data_object.rb +104 -0
  30. data/lib/wx/doc/gdi_common.rb +33 -5
  31. data/lib/wx/doc/gen/control_with_items.rb +3 -131
  32. data/lib/wx/doc/gen/core.rb +2 -2
  33. data/lib/wx/doc/gen/data_object.rb +0 -20
  34. data/lib/wx/doc/gen/data_object_simple_base.rb +10 -0
  35. data/lib/wx/doc/gen/image_list.rb +9 -10
  36. data/lib/wx/doc/gen/progress_dialog.rb +0 -20
  37. data/lib/wx/doc/gen/prt/print_data.rb +5 -0
  38. data/lib/wx/doc/gen/scaled_dc.rb +10 -0
  39. data/lib/wx/doc/progress_dialog.rb +37 -0
  40. data/lib/wx/doc/scaled_dc.rb +16 -0
  41. data/lib/wx/global_const.rb +4 -3
  42. data/lib/wx/version.rb +1 -1
  43. data/lib/wxruby_aui.so +0 -0
  44. data/lib/wxruby_core.so +0 -0
  45. data/lib/wxruby_grid.so +0 -0
  46. data/lib/wxruby_html.so +0 -0
  47. data/lib/wxruby_pg.so +0 -0
  48. data/lib/wxruby_prt.so +0 -0
  49. data/lib/wxruby_rbn.so +0 -0
  50. data/lib/wxruby_rtc.so +0 -0
  51. data/lib/wxruby_stc.so +0 -0
  52. data/rakelib/lib/config/mingw.rb +3 -0
  53. data/samples/dialogs/dialogs.rb +70 -50
  54. data/samples/drawing/maths_images.rb +1 -1
  55. data/samples/sampler/ext.rb +3 -3
  56. data/samples/sampler/stc_editor.rb +19 -19
  57. data/samples/sampler/txt_editor.rb +2 -2
  58. data/samples/treectrl/treectrl.rb +32 -30
  59. data/tests/lib/wxapp_runner.rb +64 -0
  60. data/tests/test_basic.rb +0 -5
  61. data/tests/test_clipboard.rb +114 -17
  62. data/tests/test_dialog.rb +2 -13
  63. data/tests/test_event_handling.rb +2 -13
  64. data/tests/test_events.rb +2 -6
  65. data/tests/test_geometry.rb +54 -17
  66. data/tests/test_intl.rb +2 -15
  67. data/tests/test_item_data.rb +69 -15
  68. data/tests/test_variant.rb +1 -15
  69. data/tests/testapp.rb +0 -5
  70. data/tests/testapp_noframe.rb +0 -5
  71. metadata +13 -3
@@ -28,53 +28,16 @@ module Wx
28
28
  # @param item [String] String to add.
29
29
  # @param clientData [Object] Pointer to client data to associate with the new item.
30
30
  # @return [Integer]
31
- # @overload append(item, clientData)
32
- # Appends item into the control.
33
- # The return value is the index of the newly inserted item. Note that this may be different from the last one if the control is sorted (e.g. has {Wx::LB_SORT} or {Wx::CB_SORT} style).
34
- # @param item [String] String to add.
35
- # @param clientData [Wx::ClientData] Pointer to client data to associate with the new item.
36
- # @return [Integer]
37
31
  # @overload append(items)
38
32
  # Appends several items at once into the control.
39
33
  # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
40
34
  # @param items [Array<String>] Array of strings to insert.
41
35
  # @return [Integer]
42
- # @overload append(items)
43
- # Appends several items at once into the control.
44
- # This is the same as the overload taking {Wx::ArrayString}, except that it works with the standard vector container.
45
- # @param items [std::vector< wxString >]
46
- # @return [Integer]
47
36
  # @overload append(items, clientData)
48
37
  # Appends several items at once into the control.
49
38
  # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
50
39
  # @param items [Array<String>] Array of strings to insert.
51
- # @param clientData [void] Array of client data pointers of the same size as items to associate with the new items.
52
- # @return [Integer]
53
- # @overload append(items, clientData)
54
- # Appends several items at once into the control.
55
- # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
56
- # @param items [Array<String>] Array of strings to insert.
57
- # @param clientData [Wx::ClientData] Array of client data pointers of the same size as items to associate with the new items.
58
- # @return [Integer]
59
- # @overload append(n, items)
60
- # Appends several items at once into the control.
61
- # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
62
- # @param n [Integer] Number of items in the items array.
63
- # @param items [String] Array of strings of size n.
64
- # @return [Integer]
65
- # @overload append(n, items, clientData)
66
- # Appends several items at once into the control.
67
- # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
68
- # @param n [Integer] Number of items in the items array.
69
- # @param items [String] Array of strings of size n.
70
- # @param clientData [void] Array of client data pointers of size n to associate with the new items.
71
- # @return [Integer]
72
- # @overload append(n, items, clientData)
73
- # Appends several items at once into the control.
74
- # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
75
- # @param n [Integer] Number of items in the items array.
76
- # @param items [String] Array of strings of size n.
77
- # @param clientData [Wx::ClientData] Array of client data pointers of size n to associate with the new items.
40
+ # @param clientData [Array] Array of client data pointers of the same size as items to associate with the new items.
78
41
  # @return [Integer]
79
42
  def append(*args) end
80
43
 
@@ -107,13 +70,6 @@ module Wx
107
70
  # @param pos [Integer] Position to insert item before, zero based.
108
71
  # @param clientData [Object] Pointer to client data to associate with the new item.
109
72
  # @return [Integer]
110
- # @overload insert(item, pos, clientData)
111
- # Inserts item into the control.
112
- # The return value is the index of the newly inserted item. If the insertion failed for some reason, -1 is returned.
113
- # @param item [String] String to add.
114
- # @param pos [Integer] Position to insert item before, zero based.
115
- # @param clientData [Wx::ClientData] Pointer to client data to associate with the new item.
116
- # @return [Integer]
117
73
  # @overload insert(items, pos)
118
74
  # Inserts several items at once into the control.
119
75
  # Notice that calling this method is usually much faster than inserting them one by one if you need to insert a lot of items.
@@ -129,45 +85,7 @@ module Wx
129
85
  # The return value is the index of the last inserted item. If the insertion failed for some reason, -1 is returned.
130
86
  # @param items [Array<String>] Array of strings to insert.
131
87
  # @param pos [Integer] Position to insert the items before, zero based.
132
- # @param clientData [void] Array of client data pointers of the same size as items to associate with the new items.
133
- # @return [Integer]
134
- # @overload insert(items, pos, clientData)
135
- # Inserts several items at once into the control.
136
- # Notice that calling this method is usually much faster than inserting them one by one if you need to insert a lot of items.
137
- #
138
- # The return value is the index of the last inserted item. If the insertion failed for some reason, -1 is returned.
139
- # @param items [Array<String>] Array of strings to insert.
140
- # @param pos [Integer] Position to insert the items before, zero based.
141
- # @param clientData [Wx::ClientData] Array of client data pointers of the same size as items to associate with the new items.
142
- # @return [Integer]
143
- # @overload insert(n, items, pos)
144
- # Inserts several items at once into the control.
145
- # Notice that calling this method is usually much faster than inserting them one by one if you need to insert a lot of items.
146
- #
147
- # The return value is the index of the last inserted item. If the insertion failed for some reason, -1 is returned.
148
- # @param n [Integer] Number of items in the items array.
149
- # @param items [String] Array of strings of size n.
150
- # @param pos [Integer] Position to insert the items before, zero based.
151
- # @return [Integer]
152
- # @overload insert(n, items, pos, clientData)
153
- # Inserts several items at once into the control.
154
- # Notice that calling this method is usually much faster than inserting them one by one if you need to insert a lot of items.
155
- #
156
- # The return value is the index of the last inserted item. If the insertion failed for some reason, -1 is returned.
157
- # @param n [Integer] Number of items in the items array.
158
- # @param items [String] Array of strings of size n.
159
- # @param pos [Integer] Position to insert the new items before, zero based.
160
- # @param clientData [void] Array of client data pointers of size n to associate with the new items.
161
- # @return [Integer]
162
- # @overload insert(n, items, pos, clientData)
163
- # Inserts several items at once into the control.
164
- # Notice that calling this method is usually much faster than inserting them one by one if you need to insert a lot of items.
165
- #
166
- # The return value is the index of the last inserted item. If the insertion failed for some reason, -1 is returned.
167
- # @param n [Integer] Number of items in the items array.
168
- # @param items [String] Array of strings of size n.
169
- # @param pos [Integer] Position to insert the new items before, zero based.
170
- # @param clientData [Wx::ClientData] Array of client data pointers of size n to associate with the new items.
88
+ # @param clientData [Array] Array of client data pointers of the same size as items to associate with the new items.
171
89
  # @return [Integer]
172
90
  def insert(*args) end
173
91
 
@@ -176,42 +94,11 @@ module Wx
176
94
  # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
177
95
  # @param items [Array<String>] Array of strings to insert.
178
96
  # @return [void]
179
- # @overload set(items)
180
- # Replaces the current control contents with the given items.
181
- # This is the same as the overload taking {Wx::ArrayString}, except that it works with the standard vector container.
182
- # @param items [std::vector< wxString >]
183
- # @return [void]
184
97
  # @overload set(items, clientData)
185
98
  # Replaces the current control contents with the given items.
186
99
  # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
187
100
  # @param items [Array<String>] Array of strings to insert.
188
- # @param clientData [void] Array of client data pointers of the same size as items to associate with the new items.
189
- # @return [void]
190
- # @overload set(items, clientData)
191
- # Replaces the current control contents with the given items.
192
- # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
193
- # @param items [Array<String>] Array of strings to insert.
194
- # @param clientData [Wx::ClientData] Array of client data pointers of the same size as items to associate with the new items.
195
- # @return [void]
196
- # @overload set(n, items)
197
- # Replaces the current control contents with the given items.
198
- # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
199
- # @param n [Integer] Number of items in the items array.
200
- # @param items [String] Array of strings of size n.
201
- # @return [void]
202
- # @overload set(n, items, clientData)
203
- # Replaces the current control contents with the given items.
204
- # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
205
- # @param n [Integer] Number of items in the items array.
206
- # @param items [String] Array of strings of size n.
207
- # @param clientData [void] Array of client data pointers of size n to associate with the new items.
208
- # @return [void]
209
- # @overload set(n, items, clientData)
210
- # Replaces the current control contents with the given items.
211
- # Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
212
- # @param n [Integer] Number of items in the items array.
213
- # @param items [String] Array of strings of size n.
214
- # @param clientData [Wx::ClientData] Array of client data pointers of size n to associate with the new items.
101
+ # @param clientData [Array] Array of client data pointers of the same size as items to associate with the new items.
215
102
  # @return [void]
216
103
  def set(*args) end
217
104
 
@@ -228,26 +115,11 @@ module Wx
228
115
  # @return [void]
229
116
  def delete(n) end
230
117
 
231
- # Returns the client object associated with the given item and transfers its ownership to the caller.
232
- # This method, unlike {Wx::ControlWithItems#get_client_object}, expects the caller to delete the returned pointer. It also replaces the internally stored pointer with NULL, i.e. completely detaches the client object pointer from the control.
233
- # It's an error to call this method unless {Wx::ControlWithItems#has_client_object_data} returns true.
234
- #
235
- # The associated client object pointer to be deleted by caller or NULL.
236
- # @param n [Integer] The zero-based item index.
237
- # @return [Wx::ClientData]
238
- def detach_client_object(n) end
239
-
240
118
  # Returns true, if either untyped data (<code>void*</code>) or object data ({Wx::ClientData}*) is associated with the items of the control.
241
119
  # @return [true,false]
242
120
  def has_client_data; end
243
121
  alias_method :has_client_data?, :has_client_data
244
122
 
245
- # Returns true, if object data is associated with the items of the control.
246
- # Object data pointers have the type <code>wxClientData*</code> instead of <code>void*</code> and, importantly, are owned by the control, i.e. will be deleted by it, unlike their untyped counterparts.
247
- # @return [true,false]
248
- def has_client_object_data; end
249
- alias_method :has_client_object_data?, :has_client_object_data
250
-
251
123
  # Returns true, if untyped data (<code>void*</code>) is associated with the items of the control.
252
124
  # @return [true,false]
253
125
  def has_client_untyped_data; end
@@ -7,10 +7,10 @@
7
7
  module Wx
8
8
 
9
9
  # wxRuby version string
10
- Wx::WXRUBY_VERSION = '0.9.0-beta.9'
10
+ Wx::WXRUBY_VERSION = '0.9.0-beta.11'
11
11
 
12
12
  # wxRuby version release type (alpha, beta, rc)
13
- Wx::WXRUBY_RELEASE_TYPE = 'beta.9'
13
+ Wx::WXRUBY_RELEASE_TYPE = 'beta.11'
14
14
  # wxRuby major version number
15
15
  Wx::WXRUBY_MAJOR = 0
16
16
  # wxRuby minor version number
@@ -85,12 +85,6 @@ module Wx
85
85
  def get_data_here(format) end
86
86
  alias_method :data_here, :get_data_here
87
87
 
88
- # Returns the data size of the given format format.
89
- # @param format [Wx::DataFormat]
90
- # @return [Integer]
91
- def get_data_size(format) end
92
- alias_method :data_size, :get_data_size
93
-
94
88
  # Returns the number of available formats for rendering or setting the data.
95
89
  # @param dir [Direction]
96
90
  # @return [Integer]
@@ -122,20 +116,6 @@ module Wx
122
116
 
123
117
  end # DataObject
124
118
 
125
- # This is the simplest possible implementation of the {Wx::DataObject} class.
126
- # The data object of (a class derived from) this class only supports <b>one format</b>, so the number of virtual functions to be implemented is reduced.
127
- # Notice that this is still an abstract base class and cannot be used directly, it must be derived. The objects supporting rendering the data must override {Wx::DataObjectSimple#get_data_size} and {Wx::DataObjectSimple#get_data_here} while the objects which may be set must override {Wx::DataObjectSimple#set_data}. Of course, the objects supporting both operations must override all three methods.
128
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl}, you need to derive your data object class from Wx::PlDataObjectSimple.
129
- # ===
130
- #
131
- # Category: Clipboard and Drag & Drop
132
- # @see Drag and Drop Overview
133
- # @see Drag & Drop Sample
134
- # @see Wx::FileDataObject
135
- # @see Wx::TextDataObject
136
- # @see Wx::BitmapDataObject
137
- #
138
- #
139
119
  class DataObjectSimple < DataObject
140
120
 
141
121
  # Constructor accepts the supported format (none by default) which may also be set later with {Wx::DataObjectSimple#set_format}.
@@ -0,0 +1,10 @@
1
+ # :stopdoc:
2
+ # This file is automatically generated by the WXRuby3 documentation
3
+ # generator. Do not alter this file.
4
+ # :startdoc:
5
+
6
+
7
+ module Wx
8
+
9
+
10
+ end
@@ -73,18 +73,17 @@ module Wx
73
73
  # @param bitmap [Wx::Bitmap] Bitmap representing the opaque areas of the image.
74
74
  # @param maskColour [Wx::Colour,String,Symbol] Colour indicating which parts of the image are transparent.
75
75
  # @return [Integer]
76
+ # @overload add(icon)
77
+ # Adds a new image using an icon.
78
+ # The logical size of the icon should be the same as the size specified when constructing {Wx::ImageList}.
79
+ #
80
+ # The new zero-based image index.
81
+ #
82
+ # Availability: only available for the {Wx::MSW}, {Wx::OSX/Cocoa} ports. {Wx::msw},{Wx::osx}
83
+ # @param icon [Wx::Icon] Icon to use as the image.
84
+ # @return [Integer]
76
85
  def add(*args) end
77
86
 
78
- # Adds a new image using an icon.
79
- # The logical size of the icon should be the same as the size specified when constructing {Wx::ImageList}.
80
- #
81
- # The new zero-based image index.
82
- #
83
- # Availability: only available for the {Wx::MSW}, {Wx::OSX/Cocoa} ports. {Wx::msw},{Wx::osx}
84
- # @param icon [Wx::Icon] Icon to use as the image.
85
- # @return [Integer]
86
- def add_icon(icon) end
87
-
88
87
  # Initializes the list.
89
88
  # See {Wx::ImageList#image_list} for details.
90
89
  # This function can be called only once after creating the object using its default ctor or after calling {Wx::ImageList#destroy}.
@@ -58,15 +58,6 @@ module Wx
58
58
  def get_message; end
59
59
  alias_method :message, :get_message
60
60
 
61
- # Like {Wx::ProgressDialog#update} but makes the gauge control run in indeterminate mode.
62
- # In indeterminate mode the remaining and the estimated time labels (if present) are set to "Unknown" or to newmsg (if it's non-empty). Each call to this function moves the progress bar a bit to indicate that some progress was done.
63
- # @see Wx::Gauge#pulse
64
- # @see Wx::ProgressDialog#update
65
- # @param newmsg [String]
66
- # @param skip [bool]
67
- # @return [true,false]
68
- def pulse(newmsg=Wx::EMPTY_STRING, skip=nil) end
69
-
70
61
  # Can be used to continue with the dialog, after the user had clicked the "Abort" button.
71
62
  # @return [void]
72
63
  def resume; end
@@ -89,17 +80,6 @@ module Wx
89
80
  # @return [true,false]
90
81
  def was_skipped; end
91
82
 
92
- # Updates the dialog, setting the progress bar to the new value and updating the message if new one is specified.
93
- # Returns true unless the "Cancel" button has been pressed.
94
- # If false is returned, the application can either immediately destroy the dialog or ask the user for the confirmation and if the abort is not confirmed the dialog may be resumed with {Wx::ProgressDialog#resume} function.
95
- # If value is the maximum value for the dialog, the behaviour of the function depends on whether {Wx::PD_AUTO_HIDE} was used when the dialog was created. If it was, the dialog is hidden and the function returns immediately. If it was not, the dialog becomes a modal dialog and waits for the user to dismiss it, meaning that this function does not return until this happens.
96
- # Notice that if newmsg is longer than the currently shown message, the dialog will be automatically made wider to account for it. However if the new message is shorter than the previous one, the dialog doesn't shrink back to avoid constant resizes if the message is changed often. To do this and fit the dialog to its current contents you may call {Wx::ProgressDialog#fit} explicitly. However the native MSW implementation of this class does make the dialog shorter if the new text has fewer lines of text than the old one, so it is recommended to keep the number of lines of text constant in order to avoid jarring dialog size changes. You may also want to make the initial message, specified when creating the dialog, wide enough to avoid having to resize the dialog later, e.g. by appending a long string of unbreakable spaces ({Wx::String}(L'\u00a0', 100)) to it.
97
- # @param value [Integer] The new value of the progress meter. It should be less than or equal to the maximum value given to the constructor.
98
- # @param newmsg [String] The new messages for the progress dialog text, if it is empty (which is the default) the message is not changed.
99
- # @param skip [bool] If "Skip" button was pressed since last {Wx::ProgressDialog#update} call, this is set to true.
100
- # @return [true,false]
101
- def update(value, newmsg=Wx::EMPTY_STRING, skip=nil) end
102
-
103
83
  end # ProgressDialog
104
84
 
105
85
 
@@ -331,6 +331,11 @@ module Wx::PRT
331
331
  def get_no_copies; end
332
332
  alias_method :no_copies, :get_no_copies
333
333
 
334
+ # Returns a reference to the internal {Wx::PRT::PrintData} object.
335
+ # @return [Wx::PrintData]
336
+ def get_print_data; end
337
+ alias_method :print_data, :get_print_data
338
+
334
339
  # Returns true if the user has selected printing to a file.
335
340
  # @return [true,false]
336
341
  def get_print_to_file; end
@@ -0,0 +1,10 @@
1
+ # :stopdoc:
2
+ # This file is automatically generated by the WXRuby3 documentation
3
+ # generator. Do not alter this file.
4
+ # :startdoc:
5
+
6
+
7
+ module Wx
8
+
9
+
10
+ end
@@ -0,0 +1,37 @@
1
+
2
+ class Wx::ProgressDialog
3
+
4
+ # Updates the dialog, setting the progress bar to the new value and updating the message if new one is specified.
5
+ #
6
+ # Returns <code>false</code> if the "Cancel" button has been pressed, <code>true</code> if neither "Cancel" nor
7
+ # "Skip" has been pressed and <code>:skipped</code> if "Skip" has been pressed.
8
+ #
9
+ # If false is returned, the application can either immediately destroy the dialog or ask the user for the confirmation
10
+ # and if the abort is not confirmed the dialog may be resumed with #resume method.
11
+ #
12
+ # If value is the maximum value for the dialog, the behaviour of the function depends on whether Wx::PD_AUTO_HIDE was
13
+ # used when the dialog was created. If it was, the dialog is hidden and the function returns immediately. If it was
14
+ # not, the dialog becomes a modal dialog and waits for the user to dismiss it, meaning that this function does not
15
+ # return until this happens.
16
+ #
17
+ # Notice that if newmsg is longer than the currently shown message, the dialog will be automatically made wider to
18
+ # account for it. However if the new message is shorter than the previous one, the dialog doesn't shrink back to
19
+ # avoid constant resizes if the message is changed often. To do this and fit the dialog to its current contents you
20
+ # may call fit explicitly. An alternative would be to keep the number of lines of text constant in order to avoid
21
+ # jarring dialog size changes. You may also want to make the initial message, specified when creating the dialog,
22
+ # wide enough to avoid having to resize the dialog later, e.g. by appending a long string of unbreakable spaces
23
+ # (wxString(L'\u00a0', 100)) to it.
24
+ # @param [Integer] value The new value of the progress meter. It should be less than or equal to the maximum value given to the constructor.
25
+ # @param [String] newmsg The new messages for the progress dialog text, if it is empty (which is the default) the message is not changed.
26
+ # @return [Boolean,:skipped]
27
+ def update(value, newmsg = '') end
28
+
29
+ # Like #update but makes the gauge control run in indeterminate mode.
30
+ #
31
+ # In indeterminate mode the remaining and the estimated time labels (if present) are set to "Unknown" or to newmsg
32
+ # (if it's non-empty). Each call to this function moves the progress bar a bit to indicate that some progress was done.
33
+ # @param [String] newmsg
34
+ # @return [Boolean,:skipped]
35
+ def pulse(newmsg = '') end
36
+
37
+ end
@@ -0,0 +1,16 @@
1
+
2
+ class Wx
3
+
4
+ class ScaledDC < Wx::DC
5
+
6
+ private :initialize
7
+
8
+ # Creates a Wx::ScaledDC instance for target and scale and
9
+ # passes the instance to the given block to draw on.
10
+ # @param [Wx::DC] target DC to draw on (scaled)
11
+ # @param [Float] scale scale factor
12
+ # @yieldparam [Wx::ScaledDC] dc scaled dc to draw on
13
+ def self.draw_on(target, scale) end
14
+ end
15
+
16
+ end
@@ -4,7 +4,7 @@
4
4
  module WxGlobalConstants
5
5
 
6
6
  class << self
7
- def search_nested(mod, sym)
7
+ def search_nested(mod, sym, path = [])
8
8
  # check any nested modules and/or (enum) classes
9
9
  const_val = nil
10
10
  mod.constants.each do |c|
@@ -16,11 +16,12 @@ module WxGlobalConstants
16
16
  elsif cv.name.start_with?('Wx::') # only search Wx namespace
17
17
  # prevent const_missing being triggered here since that may lead to unexpected results
18
18
  const_val = cv.const_get(sym) if cv.constants.include?(sym)
19
- const_val = search_nested(cv, sym) unless const_val
19
+ const_val = search_nested(cv, sym, path+[mod]) unless const_val || path.include?(cv)
20
20
  end
21
21
  when ::Module
22
22
  if cv.name.start_with?('Wx::') # only search Wx namespace
23
- const_val = cv.const_get(sym) rescue nil
23
+ const_val = cv.const_get(sym) if cv.constants.include?(sym)
24
+ const_val = search_nested(cv, sym, path+[mod]) unless const_val || path.include?(cv)
24
25
  end
25
26
  end unless mod == cv # watch out for infinite recursion
26
27
  break if const_val
data/lib/wx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wx
2
- WXRUBY_VERSION = '0.9.0-beta.9'
2
+ WXRUBY_VERSION = '0.9.0-beta.11'
3
3
  end
data/lib/wxruby_aui.so CHANGED
Binary file
data/lib/wxruby_core.so CHANGED
Binary file
data/lib/wxruby_grid.so CHANGED
Binary file
data/lib/wxruby_html.so CHANGED
Binary file
data/lib/wxruby_pg.so CHANGED
Binary file
data/lib/wxruby_prt.so CHANGED
Binary file
data/lib/wxruby_rbn.so CHANGED
Binary file
data/lib/wxruby_rtc.so CHANGED
Binary file
data/lib/wxruby_stc.so CHANGED
Binary file
@@ -122,6 +122,9 @@ module WXRuby3
122
122
  @rescomp << ' --define __WXMSW__ --define wxUSE_DPI_AWARE_MANIFEST=2 --define wxUSE_RC_MANIFEST=1 --define ISOLATION_AWARE_ENABLED'
123
123
  @rescomp << ' --define WXUSINGDLL'
124
124
  @extra_cflags << '-DISOLATION_AWARE_ENABLED'
125
+ if @wx_version >= '3.3.0'
126
+ @extra_cflags << '-D_UNICODE' << '-DUNICODE'
127
+ end
125
128
  end
126
129
  end
127
130
  private :init_platform
@@ -36,6 +36,7 @@ DIALOGS_STYLED_BUSYINFO = 25
36
36
  DIALOGS_FIND = 26
37
37
  DIALOGS_REPLACE = 27
38
38
  DIALOGS_PREFS = 28
39
+ DIALOGS_PREFS_TOOLBOOK = 29
39
40
 
40
41
  class MyTipProvider < TipProvider
41
42
  TIPS = [
@@ -147,16 +148,18 @@ end
147
148
  # PropertySheetDialog is specialised for doing preferences dialogs; it
148
149
  # contains a BookCtrl of some sort
149
150
  class MyPrefsDialog < Wx::PropertySheetDialog
150
- def initialize(parent)
151
+ def initialize(parent, pref_type)
151
152
  # Using Book type other than Notebook needs two-step construction
152
153
  super()
153
- self.sheet_style = Wx::PROPSHEET_BUTTONTOOLBOOK
154
- self.sheet_outer_border = 1
155
- self.sheet_inner_border = 2
156
- img_list = Wx::ImageList.new(32, 32)
157
- img_list << std_bitmap(Wx::ART_NORMAL_FILE)
158
- img_list << std_bitmap(Wx::ART_CDROM)
159
- img_list << std_bitmap(Wx::ART_REPORT_VIEW)
154
+ if pref_type == DIALOGS_PREFS_TOOLBOOK
155
+ self.sheet_style = Wx::PROPSHEET_BUTTONTOOLBOOK
156
+ self.sheet_outer_border = 1
157
+ self.sheet_inner_border = 2
158
+ img_list = Wx::ImageList.new(32, 32)
159
+ img_list << std_bitmap(Wx::ART_NORMAL_FILE)
160
+ img_list << std_bitmap(Wx::ART_CDROM)
161
+ img_list << std_bitmap(Wx::ART_REPORT_VIEW)
162
+ end
160
163
 
161
164
  create(parent, -1, "Preferences")
162
165
  create_buttons(Wx::ID_OK|Wx::ID_CANCEL)
@@ -247,40 +250,41 @@ class MyFrame < Frame
247
250
  @index = -1
248
251
  @index_2 = -1
249
252
 
250
- @max = 10
253
+ @max = 100
251
254
 
252
255
  create_status_bar()
253
256
 
254
- evt_menu(DIALOGS_CHOOSE_COLOUR) {|event| on_choose_colour(event) }
255
- evt_menu(DIALOGS_CHOOSE_FONT) {|event| on_choose_font(event) }
256
- evt_menu(DIALOGS_LOG_DIALOG) {|event| on_log_dialog(event) }
257
- evt_menu(DIALOGS_MESSAGE_BOX) {|event| on_message_box(event) }
258
- evt_menu(DIALOGS_TEXT_ENTRY) {|event| on_text_entry(event) }
259
- evt_menu(DIALOGS_PASSWORD_ENTRY) {|event| on_password_entry(event) }
260
- evt_menu(DIALOGS_NUM_ENTRY) {|event| on_numeric_entry(event) }
261
- evt_menu(DIALOGS_SINGLE_CHOICE) {|event| on_single_choice(event) }
262
- evt_menu(DIALOGS_MULTI_CHOICE) {|event| on_multi_choice(event) }
263
- evt_menu(DIALOGS_FILE_OPEN) {|event| on_file_open(event) }
264
- evt_menu(DIALOGS_FILE_OPEN2) {|event| on_file_open2(event) }
265
- evt_menu(DIALOGS_FILES_OPEN) {|event| on_files_open(event) }
266
- evt_menu(DIALOGS_FILE_SAVE) {|event| on_file_save(event) }
267
- evt_menu(DIALOGS_DIR_CHOOSE) {|event| on_dir_choose(event) }
268
- evt_menu(DIALOGS_MODAL) {|event| on_modal_dlg(event) }
269
- evt_menu(DIALOGS_MODELESS) {|event| on_modeless_dlg(event) }
270
- evt_menu(DIALOGS_TIP) {|event| on_show_tip(event) }
271
- evt_menu(DIALOGS_CUSTOM_TIP) {|event| on_show_custom_tip(event) }
272
- evt_menu(DIALOGS_PROGRESS) {|event| on_show_progress(event) }
273
- evt_menu(DIALOGS_BUSYINFO) {|event| on_show_busy_info(event) }
274
- evt_menu(DIALOGS_STYLED_BUSYINFO) {|event| on_show_styled_busy_info(event) }
275
- evt_menu(DIALOGS_PREFS) {|event| on_show_prefs(event) }
276
- evt_menu(DIALOGS_FIND) {|event| on_show_find_dialog(event) }
277
- evt_menu(DIALOGS_REPLACE) {|event| on_show_replace_dialog(event) }
278
- evt_find(-1) {|event| on_find_dialog(event) }
279
- evt_find_next(-1) {|event| on_find_dialog(event) }
280
- evt_find_replace(-1) {|event| on_find_dialog(event) }
281
- evt_find_replace_all(-1) {|event| on_find_dialog(event) }
282
- evt_find_close(-1) {|event| on_find_dialog(event) }
283
- evt_menu(ID_EXIT) {|event| on_exit(event) }
257
+ evt_menu(DIALOGS_CHOOSE_COLOUR, :on_choose_colour)
258
+ evt_menu(DIALOGS_CHOOSE_FONT, :on_choose_font)
259
+ evt_menu(DIALOGS_LOG_DIALOG, :on_log_dialog)
260
+ evt_menu(DIALOGS_MESSAGE_BOX, :on_message_box)
261
+ evt_menu(DIALOGS_TEXT_ENTRY, :on_text_entry)
262
+ evt_menu(DIALOGS_PASSWORD_ENTRY, :on_password_entry)
263
+ evt_menu(DIALOGS_NUM_ENTRY, :on_numeric_entry)
264
+ evt_menu(DIALOGS_SINGLE_CHOICE, :on_single_choice)
265
+ evt_menu(DIALOGS_MULTI_CHOICE, :on_multi_choice)
266
+ evt_menu(DIALOGS_FILE_OPEN, :on_file_open)
267
+ evt_menu(DIALOGS_FILE_OPEN2, :on_file_open2)
268
+ evt_menu(DIALOGS_FILES_OPEN, :on_files_open)
269
+ evt_menu(DIALOGS_FILE_SAVE, :on_file_save)
270
+ evt_menu(DIALOGS_DIR_CHOOSE, :on_dir_choose)
271
+ evt_menu(DIALOGS_MODAL, :on_modal_dlg)
272
+ evt_menu(DIALOGS_MODELESS, :on_modeless_dlg)
273
+ evt_menu(DIALOGS_TIP, :on_show_tip)
274
+ evt_menu(DIALOGS_CUSTOM_TIP, :on_show_custom_tip)
275
+ evt_menu(DIALOGS_PROGRESS, :on_show_progress)
276
+ evt_menu(DIALOGS_BUSYINFO, :on_show_busy_info)
277
+ evt_menu(DIALOGS_STYLED_BUSYINFO, :on_show_styled_busy_info)
278
+ evt_menu(DIALOGS_PREFS, :on_show_prefs)
279
+ evt_menu(DIALOGS_PREFS_TOOLBOOK,:on_show_prefs)
280
+ evt_menu(DIALOGS_FIND, :on_show_find_dialog)
281
+ evt_menu(DIALOGS_REPLACE, :on_show_replace_dialog)
282
+ evt_find(-1, :on_find_dialog)
283
+ evt_find_next(-1, :on_find_dialog)
284
+ evt_find_replace(-1, :on_find_dialog)
285
+ evt_find_replace_all(-1, :on_find_dialog)
286
+ evt_find_close(-1, :on_find_dialog)
287
+ evt_menu(ID_EXIT, :on_exit)
284
288
 
285
289
  end
286
290
 
@@ -614,26 +618,37 @@ class MyFrame < Frame
614
618
 
615
619
 
616
620
  def on_show_prefs(event)
617
- MyPrefsDialog(self)
621
+ MyPrefsDialog(self, event.id)
618
622
  end
619
623
 
620
624
  def on_show_progress(event)
621
625
  cont = false
622
626
  Wx::ProgressDialog("Progress dialog example",
623
- "An informative message",
627
+ "An informative message\n"+"#{' '*100}\n\n\n\n",
624
628
  @max, # range
625
629
  self, # parent
626
- PD_CAN_ABORT | PD_APP_MODAL |
630
+ PD_CAN_ABORT | PD_CAN_SKIP | PD_APP_MODAL |
627
631
  PD_ELAPSED_TIME | PD_ESTIMATED_TIME |
628
632
  PD_REMAINING_TIME) do |dialog|
629
633
  cont = true
630
- (@max+1).times do |i|
631
- if i == @max
632
- cont = dialog.update(i, "That's all, folks!")
633
- elsif i == @max / 2
634
- cont = dialog.update(i, "Only half of it left (very long message)!")
635
- else
634
+ i = 0
635
+ while i <= @max
636
+ if i == 0
636
637
  cont = dialog.update(i)
638
+ elsif i == @max
639
+ cont = dialog.update(i, "That's all, folks!\n\nNothing more to see here any more.")
640
+ elsif i <= (@max / 2)
641
+ cont = dialog.pulse("Testing indeterminate mode\n" +
642
+ "\n" +
643
+ "This mode allows you to show to the user\n" +
644
+ "that something is going on even if you don't know\n" +
645
+ "when exactly will you finish.")
646
+ else
647
+ cont = dialog.update(i, "Now in standard determinate mode\n" +
648
+ "\n" +
649
+ "This is the standard usage mode in which you\n" +
650
+ "update the dialog after performing each new step of work.\n" +
651
+ "It requires knowing the total number of steps in advance.")
637
652
  end
638
653
 
639
654
  if !cont
@@ -644,8 +659,12 @@ class MyFrame < Frame
644
659
  break
645
660
  end
646
661
  dialog.resume
662
+ elsif cont == :skipped
663
+ i += (@max / 4)
664
+ i = @max-1 if i >= @max
647
665
  end
648
- sleep(1)
666
+ sleep(i == 0 ? 1 : 0.15)
667
+ i += 1
649
668
  end
650
669
  end
651
670
 
@@ -831,7 +850,8 @@ class MyApp < App
831
850
  file_menu.append(DIALOGS_PROGRESS, "Pro&gress dialog\tCtrl-G")
832
851
  file_menu.append(DIALOGS_BUSYINFO, "&Busy info dialog\tCtrl-B")
833
852
  file_menu.append(DIALOGS_STYLED_BUSYINFO, "Styled BusyInfo dialog")
834
- file_menu.append(DIALOGS_PREFS, "Propert&y sheet dialog\tCtrl-Y")
853
+ file_menu.append(DIALOGS_PREFS, "Standard propert&y sheet dialog\tCtrl-Y")
854
+ file_menu.append(DIALOGS_PREFS_TOOLBOOK, "&Toolbook property sheet dialog\tShift-Ctrl-Y")
835
855
  file_menu.append(DIALOGS_FIND, "&Find dialog\tCtrl-F", "", ITEM_CHECK)
836
856
  file_menu.append(DIALOGS_REPLACE, "Find and &replace dialog\tShift-Ctrl-F", "", ITEM_CHECK)
837
857
 
@@ -211,7 +211,7 @@ class MathsPanel < Panel
211
211
  # Display a dialog to save the image to a file
212
212
  def on_save
213
213
  SaveImageDialog(parent) do |dlg|
214
- if dlg.show_modal == ID_OK
214
+ if dlg.show_modal == Wx::ID_OK
215
215
  if dlg.image_type == Wx::BITMAP_TYPE_PNG
216
216
  # test writing to IO
217
217
  File.open(dlg.path, 'w') do |f|