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
@@ -0,0 +1,157 @@
1
+ # :stopdoc:
2
+ # This file is automatically generated by the WXRuby3 documentation
3
+ # generator. Do not alter this file.
4
+ # :startdoc:
5
+
6
+
7
+ module Wx
8
+
9
+ # A combobox that displays bitmap in front of the list items.
10
+ # It currently only allows using bitmaps of one size, and resizes itself so that a bitmap can be shown next to the text field.
11
+ # While {Wx::BitmapComboBox} contains the {Wx::ComboBox} API, but it might not actually be derived from that class. In fact, if the platform does not have a native implementation, {Wx::BitmapComboBox} will inherit from {Wx::OwnerDrawnComboBox}. You can determine if the implementation is generic by checking whether {Wx::GENERIC_BITMAPCOMBOBOX} is defined. Currently {Wx::BitmapComboBox} is implemented natively for MSW and GTK+.
12
+ #
13
+ # === Styles
14
+ #
15
+ # This class supports the following styles:
16
+ #
17
+ # - {Wx::CB_READONLY}: Creates a combobox without a text editor. On some platforms the control may appear very different when this style is used.
18
+ # - {Wx::CB_SORT}: Sorts the entries in the list alphabetically.
19
+ # - {Wx::TE_PROCESS_ENTER}: The control will generate the event {Wx::EVT_TEXT_ENTER} (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). Windows only.
20
+ #
21
+ # Todocreate {Wx::CB_PROCESS_ENTER} rather than reusing {Wx::TE_PROCESS_ENTER}!
22
+ #
23
+ # === Events emitted by this class
24
+ #
25
+ # The following event-handler methods redirect the events to member method or handler blocks for {Wx::CommandEvent} events.
26
+ # Event handler methods for events emitted by this class:
27
+ # - {Wx::EvtHandler#evt_combobox}(id, meth = nil, &block): Process a {Wx::EVT_COMBOBOX} event, when an item on the list is selected.
28
+ # - {Wx::EvtHandler#evt_text}(id, meth = nil, &block): Process a {Wx::EVT_TEXT} event, when the combobox text changes.
29
+ # - {Wx::EvtHandler#evt_text_enter}(id, meth = nil, &block): Process a {Wx::EVT_TEXT_ENTER} event, when RETURN is pressed in the combobox.
30
+ #
31
+ # ===
32
+ #
33
+ # Category: {Wx::Controls} <div class='appearance'><span class='appearance'>Appearance:</span><table><tr><td> {Wx::MSW} Appearance
34
+ # </td><td> {Wx::GTK} Appearance
35
+ # </td><td> {Wx::OSX} Appearance
36
+ # </td></tr></table></div>
37
+ # @see Wx::ComboBox
38
+ # @see Wx::Choice
39
+ # @see Wx::OwnerDrawnComboBox
40
+ # @see Wx::CommandEvent
41
+ #
42
+ #
43
+ class BitmapComboBox < ComboBox
44
+
45
+ # @overload initialize()
46
+ # Default ctor.
47
+ # @return [BitmapComboBox]
48
+ # @overload initialize(parent, id=Wx::StandardID::ID_ANY, value=(''), pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, choices=nil, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::BitmapComboBoxNameStr)
49
+ # Constructor, creating and showing a combobox.
50
+ #
51
+ # @see Wx::BitmapComboBox#create
52
+ # @see Wx::Validator
53
+ # @param parent [Wx::Window] Parent window. Must not be NULL.
54
+ # @param id [Integer] Window identifier. The value {Wx::StandardID::ID_ANY} indicates a default value.
55
+ # @param value [String] Initial selection string. An empty string indicates no selection.
56
+ # @param pos [Array(Integer, Integer), Wx::Point] Initial position.
57
+ # @param size [Array(Integer, Integer), Wx::Size] Initial size.
58
+ # @param choices [Array<String>] An array of strings with which to initialise the control.
59
+ # @param style [Integer] The window style, see {Wx::CB_}* flags.
60
+ # @param validator [Wx::Validator] Validator which can be used for additional data checks.
61
+ # @param name [String] Control name.
62
+ # @return [BitmapComboBox]
63
+ # @overload initialize(parent, id, value, pos, size, choices, style, validator=Wx::DEFAULT_VALIDATOR, name=Wx::BitmapComboBoxNameStr)
64
+ # Constructor, creating and showing a combobox.
65
+ #
66
+ # @see Wx::BitmapComboBox#create
67
+ # @see Wx::Validator
68
+ # @param parent [Wx::Window] Parent window. Must not be NULL.
69
+ # @param id [Integer] Window identifier. The value {Wx::StandardID::ID_ANY} indicates a default value.
70
+ # @param value [String] Initial selection string. An empty string indicates no selection.
71
+ # @param pos [Array(Integer, Integer), Wx::Point] Initial position.
72
+ # @param size [Array(Integer, Integer), Wx::Size] Initial size.
73
+ # @param choices [Array<String>] A {Wx::ArrayString} with which to initialise the control.
74
+ # @param style [Integer] The window style, see {Wx::CB_}* flags.
75
+ # @param validator [Wx::Validator] Validator which can be used for additional data checks.
76
+ # @param name [String] Control name.
77
+ # @return [BitmapComboBox]
78
+ def initialize(*args) end
79
+
80
+ # @overload append(item, bitmap=Wx::NULL_BITMAP)
81
+ # Adds the item to the end of the combo box.
82
+ # @param item [String]
83
+ # @param bitmap [Wx::Bitmap]
84
+ # @return [Integer]
85
+ # @overload append(item, bitmap, clientData)
86
+ # Adds the item to the end of the combo box, associating the given untyped, client data pointer clientData with the item.
87
+ # @param item [String]
88
+ # @param bitmap [Wx::Bitmap]
89
+ # @param clientData [Object]
90
+ # @return [Integer]
91
+ def append(*args) end
92
+
93
+ # @overload create(parent, id, value, pos, size, choices, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::BitmapComboBoxNameStr)
94
+ # Creates the combobox for two-step construction.
95
+ # @param parent [Wx::Window]
96
+ # @param id [Integer]
97
+ # @param value [String]
98
+ # @param pos [Array(Integer, Integer), Wx::Point]
99
+ # @param size [Array(Integer, Integer), Wx::Size]
100
+ # @param choices [Array<String>]
101
+ # @param style [Integer]
102
+ # @param validator [Wx::Validator]
103
+ # @param name [String]
104
+ # @return [true,false]
105
+ # @overload create(parent, id, value, pos, size, choices, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::BitmapComboBoxNameStr)
106
+ # Creates the combobox for two-step construction.
107
+ # @param parent [Wx::Window]
108
+ # @param id [Integer]
109
+ # @param value [String]
110
+ # @param pos [Array(Integer, Integer), Wx::Point]
111
+ # @param size [Array(Integer, Integer), Wx::Size]
112
+ # @param choices [Array<String>]
113
+ # @param style [Integer]
114
+ # @param validator [Wx::Validator]
115
+ # @param name [String]
116
+ # @return [true,false]
117
+ def create(*args) end
118
+
119
+ # Returns the size of the bitmaps used in the combo box.
120
+ # If the combo box is empty, then {Wx::DEFAULT_SIZE} is returned.
121
+ # @return [Wx::Size]
122
+ def get_bitmap_size; end
123
+ alias_method :bitmap_size, :get_bitmap_size
124
+
125
+ # Returns the bitmap of the item with the given index.
126
+ # @param n [Integer]
127
+ # @return [Wx::Bitmap]
128
+ def get_item_bitmap(n) end
129
+ alias_method :item_bitmap, :get_item_bitmap
130
+
131
+ # @overload insert(item, bitmap, pos)
132
+ # Inserts the item into the list before pos.
133
+ # Not valid for {Wx::CB_SORT} style, use {Wx::BitmapComboBox#append} instead.
134
+ # @param item [String]
135
+ # @param bitmap [Wx::Bitmap]
136
+ # @param pos [Integer]
137
+ # @return [Integer]
138
+ # @overload insert(item, bitmap, pos, clientData)
139
+ # Inserts the item into the list before pos, associating the given untyped, client data pointer with the item.
140
+ # Not valid for {Wx::CB_SORT} style, use {Wx::BitmapComboBox#append} instead.
141
+ # @param item [String]
142
+ # @param bitmap [Wx::Bitmap]
143
+ # @param pos [Integer]
144
+ # @param clientData [Object]
145
+ # @return [Integer]
146
+ def insert(*args) end
147
+
148
+ # Sets the bitmap for the given item.
149
+ # @param n [Integer]
150
+ # @param bitmap [Wx::BitmapBundle,Wx::Bitmap,Wx::Icon,Wx::Image]
151
+ # @return [void]
152
+ def set_item_bitmap(n, bitmap) end
153
+
154
+ end # BitmapComboBox
155
+
156
+
157
+ end
@@ -25,15 +25,13 @@ module Wx
25
25
 
26
26
  # Adds non-stretchable space to the main orientation of the sizer only.
27
27
  # More readable way of calling:
28
- #
29
- # if ( wxBoxSizer::IsVertical() )
30
- # {
31
- # wxBoxSizer::Add(0, size, 0).
32
- # }
28
+ # ```ruby
29
+ # if box_sizer.vertical?
30
+ # box_sizer.add(0, size, 0)
33
31
  # else
34
- # {
35
- # wxBoxSizer::Add(size, 0, 0).
36
- # }
32
+ # box_size.add(size, 0, 0)
33
+ # end
34
+ # ```
37
35
  # @param size [Integer]
38
36
  # @return [Wx::SizerItem]
39
37
  def add_spacer(size) end
@@ -101,6 +101,8 @@ module Wx
101
101
  # @see Wx::DC#set_brush
102
102
  #
103
103
  #
104
+ #
105
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
104
106
  class Brush < GDIObject
105
107
 
106
108
  # @overload set_colour(colour)
@@ -7,52 +7,55 @@
7
7
  module Wx
8
8
 
9
9
  # This class makes it easy to tell your user that the program is temporarily busy.
10
- # Normally the main thread should always return to the main loop to continue dispatching events as quickly as possible, hence this class shouldn't be needed. However if the main thread does need to block, this class provides a simple way to at least show this to the user: just create a {Wx::BusyInfo} object on the stack, and within the current scope, a message window will be shown.
10
+ # Normally the main thread should always return to the main loop to continue dispatching events as quickly as possible,
11
+ # hence this class shouldn't be needed. However if the main thread does need to block, this class provides a simple
12
+ # way to at least show this to the user: just call {Wx::BusyInfo.busy} with a block and for the duration of the
13
+ # execution of the block a message window will be shown.
11
14
  # For example:
15
+ # ```ruby
16
+ # BusyInfo.busy('Working, please wait...') do
17
+ # 100000.times { do_a_calculation }
18
+ # end
19
+ # ```
12
20
  #
13
- # wxBusyInfo wait("Please wait, working...");
14
- #
15
- # for (int i = 0; i < 100000; i++)
16
- # {
17
- # DoACalculation();
18
- # }
21
+ # The displayed window is rather plain by default but can be customized by passing {Wx::BusyInfo.busy} an object of
22
+ # {Wx::BusyInfoFlags} class instead of a simple message. Here is an example:
19
23
  #
20
- # It works by creating a window in the constructor, and deleting it in the destructor.
21
- # This window is rather plain by default but can be customized by passing {Wx::BusyInfo} constructor an object of {Wx::BusyInfoFlags} class instead of a simple message. Here is an example from the dialogs sample:
22
- #
23
- # wxBusyInfo info
24
- # (
25
- # wxBusyInfoFlags()
26
- # .Parent(this)
27
- # .Icon(wxArtProvider::GetIcon(wxART_PRINT,
28
- # wxART_OTHER, wxSize(128, 128)))
29
- # .Title("<b>Printing your document</b>")
30
- # .Text("Please wait...")
31
- # .Foreground(*wxWHITE)
32
- # .Background(*wxBLACK)
33
- # .Transparency(4*wxALPHA_OPAQUE/5)
34
- # );
24
+ # ```ruby
25
+ # Wx::BusyInfo.busy(
26
+ # Wx::BusyInfoFlags.new
27
+ # .parent(self)
28
+ # .icon(Wx::ArtProvider.get_icon(Wx::ART_PRINT,Wx::ART_OTHER, [128, 128]))
29
+ # .title("<b>Printing your document</b>")
30
+ # .text("Please wait...")
31
+ # .foreground(Wx::WHITE)
32
+ # .background(Wx::BLACK)
33
+ # .transparency(4*Wx::ALPHA_OPAQUE/5)) do |bi|
34
+ # end
35
+ # ```
35
36
  #
36
37
  # This shows that separate title and text can be set, and that simple markup ({Wx::Control#set_label_markup}) can be used in them, and that it's also possible to add an icon and customize the colours and transparency of the window.
37
- # You may also want to call {Wx::TheApp}->Yield() to refresh the window periodically (in case it had been obscured by other windows, for example) like this:
38
- #
39
- # wxWindowDisabler disableAll;
40
- # wxBusyInfo wait("Please wait, working...");
41
- #
42
- # for (int i = 0; i < 100000; i++)
43
- # {
44
- # DoACalculation();
45
- #
46
- # if ( !(i % 1000) )
47
- # wxTheApp->Yield();
48
- # }
38
+ # You may also want to call `Wx.get_app.yield` to refresh the window periodically (in case it had been obscured by other windows, for example) like this:
39
+ # ```ruby
40
+ # Wx::WindowDisabler.disable do
41
+ # BusyInfo.busy('Working, please wait...') do
42
+ # 100000.times do |i|
43
+ # do_a_calculation }
44
+ # Wx.get_app.yield if (i % 1000) == 0
45
+ # end
46
+ # end
47
+ # end
48
+ # ```
49
49
  #
50
- # but take care to not cause undesirable reentrancies when doing it (see {Wx::App::Yield} for more details). The simplest way to do it is to use {Wx::WindowDisabler} class as illustrated in the above example.
50
+ # but take care to not cause undesirable re-entrance when doing it (see {Wx::App#yield} for more details). The simplest way to do it is to use {Wx::WindowDisabler} class as illustrated in the above example.
51
51
  # Note that a {Wx::BusyInfo} is always built with the {Wx::STAY_ON_TOP} window style (see {Wx::Frame} window styles for more info).
52
- # ===
52
+ #
53
+ # ===
53
54
  #
54
55
  # Category: Common Dialogs
55
56
  #
57
+ #
58
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
56
59
  class BusyInfo < ::Object
57
60
 
58
61
  # Update the information text.
@@ -71,18 +74,21 @@ module Wx
71
74
  # Parameters for {Wx::BusyInfo}.
72
75
  # This class exists only in order to make passing attributes to {Wx::BusyInfo} constructor easier and the code doing it more readable.
73
76
  # All methods of this class return the reference to the object on which they are called, making it possible to chain them together, e.g. typically you would just create a temporary {Wx::BusyInfoFlags} object and then call the methods corresponding to the attributes you want to set, before finally passing the result to {Wx::BusyInfo} constructor, e.g.:
77
+ # ```ruby
78
+ # Wx::BusyInfo.busy(
79
+ # Wx::BusyInfoFlags.new
80
+ # .parent(self)
81
+ # .icon(Wx::ArtProvider.get_icon(Wx::ART_PRINT,Wx::ART_OTHER, [128, 128]))
82
+ # .title("<b>Printing your document</b>")
83
+ # .text("Please wait...")
84
+ # .foreground(Wx::WHITE)
85
+ # .background(Wx::BLACK)
86
+ # .transparency(4*Wx::ALPHA_OPAQUE/5)) do |bi|
87
+ # end
88
+ # ```
74
89
  #
75
- # wxBusyInfo info
76
- # (
77
- # wxBusyInfoFlags()
78
- # .Parent(window)
79
- # .Icon(icon)
80
- # .Title("Some text")
81
- # .Text("Some more text")
82
- # .Foreground(wxColour(...))
83
- # .Background(wxColour(...))
84
- # );
85
90
  #
91
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
86
92
  class BusyInfoFlags < ::Object
87
93
 
88
94
  # Default constructor initializes all attributes to default values.
@@ -33,15 +33,11 @@ module Wx
33
33
  def create(window, size) end
34
34
 
35
35
  # Get the caret position (in pixels).
36
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} there are two methods instead of a single overloaded method:
37
- # - {Wx::Caret#get_position}: returns a Wx::Point object.- GetPositionXY(): returns a 2-element list (x, y).
38
36
  # @return [Wx::Point]
39
37
  def get_position; end
40
38
  alias_method :position, :get_position
41
39
 
42
40
  # Get the caret size.
43
- # <b>{Wx::Perl} Note:</b> In {Wx::Perl} there are two methods instead of a single overloaded method:
44
- # - {Wx::Caret#get_size}: returns a Wx::Size object.- GetSizeWH(): returns a 2-element list (width, height).
45
41
  # @return [Wx::Size]
46
42
  def get_size; end
47
43
  alias_method :size, :get_size
@@ -31,7 +31,6 @@ module Wx
31
31
 
32
32
  # @overload initialize(parent, id, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, choices=nil, style=0, validator=Wx::DEFAULT_VALIDATOR, name=("listBox"))
33
33
  # Constructor, creating and showing a list box.
34
- # <b>{Wx::Perl} Note:</b> Not supported by {Wx::Perl}.
35
34
  # @param parent [Wx::Window] Parent window. Must not be NULL.
36
35
  # @param id [Integer] Window identifier. The value {Wx::StandardID::ID_ANY} indicates a default value.
37
36
  # @param pos [Array(Integer, Integer), Wx::Point] Window position. If {Wx::DEFAULT_POSITION} is specified then a default position is chosen.
@@ -43,7 +42,6 @@ module Wx
43
42
  # @return [CheckListBox]
44
43
  # @overload initialize(parent, id, pos, size, choices, style=0, validator=Wx::DEFAULT_VALIDATOR, name=("listBox"))
45
44
  # Constructor, creating and showing a list box.
46
- # <b>{Wx::Perl} Note:</b> Use an array reference for the choices parameter.
47
45
  # @param parent [Wx::Window] Parent window. Must not be NULL.
48
46
  # @param id [Integer] Window identifier. The value {Wx::StandardID::ID_ANY} indicates a default value.
49
47
  # @param pos [Array(Integer, Integer), Wx::Point] Window position.
@@ -54,7 +54,7 @@ module Wx
54
54
  # @return [Choice]
55
55
  # @overload initialize(parent, id, pos, size, choices, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::ChoiceNameStr)
56
56
  # Constructor, creating and showing a choice.
57
- # <b>{Wx::Perl} Note:</b> Use an array reference for the choices parameter.
57
+ #
58
58
  # @see Wx::Choice#create
59
59
  # @see Wx::Validator
60
60
  # @param parent [Wx::Window] Parent window. Must not be NULL.
@@ -87,10 +87,6 @@ module Wx
87
87
  def set_columns(n=1) end
88
88
  alias_method :columns=, :set_columns
89
89
 
90
- # @return [true,false]
91
- def is_sorted; end
92
- alias_method :sorted?, :is_sorted
93
-
94
90
  # Returns the number of items in the control.
95
91
  #
96
92
  # @see Wx::Choice#is_empty
@@ -8,18 +8,17 @@ module Wx
8
8
 
9
9
  # {Wx::ClientDC} is primarily useful for obtaining information about the window from outside EVT_PAINT() handler.
10
10
  # Typical use of this class is to obtain the extent of some text string in order to allocate enough size for a window, e.g.
11
- #
12
- # // Create the initially empty label with the size big enough to show
13
- # // the given string.
14
- # wxClientDC dc(this);
15
- # wxStaticText* text = new wxStaticText
16
- # (
17
- # this, wxID_ANY, "",
18
- # wxPoint(),
19
- # dc.GetTextExtent("String of max length"),
20
- # wxST_NO_AUTORESIZE
21
- # );
22
- # }
11
+ # ```ruby
12
+ # # Create the initially empty label with the size big enough to show
13
+ # # the given string.
14
+ # text = Wx::ClientDC.draw_on(self) do |dc|
15
+ # Wx::StaticText.new(
16
+ # self, Wx::ID_ANY, "",
17
+ # Wx::Point.new,
18
+ # dc.get_text_extent("String of max length"),
19
+ # Wx::ST_NO_AUTORESIZE)
20
+ # end
21
+ # ```
23
22
  #
24
23
  # While {Wx::ClientDC} may also be used for drawing on the client area of a window from outside an EVT_PAINT() handler in some ports, this does not work on all platforms (neither {Wx::OSX} nor {Wx::GTK} with GTK 3 Wayland backend support this, so drawing using {Wx::ClientDC} simply doesn't have any effect there) and the only portable way of drawing is via {Wx::PaintDC}. To redraw a small part of the window, use {Wx::Window#refresh_rect} to invalidate just this part and check {Wx::Window#get_update_region} in the paint event handler to redraw this part only.
25
24
  #
@@ -35,14 +34,10 @@ module Wx
35
34
  # @see Wx::ScreenDC
36
35
  #
37
36
  #
37
+ #
38
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
38
39
  class ClientDC < WindowDC
39
40
 
40
- # Constructor.
41
- # Pass a pointer to the window on which you wish to paint.
42
- # @param window [Wx::Window]
43
- # @return [ClientDC]
44
- def initialize(window) end
45
-
46
41
  end # ClientDC
47
42
 
48
43
 
@@ -7,42 +7,45 @@
7
7
  module Wx
8
8
 
9
9
  # A class for manipulating the clipboard.
10
- # To use the clipboard, you call member functions of the global {Wx::TheClipboard} object.
11
- # See the wxDataObject Overview for further information.
12
- # Call {Wx::Clipboard#open} to get ownership of the clipboard. If this operation returns true, you now own the clipboard. Call {Wx::Clipboard#set_data} to put data on the clipboard, or {Wx::Clipboard#get_data} to retrieve data from the clipboard. Call {Wx::Clipboard#close} to close the clipboard and relinquish ownership. You should keep the clipboard open only momentarily.
10
+ # To use the clipboard, you call member functions of the global {Wx::Clipboard} object passed to the block for {Wx::Clipboard.open}.
11
+ # See the {Wx::DataObject} Overview for further information.
12
+ # Call {Wx::Clipboard.open} to get ownership of the (global) clipboard and execute the given block. You now
13
+ # own the clipboard passed to the given block. Call {Wx::Clipboard#set_data} to put data on the clipboard, or
14
+ # {Wx::Clipboard#get_data} to retrieve data from the clipboard. The clipboard is closed and ownership
15
+ # relinquished when the block returns. You should keep the clipboard open only momentarily.
13
16
  # For example:
14
17
  #
15
- # // Write some text to the clipboard
16
- # if (wxTheClipboard->Open())
17
- # {
18
- # // This data objects are held by the clipboard,
19
- # // so do not delete them in the app.
20
- # wxTheClipboard->SetData( new wxTextDataObject("Some text") );
21
- # wxTheClipboard->Close();
22
- # }
23
- #
24
- # // Read some text
25
- # if (wxTheClipboard->Open())
26
- # {
27
- # if (wxTheClipboard->IsSupported( wxDF_TEXT ))
28
- # {
29
- # wxTextDataObject data;
30
- # wxTheClipboard->GetData( data );
31
- # wxMessageBox( data.GetText() );
32
- # }
33
- # wxTheClipboard->Close();
34
- # }
18
+ # ```ruby
19
+ # # Write some text to the clipboard
20
+ # Wx::Clipboard.open do |clip|
21
+ # # This data object is held by the clipboard
22
+ # clip.place(Wx::TextDataObject.new("Some text"))
23
+ # # or alternatively
24
+ # # clip.set_data(Wx::TextDataObject.new("Some text"))
25
+ # end
35
26
  #
36
- # On GTK, the clipboard behavior can vary depending on the configuration of the end-user's machine. In order for the clipboard data to persist after the window closes, a clipboard manager must be installed. Some clipboard managers will automatically flush the clipboard after each new piece of data is added, while others will not. The {Wx::Clipboard#flush} function will force the clipboard manager to flush the data.
27
+ # # Read some text
28
+ # data = Wx::TextDataObject.new
29
+ # Wx::Clipboard.open do |clip|
30
+ # if clip.supported?(Wx::DF_TEXT)
31
+ # clip.fetch(data) # or clip.get_data(data)
32
+ # end
33
+ # end
34
+ # Wx.message_box(data.get_text)
35
+ # ```
36
+ #
37
+ # On GTK, the clipboard behavior can vary depending on the configuration of the end-user's machine. In order
38
+ # for the clipboard data to persist after the window closes, a clipboard manager must be installed. Some
39
+ # clipboard managers will automatically flush the clipboard after each new piece of data is added, while others
40
+ # will not. The {Wx::Clipboard#flush} function will force the clipboard manager to flush the data.
37
41
  #
38
42
  # ===
39
43
  #
40
44
  # Category: Clipboard and Drag & Drop
41
- # @see Drag and Drop Overview
42
- # @see wxDataObject Overview
43
- # @see Wx::DataObject
45
+ # @see Wx::DataObject
44
46
  #
45
47
  #
48
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
46
49
  class Clipboard < Object
47
50
 
48
51
  # Default constructor.
@@ -21,17 +21,19 @@ module Wx
21
21
  # Note that because of its nature of control which can dynamically (and drastically) change its size at run-time under user-input, when putting {Wx::CollapsiblePane} inside a {Wx::Sizer} you should be careful to add it with a proportion value of zero; this is because otherwise all other windows with non-null proportion values will automatically resize each time the user expands or collapse the pane window usually resulting in a weird, flickering effect.
22
22
  # Usage sample:
23
23
  #
24
- # wxCollapsiblePane *collpane = new wxCollapsiblePane(this, wxID_ANY, "Details:");
24
+ # ```ruby
25
+ # collpane = Wx::CollapsiblePane.new(self, Wx::ID_ANY, "Details:")
25
26
  #
26
- # // add the pane with a zero proportion value to the 'sz' sizer which contains it
27
- # sz->Add(collpane, 0, wxGROW|wxALL, 5);
27
+ # # add the pane with a zero proportion value to the 'sz' sizer which contains it
28
+ # sz.add(collpane, 0, Wx::GROW|Wx::ALL, 5)
28
29
  #
29
- # // now add a test label in the collapsible pane using a sizer to layout it:
30
- # wxWindow *win = collpane->GetPane();
31
- # wxSizer *paneSz = new wxBoxSizer(wxVERTICAL);
32
- # paneSz->Add(new wxStaticText(win, wxID_ANY, "test!"), 1, wxGROW|wxALL, 2);
33
- # win->SetSizer(paneSz);
34
- # paneSz->SetSizeHints(win);
30
+ # #/ now add a test label in the collapsible pane using a sizer to layout it:
31
+ # win = collpane.get_pane
32
+ # pane_sz = Wx::VBoxSizer
33
+ # pane_sz.add(Wx::StaticText.new(win, Wx::ID_ANY, "test!"), 1, Wx::GROW|Wx::ALL, 2)
34
+ # win.set_sizer(pane_sz)
35
+ # pane_sz.set_size_hints(win)
36
+ # ```
35
37
  #
36
38
  # It is only available if {Wx::Setup::USE_COLLPANE} is set to 1 (the default).
37
39
  # === Styles
@@ -66,6 +66,8 @@ module Wx
66
66
  # @see Wx::SystemSettings
67
67
  #
68
68
  #
69
+ #
70
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
69
71
  class Colour < Object
70
72
 
71
73
  # Sets the RGB or RGBA colour values from a single 32 bit value.
@@ -111,11 +113,11 @@ module Wx
111
113
  # @param blue [Integer]
112
114
  # @param alpha [Integer]
113
115
  # @return [void]
114
- # @overload set(RGB)
116
+ # @overload set(rGB)
115
117
  # Sets the RGB intensity values using the given values (first overload), extracting them from the packed long (second overload), using the given string (third overload).
116
118
  # When using third form, {Wx::Colour#set} accepts: colour names (those listed in {Wx::ColourDatabase}), the CSS-like <code>"rgb(r,g,b)"</code> or <code>"rgba(r,g,b,a)"</code> syntax (case insensitive) and the HTML-like syntax: <code>"#"</code> followed by 6 hexadecimal digits for red, green, blue components.
117
119
  # Returns true if the conversion was successful, false otherwise.
118
- # @param RGB [Integer]
120
+ # @param rGB [Integer]
119
121
  # @return [void]
120
122
  # @overload set(str)
121
123
  # Sets the RGB intensity values using the given values (first overload), extracting them from the packed long (second overload), using the given string (third overload).
@@ -185,8 +187,9 @@ module Wx
185
187
 
186
188
  # Return the perceived brightness of the colour.
187
189
  # This value is computed using the simple
188
- #
190
+ # ```
189
191
  # 0.299*R + 0.587*G + 0.114*B
192
+ # ```
190
193
  # formula with the coefficients taken from the RGB to YIQ conversion formula and R, G and B being the values of the corresponding colour channels normalized to 0..1 range, so that the return value is 0 for black and 1 for white.
191
194
  # @return [Float]
192
195
  def get_luminance; end