wxruby3 0.9.0.pre.beta.13-x64-mingw-ucrt → 0.9.0.pre.rc.1-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/README.md +47 -4
  4. data/assets/hello_button.png +0 -0
  5. data/assets/hello_button_clicked.png +0 -0
  6. data/assets/hello_world.png +0 -0
  7. data/assets/repo-social-preview.png +0 -0
  8. data/ext/wxbase32u_gcc_custom.dll +0 -0
  9. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  10. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  11. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  12. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  13. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  14. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  15. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  16. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  17. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  18. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  19. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  20. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  21. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  22. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  23. data/lib/wx/accessors.rb +8 -2
  24. data/lib/wx/core/art_locator.rb +2 -2
  25. data/lib/wx/core/artprovider.rb +2 -2
  26. data/lib/wx/core/bitmap.rb +6 -5
  27. data/lib/wx/core/bitmap_combobox.rb +34 -0
  28. data/lib/wx/core/controlwithitems.rb +52 -14
  29. data/lib/wx/core/cursor.rb +1 -1
  30. data/lib/wx/core/dc.rb +0 -20
  31. data/lib/wx/core/event_blocker.rb +14 -0
  32. data/lib/wx/core/events/evt_list.rb +12 -0
  33. data/lib/wx/core/evthandler.rb +36 -0
  34. data/lib/wx/core/find_replace_dialog.rb +24 -0
  35. data/lib/wx/core/icon.rb +1 -1
  36. data/lib/wx/core/image.rb +1 -1
  37. data/lib/wx/core/paintdc.rb +8 -0
  38. data/lib/wx/core/text_entry.rb +15 -0
  39. data/lib/wx/core/v_list_box.rb +13 -0
  40. data/lib/wx/core/window.rb +1 -1
  41. data/lib/wx/doc/busy_info.rb +21 -0
  42. data/lib/wx/doc/client_dc.rb +28 -0
  43. data/lib/wx/doc/controlwithitems.rb +11 -0
  44. data/lib/wx/doc/dc.rb +0 -14
  45. data/lib/wx/doc/event_blocker.rb +27 -0
  46. data/lib/wx/doc/evthandler.rb +4 -0
  47. data/lib/wx/doc/extra/02_lifecycles.md +49 -0
  48. data/lib/wx/doc/extra/10_art.md +1 -1
  49. data/lib/wx/doc/extra/11_drawing_and_dc.md +62 -0
  50. data/lib/wx/doc/gen/about_dialog_info.rb +27 -24
  51. data/lib/wx/doc/gen/accelerator.rb +11 -12
  52. data/lib/wx/doc/gen/app.rb +6 -3
  53. data/lib/wx/doc/gen/art_provider.rb +53 -29
  54. data/lib/wx/doc/gen/aui/aui_manager.rb +4 -0
  55. data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +1 -1
  56. data/lib/wx/doc/gen/aui/aui_pane_info.rb +2 -0
  57. data/lib/wx/doc/gen/aui/aui_tab_ctrl.rb +2 -0
  58. data/lib/wx/doc/gen/bitmap.rb +25 -25
  59. data/lib/wx/doc/gen/bitmap_combo_box.rb +157 -0
  60. data/lib/wx/doc/gen/box_sizer.rb +6 -8
  61. data/lib/wx/doc/gen/brush.rb +2 -0
  62. data/lib/wx/doc/gen/busy_info.rb +52 -46
  63. data/lib/wx/doc/gen/caret.rb +0 -4
  64. data/lib/wx/doc/gen/check_list_box.rb +0 -2
  65. data/lib/wx/doc/gen/choice.rb +1 -5
  66. data/lib/wx/doc/gen/client_dc.rb +13 -18
  67. data/lib/wx/doc/gen/clipboard.rb +30 -27
  68. data/lib/wx/doc/gen/collapsible_pane.rb +11 -9
  69. data/lib/wx/doc/gen/colour.rb +6 -3
  70. data/lib/wx/doc/gen/colour_dialog.rb +111 -23
  71. data/lib/wx/doc/gen/combo_box.rb +2 -4
  72. data/lib/wx/doc/gen/control.rb +20 -18
  73. data/lib/wx/doc/gen/core.rb +2 -2
  74. data/lib/wx/doc/gen/cursor.rb +18 -50
  75. data/lib/wx/doc/gen/data_format.rb +0 -2
  76. data/lib/wx/doc/gen/data_object.rb +37 -44
  77. data/lib/wx/doc/gen/dc.rb +16 -24
  78. data/lib/wx/doc/gen/defs.rb +3 -40
  79. data/lib/wx/doc/gen/dialog.rb +21 -17
  80. data/lib/wx/doc/gen/dir_dialog.rb +10 -8
  81. data/lib/wx/doc/gen/event.rb +2 -2
  82. data/lib/wx/doc/gen/event_blocker.rb +49 -0
  83. data/lib/wx/doc/gen/event_filter.rb +95 -0
  84. data/lib/wx/doc/gen/event_list.rb +16 -2
  85. data/lib/wx/doc/gen/events.rb +103 -112
  86. data/lib/wx/doc/gen/evt_handler.rb +28 -52
  87. data/lib/wx/doc/gen/file_dialog.rb +8 -4
  88. data/lib/wx/doc/gen/find_replace_dialog.rb +1 -1
  89. data/lib/wx/doc/gen/font.rb +10 -2
  90. data/lib/wx/doc/gen/font_data.rb +2 -0
  91. data/lib/wx/doc/gen/font_dialog.rb +1 -1
  92. data/lib/wx/doc/gen/frame.rb +4 -3
  93. data/lib/wx/doc/gen/fs_file.rb +8 -0
  94. data/lib/wx/doc/gen/gcdc.rb +2 -22
  95. data/lib/wx/doc/gen/gdi_common.rb +18 -2
  96. data/lib/wx/doc/gen/gdi_object.rb +2 -0
  97. data/lib/wx/doc/gen/graphics_context.rb +4 -43
  98. data/lib/wx/doc/gen/graphics_object.rb +2 -0
  99. data/lib/wx/doc/gen/grid/grid_cell_attr.rb +2 -1
  100. data/lib/wx/doc/gen/grid/grid_ctrl.rb +4 -2
  101. data/lib/wx/doc/gen/grid/grid_table_message.rb +2 -0
  102. data/lib/wx/doc/gen/grid_bag_sizer.rb +4 -0
  103. data/lib/wx/doc/gen/help_controller.rb +4 -1
  104. data/lib/wx/doc/gen/html/html_cell.rb +4 -1
  105. data/lib/wx/doc/gen/html/html_help_controller.rb +4 -1
  106. data/lib/wx/doc/gen/html/html_help_data.rb +4 -0
  107. data/lib/wx/doc/gen/html/html_help_window.rb +2 -1
  108. data/lib/wx/doc/gen/html/html_list_box.rb +138 -11
  109. data/lib/wx/doc/gen/html/html_window.rb +9 -3
  110. data/lib/wx/doc/gen/icon.rb +7 -1
  111. data/lib/wx/doc/gen/icon_location.rb +2 -0
  112. data/lib/wx/doc/gen/image.rb +15 -8
  113. data/lib/wx/doc/gen/keyboard_state.rb +6 -0
  114. data/lib/wx/doc/gen/list_box.rb +0 -11
  115. data/lib/wx/doc/gen/list_ctrl.rb +10 -13
  116. data/lib/wx/doc/gen/locale.rb +7 -3
  117. data/lib/wx/doc/gen/log.rb +6 -2
  118. data/lib/wx/doc/gen/mdi_frame.rb +2 -0
  119. data/lib/wx/doc/gen/media_ctrl.rb +2 -0
  120. data/lib/wx/doc/gen/memory_dc.rb +105 -18
  121. data/lib/wx/doc/gen/menu.rb +4 -2
  122. data/lib/wx/doc/gen/menu_bar.rb +0 -2
  123. data/lib/wx/doc/gen/menu_item.rb +9 -3
  124. data/lib/wx/doc/gen/message_dialog.rb +6 -3
  125. data/lib/wx/doc/gen/mirror_dc.rb +2 -8
  126. data/lib/wx/doc/gen/mouse_state.rb +2 -0
  127. data/lib/wx/doc/gen/multi_choice_dialog.rb +0 -2
  128. data/lib/wx/doc/gen/non_owned_window.rb +2 -1
  129. data/lib/wx/doc/gen/notebook.rb +4 -2
  130. data/lib/wx/doc/gen/paint_dc.rb +2 -6
  131. data/lib/wx/doc/gen/palette.rb +3 -3
  132. data/lib/wx/doc/gen/pen.rb +6 -1
  133. data/lib/wx/doc/gen/pg/pg_editor.rb +2 -1
  134. data/lib/wx/doc/gen/pg/pg_multi_button.rb +4 -0
  135. data/lib/wx/doc/gen/pg/pg_properties.rb +30 -3
  136. data/lib/wx/doc/gen/pg/pg_property.rb +30 -4
  137. data/lib/wx/doc/gen/pg/pg_validation_info.rb +2 -0
  138. data/lib/wx/doc/gen/pg/property_grid.rb +5 -2
  139. data/lib/wx/doc/gen/pg/property_grid_interface.rb +6 -2
  140. data/lib/wx/doc/gen/pg/property_grid_manager.rb +2 -0
  141. data/lib/wx/doc/gen/pg/property_grid_page_state.rb +2 -0
  142. data/lib/wx/doc/gen/picker_base.rb +2 -1
  143. data/lib/wx/doc/gen/platform_info.rb +4 -1
  144. data/lib/wx/doc/gen/property_sheet_dialog.rb +2 -0
  145. data/lib/wx/doc/gen/prt/post_script_dc.rb +2 -8
  146. data/lib/wx/doc/gen/prt/print_data.rb +6 -0
  147. data/lib/wx/doc/gen/prt/printer.rb +0 -3
  148. data/lib/wx/doc/gen/prt/printer_dc.rb +2 -6
  149. data/lib/wx/doc/gen/radio_box.rb +2 -2
  150. data/lib/wx/doc/gen/rbn/ribbon_art_provider.rb +6 -0
  151. data/lib/wx/doc/gen/rbn/ribbon_panel.rb +1 -1
  152. data/lib/wx/doc/gen/region.rb +2 -0
  153. data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +6 -0
  154. data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +0 -4
  155. data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +2 -0
  156. data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +2 -1
  157. data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +2 -0
  158. data/lib/wx/doc/gen/screen_dc.rb +2 -0
  159. data/lib/wx/doc/gen/scroll_bar.rb +2 -1
  160. data/lib/wx/doc/gen/scrolled_canvas.rb +4 -8
  161. data/lib/wx/doc/gen/scrolled_control.rb +4 -8
  162. data/lib/wx/doc/gen/scrolled_window.rb +4 -8
  163. data/lib/wx/doc/gen/search_ctrl.rb +131 -0
  164. data/lib/wx/doc/gen/single_choice_dialog.rb +0 -2
  165. data/lib/wx/doc/gen/sizer.rb +14 -3
  166. data/lib/wx/doc/gen/splash_screen.rb +2 -0
  167. data/lib/wx/doc/gen/static_box.rb +6 -3
  168. data/lib/wx/doc/gen/static_box_sizer.rb +2 -1
  169. data/lib/wx/doc/gen/status_bar.rb +0 -5
  170. data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +4 -5
  171. data/lib/wx/doc/gen/svg_file_dc.rb +10 -11
  172. data/lib/wx/doc/gen/text_ctrl.rb +10 -3
  173. data/lib/wx/doc/gen/text_entry.rb +8 -3
  174. data/lib/wx/doc/gen/text_entry_dialog.rb +4 -2
  175. data/lib/wx/doc/gen/timer_event.rb +2 -0
  176. data/lib/wx/doc/gen/tool_bar.rb +8 -4
  177. data/lib/wx/doc/gen/top_level_window.rb +5 -2
  178. data/lib/wx/doc/gen/tree_ctrl.rb +0 -6
  179. data/lib/wx/doc/gen/ui_action_simulator.rb +100 -0
  180. data/lib/wx/doc/gen/utils.rb +1 -1
  181. data/lib/wx/doc/gen/v_list_box.rb +36 -26
  182. data/lib/wx/doc/gen/validator.rb +2 -1
  183. data/lib/wx/doc/gen/variant.rb +10 -0
  184. data/lib/wx/doc/gen/window.rb +38 -17
  185. data/lib/wx/doc/gen/window_dc.rb +2 -0
  186. data/lib/wx/doc/gen/window_disabler.rb +2 -0
  187. data/lib/wx/doc/gen/wizard_page_simple.rb +2 -0
  188. data/lib/wx/doc/gen/xml_node.rb +6 -0
  189. data/lib/wx/doc/gen/xml_resource.rb +4 -1
  190. data/lib/wx/doc/memory_dc.rb +75 -0
  191. data/lib/wx/doc/mirror_dc.rb +16 -0
  192. data/lib/wx/doc/prt/printer_dc.rb +26 -0
  193. data/lib/wx/doc/screen_dc.rb +10 -6
  194. data/lib/wx/doc/svg_file_dc.rb +20 -0
  195. data/lib/wx/doc/v_list_box.rb +9 -0
  196. data/lib/wx/doc/window_disabler.rb +10 -0
  197. data/lib/wx/global_const.rb +24 -18
  198. data/lib/wx/html/keyword_defs.rb +6 -7
  199. data/lib/wx/html/require.rb +1 -0
  200. data/lib/wx/html/simple_html_listbox.rb +105 -0
  201. data/lib/wx/keyword_defs.rb +7 -0
  202. data/lib/wx/version.rb +1 -1
  203. data/lib/wx/wxruby/cmd/test.rb +1 -1
  204. data/lib/wxruby_aui.so +0 -0
  205. data/lib/wxruby_core.so +0 -0
  206. data/lib/wxruby_grid.so +0 -0
  207. data/lib/wxruby_html.so +0 -0
  208. data/lib/wxruby_pg.so +0 -0
  209. data/lib/wxruby_prt.so +0 -0
  210. data/lib/wxruby_rbn.so +0 -0
  211. data/lib/wxruby_rtc.so +0 -0
  212. data/lib/wxruby_stc.so +0 -0
  213. data/rakelib/install.rb +3 -1
  214. data/rakelib/yard/yard/relative_markdown_links.rb +5 -1
  215. data/samples/bigdemo/wxArtProvider.rbw +5 -4
  216. data/samples/controls/controls.rb +2 -2
  217. data/samples/controls/htlbox.rb +411 -0
  218. data/samples/controls/tn_htlbox.png +0 -0
  219. data/samples/drawing/graphics_drawing.rb +1 -2
  220. data/samples/drawing/{svgtest.rb → image_prt.rb} +49 -18
  221. data/samples/drawing/tn_image_prt.png +0 -0
  222. data/samples/propgrid/propgrid.rb +23 -21
  223. data/samples/ribbon/ribbon.rb +47 -46
  224. data/tests/lib/wxapp_runner.rb +3 -3
  225. data/tests/lib/wxframe_runner.rb +59 -0
  226. data/tests/test_app_event_filter.rb +74 -0
  227. data/tests/test_art_provider.rb +52 -0
  228. data/tests/test_clipboard.rb +2 -1
  229. data/tests/test_event_handling.rb +199 -16
  230. data/tests/test_events.rb +4 -11
  231. data/tests/test_gdi_object.rb +161 -0
  232. data/tests/test_intl.rb +11 -14
  233. data/tests/test_item_data.rb +33 -1
  234. data/tests/test_std_controls.rb +147 -0
  235. metadata +38 -8
  236. data/lib/wx/doc/gen/auto_buffered_paint_dc.rb +0 -47
  237. data/lib/wx/doc/gen/buffered_dc.rb +0 -95
  238. data/lib/wx/doc/gen/buffered_paint_dc.rb +0 -55
  239. data/lib/wx/doc/gen/colour_data.rb +0 -96
  240. data/samples/drawing/tn_svgtest.png +0 -0
@@ -21,30 +21,30 @@ module Wx
21
21
  # This class represents the colour chooser dialog.
22
22
  # Starting from wxWidgets 3.1.3 and currently in the MSW port only, this dialog generates {Wx::EVT_COLOUR_CHANGED} events while it is being shown, i.e. from inside its {Wx::ColourDialog#show_modal} method, that notify the program about the change of the currently selected colour and allow it to e.g. preview the effect of selecting this colour. Note that if you react to this event, you should also correctly revert to the previously selected colour if the dialog is cancelled by the user.
23
23
  # Example of using this class with dynamic feedback for the selected colour:
24
+ # ```ruby
25
+ # # Some function for redrawing using the given colour. Ideally, it
26
+ # # shouldn't do anything if the colour is the same as the one used
27
+ # # before.
28
+ # # def redraw(colour) ... end
24
29
  #
25
- # // Some function for redrawing using the given colour. Ideally, it
26
- # // shouldn't do anything if the colour is the same as the one used
27
- # // before.
28
- # void Redraw(const wxColour& colour);
29
- #
30
- # wxColourData data;
31
- # data.SetColour(initialColourToUse);
32
- # wxColourData dlg(this, &data);
33
- # dlg.Bind(wxEVT_COLOUR_CHANGED, [](wxColourDialogEvent& event) {
34
- # Redraw(event.GetColour());
35
- # });
36
- # if ( dlg.ShowModal() == wxID_OK ) {
37
- # // Colour did change.
38
- # } else {
39
- # // Colour didn't change.
40
- # }
41
- #
42
- # // This call is unnecessary under platforms generating
43
- # // wxEVT_COLOUR_CHANGED if the dialog was accepted and unnecessary
44
- # // under the platforms not generating this event if it was cancelled,
45
- # // so we could check for the different cases explicitly to avoid it,
46
- # // but it's simpler to just always call it.
47
- # Redraw(data.GetColour());
30
+ # data = Wx::ColourData.new
31
+ # data.set_colour(initialColourToUse)
32
+ # Wx::ColourDialog(self, data) do |dlg|
33
+ # dlg.evt_colour_changed { |event| redraw(event.get_colour) }
34
+ # if dlg.show_modal == Wx::ID_OK
35
+ # # Colour did change.
36
+ # else
37
+ # # Colour didn't change.
38
+ # end
39
+ # end
40
+ #
41
+ # # This call is unnecessary under platforms generating
42
+ # # Wx::EVT_COLOUR_CHANGED if the dialog was accepted and unnecessary
43
+ # # under the platforms not generating this event if it was cancelled,
44
+ # # so we could check for the different cases explicitly to avoid it,
45
+ # # but it's simpler to just always call it.
46
+ # redraw(data.get_colour)
47
+ # ```
48
48
  #
49
49
  # ===
50
50
  #
@@ -79,5 +79,93 @@ module Wx
79
79
 
80
80
  end # ColourDialog
81
81
 
82
+ # This class holds a variety of information related to colour dialogs.
83
+ # ===
84
+ #
85
+ # Category: Common Dialogs, Data Structures
86
+ # @see Wx::Colour
87
+ # @see Wx::ColourDialog
88
+ # @see wxColourDialog Overview
89
+ #
90
+ #
91
+ #
92
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
93
+ class ColourData < Object
94
+
95
+ #
96
+ #
97
+ NUM_CUSTOM = 16
98
+
99
+ # Constructor.
100
+ # Initializes the custom colours to {Wx::NULL_COLOUR}, the data colour setting to black, and the choose full setting to true.
101
+ # @return [ColourData]
102
+ def initialize; end
103
+
104
+ # Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls.
105
+ # Has no meaning under other platforms.
106
+ # The default value is true.
107
+ # @return [true,false]
108
+ def get_choose_full; end
109
+ alias_method :choose_full, :get_choose_full
110
+
111
+ # Indicates whether the colour dialog will display alpha values and an opacity selector.
112
+ # It is meaningful under {Wx::GTK}, {Wx::OSX} and with regards to generic colour dialog.
113
+ # The default value is false, except {Wx::OSX} where it is true (for the sake of backward compatibility).
114
+ # @return [true,false]
115
+ def get_choose_alpha; end
116
+ alias_method :choose_alpha, :get_choose_alpha
117
+
118
+ # Gets the current colour associated with the colour dialog.
119
+ # The default colour is black.
120
+ # @return [Wx::Colour]
121
+ def get_colour; end
122
+ alias_method :colour, :get_colour
123
+
124
+ # Returns custom colours associated with the colour dialog.
125
+ # @param i [Integer] An integer between 0 and 15, being any of the 15 custom colours that the user has saved. The default custom colours are invalid colours.
126
+ # @return [Wx::Colour]
127
+ def get_custom_colour(i) end
128
+ alias_method :custom_colour, :get_custom_colour
129
+
130
+ # Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls.
131
+ # Under other platforms, has no effect.
132
+ # The default value is true.
133
+ # @param flag [true,false]
134
+ # @return [void]
135
+ def set_choose_full(flag) end
136
+ alias_method :choose_full=, :set_choose_full
137
+
138
+ # Tells the colour dialog to show alpha values and an opacity selector (slider).
139
+ # Currently it has effect under {Wx::GTK}, {Wx::OSX} and for generic colour dialog.
140
+ # The default value is false, except {Wx::OSX} where it is true for backward compatibility.
141
+ # @param flag [true,false]
142
+ # @return [void]
143
+ def set_choose_alpha(flag) end
144
+ alias_method :choose_alpha=, :set_choose_alpha
145
+
146
+ # Sets the default colour for the colour dialog.
147
+ # The default colour is black.
148
+ # @param colour [Wx::Colour,String,Symbol]
149
+ # @return [void]
150
+ def set_colour(colour) end
151
+ alias_method :colour=, :set_colour
152
+
153
+ # Sets custom colours for the colour dialog.
154
+ # @param i [Integer] An integer between 0 and 15 for whatever custom colour you want to set. The default custom colours are invalid colours.
155
+ # @param colour [Wx::Colour,String,Symbol] The colour to set
156
+ # @return [void]
157
+ def set_custom_colour(i, colour) end
158
+
159
+ # Converts the colours saved in this class in a string form, separating the various colours with a comma.
160
+ # @return [String]
161
+ def to_string; end
162
+
163
+ # Decodes the given string, which should be in the same format returned by {Wx::ColourData#to_string}, and sets the internal colours.
164
+ # @param str [String]
165
+ # @return [true,false]
166
+ def from_string(str) end
167
+
168
+ end # ColourData
169
+
82
170
 
83
171
  end
@@ -80,7 +80,7 @@ module Wx
80
80
  # @return [ComboBox]
81
81
  # @overload initialize(parent, id, value=(''), pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, choices=nil, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::ComboBoxNameStr)
82
82
  # Constructor, creating and showing a combobox.
83
- # <b>{Wx::Perl} Note:</b> Not supported by {Wx::Perl}.
83
+ #
84
84
  # @see Wx::ComboBox#create
85
85
  # @see Wx::Validator
86
86
  # @param parent [Wx::Window] Parent window. Must not be NULL.
@@ -95,7 +95,7 @@ module Wx
95
95
  # @return [ComboBox]
96
96
  # @overload initialize(parent, id, value, pos, size, choices, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::ComboBoxNameStr)
97
97
  # Constructor, creating and showing a combobox.
98
- # <b>{Wx::Perl} Note:</b> Use an array reference for the choices parameter.
98
+ #
99
99
  # @see Wx::ComboBox#create
100
100
  # @see Wx::Validator
101
101
  # @param parent [Wx::Window] Parent window. Must not be NULL.
@@ -180,8 +180,6 @@ module Wx
180
180
 
181
181
  # Gets the current selection span.
182
182
  # If the returned values are equal, there was no selection. Please note that the indices returned may be used with the other {Wx::TextCtrl} methods but don't necessarily represent the correct indices into the string returned by {Wx::ComboBox#get_value} for multiline controls under Windows (at least,) you should use {Wx::ComboBox#get_string_selection} to get the selected text.
183
- #
184
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method takes no parameters and returns a 2-element list (from, to).
185
183
  # @return [Array(Integer,Integer)]
186
184
  def get_text_selection_range; end
187
185
  alias_method :text_selection_range, :get_text_selection_range
@@ -72,15 +72,16 @@ module Wx
72
72
  # @overload get_size_from_text_size(xlen, ylen=-1)
73
73
  # Determine the size needed by the control to leave the given area for its text.
74
74
  # This function is mostly useful with control displaying short amounts of text that can be edited by the user, e.g. {Wx::TextCtrl}, {Wx::ComboBox}, {Wx::SearchCtrl} etc. Typically it is used to size these controls for the maximal amount of input they are supposed to contain, for example:
75
- #
76
- # // Create a control for post code entry.
77
- # wxTextCtrl* postcode = new wxTextCtrl(this, ...);
75
+ # ```ruby
76
+ # # Create a control for post code entry.
77
+ # postcode = Wx::TextCtrl.new(self, ...)
78
78
  #
79
- # // And set its initial and minimal size to be big enough for
80
- # // entering 5 digits.
81
- # postcode->SetInitialSize(
82
- # postcode->GetSizeFromTextSize(
83
- # postcode->GetTextExtent("99999")));
79
+ # # And set its initial and minimal size to be big enough for
80
+ # # entering 5 digits.
81
+ # postcode.set_initial_size(
82
+ # postcode.get_size_from_text_size(
83
+ # postcode.get_text_extent("99999")))
84
+ # ```
84
85
  #
85
86
  # Currently this method is only implemented for {Wx::TextCtrl}, {Wx::ComboBox} and {Wx::Choice} in {Wx::MSW} and {Wx::GTK}.
86
87
  #
@@ -97,11 +98,11 @@ module Wx
97
98
 
98
99
  # Determine the minimum size needed by the control to display the given text.
99
100
  # The helper function that uses combination of {Wx::Control#get_size_from_text_size} and {Wx::Control#get_text_extent} which used together pretty often:
100
- #
101
- # wxSize GetSizeFromText(const wxString& text) const
102
- # {
103
- # return GetSizeFromTextSize(GetTextExtent(text).GetWidth());
104
- # }
101
+ # ```ruby
102
+ # def get_size_from_text(text)
103
+ # get_size_from_text_size(get_text_extent(text))
104
+ # end
105
+ # ```
105
106
  #
106
107
  # The size that the control should have to leave the area of the specified text. May return {Wx::DEFAULT_SIZE} if this method is not implemented for this particular control under the current platform.
107
108
  # @param text [String] The given text.
@@ -127,12 +128,13 @@ module Wx
127
128
  # Sets the controls label to a string using markup.
128
129
  # Simple markup supported by this function can be used to apply different fonts or colours to different parts of the control label when supported. If markup is not supported by the control or platform, it is simply stripped and {Wx::Control#set_label} is used with the resulting string.
129
130
  # For example,
130
- #
131
- # wxStaticText *text;
131
+ # ```ruby
132
+ # text = Wx::StaticText.new
132
133
  # ...
133
- # text->SetLabelMarkup("<b>&amp;Bed</b> &amp;mp; "
134
- # "<span foreground='red'>breakfast</span> "
135
- # "available <big>HERE</big>");
134
+ # text.set_label_markup("<b>&amp;Bed</b> &amp;mp; "+
135
+ # "<span foreground='red'>breakfast</span> "+
136
+ # "available <big>HERE</big>")
137
+ # ```
136
138
  # would show the string using bold, red and big for the corresponding words under {Wx::GTK} but will simply show the string "Bed &amp; breakfast
137
139
  # available HERE" on the other platforms. In any case, the "B" of "Bed" will be underlined to indicate that it can be used as a mnemonic for this control.
138
140
  # The supported tags are:
@@ -7,10 +7,10 @@
7
7
  module Wx
8
8
 
9
9
  # wxRuby version string
10
- Wx::WXRUBY_VERSION = '0.9.0-beta.13'
10
+ Wx::WXRUBY_VERSION = '0.9.0-rc.1'
11
11
 
12
12
  # wxRuby version release type (alpha, beta, rc)
13
- Wx::WXRUBY_RELEASE_TYPE = 'beta.13'
13
+ Wx::WXRUBY_RELEASE_TYPE = 'rc.1'
14
14
  # wxRuby major version number
15
15
  Wx::WXRUBY_MAJOR = 0
16
16
  # wxRuby minor version number
@@ -11,63 +11,30 @@ module Wx
11
11
  NULL_CURSOR = nil
12
12
 
13
13
  # A cursor is a small bitmap usually used for denoting where the mouse pointer is, with a picture that might indicate the interpretation of a mouse click.
14
- # As with icons, cursors in X and MS Windows are created in a different manner. Therefore, separate cursors will be created for the different environments. Platform-specific methods for creating a {Wx::Cursor} object are catered for, and this is an occasion where conditional compilation will probably be required (see {Wx::Icon} for an example).
15
- # A single cursor object may be used in many windows (any subwindow type). The wxWidgets convention is to set the cursor for a window, as in X, rather than to set it globally as in MS Windows, although a global {set_cursor} function is also available for MS Windows use.
16
- #
17
- # == Creating a Custom Cursor
18
- #
19
- # The following is an example of creating a cursor from 32x32 bitmap data (down_bits) and a mask (down_mask) where 1 is black and 0 is white for the bits, and 1 is opaque and 0 is transparent for the mask. It works on Windows and GTK+.
20
- #
21
- # static char down_bits[] = { 255, 255, 255, 255, 31,
22
- # 255, 255, 255, 31, 255, 255, 255, 31, 255, 255, 255,
23
- # 31, 255, 255, 255, 31, 255, 255, 255, 31, 255, 255,
24
- # 255, 31, 255, 255, 255, 31, 255, 255, 255, 25, 243,
25
- # 255, 255, 19, 249, 255, 255, 7, 252, 255, 255, 15, 254,
26
- # 255, 255, 31, 255, 255, 255, 191, 255, 255, 255, 255,
27
- # 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
28
- # 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
29
- # 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
30
- # 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
31
- # 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
32
- # 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
33
- # 255 };
34
- #
35
- # static char down_mask[] = { 240, 1, 0, 0, 240, 1,
36
- # 0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 240, 1,
37
- # 0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 255, 31, 0, 0, 255,
38
- # 31, 0, 0, 254, 15, 0, 0, 252, 7, 0, 0, 248, 3, 0, 0,
39
- # 240, 1, 0, 0, 224, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0,
40
- # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
41
- # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
42
- # 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
43
- # 0, 0, 0, 0, 0 };
44
- #
45
- # #ifdef __WXMSW__
46
- # wxBitmap down_bitmap(down_bits, 32, 32);
47
- # wxBitmap down_mask_bitmap(down_mask, 32, 32);
48
- #
49
- # down_bitmap.SetMask(new wxMask(down_mask_bitmap));
50
- # wxImage down_image = down_bitmap.ConvertToImage();
51
- # down_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 6);
52
- # down_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 14);
53
- # wxCursor down_cursor = wxCursor(down_image);
54
- # #elif defined(__WXGTK__) or defined(__WXMOTIF__)
55
- # wxCursor down_cursor = wxCursor(down_bits, 32, 32, 6, 14,
56
- # down_mask, wxWHITE, wxBLACK);
57
- # #endif
14
+ # As with icons, cursors in X and MS Windows are created in a different manner. Therefore, separate cursors
15
+ # will be created for the different environments. Platform-specific methods for creating a {Wx::Cursor} object
16
+ # are catered for, and this is an occasion where conditional compilation will probably be required
17
+ # (see {Wx::Icon} for an example).
18
+ # A single cursor object may be used in many windows (any subwindow type). The wxWidgets convention is to set
19
+ # the cursor for a window, as in X, rather than to set it globally as in MS Windows, although a global
20
+ # {set_cursor} function is also available for MS Windows use.
58
21
  #
59
22
  # ===
60
23
  #
61
24
  # Category: Graphics Device Interface (GDI)
62
25
  # Predefined objects/pointers:
63
- # - {Wx::NULL_CURSOR}- {Wx::STANDARD_CURSOR}- {Wx::HOURGLASS_CURSOR}- {Wx::CROSS_CURSOR}
26
+ # - {Wx::NULL_CURSOR}
27
+ # - {Wx::STANDARD_CURSOR}
28
+ # - {Wx::HOURGLASS_CURSOR}
29
+ # - {Wx::CROSS_CURSOR}
64
30
  # @see Wx::Bitmap
65
31
  # @see Wx::Icon
66
32
  # @see Wx::Window#set_cursor
67
- # @see set_cursor
68
- # @see Wx::StockCursor
33
+ # @see Wx.set_cursor
34
+ # @see Wx::StockCursor
69
35
  #
70
36
  #
37
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
71
38
  class Cursor < GDIObject
72
39
 
73
40
  # @overload initialize()
@@ -93,9 +60,10 @@ module Wx
93
60
  # In {Wx::GTK}, colour cursors and alpha channel are supported (starting from GTK+ 2.2). Otherwise the two most frequent colors will be used for foreground and background. In any case, the cursor will be displayed at the size of the image.
94
61
  # Under {Wx::Mac} (Cocoa), large cursors are supported.
95
62
  # Notice that the image can define the cursor hot spot. To set it you need to use {Wx::Image#set_option} with {Wx::IMAGE_OPTION_CUR_HOTSPOT_X} or {Wx::IMAGE_OPTION_CUR_HOTSPOT_Y}, e.g.
96
- #
97
- # image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, hotSpotX);
98
- # image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, hotSpotY);
63
+ # ```ruby
64
+ # image.set_option(Wx::IMAGE_OPTION_CUR_HOTSPOT_X, hotSpotX)
65
+ # image.set_option(Wx::IMAGE_OPTION_CUR_HOTSPOT_X, hotSpotY)
66
+ # ```
99
67
  # @param image [Wx::Image]
100
68
  # @return [Cursor]
101
69
  # @overload initialize(xpmData)
@@ -48,12 +48,10 @@ module Wx
48
48
 
49
49
  # @overload initialize(format=Wx::DataFormatId::DF_INVALID)
50
50
  # Constructs a data format object for one of the standard data formats or an empty data object (use {Wx::DataFormat#set_type} or {Wx::DataFormat#set_id} later in this case).
51
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} use Wx::Bitmap->newNative(format).
52
51
  # @param format [DataFormatId]
53
52
  # @return [DataFormat]
54
53
  # @overload initialize(format)
55
54
  # Constructs a data format object for a custom format identified by its name format.
56
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} use Wx::Bitmap->newUser(format).
57
55
  # @param format [String]
58
56
  # @return [DataFormat]
59
57
  def initialize(*args) end
@@ -28,7 +28,7 @@ module Wx
28
28
  # Note that neither the GTK+ data transfer mechanisms for clipboard and drag and drop, nor OLE data transfer, copies any data until another application actually requests the data. This is in contrast to the 'feel' offered to the user of a program who would normally think that the data resides in the clipboard after having pressed 'Copy' - in reality it is only declared to be available.
29
29
  # You may also derive your own data object classes from {Wx::CustomDataObject} for user-defined types. The format of user-defined data is given as a mime-type string literal, such as "application/word" or "image/png". These strings are used as they are under Unix (so far only GTK+) to identify a format and are translated into their Windows equivalent under Win32 (using the OLE IDataObject for data exchange to and from the clipboard and for drag and drop). Note that the format string translation under Windows is not yet finished.
30
30
  # Each class derived directly from {Wx::DataObject} must override and implement all of its functions which are pure virtual in the base class. The data objects which only render their data or only set it (i.e. work in only one direction), should return 0 from {Wx::DataObject#get_format_count}.
31
- # <b>{Wx::Perl} Note:</b> This class is not currently usable from {Wx::Perl}; you may use Wx::PlDataObjectSimple instead.
31
+ #
32
32
  # ===
33
33
  #
34
34
  # Category: Clipboard and Drag & Drop
@@ -72,7 +72,6 @@ module Wx
72
72
 
73
73
  # Copies all formats supported in the given direction dir to the array pointed to by formats.
74
74
  # There must be enough space for GetFormatCount(dir) formats in it.
75
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method only takes the dir parameter. In scalar context it returns the first format in the list, in list context it returns a list containing all the supported formats.
76
75
  # @param dir [Direction]
77
76
  # @return [Array<Wx::DataFormat>]
78
77
  def get_all_formats(dir=Wx::DataObjectSimpleBase::Direction::Get) end
@@ -136,51 +135,43 @@ module Wx
136
135
  # See {Wx::DataObject} documentation for the reasons why you might prefer to use {Wx::DataObject} directly instead of {Wx::DataObjectComposite} for efficiency reasons.
137
136
  # This example shows how a composite data object capable of storing either bitmaps or file names (presumably of bitmap files) can be initialized and used:
138
137
  #
139
- # MyDropTarget::MyDropTarget()
140
- # {
141
- # wxDataObjectComposite* dataobj = new wxDataObjectComposite();
142
- # dataobj->Add(new wxBitmapDataObject(), true);
143
- # dataobj->Add(new wxFileDataObject());
144
- # SetDataObject(dataobj);
145
- # }
146
- #
147
- # wxDragResult MyDropTarget::OnData(wxCoord x, wxCoord y,
148
- # wxDragResult defaultDragResult)
149
- # {
150
- # if ( !GetData() )
151
- # return wxDragNone;
152
- #
153
- # wxDataObjectComposite *
154
- # dataobjComp = static_cast<wxDataObjectComposite *>(GetDataObject());
155
- #
156
- # wxDataFormat format = dataobjComp->GetReceivedFormat();
157
- # wxDataObject *dataobj = dataobjComp->GetObject(format);
158
- # switch ( format.GetType() )
159
- # {
160
- # case wxDF_BITMAP:
161
- # {
162
- # wxBitmapDataObject *
163
- # dataobjBitmap = static_cast<wxBitmapDataObject *>(dataobj);
164
- #
165
- # ... use dataobj->GetBitmap() ...
166
- # }
167
- # break;
138
+ # ```ruby
139
+ # class MyDropTarget < Wx::DropTarget
140
+ #
141
+ # def initialize
142
+ # dataobj = Wx::DataObjectComposite.new
143
+ # dataobj.add(Wx::BitmapDataObject.new, true)
144
+ # dataobj.add(Wx::FileDataObject.new)
145
+ # set_data_object(dataobj)
146
+ # end
168
147
  #
169
- # case wxDF_FILENAME:
170
- # {
171
- # wxFileDataObject *
172
- # dataobjFile = static_cast<wxFileDataObject *>(dataobj);
148
+ # def on_data(x, y, defaultDragResult)
149
+ # return Wx::DragNone unless get_data
173
150
  #
174
- # ... use dataobj->GetFilenames() ...
175
- # }
176
- # break;
151
+ # dataobj_comp = get_data_object
177
152
  #
178
- # default:
179
- # wxFAIL_MSG( "unexpected data object format" );
180
- # }
153
+ # format = dataobj_comp.get_received_format
154
+ # dataobj = dataobj_comp.get_object(format)
155
+ # case format.get_type
156
+ # when Wx::DataFormatId::DF_BITMAP
157
+ # # dataobj is Wx::BitmapDataObject
158
+ #
159
+ # ... use dataobj.get_bitmap ...
160
+ #
161
+ # when Wx::DataFormatId::DF_FILENAME
162
+ # # dataobj is Wx::FileDataObject
163
+ #
164
+ # ... use dataobj->GetFilenames() ...
165
+ #
166
+ # else
167
+ # Wx.log_error("unexpected data object format")
168
+ # end
181
169
  #
182
- # return defaultDragResult;
183
- # }
170
+ # defaultDragResult
171
+ # end
172
+ #
173
+ # end
174
+ # ```
184
175
  #
185
176
  # ===
186
177
  #
@@ -383,7 +374,9 @@ module Wx
383
374
  # {Wx::URLDataObject} is a {Wx::DataObject} containing an URL and can be used e.g.
384
375
  # when you need to put an URL on or retrieve it from the clipboard:
385
376
  #
386
- # wxTheClipboard->SetData(new wxURLDataObject(url));
377
+ # ```ruby
378
+ # Wx::Clipboard.open { |clip| clip.place(Wx::URLDataObject.new(url))
379
+ # ```
387
380
  #
388
381
  # The actual base class of this class is not always {Wx::DataObject} itself, but rather either {Wx::DataObjectComposite} in {Wx::MSW} and {Wx::GTK} or {Wx::TextDataObject} in the other ports. Please don't rely on the exact base class, it is not guaranteed that it won't change in the future.
389
382
  #
data/lib/wx/doc/gen/dc.rb CHANGED
@@ -162,6 +162,8 @@ module Wx
162
162
  # @see Wx::DCClipper
163
163
  #
164
164
  #
165
+ #
166
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
165
167
  class DC < Object
166
168
 
167
169
  # Convert device X coordinate to logical coordinate, using the current mapping mode, user scale factor, device origin and axis orientation.
@@ -431,7 +433,6 @@ module Wx
431
433
 
432
434
  # Draws lines using an array of points of size n adding the optional offset coordinate.
433
435
  # The current pen is used for drawing the lines.
434
- # <b>{Wx::Perl} Note:</b> Not supported by {Wx::Perl}.
435
436
  # @param points [Array<Wx::Point>,Array<Array<Integer>>]
436
437
  # @param xoffset [Integer]
437
438
  # @param yoffset [Integer]
@@ -454,7 +455,6 @@ module Wx
454
455
  # The first and last points are automatically closed.
455
456
  # The last argument specifies the fill rule: <b>{Wx::PolygonFillMode::ODDEVEN_RULE}</b> (the default) or <b>{Wx::PolygonFillMode::WINDING_RULE}</b>.
456
457
  # The current pen is used for drawing the outline, and the current brush for filling the shape. Using a transparent brush suppresses filling.
457
- # <b>{Wx::Perl} Note:</b> Not supported by {Wx::Perl}.
458
458
  # @param points [Array<Wx::Point>,Array<Array<Integer>>]
459
459
  # @param xoffset [Integer]
460
460
  # @param yoffset [Integer]
@@ -540,13 +540,10 @@ module Wx
540
540
  # Draws a spline between all given points using the current pen.
541
541
  # The number of points must be at least 2 for the spline to be drawn.
542
542
  # Drawn curve is not an interpolating curve - it does not go through all points. It may be considered a smoothing curve.
543
- #
544
- # <b>{Wx::Perl} Note:</b> Not supported by {Wx::Perl}.
545
543
  # @param points [Array<Wx::Point>,Array<Array<Integer>>]
546
544
  # @return [void]
547
545
  # @overload draw_spline(x1, y1, x2, y2, x3, y3)
548
546
  # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
549
- # <b>{Wx::Perl} Note:</b> Not supported by {Wx::Perl}.
550
547
  # @param x1 [Integer]
551
548
  # @param y1 [Integer]
552
549
  # @param x2 [Integer]
@@ -711,8 +708,6 @@ module Wx
711
708
  # If the optional parameter font is specified and valid, then it is used for the text extent calculation, otherwise the currently selected font is used.
712
709
  # If string is empty, its horizontal extent is 0 but, for convenience when using this function for allocating enough space for a possibly multi-line string, its vertical extent is the same as the height of an empty line of text. Please note that this behaviour differs from that of {Wx::DC#get_text_extent}.
713
710
  # This function works with both single-line and multi-line strings.
714
- #
715
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method is implemented as GetMultiLineTextExtent(string, font = undef) returning a 3-element list (width, height, line_height)
716
711
  # @see Wx::Font
717
712
  # @see Wx::DC#set_font
718
713
  # @see Wx::DC#get_partial_text_extents
@@ -728,8 +723,6 @@ module Wx
728
723
  # The text extent as a {Wx::Size} object.
729
724
  #
730
725
  # This function works with both single-line and multi-line strings.
731
- #
732
- # <b>{Wx::Perl} Note:</b> Not supported by {Wx::Perl}.
733
726
  # @see Wx::Font
734
727
  # @see Wx::DC#set_font
735
728
  # @see Wx::DC#get_partial_text_extents
@@ -745,8 +738,6 @@ module Wx
745
738
  # If the optional parameter font is specified and valid, then it is used for the text extent calculation. Otherwise the currently selected font is.
746
739
  # If string is empty, its extent is 0 in both directions, as expected.
747
740
  # This function only works with single-line strings.
748
- #
749
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method is implemented as GetTextExtent(string, font = undef) returning a 4-element list (width, height, descent, externalLeading)
750
741
  # @see Wx::Font
751
742
  # @see Wx::DC#set_font
752
743
  # @see Wx::DC#get_partial_text_extents
@@ -758,7 +749,6 @@ module Wx
758
749
  alias_method :text_extent, :get_text_extent
759
750
 
760
751
  # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
761
- # <b>{Wx::Perl} Note:</b> Not supported by {Wx::Perl}.
762
752
  # @param string [String]
763
753
  # @return [Wx::Size]
764
754
  def get_text_size(string) end
@@ -872,6 +862,10 @@ module Wx
872
862
  # @return [true,false]
873
863
  def start_doc(message) end
874
864
 
865
+ # Starts a document page (only relevant when outputting to a printer).
866
+ # @return [void]
867
+ def start_page; end
868
+
875
869
  # Ends a document (only relevant when outputting to a printer).
876
870
  # @return [void]
877
871
  def end_doc; end
@@ -964,21 +958,21 @@ module Wx
964
958
  # Gets the brush used for painting the background.
965
959
  #
966
960
  # @see Wx::DC#set_background
967
- # @return [void]
961
+ # @return [Wx::Brush]
968
962
  def get_background; end
969
963
  alias_method :background, :get_background
970
964
 
971
965
  # Gets the current brush.
972
966
  #
973
967
  # @see Wx::DC#set_brush
974
- # @return [void]
968
+ # @return [Wx::Brush]
975
969
  def get_brush; end
976
970
  alias_method :brush, :get_brush
977
971
 
978
972
  # Gets the current pen.
979
973
  #
980
974
  # @see Wx::DC#set_pen
981
- # @return [void]
975
+ # @return [Wx::Pen]
982
976
  def get_pen; end
983
977
  alias_method :pen, :get_pen
984
978
 
@@ -1141,14 +1135,12 @@ module Wx
1141
1135
  # It can be used to scale graphics to fit the page.
1142
1136
  # For example, if maxX and maxY represent the maximum horizontal and vertical 'pixel' values used in your application, the following code will scale the graphic to fit on the printer page:
1143
1137
  #
1144
- # wxCoord w, h;
1145
- # dc.GetSize(&w, &h);
1146
- # double scaleX = (double)(maxX / w);
1147
- # double scaleY = (double)(maxY / h);
1148
- # dc.SetUserScale(min(scaleX, scaleY),min(scaleX, scaleY));
1149
- #
1150
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} there are two methods instead of a single overloaded method:
1151
- # - {Wx::DC#get_size}: returns a Wx::Size object.- GetSizeWH(): returns a 2-element list (width, height).
1138
+ # ```ruby
1139
+ # sz = dc.get_dimensions
1140
+ # scaleX = (maxX.to_f / sz.width)
1141
+ # scaleY = (maxY.to_f / sz.height);
1142
+ # dc.set_user_scale([scaleX, scaleY].min,[scaleX, scaleY].min)
1143
+ # ```
1152
1144
  # @return [Array(Integer,Integer)]
1153
1145
  def get_dimensions; end
1154
1146
  alias_method :dimensions, :get_dimensions
@@ -1169,7 +1161,7 @@ module Wx
1169
1161
  alias_method :size_mm, :get_size_mm
1170
1162
 
1171
1163
  # Gets the current user scale factor.
1172
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method takes no arguments and return a two element array (x, y).
1164
+ #
1173
1165
  # @see Wx::DC#set_user_scale
1174
1166
  # @param x [double]
1175
1167
  # @param y [double]