wxruby3 0.9.0.pre.beta.14-x64-mingw-ucrt → 0.9.0.pre.rc.2-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (278) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/INSTALL.md +51 -22
  4. data/README.md +81 -6
  5. data/assets/hello_button-macos.png +0 -0
  6. data/assets/hello_button-msw.png +0 -0
  7. data/assets/hello_button.png +0 -0
  8. data/assets/hello_button_clicked-macos.png +0 -0
  9. data/assets/hello_button_clicked-msw.png +0 -0
  10. data/assets/hello_button_clicked.png +0 -0
  11. data/assets/hello_button_clicked_combi.png +0 -0
  12. data/assets/hello_world-macos.png +0 -0
  13. data/assets/hello_world-msw.png +0 -0
  14. data/assets/hello_world.png +0 -0
  15. data/assets/hello_world_combi.png +0 -0
  16. data/assets/repo-social-preview.png +0 -0
  17. data/ext/wxbase32u_gcc_custom.dll +0 -0
  18. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  19. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  20. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  21. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  22. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  23. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  24. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  25. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  26. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  27. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  28. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  29. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  30. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  31. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  32. data/lib/wx/core/art_locator.rb +2 -2
  33. data/lib/wx/core/artprovider.rb +2 -2
  34. data/lib/wx/core/bitmap.rb +6 -5
  35. data/lib/wx/core/bitmap_combobox.rb +34 -0
  36. data/lib/wx/core/brush.rb +6 -0
  37. data/lib/wx/core/controlwithitems.rb +52 -14
  38. data/lib/wx/core/cursor.rb +1 -1
  39. data/lib/wx/core/dc.rb +0 -20
  40. data/lib/wx/core/event_blocker.rb +14 -0
  41. data/lib/wx/core/events/evt_list.rb +19 -0
  42. data/lib/wx/core/evthandler.rb +48 -2
  43. data/lib/wx/core/find_replace_dialog.rb +24 -0
  44. data/lib/wx/core/font.rb +22 -14
  45. data/lib/wx/core/helpprovider.rb +2 -2
  46. data/lib/wx/core/icon.rb +1 -1
  47. data/lib/wx/core/image.rb +1 -1
  48. data/lib/wx/core/menu.rb +5 -0
  49. data/lib/wx/core/paintdc.rb +8 -0
  50. data/lib/wx/core/pen.rb +6 -0
  51. data/lib/wx/core/text_entry.rb +15 -0
  52. data/lib/wx/core/v_list_box.rb +13 -0
  53. data/lib/wx/core/window.rb +29 -2
  54. data/lib/wx/doc/app.rb +40 -0
  55. data/lib/wx/doc/brush.rb +17 -0
  56. data/lib/wx/doc/busy_info.rb +21 -0
  57. data/lib/wx/doc/client_dc.rb +28 -0
  58. data/lib/wx/doc/controlwithitems.rb +11 -0
  59. data/lib/wx/doc/dc.rb +0 -14
  60. data/lib/wx/doc/event_blocker.rb +27 -0
  61. data/lib/wx/doc/evthandler.rb +4 -0
  62. data/lib/wx/doc/extra/02_lifecycles.md +49 -0
  63. data/lib/wx/doc/extra/10_art.md +1 -1
  64. data/lib/wx/doc/extra/11_drawing_and_dc.md +62 -0
  65. data/lib/wx/doc/font.rb +27 -0
  66. data/lib/wx/doc/gen/about_dialog_info.rb +27 -24
  67. data/lib/wx/doc/gen/accelerator.rb +11 -12
  68. data/lib/wx/doc/gen/activity_indicator.rb +65 -0
  69. data/lib/wx/doc/gen/app.rb +6 -3
  70. data/lib/wx/doc/gen/art_provider.rb +53 -29
  71. data/lib/wx/doc/gen/aui/aui_manager.rb +4 -0
  72. data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +1 -1
  73. data/lib/wx/doc/gen/aui/aui_pane_info.rb +2 -0
  74. data/lib/wx/doc/gen/aui/aui_tab_ctrl.rb +2 -0
  75. data/lib/wx/doc/gen/aui/aui_tool_bar.rb +2 -2
  76. data/lib/wx/doc/gen/bitmap.rb +25 -25
  77. data/lib/wx/doc/gen/bitmap_combo_box.rb +157 -0
  78. data/lib/wx/doc/gen/box_sizer.rb +6 -8
  79. data/lib/wx/doc/gen/brush.rb +2 -0
  80. data/lib/wx/doc/gen/busy_info.rb +52 -46
  81. data/lib/wx/doc/gen/caret.rb +0 -4
  82. data/lib/wx/doc/gen/check_list_box.rb +0 -2
  83. data/lib/wx/doc/gen/choice.rb +1 -5
  84. data/lib/wx/doc/gen/client_dc.rb +13 -18
  85. data/lib/wx/doc/gen/clipboard.rb +30 -27
  86. data/lib/wx/doc/gen/collapsible_pane.rb +11 -9
  87. data/lib/wx/doc/gen/colour.rb +6 -3
  88. data/lib/wx/doc/gen/colour_dialog.rb +111 -23
  89. data/lib/wx/doc/gen/combo_box.rb +2 -4
  90. data/lib/wx/doc/gen/context_help_button.rb +48 -0
  91. data/lib/wx/doc/gen/control.rb +20 -18
  92. data/lib/wx/doc/gen/core.rb +2 -2
  93. data/lib/wx/doc/gen/cursor.rb +18 -50
  94. data/lib/wx/doc/gen/data_format.rb +0 -2
  95. data/lib/wx/doc/gen/data_object.rb +37 -44
  96. data/lib/wx/doc/gen/dc.rb +16 -24
  97. data/lib/wx/doc/gen/defs.rb +3 -40
  98. data/lib/wx/doc/gen/dialog.rb +21 -17
  99. data/lib/wx/doc/gen/dir_dialog.rb +10 -8
  100. data/lib/wx/doc/gen/event.rb +2 -2
  101. data/lib/wx/doc/gen/event_blocker.rb +51 -0
  102. data/lib/wx/doc/gen/event_filter.rb +88 -0
  103. data/lib/wx/doc/gen/event_list.rb +23 -2
  104. data/lib/wx/doc/gen/events.rb +103 -112
  105. data/lib/wx/doc/gen/evt_handler.rb +28 -52
  106. data/lib/wx/doc/gen/file_dialog.rb +53 -50
  107. data/lib/wx/doc/gen/find_replace_dialog.rb +1 -1
  108. data/lib/wx/doc/gen/font.rb +19 -2
  109. data/lib/wx/doc/gen/font_data.rb +2 -0
  110. data/lib/wx/doc/gen/font_dialog.rb +1 -1
  111. data/lib/wx/doc/gen/frame.rb +4 -3
  112. data/lib/wx/doc/gen/fs_file.rb +8 -0
  113. data/lib/wx/doc/gen/gcdc.rb +2 -22
  114. data/lib/wx/doc/gen/gdi_common.rb +18 -2
  115. data/lib/wx/doc/gen/gdi_object.rb +2 -0
  116. data/lib/wx/doc/gen/graphics_context.rb +4 -43
  117. data/lib/wx/doc/gen/graphics_object.rb +2 -0
  118. data/lib/wx/doc/gen/grid/grid_cell_attr.rb +2 -1
  119. data/lib/wx/doc/gen/grid/grid_ctrl.rb +4 -2
  120. data/lib/wx/doc/gen/grid/grid_table_message.rb +2 -0
  121. data/lib/wx/doc/gen/grid_bag_sizer.rb +4 -0
  122. data/lib/wx/doc/gen/help_controller.rb +4 -1
  123. data/lib/wx/doc/gen/html/html_cell.rb +4 -1
  124. data/lib/wx/doc/gen/html/html_help_controller.rb +4 -1
  125. data/lib/wx/doc/gen/html/html_help_data.rb +4 -0
  126. data/lib/wx/doc/gen/html/html_help_window.rb +2 -1
  127. data/lib/wx/doc/gen/html/html_list_box.rb +138 -11
  128. data/lib/wx/doc/gen/html/html_window.rb +9 -3
  129. data/lib/wx/doc/gen/hyperlink_ctrl.rb +147 -0
  130. data/lib/wx/doc/gen/hyperlink_event.rb +43 -0
  131. data/lib/wx/doc/gen/icon.rb +7 -1
  132. data/lib/wx/doc/gen/icon_location.rb +2 -0
  133. data/lib/wx/doc/gen/image.rb +15 -8
  134. data/lib/wx/doc/gen/keyboard_state.rb +6 -0
  135. data/lib/wx/doc/gen/list_box.rb +0 -11
  136. data/lib/wx/doc/gen/list_ctrl.rb +10 -13
  137. data/lib/wx/doc/gen/locale.rb +7 -3
  138. data/lib/wx/doc/gen/log.rb +6 -2
  139. data/lib/wx/doc/gen/mdi_frame.rb +2 -0
  140. data/lib/wx/doc/gen/media_ctrl.rb +2 -0
  141. data/lib/wx/doc/gen/memory_dc.rb +105 -18
  142. data/lib/wx/doc/gen/menu.rb +4 -2
  143. data/lib/wx/doc/gen/menu_bar.rb +0 -8
  144. data/lib/wx/doc/gen/menu_item.rb +9 -3
  145. data/lib/wx/doc/gen/message_dialog.rb +6 -3
  146. data/lib/wx/doc/gen/mirror_dc.rb +2 -8
  147. data/lib/wx/doc/gen/mouse_state.rb +2 -0
  148. data/lib/wx/doc/gen/multi_choice_dialog.rb +0 -2
  149. data/lib/wx/doc/gen/non_owned_window.rb +2 -1
  150. data/lib/wx/doc/gen/notebook.rb +4 -2
  151. data/lib/wx/doc/gen/paint_dc.rb +2 -6
  152. data/lib/wx/doc/gen/palette.rb +3 -3
  153. data/lib/wx/doc/gen/pen.rb +6 -1
  154. data/lib/wx/doc/gen/pg/pg_editor.rb +2 -1
  155. data/lib/wx/doc/gen/pg/pg_multi_button.rb +4 -0
  156. data/lib/wx/doc/gen/pg/pg_properties.rb +30 -3
  157. data/lib/wx/doc/gen/pg/pg_property.rb +30 -4
  158. data/lib/wx/doc/gen/pg/pg_validation_info.rb +2 -0
  159. data/lib/wx/doc/gen/pg/property_grid.rb +5 -2
  160. data/lib/wx/doc/gen/pg/property_grid_interface.rb +6 -2
  161. data/lib/wx/doc/gen/pg/property_grid_manager.rb +2 -0
  162. data/lib/wx/doc/gen/pg/property_grid_page_state.rb +2 -0
  163. data/lib/wx/doc/gen/picker_base.rb +2 -1
  164. data/lib/wx/doc/gen/platform_info.rb +4 -1
  165. data/lib/wx/doc/gen/property_sheet_dialog.rb +2 -0
  166. data/lib/wx/doc/gen/prt/post_script_dc.rb +2 -8
  167. data/lib/wx/doc/gen/prt/print_data.rb +6 -0
  168. data/lib/wx/doc/gen/prt/printer.rb +0 -3
  169. data/lib/wx/doc/gen/prt/printer_dc.rb +2 -6
  170. data/lib/wx/doc/gen/radio_box.rb +2 -10
  171. data/lib/wx/doc/gen/rbn/ribbon_art_provider.rb +6 -0
  172. data/lib/wx/doc/gen/rbn/ribbon_panel.rb +1 -1
  173. data/lib/wx/doc/gen/region.rb +2 -0
  174. data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +6 -0
  175. data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +0 -4
  176. data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +2 -0
  177. data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +2 -1
  178. data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +2 -0
  179. data/lib/wx/doc/gen/screen_dc.rb +2 -0
  180. data/lib/wx/doc/gen/scroll_bar.rb +2 -1
  181. data/lib/wx/doc/gen/scrolled_canvas.rb +4 -8
  182. data/lib/wx/doc/gen/scrolled_control.rb +4 -8
  183. data/lib/wx/doc/gen/scrolled_window.rb +4 -8
  184. data/lib/wx/doc/gen/search_ctrl.rb +131 -0
  185. data/lib/wx/doc/gen/single_choice_dialog.rb +0 -2
  186. data/lib/wx/doc/gen/sizer.rb +14 -3
  187. data/lib/wx/doc/gen/splash_screen.rb +2 -0
  188. data/lib/wx/doc/gen/static_box.rb +6 -3
  189. data/lib/wx/doc/gen/static_box_sizer.rb +2 -1
  190. data/lib/wx/doc/gen/status_bar.rb +0 -5
  191. data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +4 -5
  192. data/lib/wx/doc/gen/svg_file_dc.rb +10 -11
  193. data/lib/wx/doc/gen/text_ctrl.rb +10 -3
  194. data/lib/wx/doc/gen/text_entry.rb +8 -3
  195. data/lib/wx/doc/gen/text_entry_dialog.rb +4 -2
  196. data/lib/wx/doc/gen/timer_event.rb +2 -0
  197. data/lib/wx/doc/gen/tool_bar.rb +8 -4
  198. data/lib/wx/doc/gen/top_level_window.rb +5 -2
  199. data/lib/wx/doc/gen/tree_ctrl.rb +0 -6
  200. data/lib/wx/doc/gen/ui_action_simulator.rb +100 -0
  201. data/lib/wx/doc/gen/utils.rb +1 -1
  202. data/lib/wx/doc/gen/v_list_box.rb +36 -26
  203. data/lib/wx/doc/gen/validator.rb +2 -1
  204. data/lib/wx/doc/gen/variant.rb +10 -0
  205. data/lib/wx/doc/gen/window.rb +38 -17
  206. data/lib/wx/doc/gen/window_dc.rb +2 -0
  207. data/lib/wx/doc/gen/window_disabler.rb +2 -0
  208. data/lib/wx/doc/gen/wizard_page_simple.rb +2 -0
  209. data/lib/wx/doc/gen/xml_node.rb +6 -0
  210. data/lib/wx/doc/gen/xml_resource.rb +4 -1
  211. data/lib/wx/doc/memory_dc.rb +75 -0
  212. data/lib/wx/doc/mirror_dc.rb +16 -0
  213. data/lib/wx/doc/pen.rb +17 -0
  214. data/lib/wx/doc/prt/printer_dc.rb +26 -0
  215. data/lib/wx/doc/radio_box.rb +20 -0
  216. data/lib/wx/doc/screen_dc.rb +10 -6
  217. data/lib/wx/doc/svg_file_dc.rb +20 -0
  218. data/lib/wx/doc/v_list_box.rb +9 -0
  219. data/lib/wx/doc/window.rb +27 -0
  220. data/lib/wx/doc/window_disabler.rb +10 -0
  221. data/lib/wx/html/keyword_defs.rb +6 -7
  222. data/lib/wx/html/require.rb +1 -0
  223. data/lib/wx/html/simple_html_listbox.rb +105 -0
  224. data/lib/wx/keyword_defs.rb +83 -75
  225. data/lib/wx/prt/keyword_defs.rb +5 -1
  226. data/lib/wx/version.rb +1 -1
  227. data/lib/wx/wxruby/cmd/test.rb +1 -1
  228. data/lib/wxruby_aui.so +0 -0
  229. data/lib/wxruby_core.so +0 -0
  230. data/lib/wxruby_grid.so +0 -0
  231. data/lib/wxruby_html.so +0 -0
  232. data/lib/wxruby_pg.so +0 -0
  233. data/lib/wxruby_prt.so +0 -0
  234. data/lib/wxruby_rbn.so +0 -0
  235. data/lib/wxruby_rtc.so +0 -0
  236. data/lib/wxruby_stc.so +0 -0
  237. data/rakelib/install.rb +20 -7
  238. data/rakelib/lib/config/linux.rb +4 -2
  239. data/rakelib/lib/config/macosx.rb +120 -1
  240. data/rakelib/lib/config/mingw.rb +6 -1
  241. data/rakelib/lib/config/unixish.rb +26 -11
  242. data/rakelib/lib/config.rb +15 -6
  243. data/rakelib/yard/yard/relative_markdown_links.rb +5 -1
  244. data/samples/aui/aui.rb +432 -363
  245. data/samples/bigdemo/wxArtProvider.rbw +5 -4
  246. data/samples/controls/controls.rb +2 -2
  247. data/samples/controls/htlbox.rb +411 -0
  248. data/samples/controls/tn_htlbox.png +0 -0
  249. data/samples/drawing/graphics_drawing.rb +1 -2
  250. data/samples/drawing/{svgtest.rb → image_prt.rb} +49 -18
  251. data/samples/drawing/tn_image_prt.png +0 -0
  252. data/samples/propgrid/propgrid.rb +26 -21
  253. data/samples/ribbon/ribbon.rb +47 -46
  254. data/samples/sampler/editor.rb +33 -25
  255. data/samples/sampler/sample.rb +2 -2
  256. data/samples/sampler/stc_editor.rb +4 -2
  257. data/tests/lib/item_container_tests.rb +82 -0
  258. data/tests/lib/text_entry_tests.rb +80 -0
  259. data/tests/lib/wxapp_runner.rb +15 -3
  260. data/tests/lib/wxframe_runner.rb +144 -0
  261. data/tests/test_app_event_filter.rb +74 -0
  262. data/tests/test_art_provider.rb +52 -0
  263. data/tests/test_clipboard.rb +2 -1
  264. data/tests/test_event_handling.rb +199 -16
  265. data/tests/test_events.rb +4 -11
  266. data/tests/test_ext_controls.rb +28 -0
  267. data/tests/test_font.rb +239 -0
  268. data/tests/test_gdi_object.rb +161 -0
  269. data/tests/test_intl.rb +16 -15
  270. data/tests/test_item_data.rb +33 -1
  271. data/tests/test_std_controls.rb +373 -0
  272. data/tests/test_window.rb +340 -0
  273. metadata +61 -8
  274. data/lib/wx/doc/gen/auto_buffered_paint_dc.rb +0 -47
  275. data/lib/wx/doc/gen/buffered_dc.rb +0 -95
  276. data/lib/wx/doc/gen/buffered_paint_dc.rb +0 -55
  277. data/lib/wx/doc/gen/colour_data.rb +0 -96
  278. data/samples/drawing/tn_svgtest.png +0 -0
@@ -328,7 +328,7 @@ module Wx
328
328
  # All the other functions still work with the column indices, i.e. the visual positioning of the columns on screen doesn't affect the code setting or getting their values for example.
329
329
  #
330
330
  # Example of reordering columns:
331
- #
331
+ # ```
332
332
  # wxListCtrl *list = new wxListCtrl(...);
333
333
  # for ( int i = 0; i < 3; i++ )
334
334
  # list->InsertColumn(i, wxString::Format("Column %d", i));
@@ -343,6 +343,7 @@ module Wx
343
343
  # // list->GetColumnIndexFromOrder(n) will return order[n] and
344
344
  # // list->GetColumnOrder() will return 1, 2 and 0 for the column 0,
345
345
  # // 1 and 2 respectively
346
+ # ```
346
347
  #
347
348
  # === Styles
348
349
  #
@@ -524,14 +525,12 @@ module Wx
524
525
  # @return [Integer]
525
526
  # @overload find_item(start, data)
526
527
  # Find an item whose data matches this data, starting from start or the beginning if 'start' is <code>-1</code>.
527
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method is implemented as FindItemData(start, data).
528
528
  # The next matching item if any or <code>-1</code> ({Wx::NOT_FOUND}) otherwise.
529
529
  # @param start [Integer]
530
530
  # @param data [Integer]
531
531
  # @return [Integer]
532
532
  # @overload find_item(start, pt, direction)
533
533
  # Find an item nearest this position in the specified direction, starting from start or the beginning if start is -1.
534
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method is implemented as FindItemAtPos(start, pt, direction).
535
534
  # The next matching item if any or <code>-1</code> ({Wx::NOT_FOUND}) otherwise.
536
535
  # @param start [Integer]
537
536
  # @param pt [Array(Integer, Integer), Wx::Point]
@@ -541,7 +540,6 @@ module Wx
541
540
 
542
541
  # Gets information about this column.
543
542
  # See {Wx::ListCtrl#set_item} for more information.
544
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method takes only the col parameter and returns a Wx::ListItem (or undef).
545
543
  # @param col [Integer]
546
544
  # @param item [Wx::ListItem]
547
545
  # @return [true,false]
@@ -628,7 +626,6 @@ module Wx
628
626
  alias_method :item_font, :get_item_font
629
627
 
630
628
  # Returns the position of the item, in icon or small icon view.
631
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method takes only the item parameter and returns a Wx::Point (or undef).
632
629
  # @param item [Integer]
633
630
  # @param pos [Array(Integer, Integer), Wx::Point]
634
631
  # @return [true,false]
@@ -637,7 +634,6 @@ module Wx
637
634
 
638
635
  # Returns the rectangle representing the item's size and position, in physical coordinates.
639
636
  # code is one of {Wx::LIST_RECT_BOUNDS}, {Wx::LIST_RECT_ICON}, {Wx::LIST_RECT_LABEL}.
640
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method takes only the item and code parameters and returns a Wx::Rect (or undef).
641
637
  # @param item [Integer]
642
638
  # @param code [Integer]
643
639
  # @return [Array(true,false,Wx::Rect)]
@@ -674,6 +670,7 @@ module Wx
674
670
  # Searches for an item with the given geometry or state, starting from item but excluding the item itself.
675
671
  # If item is -1, the first item that matches the specified flags will be returned. Returns the first item with given state following item or -1 if no such item found. This function may be used to find all selected items in the control like this:
676
672
  #
673
+ # ```
677
674
  # long item = -1;
678
675
  # for ( ;; )
679
676
  # {
@@ -686,6 +683,7 @@ module Wx
686
683
  # // this item is selected - do whatever is needed with it
687
684
  # wxLogMessage("Item %ld is selected.", item);
688
685
  # }
686
+ # ```
689
687
  #
690
688
  # geometry can be one of:
691
689
  # - {Wx::LIST_NEXT_ABOVE}: Searches for an item above the specified item.- {Wx::LIST_NEXT_ALL}: Searches for subsequent item by index.- {Wx::LIST_NEXT_BELOW}: Searches for an item below the specified item.- {Wx::LIST_NEXT_LEFT}: Searches for an item to the left of the specified item.- {Wx::LIST_NEXT_RIGHT}: Searches for an item to the right of the specified item.
@@ -756,7 +754,6 @@ module Wx
756
754
  # - {Wx::LIST_HITTEST_ABOVE}: Above the control's client area.- {Wx::LIST_HITTEST_BELOW}: Below the control's client area.- {Wx::LIST_HITTEST_TOLEFT}: To the left of the control's client area.- {Wx::LIST_HITTEST_TORIGHT}: To the right of the control's client area.- {Wx::LIST_HITTEST_NOWHERE}: Inside the control's client area but not over an item.- {Wx::LIST_HITTEST_ONITEMICON}: Over an item's icon.- {Wx::LIST_HITTEST_ONITEMLABEL}: Over an item's text.- {Wx::LIST_HITTEST_ONITEMSTATEICON}: Over the checkbox of an item.- {Wx::LIST_HITTEST_ONITEM}: Combination of {Wx::LIST_HITTEST_ONITEMICON}, {Wx::LIST_HITTEST_ONITEMLABEL}, {Wx::LIST_HITTEST_ONITEMSTATEICON}.
757
755
  #
758
756
  # If ptrSubItem is not NULL and the {Wx::ListCtrl} is in the report mode the subitem (or column) number will also be provided. This feature is only available in version 2.7.0 or higher and is currently only implemented under {Wx::MSW} and requires at least comctl32.dll of version 4.70 on the host system or the value stored in ptrSubItem will be always -1. To compile this feature into wxWidgets library you need to have access to commctrl.h of version 4.70 that is provided by Microsoft.
759
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method only takes the point parameter and returns a 2-element list (item, flags).
760
757
  # @param point [Array(Integer, Integer), Wx::Point]
761
758
  # @return [Array(Integer,Integer)]
762
759
  def hit_test(point) end
@@ -790,19 +787,16 @@ module Wx
790
787
  # @return [Integer]
791
788
  # @overload insert_item(index, label)
792
789
  # Insert a string item.
793
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method is implemented as InsertStringItem(index, label).
794
790
  # @param index [Integer] Index of the new item, supplied by the application
795
791
  # @param label [String] String label
796
792
  # @return [Integer]
797
793
  # @overload insert_item(index, imageIndex)
798
794
  # Insert an image item.
799
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method is implemented as InsertImageItem(index, imageIndex).
800
795
  # @param index [Integer] Index of the new item, supplied by the application
801
796
  # @param imageIndex [Integer] Index into the image list associated with this control and view style
802
797
  # @return [Integer]
803
798
  # @overload insert_item(index, label, imageIndex)
804
799
  # Insert an image/string item.
805
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method is implemented as InsertImageStringItem(index, label, imageIndex).
806
800
  # @param index [Integer] Index of the new item, supplied by the application
807
801
  # @param label [String] String label
808
802
  # @param imageIndex [Integer] Index into the image list associated with this control and view style
@@ -985,11 +979,13 @@ module Wx
985
979
  # Sets the item state.
986
980
  # The stateMask is a combination of {Wx::LIST_STATE_XXX} constants described in {Wx::ListItem} documentation. For each of the bits specified in stateMask, the corresponding state is set or cleared depending on whether state argument contains the same bit or not.
987
981
  # So to select an item you can use
988
- #
982
+ # ```
989
983
  # list->SetItemState(item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
984
+ # ```
990
985
  # while to deselect it you should use
991
- #
986
+ # ```
992
987
  # list->SetItemState(item, 0, wxLIST_STATE_SELECTED);
988
+ # ```
993
989
  #
994
990
  # Consider using {Wx::ListView} if possible to avoid dealing with this error-prone and confusing method.
995
991
  # Also notice that contrary to the usual rule that only user actions generate events, this method does generate {Wx::EVT_LIST_ITEM_SELECTED} event when it is used to select an item.
@@ -1092,7 +1088,7 @@ module Wx
1092
1088
  # Returns the new value to use for sort indicator after clicking a column.
1093
1089
  # This helper function can be useful in the EVT_LIST_COL_CLICK handler when it updates the sort indicator after the user clicked on a column.
1094
1090
  # For example:
1095
- #
1091
+ # ```
1096
1092
  # void MyListCtrl::OnColClick(wxListEvent& event)
1097
1093
  # {
1098
1094
  # int col = event.GetColumn();
@@ -1103,6 +1099,7 @@ module Wx
1103
1099
  # SortItems(MyCompareFunction, ascending);
1104
1100
  # ShowSortIndicator(col, ascending);
1105
1101
  # }
1102
+ # ```
1106
1103
  # @param col [Integer]
1107
1104
  # @return [true,false]
1108
1105
  def get_updated_ascending_sort_indicator(col) end
@@ -3779,8 +3779,8 @@ module Wx
3779
3779
  #
3780
3780
  # In wxWidgets this class manages current locale. It also initializes and activates {Wx::Translations} object that manages message catalogs.
3781
3781
  # For a list of the supported languages, please see {Wx::Language} enum values. These constants may be used to specify the language in {Wx::Locale#init} and are returned by {Wx::Locale.get_system_language}.
3782
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} you can't use the '_' function name, so the Wx::Locale module can export the gettext and gettext_noop under any given name.
3783
3782
  #
3783
+ # ```
3784
3784
  # # this imports gettext ( equivalent to Wx::GetTranslation
3785
3785
  # # and gettext_noop ( a noop )
3786
3786
  # # into your module
@@ -3792,9 +3792,11 @@ module Wx
3792
3792
  # print gettext( "Panic!" );
3793
3793
  #
3794
3794
  # button = Wx::Button-new( window, -1, gettext( "Label" ) );
3795
+ # ```
3795
3796
  #
3796
3797
  # If you need to translate a lot of strings, then adding gettext( ) around each one is a long task ( that is why _( ) was introduced ), so just choose a shorter name for gettext:
3797
3798
  #
3799
+ # ```
3798
3800
  # use Wx::Locale 'gettext' = 't',
3799
3801
  # 'gettext_noop' = 'gettext_noop';
3800
3802
  #
@@ -3804,6 +3806,7 @@ module Wx
3804
3806
  # print t( "Panic!!" );
3805
3807
  #
3806
3808
  # # ...
3809
+ # ```
3807
3810
  #
3808
3811
  # ===
3809
3812
  #
@@ -4006,9 +4009,10 @@ module Wx
4006
4009
  end # Locale
4007
4010
 
4008
4011
  # Encapsulates a {Wx::Language} identifier together with OS-specific information related to that language.
4009
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} Wx::LanguageInfo has only one method:
4010
- # - Wx::LanguageInfo->new(language, canonicalName, WinLang, WinSubLang, Description)
4011
4012
  #
4013
+ #
4014
+ #
4015
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
4012
4016
  class LanguageInfo < ::Object
4013
4017
 
4014
4018
  # Win32 language identifiers (LANG_xxxx, SUBLANG_xxxx).
@@ -162,8 +162,9 @@ module Wx
162
162
 
163
163
  # Sets the log level for the given component.
164
164
  # For example, to disable all but error messages from wxWidgets network classes you may use
165
- #
165
+ # ```
166
166
  # wxLog::SetComponentLevel("wx/net", wxLOG_Error);
167
+ # ```
167
168
  #
168
169
  # {Wx::Log.set_log_level} may be used to set the global log level.
169
170
  # @param component [String] Non-empty component name, possibly using slashes (<code>/</code>) to separate it into several parts.
@@ -248,7 +249,7 @@ module Wx
248
249
  # Log the given record.
249
250
  # This function should only be called from the DoLog() implementations in the derived classes if they need to call {Wx::Log#do_log_record} on another log object (they can, of course, just use {Wx::Log#do_log_record} call syntax to call it on the object itself). It should not be used for logging new messages which can be only sent to the currently active logger using OnLog() which also checks if the logging (for this level) is enabled while this method just directly calls DoLog().
250
251
  # Example of use of this class from {Wx::LogChain}:
251
- #
252
+ # ```
252
253
  # void wxLogChain::DoLogRecord(wxLogLevel level,
253
254
  # const wxString& msg,
254
255
  # const wxLogRecordInfo& info)
@@ -261,6 +262,7 @@ module Wx
261
262
  # if ( m_logNew && m_logNew != this )
262
263
  # m_logNew->LogRecord(level, msg, info);
263
264
  # }
265
+ # ```
264
266
  # @param level [Wx::LogLevel]
265
267
  # @param msg [String]
266
268
  # @param info [Wx::LogRecordInfo]
@@ -294,6 +296,7 @@ module Wx
294
296
  # It is especially useful when you want to divert the logs somewhere (for example to a file or a log window) but also keep showing the error messages using the standard dialogs as {Wx::LogGui} does by default.
295
297
  # Example of usage:
296
298
  #
299
+ # ```
297
300
  # wxLogChain *logChain = new wxLogChain(new wxLogStderr);
298
301
  #
299
302
  # // all the log messages are sent to stderr and also processed as usually
@@ -302,6 +305,7 @@ module Wx
302
305
  # // don't delete logChain directly as this would leave a dangling
303
306
  # // pointer as active log target, use SetActiveTarget() instead
304
307
  # delete wxLog::SetActiveTarget(...something else or NULL...);
308
+ # ```
305
309
  #
306
310
  # ===
307
311
  #
@@ -112,8 +112,10 @@ module Wx
112
112
  # Override this to return a different kind of client window.
113
113
  # If you override this function, you must create your parent frame in two stages, or your function will never be called, due to the way C++ treats virtual functions called from constructors. For example:
114
114
  #
115
+ # ```
115
116
  # frame = new MyParentFrame;
116
117
  # frame->Create(parent, myParentFrameId, "My Parent Frame");
118
+ # ```
117
119
  #
118
120
  # You might wish to derive from {Wx::MDIClientWindow} in order to implement different erase behaviour, for example, such as painting a bitmap on the background.
119
121
  # Note that it is probably impossible to have a client window that scrolls as well as painting a bitmap or pattern, since in <b>OnScroll</b>, the scrollbar positions always return zero.
@@ -20,6 +20,7 @@ module Wx
20
20
  # When {Wx::MediaCtrl} plays a file, it plays until the stop position is reached (currently the end of the file/stream). Right before it hits the end of the stream, it fires off a EVT_MEDIA_STOP event to its parent window, at which point the event handler can choose to veto the event, preventing the stream from actually stopping.
21
21
  # Example:
22
22
  #
23
+ # ```
23
24
  # // bind the media event
24
25
  # Bind(wxMY_ID, wxEVT_MEDIA_STOP, &MyFrame::OnMediaStop, this);
25
26
  #
@@ -32,6 +33,7 @@ module Wx
32
33
  # evt.Veto();
33
34
  # }
34
35
  # }
36
+ # ```
35
37
  #
36
38
  # When {Wx::MediaCtrl} stops, either by the EVT_MEDIA_STOP not being vetoed, or by manually calling {Wx::MediaCtrl#stop}, where it actually stops is not at the beginning, rather, but at the beginning of the stream. That is, when it stops and play is called, playback is guaranteed to start at the beginning of the media. This is because some streams are not seekable, and when stop is called on them they return to the beginning, thus {Wx::MediaCtrl} tries to keep consistent for all types of media.
37
39
  # Note that when changing the state of the media through {Wx::MediaCtrl#play} and other methods, the media may not actually be in the {Wx::MediaState::MEDIASTATE_PLAYING}, for example. If you are relying on the media being in certain state, catch the event relevant to the state. See {Wx::MediaEvent} for the kinds of events that you can catch.
@@ -6,10 +6,26 @@
6
6
 
7
7
  module Wx
8
8
 
9
+ #
10
+ BUFFER_VIRTUAL_AREA = 1
11
+
12
+ #
13
+ BUFFER_CLIENT_AREA = 2
14
+
15
+ #
16
+ BUFFER_USES_SHARED_BUFFER = 4
17
+
18
+ # Check if the window is natively double buffered and will return a {Wx::PaintDC} if it is, a {Wx::BufferedPaintDC} otherwise.
19
+ # It is the caller's responsibility to delete the {Wx::DC} pointer when finished with it.
20
+ # @param window [Wx::Window]
21
+ # @return [Wx::DC]
22
+ def self.auto_buffered_paint_dc_factory(window) end
23
+
9
24
  # A memory device context provides a means to draw graphics onto a bitmap.
10
25
  # When drawing in to a mono-bitmap, using {Wx::WHITE}, {Wx::WHITE_PEN} and {Wx::WHITE_BRUSH} will draw the background colour (i.e. 0) whereas all other colours will draw the foreground colour (i.e. 1).
11
26
  # A bitmap must be selected into the new memory DC before it may be used for anything. Typical usage is as follows:
12
27
  #
28
+ # ```
13
29
  # // Create a memory DC
14
30
  # wxMemoryDC temp_dc;
15
31
  # temp_dc.SelectObject(test_bitmap);
@@ -17,15 +33,18 @@ module Wx
17
33
  # // We can now draw into the memory DC...
18
34
  # // Copy from this DC to another DC.
19
35
  # old_dc.Blit(250, 50, BITMAP_WIDTH, BITMAP_HEIGHT, temp_dc, 0, 0);
36
+ # ```
20
37
  #
21
38
  # Note that the memory DC must be deleted (or the bitmap selected out of it) before a bitmap can be reselected into another memory DC.
22
39
  # And, before performing any other operations on the bitmap data, the bitmap must be selected out of the memory DC:
23
40
  #
41
+ # ```
24
42
  # temp_dc.SelectObject(wxNullBitmap);
43
+ # ```
25
44
  #
26
45
  # This happens automatically when {Wx::MemoryDC} object goes out of scope.
27
46
  # Note that the scaling factor of the bitmap determines the scaling factor used by this device context, so when using a memory device context as a back buffer for a window, you should typically create the bitmap using the same scale factor as used by the window, e.g.
28
- #
47
+ # ```
29
48
  # void MyWindow::OnPaint(wxPaintEvent&)
30
49
  # {
31
50
  # wxBitmap bmp;
@@ -38,6 +57,7 @@ module Wx
38
57
  # wxPaintDC dc(this);
39
58
  # dc.DrawBitmap(bmp, wxPoint(0, 0));
40
59
  # }
60
+ # ```
41
61
  #
42
62
  # ===
43
63
  #
@@ -46,24 +66,10 @@ module Wx
46
66
  # @see Wx::DC
47
67
  #
48
68
  #
69
+ #
70
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
49
71
  class MemoryDC < DC
50
72
 
51
- # @overload initialize()
52
- # Constructs a new memory device context.
53
- # Use the {Wx::DC#is_ok} member to test whether the constructor was successful in creating a usable device context. Don't forget to select a bitmap into the DC before drawing on it.
54
- # @return [MemoryDC]
55
- # @overload initialize(dc)
56
- # Constructs a new memory device context having the same characteristics as the given existing device context.
57
- # This constructor creates a memory device context compatible with dc in {Wx::MSW}, the argument is ignored in the other ports. If dc is NULL, a device context compatible with the screen is created, just as with the default constructor.
58
- # @param dc [Wx::DC]
59
- # @return [MemoryDC]
60
- # @overload initialize(bitmap)
61
- # Constructs a new memory device context and calls {Wx::MemoryDC#select_object} with the given bitmap.
62
- # Use the {Wx::DC#is_ok} member to test whether the constructor was successful in creating a usable device context.
63
- # @param bitmap [Wx::Bitmap]
64
- # @return [MemoryDC]
65
- def initialize(*args) end
66
-
67
73
  # Allow using this device context object to modify the given bitmap contents.
68
74
  # Note that if you need to only use the existing bitmap contents instead of modifying it, you should use {Wx::MemoryDC#select_object_as_source} instead.
69
75
  # Before using the updated bitmap data, make sure to select it out of context first either by selecting {Wx::NULL_BITMAP} into the device context or destroying the device context entirely.
@@ -83,7 +89,7 @@ module Wx
83
89
 
84
90
  # @overload get_selected_bitmap()
85
91
  # Get the selected bitmap.
86
- # @return [void]
92
+ # @return [Wx::Bitmap]
87
93
  # @overload get_selected_bitmap()
88
94
  # @return [Wx::Bitmap]
89
95
  def get_selected_bitmap(*args) end
@@ -91,5 +97,86 @@ module Wx
91
97
 
92
98
  end # MemoryDC
93
99
 
100
+ # This class provides a simple way to avoid flicker: when drawing on it, everything is in fact first drawn on an in-memory buffer (a {Wx::Bitmap}) and then copied to the screen, using the associated {Wx::DC}, only once, when this object is destroyed.
101
+ # {Wx::BufferedDC} itself is typically associated with {Wx::ClientDC}, if you want to use it in your EVT_PAINT handler, you should look at {Wx::BufferedPaintDC} instead.
102
+ # When used like this, a valid DC must be specified in the constructor while the buffer bitmap doesn't have to be explicitly provided, by default this class will allocate the bitmap of required size itself. However using a dedicated bitmap can speed up the redrawing process by eliminating the repeated creation and destruction of a possibly big bitmap. Otherwise, {Wx::BufferedDC} can be used in the same way as any other device context.
103
+ # Another possible use for {Wx::BufferedDC} is to use it to maintain a backing store for the window contents. In this case, the associated DC may be NULL but a valid backing store bitmap should be specified.
104
+ # Finally, please note that GTK+ 2.0 as well as macOS provide double buffering themselves natively. You can either use {Wx::Window#is_double_buffered} to determine whether you need to use buffering or not, or use {Wx::AutoBufferedPaintDC} to avoid needless double buffering on the systems which already do it automatically.
105
+ # ===
106
+ #
107
+ # Category: Device Contexts
108
+ # @see Wx::DC
109
+ # @see Wx::MemoryDC
110
+ # @see Wx::BufferedPaintDC
111
+ # @see Wx::AutoBufferedPaintDC
112
+ #
113
+ #
114
+ class BufferedDC < MemoryDC
115
+
116
+ # @overload init(dc, area, style=Wx::BUFFER_CLIENT_AREA)
117
+ # Initializes the object created using the default constructor.
118
+ # Please see the constructors for parameter details.
119
+ # @param dc [Wx::DC]
120
+ # @param area [Array(Integer, Integer), Wx::Size]
121
+ # @param style [Integer]
122
+ # @return [void]
123
+ # @overload init(dc, buffer=Wx::NULL_BITMAP, style=Wx::BUFFER_CLIENT_AREA)
124
+ # Initializes the object created using the default constructor.
125
+ # Please see the constructors for parameter details.
126
+ # @param dc [Wx::DC]
127
+ # @param buffer [Wx::Bitmap]
128
+ # @param style [Integer]
129
+ # @return [void]
130
+ def init(*args) end
131
+
132
+ # Blits the buffer to the dc, and detaches the dc from the buffer (so it can be effectively used once only).
133
+ # Usually only called in the destructor or by the destructor of derived classes if the BufferedDC must blit before the derived class (which may own the dc it's blitting to) is destroyed.
134
+ # @return [void]
135
+ def un_mask; end
136
+
137
+ # Set the style.
138
+ # @param style [Integer]
139
+ # @return [void]
140
+ def set_style(style) end
141
+ alias_method :style=, :set_style
142
+
143
+ # Get the style.
144
+ # @return [Integer]
145
+ def get_style; end
146
+ alias_method :style, :get_style
147
+
148
+ end # BufferedDC
149
+
150
+ # This is a subclass of {Wx::BufferedDC} which can be used inside of an <code>EVT_PAINT()</code> event handler to achieve double-buffered drawing.
151
+ # Just use this class instead of {Wx::PaintDC} and make sure {Wx::Window#set_background_style} is called with {Wx::BackgroundStyle::BG_STYLE_PAINT} somewhere in the class initialization code, and that's all you have to do to (mostly) avoid flicker. The only thing to watch out for is that if you are using this class together with {Wx::Scrolled}, you probably do <b>not</b> want to call Wx::Scrolled#prepare_dc on it as it already does this internally for the real underlying {Wx::PaintDC}.
152
+ # ===
153
+ #
154
+ # Category: Device Contexts
155
+ # @see Wx::DC
156
+ # @see Wx::BufferedDC
157
+ # @see Wx::AutoBufferedPaintDC
158
+ # @see Wx::PaintDC
159
+ #
160
+ #
161
+ class BufferedPaintDC < BufferedDC
162
+
163
+ end # BufferedPaintDC
164
+
165
+ # This {Wx::DC} derivative can be used inside of an <code>EVT_PAINT()</code> event handler to achieve double-buffered drawing.
166
+ # Just use this class instead of {Wx::PaintDC} and make sure {Wx::Window#set_background_style} is called with {Wx::BackgroundStyle::BG_STYLE_PAINT} somewhere in the class initialization code, and that's all you have to do to (mostly) avoid flicker.
167
+ # The difference between {Wx::BufferedPaintDC} and this class is that this class won't double-buffer on platforms which have native double-buffering already, avoiding any unnecessary buffering to avoid flicker.
168
+ # {Wx::AutoBufferedPaintDC} is simply a typedef of {Wx::PaintDC} on platforms that have native double-buffering, otherwise, it is a typedef of {Wx::BufferedPaintDC}.
169
+ # ===
170
+ #
171
+ # Category: Device Contexts
172
+ # @see Wx::DC
173
+ # @see Wx::BufferedPaintDC
174
+ # @see Wx::PaintDC
175
+ #
176
+ #
177
+ class AutoBufferedPaintDC < BufferedPaintDC
178
+
179
+ end # AutoBufferedPaintDC
180
+
94
181
 
95
182
  end
@@ -55,11 +55,13 @@ module Wx
55
55
  # @overload append(id, item=(''), helpString=(''), kind=Wx::ItemKind::ITEM_NORMAL)
56
56
  # Adds a menu item.
57
57
  # Example:
58
- #
58
+ # ```
59
59
  # m_pFileMenu->Append(ID_NEW_FILE, "&New file\tCTRL+N", "Creates a new XYZ document");
60
+ # ```
60
61
  # or even better for stock menu items (see {Wx::MenuItem::MenuItem}):
61
- #
62
+ # ```
62
63
  # m_pFileMenu->Append(wxID_NEW, "", "Creates a new XYZ document");
64
+ # ```
63
65
  #
64
66
  # This command can be used after the menu has been shown, as well as on initial creation of a menu or menubar.
65
67
  # @see Wx::Menu#append_separator
@@ -62,8 +62,6 @@ module Wx
62
62
 
63
63
  # Finds the menu item object associated with the given menu item identifier.
64
64
  # The found menu item object, or NULL if one was not found.
65
- #
66
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method takes just the id parameter; in scalar context it returns the associated Wx::MenuItem, in list context it returns a 2-element list (item, submenu).
67
65
  # @param id [Integer] Menu item identifier.
68
66
  # @param menu [Wx::Menu] If not NULL, menu will get set to the associated menu.
69
67
  # @return [Wx::MenuItem]
@@ -203,12 +201,6 @@ module Wx
203
201
  # @return [void]
204
202
  def set_menu_label(pos, label) end
205
203
 
206
- # Returns the Apple menu.
207
- # This is the leftmost menu with application's name as its title. You shouldn't remove any items from it, but it is safe to insert extra menu items or submenus into it.
208
- # Availability: only available for the {Wx::OSX/Cocoa} port. {Wx::osx}
209
- # @return [Wx::Menu]
210
- def osx_get_apple_menu; end
211
-
212
204
  # @return [Wx::Frame]
213
205
  def get_frame; end
214
206
  alias_method :frame, :get_frame
@@ -212,19 +212,21 @@ module Wx
212
212
  # The label string for the normal menu items (not separators) may include the accelerator which can be used to activate the menu item from keyboard. An accelerator key can be specified using the ampersand <code>&</code> character. In order to embed an ampersand character in the menu item text, the ampersand must be doubled.
213
213
  # Optionally you can specify also an accelerator string appending a tab character <code>\t</code> followed by a valid key combination (e.g. <code>CTRL+V</code>). Its general syntax is any combination of <code>"CTRL"</code>, <code>"RAWCTRL"</code>, <code>"ALT"</code> and <code>"SHIFT"</code> strings (case doesn't matter) separated by either <code>'-'</code> or <code>'+'</code> characters and followed by the accelerator itself. Notice that CTRL corresponds to the "Ctrl" key on most platforms but not under macOS where it is mapped to "Cmd" key on Mac keyboard. Usually this is exactly what you want in portable code but if you really need to use the (rarely used for this purpose) "Ctrl" key even under Mac, you may use RAWCTRL to prevent this mapping. Under the other platforms RAWCTRL is the same as plain CTRL.
214
214
  # The accelerator may be any alphanumeric character, any function key (from F1 to F12), any numpad digit key using KP_ prefix (i.e. from KP_0 to KP_9) or one of the special strings listed below (again, case doesn't matter) corresponding to the specified key code:
215
- # - Del or Delete: WXK_DELETE- Back: WXK_BACK- Ins or Insert: WXK_INSERT- Enter or Return: WXK_RETURN- PgUp or PageUp: WXK_PAGEUP- PgDn or PageDown: WXK_PAGEDOWN- Left: WXK_LEFT- Right: WXK_RIGHT- Up: WXK_UP- Down: WXK_DOWN- Home: WXK_HOME- End: WXK_END- Space: WXK_SPACE- Tab: WXK_TAB- Esc or Escape: WXK_ESCAPE- Cancel: WXK_CANCEL- Clear: WXK_CLEAR- Menu: WXK_MENU- Pause: WXK_PAUSE- Capital: WXK_CAPITAL- Select: WXK_SELECT- Print: WXK_PRINT- Execute: WXK_EXECUTE- Snapshot: WXK_SNAPSHOT- Help: WXK_HELP- Add: WXK_ADD- Separator: WXK_SEPARATOR- Subtract: WXK_SUBTRACT- Decimal: WXK_DECIMAL- Divide: WXK_DIVIDE- Num_lock: WXK_NUMLOCK- Scroll_lock: WXK_SCROLL- KP_Space: WXK_NUMPAD_SPACE- KP_Tab: WXK_NUMPAD_TAB- KP_Enter: WXK_NUMPAD_ENTER- KP_Home: WXK_NUMPAD_HOME- KP_Left: WXK_NUMPAD_LEFT- KP_Up: WXK_NUMPAD_UP- KP_Right: WXK_NUMPAD_RIGHT- KP_Down: WXK_NUMPAD_DOWN- KP_PageUp: WXK_NUMPAD_PAGEUP- KP_PageDown: WXK_NUMPAD_PAGEDOWN- KP_Prior: WXK_NUMPAD_PAGEUP- KP_Next: WXK_NUMPAD_PAGEDOWN- KP_End: WXK_NUMPAD_END- KP_Begin: WXK_NUMPAD_BEGIN- KP_Insert: WXK_NUMPAD_INSERT- KP_Delete: WXK_NUMPAD_DELETE- KP_Equal: WXK_NUMPAD_EQUAL- KP_Multiply: WXK_NUMPAD_MULTIPLY- KP_Add: WXK_NUMPAD_ADD- KP_Separator: WXK_NUMPAD_SEPARATOR- KP_Subtract: WXK_NUMPAD_SUBTRACT- KP_Decimal: WXK_NUMPAD_DECIMAL- KP_Divide: WXK_NUMPAD_DIVIDE- Windows_Left: WXK_WINDOWS_LEFT- Windows_Right: WXK_WINDOWS_RIGHT- Windows_Menu: WXK_WINDOWS_MENU- Command: WXK_COMMAND
215
+ # - Del or Delete: {Wx::K_DELETE}- Back: {Wx::K_BACK}- Ins or Insert: {Wx::K_INSERT}- Enter or Return: {Wx::K_RETURN}- PgUp or PageUp: {Wx::K_PAGEUP}- PgDn or PageDown: {Wx::K_PAGEDOWN}- Left: {Wx::K_LEFT}- Right: {Wx::K_RIGHT}- Up: {Wx::K_UP}- Down: {Wx::K_DOWN}- Home: {Wx::K_HOME}- End: {Wx::K_END}- Space: {Wx::K_SPACE}- Tab: {Wx::K_TAB}- Esc or Escape: {Wx::K_ESCAPE}- Cancel: {Wx::K_CANCEL}- Clear: {Wx::K_CLEAR}- Menu: {Wx::K_MENU}- Pause: {Wx::K_PAUSE}- Capital: {Wx::K_CAPITAL}- Select: {Wx::K_SELECT}- Print: {Wx::K_PRINT}- Execute: {Wx::K_EXECUTE}- Snapshot: {Wx::K_SNAPSHOT}- Help: {Wx::K_HELP}- Add: {Wx::K_ADD}- Separator: {Wx::K_SEPARATOR}- Subtract: {Wx::K_SUBTRACT}- Decimal: {Wx::K_DECIMAL}- Divide: {Wx::K_DIVIDE}- Num_lock: {Wx::K_NUMLOCK}- Scroll_lock: {Wx::K_SCROLL}- KP_Space: {Wx::K_NUMPAD}_SPACE- KP_Tab: {Wx::K_NUMPAD}_TAB- KP_Enter: {Wx::K_NUMPAD}_ENTER- KP_Home: {Wx::K_NUMPAD}_HOME- KP_Left: {Wx::K_NUMPAD}_LEFT- KP_Up: {Wx::K_NUMPAD}_UP- KP_Right: {Wx::K_NUMPAD}_RIGHT- KP_Down: {Wx::K_NUMPAD}_DOWN- KP_PageUp: {Wx::K_NUMPAD}_PAGEUP- KP_PageDown: {Wx::K_NUMPAD}_PAGEDOWN- KP_Prior: {Wx::K_NUMPAD}_PAGEUP- KP_Next: {Wx::K_NUMPAD}_PAGEDOWN- KP_End: {Wx::K_NUMPAD}_END- KP_Begin: {Wx::K_NUMPAD}_BEGIN- KP_Insert: {Wx::K_NUMPAD}_INSERT- KP_Delete: {Wx::K_NUMPAD}_DELETE- KP_Equal: {Wx::K_NUMPAD}_EQUAL- KP_Multiply: {Wx::K_NUMPAD}_MULTIPLY- KP_Add: {Wx::K_NUMPAD}_ADD- KP_Separator: {Wx::K_NUMPAD}_SEPARATOR- KP_Subtract: {Wx::K_NUMPAD}_SUBTRACT- KP_Decimal: {Wx::K_NUMPAD}_DECIMAL- KP_Divide: {Wx::K_NUMPAD}_DIVIDE- Windows_Left: {Wx::K_WINDOWS}_LEFT- Windows_Right: {Wx::K_WINDOWS}_RIGHT- Windows_Menu: {Wx::K_WINDOWS}_MENU- Command: {Wx::K_COMMAND}
216
216
  #
217
217
  # Examples:
218
218
  #
219
+ # ```
219
220
  # m_pMyMenuItem->SetItemLabel("My &item\tCTRL+I");
220
221
  # m_pMyMenuItem2->SetItemLabel("Clean && build\tF7");
221
222
  # m_pMyMenuItem3->SetItemLabel("Simple item");
222
223
  # m_pMyMenuItem4->SetItemLabel("Item with &accelerator");
224
+ # ```
223
225
  #
224
226
  # In {Wx::GTK} using <code>"SHIFT"</code> with non-alphabetic characters currently doesn't work, even in combination with other modifiers, due to GTK+ limitation. E.g. <code>Shift+Ctrl+A</code> works but <code>Shift+Ctrl+1</code> or <code>Shift+/</code> do not, so avoid using accelerators of this form in portable code.
225
227
  #
226
228
  # In {Wx::GTk}, the left/right/up/down arrow keys do not work as accelerator keys for a menu item unless a modifier key is used. Additionally, the following keycodes are not supported as menu accelerator keys:
227
- # - WXK_COMMAND/WXK_CONTROL- WXK_SHIFT- WXK_ALT- WXK_SCROLL- WXK_CAPITAL- WXK_NUMLOCK- WXK_NUMPAD_TAB- WXK_TAB- WXK_WINDOWS_LEFT- WXK_WINDOWS_RIGHT- WXK_ADD- WXK_SEPARATOR- WXK_SUBTRACT- WXK_DECIMAL- WXK_DIVIDE- WXK_SNAPSHOT
229
+ # - {Wx::K_COMMAND}/{Wx::K_CONTROL}- {Wx::K_SHIFT}- {Wx::K_ALT}- {Wx::K_SCROLL}- {Wx::K_CAPITAL}- {Wx::K_NUMLOCK}- {Wx::K_NUMPAD}_TAB- {Wx::K_TAB}- {Wx::K_WINDOWS}_LEFT- {Wx::K_WINDOWS}_RIGHT- {Wx::K_ADD}- {Wx::K_SEPARATOR}- {Wx::K_SUBTRACT}- {Wx::K_DECIMAL}- {Wx::K_DIVIDE}- {Wx::K_SNAPSHOT}
228
230
  # @see Wx::MenuItem#get_item_label
229
231
  # @see Wx::MenuItem#get_item_label_text
230
232
  # @param label [String]
@@ -266,7 +268,7 @@ module Wx
266
268
 
267
269
  # Add an extra accelerator for this menu item.
268
270
  # Additional accelerators are not shown in the item's label, but still will trigger the menu command when pressed.
269
- # They can be useful to let multiple keys be used as accelerators for the same command, e.g. WXK_ADD and WXK_NUMPAD_ADD.
271
+ # They can be useful to let multiple keys be used as accelerators for the same command, e.g. {Wx::K_ADD} and {Wx::K_NUMPAD}_ADD.
270
272
  # Availability: only available for the {Wx::MSW}, {Wx::GTK} ports. {Wx::msw},{Wx::gtk}
271
273
  # @param accel [Wx::AcceleratorEntry]
272
274
  # @return [void]
@@ -283,6 +285,7 @@ module Wx
283
285
  # For the custom (non-stock) menu items, text must be specified and while helpString may be left empty, it's recommended to pass the item description (which is automatically shown by the library in the status bar when the menu item is selected) in this parameter.
284
286
  # Finally note that you can e.g. use a stock menu label without using its stock help string:
285
287
  #
288
+ # ```
286
289
  # // use all stock properties:
287
290
  # helpMenu->Append(wxID_ABOUT);
288
291
  #
@@ -293,6 +296,7 @@ module Wx
293
296
  # wxMenuItem *mymenu = new wxMenuItem(helpMenu, wxID_ABOUT);
294
297
  # mymenu->SetBitmap(wxArtProvider::GetBitmap(wxART_WARNING));
295
298
  # helpMenu->Append(mymenu);
299
+ # ```
296
300
  #
297
301
  # that is, stock properties are set independently one from the other.
298
302
  # @param parentMenu [Wx::Menu] Menu that the menu item belongs to. Can be NULL if the item is going to be added to the menu later.
@@ -318,7 +322,9 @@ module Wx
318
322
  # Strips all accelerator characters and mnemonics from the given text.
319
323
  # For example:
320
324
  #
325
+ # ```
321
326
  # wxMenuItem::GetLabelText("&Hello\tCtrl-h");
327
+ # ```
322
328
  #
323
329
  # will return just <code>"Hello"</code>.
324
330
  # @see Wx::MenuItem#get_item_label_text
@@ -14,11 +14,12 @@ module Wx
14
14
  # This is a convenient function which is usually used instead of using {Wx::MessageDialog} directly. Notice however that some of the features, such as extended text and custom labels for the message box buttons, are not provided by this function but only by {Wx::MessageDialog}.
15
15
  # The return value is one of: {Wx::YES}, {Wx::NO}, {Wx::CANCEL}, {Wx::OK} or {Wx::HELP} (notice that this return value is <b>different</b> from the return value of {Wx::MessageDialog#show_modal}).
16
16
  # For example:
17
- #
17
+ # ```
18
18
  # int answer = wxMessageBox("Quit program?", "Confirm",
19
19
  # wxYES_NO | wxCANCEL, main_frame);
20
20
  # if (answer == wxYES)
21
21
  # main_frame->Close();
22
+ # ```
22
23
  #
23
24
  # message may contain newline characters, in which case the message will be split into separate lines, to cater for large messages.
24
25
  # @param message [String] Message to show in the dialog.
@@ -121,18 +122,20 @@ module Wx
121
122
 
122
123
  # Overrides the default labels of the Yes and No buttons.
123
124
  # The arguments of this function can be either strings or one of the standard identifiers, such as {Wx::StandardID::ID_APPLY} or {Wx::StandardID::ID_OPEN}. Notice that even if the label is specified as an identifier, the return value of the dialog {Wx::MessageDialog#show_modal} method still remains one of {Wx::StandardID::ID_OK}, {Wx::StandardID::ID_CANCEL}, {Wx::StandardID::ID_YES} or {Wx::StandardID::ID_NO} values, i.e. this identifier changes only the label appearance but not the return code generated by the button. It is possible to mix stock identifiers and string labels in the same function call, for example:
124
- #
125
+ # ```
125
126
  # wxMessageDialog dlg(...);
126
127
  # dlg.SetYesNoLabels(wxID_SAVE, _("&Don't save"));
128
+ # ```
127
129
  #
128
130
  # Also notice that this function is not currently available on all platforms (although as of wxWidgets 2.9.0 it is implemented in all major ports), so it may return false to indicate that the labels couldn't be changed. If it returns true, the labels were set successfully.
129
131
  # Typically, if the function was used successfully, the main dialog message may need to be changed, e.g.:
130
- #
132
+ # ```
131
133
  # wxMessageDialog dlg(...);
132
134
  # if ( dlg.SetYesNoLabels(_("&Quit"), _("&Don't quit")) )
133
135
  # dlg.SetMessage(_("What do you want to do?"));
134
136
  # else // buttons have standard "Yes"/"No" values, so rephrase the question
135
137
  # dlg.SetMessage(_("Do you really want to quit?"));
138
+ # ```
136
139
  # @param yes [ButtonLabel]
137
140
  # @param no [ButtonLabel]
138
141
  # @return [true,false]
@@ -13,16 +13,10 @@ module Wx
13
13
  #
14
14
  # Category: Device Contexts
15
15
  #
16
+ #
17
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
16
18
  class MirrorDC < DC
17
19
 
18
- # Creates a (maybe) mirrored DC associated with the real dc.
19
- # Everything drawn on {Wx::MirrorDC} will appear (and maybe mirrored) on dc.
20
- # mirror specifies if we do mirror (if it is true) or not (if it is false).
21
- # @param dc [Wx::DC]
22
- # @param mirror [true,false]
23
- # @return [MirrorDC]
24
- def initialize(dc, mirror) end
25
-
26
20
  end # MirrorDC
27
21
 
28
22
 
@@ -16,6 +16,8 @@ module Wx
16
16
  # @see Wx::MouseEvent
17
17
  #
18
18
  #
19
+ #
20
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
19
21
  class MouseState < KeyboardState
20
22
 
21
23
  # Returns the physical mouse position.
@@ -26,8 +26,6 @@ module Wx
26
26
 
27
27
  # Constructor taking an array of {Wx::String} choices.
28
28
  # Use {Wx::MultiChoiceDialog#show_modal} to show the dialog.
29
- #
30
- # <b>{Wx::Perl} Note:</b> Use an array reference for the choices parameter.
31
29
  # @param parent [Wx::Window] Parent window.
32
30
  # @param message [String] Message to show on the dialog.
33
31
  # @param caption [String] The dialog caption.
@@ -26,12 +26,13 @@ module Wx
26
26
  # Set the window shape to the given path.
27
27
  # Set the window shape to the interior of the given path and also draw the window border along the specified path.
28
28
  # For example, to make a clock-like circular window you could use
29
- #
29
+ # ```
30
30
  # wxSize size = GetSize();
31
31
  # wxGraphicsPath
32
32
  # path = wxGraphicsRenderer::GetDefaultRenderer()->CreatePath();
33
33
  # path.AddCircle(size.x/2, size.y/2, 30);
34
34
  # SetShape(path);
35
+ # ```
35
36
  #
36
37
  # Note that windows with non default shape have a fixed size and can't be resized using {Wx::NonOwnedWindow#set_size}.
37
38
  # As the overload above, this method is not guaranteed to work on all platforms but currently does work in {Wx::MSW}, {Wx::OSX}/Cocoa and {Wx::GTK} (with the appropriate but almost always present X11 extensions) ports.
@@ -85,16 +85,18 @@ module Wx
85
85
  #
86
86
  # On Windows, the default theme paints a background on the notebook's pages. If you wish to suppress this theme, for aesthetic or performance reasons, there are three ways of doing it. You can use {Wx::NB_NOPAGETHEME} to disable themed drawing for a particular notebook, you can call {Wx::SystemOptions.set_option} to disable it for the whole application, or you can disable it for individual pages by using {Wx::Notebook#set_background_colour}.
87
87
  # To disable themed pages globally:
88
- #
88
+ # ```
89
89
  # wxSystemOptions::SetOption("msw.notebook.themed-background", 0);
90
+ # ```
90
91
  #
91
92
  # Set the value to 1 to enable it again. To give a single page a solid background that more or less fits in with the overall theme, use:
92
- #
93
+ # ```
93
94
  # wxColour col = notebook->GetThemeBackgroundColour();
94
95
  # if (col.IsOk())
95
96
  # {
96
97
  # page->SetBackgroundColour(col);
97
98
  # }
99
+ # ```
98
100
  #
99
101
  # On platforms other than Windows, or if the application is not using Windows themes, {Wx::Notebook#get_theme_background_colour} will return an uninitialised colour object, and the above code will therefore work on all platforms.
100
102
  # ===