wxruby3 0.9.3-x64-mingw-ucrt → 0.9.5-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +1 -1
  3. data/README.md +2 -2
  4. data/ext/wxbase32u_gcc_custom.dll +0 -0
  5. data/ext/wxbase32u_net_gcc_custom.dll +0 -0
  6. data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
  7. data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
  8. data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
  9. data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
  10. data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
  11. data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
  12. data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
  13. data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
  14. data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
  15. data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
  16. data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
  17. data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
  18. data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
  19. data/lib/wx/core/book_ctrl_base.rb +16 -0
  20. data/lib/wx/core/combo_ctrl.rb +171 -0
  21. data/lib/wx/core/config.rb +454 -83
  22. data/lib/wx/core/notebook.rb +10 -8
  23. data/lib/wx/core/peristent_object.rb +15 -0
  24. data/lib/wx/core/persistence_manager.rb +39 -0
  25. data/lib/wx/core/persistent_window.rb +16 -0
  26. data/lib/wx/core/top_level_window.rb +16 -0
  27. data/lib/wx/core/treebook.rb +18 -0
  28. data/lib/wx/core.rb +4 -0
  29. data/lib/wx/doc/book_ctrl_base.rb +19 -0
  30. data/lib/wx/doc/comboctrl.rb +128 -3
  31. data/lib/wx/doc/config.rb +101 -41
  32. data/lib/wx/doc/extra/14_config.md +101 -0
  33. data/lib/wx/doc/extra/15_persistence.md +148 -0
  34. data/lib/wx/doc/gen/app_traits.rb +2 -54
  35. data/lib/wx/doc/gen/art_provider.rb +0 -2
  36. data/lib/wx/doc/gen/aui/aui_dock_art.rb +77 -77
  37. data/lib/wx/doc/gen/aui/aui_manager.rb +0 -1
  38. data/lib/wx/doc/gen/aui/aui_manager_event.rb +1 -1
  39. data/lib/wx/doc/gen/aui/aui_mdi_client_window.rb +5 -4
  40. data/lib/wx/doc/gen/aui/aui_notebook_event.rb +1 -1
  41. data/lib/wx/doc/gen/aui/aui_tool_bar_event.rb +21 -21
  42. data/lib/wx/doc/gen/book_ctrl_event.rb +1 -1
  43. data/lib/wx/doc/gen/calendar_event.rb +1 -1
  44. data/lib/wx/doc/gen/colour.rb +0 -1
  45. data/lib/wx/doc/gen/colour_dialog.rb +1 -1
  46. data/lib/wx/doc/gen/combo_box.rb +3 -2
  47. data/lib/wx/doc/gen/combo_ctrl.rb +91 -227
  48. data/lib/wx/doc/gen/core.rb +2 -2
  49. data/lib/wx/doc/gen/date_event.rb +1 -1
  50. data/lib/wx/doc/gen/dc.rb +0 -3
  51. data/lib/wx/doc/gen/dialog.rb +0 -1
  52. data/lib/wx/doc/gen/event.rb +4 -4
  53. data/lib/wx/doc/gen/event_blocker.rb +1 -1
  54. data/lib/wx/doc/gen/event_filter.rb +0 -2
  55. data/lib/wx/doc/gen/events.rb +17 -39
  56. data/lib/wx/doc/gen/file_ctrl_event.rb +1 -1
  57. data/lib/wx/doc/gen/file_dialog.rb +0 -2
  58. data/lib/wx/doc/gen/file_dialog_customize_hook.rb +55 -63
  59. data/lib/wx/doc/gen/file_dir_picker_event.rb +1 -1
  60. data/lib/wx/doc/gen/file_system.rb +1 -58
  61. data/lib/wx/doc/gen/find_dialog_event.rb +1 -1
  62. data/lib/wx/doc/gen/frame.rb +0 -1
  63. data/lib/wx/doc/gen/gdi_common.rb +0 -8
  64. data/lib/wx/doc/gen/grid/grid_cell_activatable_editor.rb +0 -2
  65. data/lib/wx/doc/gen/grid/grid_cell_attr.rb +0 -2
  66. data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_editor.rb +0 -2
  67. data/lib/wx/doc/gen/grid/grid_cell_auto_wrap_string_renderer.rb +0 -2
  68. data/lib/wx/doc/gen/grid/grid_cell_bool_editor.rb +0 -2
  69. data/lib/wx/doc/gen/grid/grid_cell_bool_renderer.rb +0 -2
  70. data/lib/wx/doc/gen/grid/grid_cell_choice_editor.rb +0 -2
  71. data/lib/wx/doc/gen/grid/grid_cell_date_editor.rb +0 -2
  72. data/lib/wx/doc/gen/grid/grid_cell_date_renderer.rb +0 -2
  73. data/lib/wx/doc/gen/grid/grid_cell_date_time_renderer.rb +0 -2
  74. data/lib/wx/doc/gen/grid/grid_cell_editor.rb +0 -2
  75. data/lib/wx/doc/gen/grid/grid_cell_enum_editor.rb +0 -2
  76. data/lib/wx/doc/gen/grid/grid_cell_enum_renderer.rb +0 -2
  77. data/lib/wx/doc/gen/grid/grid_cell_float_editor.rb +0 -2
  78. data/lib/wx/doc/gen/grid/grid_cell_float_renderer.rb +0 -2
  79. data/lib/wx/doc/gen/grid/grid_cell_number_editor.rb +0 -2
  80. data/lib/wx/doc/gen/grid/grid_cell_number_renderer.rb +0 -2
  81. data/lib/wx/doc/gen/grid/grid_cell_renderer.rb +0 -2
  82. data/lib/wx/doc/gen/grid/grid_cell_string_renderer.rb +0 -2
  83. data/lib/wx/doc/gen/grid/grid_cell_text_editor.rb +0 -2
  84. data/lib/wx/doc/gen/grid/grid_ctrl.rb +0 -12
  85. data/lib/wx/doc/gen/grid/grid_editor_created_event.rb +1 -1
  86. data/lib/wx/doc/gen/grid/grid_event.rb +1 -1
  87. data/lib/wx/doc/gen/grid/grid_range_select_event.rb +1 -1
  88. data/lib/wx/doc/gen/grid/grid_size_event.rb +1 -1
  89. data/lib/wx/doc/gen/gui_event_loop.rb +0 -2
  90. data/lib/wx/doc/gen/header_ctrl.rb +0 -7
  91. data/lib/wx/doc/gen/header_ctrl_event.rb +1 -1
  92. data/lib/wx/doc/gen/html/html_cell_event.rb +1 -1
  93. data/lib/wx/doc/gen/image.rb +0 -2
  94. data/lib/wx/doc/gen/list_ctrl.rb +0 -1
  95. data/lib/wx/doc/gen/list_event.rb +1 -1
  96. data/lib/wx/doc/gen/media_ctrl.rb +0 -6
  97. data/lib/wx/doc/gen/media_event.rb +1 -1
  98. data/lib/wx/doc/gen/menu.rb +0 -2
  99. data/lib/wx/doc/gen/notebook.rb +0 -1
  100. data/lib/wx/doc/gen/persistence_manager.rb +135 -0
  101. data/lib/wx/doc/gen/persistent_object.rb +52 -0
  102. data/lib/wx/doc/gen/persistent_window.rb +116 -0
  103. data/lib/wx/doc/gen/pg/pg_property.rb +0 -13
  104. data/lib/wx/doc/gen/pg/pg_validation_info.rb +0 -2
  105. data/lib/wx/doc/gen/pg/property_grid.rb +0 -2
  106. data/lib/wx/doc/gen/pg/property_grid_event.rb +1 -1
  107. data/lib/wx/doc/gen/pg/property_grid_interface.rb +2 -2
  108. data/lib/wx/doc/gen/pg/property_grid_manager.rb +0 -2
  109. data/lib/wx/doc/gen/pg/property_grid_page.rb +0 -2
  110. data/lib/wx/doc/gen/pg/property_grid_page_state.rb +0 -1
  111. data/lib/wx/doc/gen/prt/post_script_dc.rb +0 -1
  112. data/lib/wx/doc/gen/rbn/ribbon_bar_event.rb +1 -1
  113. data/lib/wx/doc/gen/rbn/ribbon_button_bar_event.rb +1 -1
  114. data/lib/wx/doc/gen/rbn/ribbon_gallery_event.rb +1 -1
  115. data/lib/wx/doc/gen/rbn/ribbon_panel_event.rb +1 -1
  116. data/lib/wx/doc/gen/rbn/ribbon_tool_bar_event.rb +1 -1
  117. data/lib/wx/doc/gen/rtc/rich_text_event.rb +1 -1
  118. data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +0 -1
  119. data/lib/wx/doc/gen/rtc/rich_text_style_list_box.rb +3 -0
  120. data/lib/wx/doc/gen/rtc/rich_text_xml_handler.rb +0 -1
  121. data/lib/wx/doc/gen/scroll_bar.rb +0 -1
  122. data/lib/wx/doc/gen/sizer.rb +0 -1
  123. data/lib/wx/doc/gen/slider.rb +0 -1
  124. data/lib/wx/doc/gen/spin_double_event.rb +1 -1
  125. data/lib/wx/doc/gen/spin_event.rb +1 -1
  126. data/lib/wx/doc/gen/splash_screen.rb +1 -1
  127. data/lib/wx/doc/gen/splitter_event.rb +1 -1
  128. data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +0 -1
  129. data/lib/wx/doc/gen/stc/styled_text_event.rb +1 -2
  130. data/lib/wx/doc/gen/task_bar_icon.rb +0 -1
  131. data/lib/wx/doc/gen/task_bar_icon_event.rb +1 -1
  132. data/lib/wx/doc/gen/text_ctrl.rb +0 -5
  133. data/lib/wx/doc/gen/text_entry.rb +0 -4
  134. data/lib/wx/doc/gen/tree_ctrl.rb +0 -2
  135. data/lib/wx/doc/gen/tree_event.rb +1 -1
  136. data/lib/wx/doc/gen/utils.rb +0 -16
  137. data/lib/wx/doc/gen/v_scrolled_window.rb +0 -1
  138. data/lib/wx/doc/gen/wizard.rb +0 -1
  139. data/lib/wx/doc/gen/wizard_event.rb +1 -1
  140. data/lib/wx/doc/gen/wizard_page.rb +0 -1
  141. data/lib/wx/doc/owner_drawn_combobox.rb +5 -1
  142. data/lib/wx/doc/persistence_manager.rb +36 -0
  143. data/lib/wx/doc/persistent_object.rb +27 -0
  144. data/lib/wx/doc/top_level_window.rb +19 -0
  145. data/lib/wx/doc/treebook.rb +6 -1
  146. data/lib/wx/version.rb +1 -1
  147. data/lib/wxruby_aui.so +0 -0
  148. data/lib/wxruby_core.so +0 -0
  149. data/lib/wxruby_grid.so +0 -0
  150. data/lib/wxruby_html.so +0 -0
  151. data/lib/wxruby_pg.so +0 -0
  152. data/lib/wxruby_prt.so +0 -0
  153. data/lib/wxruby_rbn.so +0 -0
  154. data/lib/wxruby_rtc.so +0 -0
  155. data/lib/wxruby_stc.so +0 -0
  156. data/samples/widgets/widgets.rb +5 -9
  157. data/tests/test_combo_ctrl.rb +196 -0
  158. data/tests/test_config.rb +207 -42
  159. data/tests/test_persistence.rb +142 -0
  160. metadata +20 -2
@@ -22,7 +22,6 @@ module Wx
22
22
  # Category: {Wx::Events}
23
23
  #
24
24
  # ## Delayed Action Mechanism
25
- #
26
25
  # {Wx::IdleEvent} can be used to perform some action "at slightly later time". This can be necessary in several circumstances when, for whatever reason, something can't be done in the current event handler. For example, if a mouse event handler is called with the mouse button pressed, the mouse can be currently captured and some operations with it notably capturing it again might be impossible or lead to undesirable results. If you still want to capture it, you can do it from {Wx::EVT_IDLE} handler when it is called the next time instead of doing it immediately.
27
26
  # This can be achieved in two different ways: when using static event tables, you will need a flag indicating to the (always connected) idle event handler whether the desired action should be performed. The originally called handler would then set it to indicate that it should indeed be done and the idle handler itself would reset it to prevent it from doing the same action again.
28
27
  # Using dynamically connected event handlers things are even simpler as the original event handler can simply {Wx::EvtHandler#connect} or {Wx::EvtHandler#bind} the idle event handler which would only be executed then and could {Wx::EvtHandler#disconnect} or {Wx::EvtHandler#unbind} itself.
@@ -78,7 +77,7 @@ module Wx
78
77
  class NotifyEvent < CommandEvent
79
78
 
80
79
  # Constructor (used internally by wxWidgets only).
81
- # @param eventType [Wx::StaticLine::EventType]
80
+ # @param eventType [Wx::Notebook::EventType]
82
81
  # @param id [Integer]
83
82
  # @return [Wx::NotifyEvent]
84
83
  def initialize(eventType=Wx::EVT_NULL, id=0) end
@@ -107,7 +106,6 @@ module Wx
107
106
  # Note that scrolled windows send the {Wx::ScrollWinEvent} which does not derive from {Wx::CommandEvent}, but from {Wx::Event} directly - don't confuse these two kinds of events and use the event table macros mentioned below only for the scrollbar-like controls.
108
107
  #
109
108
  # ## The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED
110
- #
111
109
  # The EVT_SCROLL_THUMBRELEASE event is only emitted when actually dragging the thumb using the mouse and releasing it (This EVT_SCROLL_THUMBRELEASE event is also followed by an EVT_SCROLL_CHANGED event).
112
110
  # The EVT_SCROLL_CHANGED event also occurs when using the keyboard to change the thumb position, and when clicking next to the thumb (In all these cases the EVT_SCROLL_THUMBRELEASE event does not happen).
113
111
  # In short, the EVT_SCROLL_CHANGED event is triggered when scrolling/ moving has finished independently of the way it had started. Please see the Widgets Sample ("Slider" page) to see the difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED in action.
@@ -174,7 +172,7 @@ module Wx
174
172
  class ScrollEvent < CommandEvent
175
173
 
176
174
  # Constructor.
177
- # @param commandType [Wx::StaticLine::EventType]
175
+ # @param commandType [Wx::Notebook::EventType]
178
176
  # @param id [Integer]
179
177
  # @param pos [Integer]
180
178
  # @param orientation [Integer]
@@ -237,7 +235,7 @@ module Wx
237
235
  class ScrollWinEvent < Event
238
236
 
239
237
  # Constructor.
240
- # @param commandType [Wx::StaticLine::EventType]
238
+ # @param commandType [Wx::Notebook::EventType]
241
239
  # @param pos [Integer]
242
240
  # @param orientation [Integer]
243
241
  # @return [Wx::ScrollWinEvent]
@@ -377,7 +375,7 @@ module Wx
377
375
  # - {Wx::EVT_MOUSEWHEEL}
378
376
  #
379
377
  # - {Wx::EVT_MAGNIFY}
380
- # @param mouseEventType [Wx::StaticLine::EventType]
378
+ # @param mouseEventType [Wx::Notebook::EventType]
381
379
  # @return [Wx::MouseEvent]
382
380
  def initialize(mouseEventType=Wx::EVT_NULL) end
383
381
 
@@ -846,7 +844,7 @@ module Wx
846
844
 
847
845
  # Constructor.
848
846
  # @param winid [Integer]
849
- # @param type [Wx::StaticLine::EventType]
847
+ # @param type [Wx::Notebook::EventType]
850
848
  # @return [Wx::GestureEvent]
851
849
  def initialize(winid=0, type=Wx::EVT_NULL) end
852
850
 
@@ -1122,7 +1120,7 @@ module Wx
1122
1120
  # Constructor.
1123
1121
  #
1124
1122
  # Currently, the only valid event types are {Wx::EVT_CHAR} and {Wx::EVT_CHAR_HOOK}.
1125
- # @param keyEventType [Wx::StaticLine::EventType]
1123
+ # @param keyEventType [Wx::Notebook::EventType]
1126
1124
  # @return [Wx::KeyEvent]
1127
1125
  def initialize(keyEventType=Wx::EVT_NULL) end
1128
1126
 
@@ -1561,7 +1559,7 @@ module Wx
1561
1559
  class FocusEvent < Event
1562
1560
 
1563
1561
  # Constructor.
1564
- # @param eventType [Wx::StaticLine::EventType]
1562
+ # @param eventType [Wx::Notebook::EventType]
1565
1563
  # @param id [Integer]
1566
1564
  # @return [Wx::FocusEvent]
1567
1565
  def initialize(eventType=Wx::EVT_NULL, id=0) end
@@ -1612,23 +1610,15 @@ module Wx
1612
1610
  #
1613
1611
  class Reason < Wx::Enum
1614
1612
 
1615
- # Window activated by mouse click.
1616
- #
1617
- Reason_Mouse = Wx::ActivateEvent::Reason.new(0)
1618
-
1619
- # Window was activated with some other method than mouse click.
1620
- #
1621
- Reason_Unknown = Wx::ActivateEvent::Reason.new(1)
1622
-
1623
1613
  end # Reason
1624
1614
 
1625
1615
  # Constructor.
1626
- # @param eventType [Wx::StaticLine::EventType]
1616
+ # @param eventType [Wx::Notebook::EventType]
1627
1617
  # @param active [Boolean]
1628
1618
  # @param id [Integer]
1629
1619
  # @param activationReason [Wx::ActivateEvent::Reason]
1630
1620
  # @return [Wx::ActivateEvent]
1631
- def initialize(eventType=Wx::EVT_NULL, active=true, id=0, activationReason=Wx::ActivateEvent::Reason::Reason_Unknown) end
1621
+ def initialize(eventType=Wx::EVT_NULL, active=true, id=0, activationReason=REASON_UNKNOWN) end
1632
1622
 
1633
1623
  # Returns true if the application or window is being activated, false otherwise.
1634
1624
  # @return [Boolean]
@@ -1702,7 +1692,7 @@ module Wx
1702
1692
  class MenuEvent < Event
1703
1693
 
1704
1694
  # Constructor.
1705
- # @param type [Wx::StaticLine::EventType]
1695
+ # @param type [Wx::Notebook::EventType]
1706
1696
  # @param id [Integer]
1707
1697
  # @param menu [Wx::Menu]
1708
1698
  # @return [Wx::MenuEvent]
@@ -1782,7 +1772,7 @@ module Wx
1782
1772
  class CloseEvent < Event
1783
1773
 
1784
1774
  # Constructor.
1785
- # @param commandEventType [Wx::StaticLine::EventType]
1775
+ # @param commandEventType [Wx::Notebook::EventType]
1786
1776
  # @param id [Integer]
1787
1777
  # @return [Wx::CloseEvent]
1788
1778
  def initialize(commandEventType=Wx::EVT_NULL, id=0) end
@@ -1976,7 +1966,7 @@ module Wx
1976
1966
  class JoystickEvent < Event
1977
1967
 
1978
1968
  # Constructor.
1979
- # @param eventType [Wx::StaticLine::EventType]
1969
+ # @param eventType [Wx::Notebook::EventType]
1980
1970
  # @param state [Integer]
1981
1971
  # @param joystick [Integer]
1982
1972
  # @param change [Integer]
@@ -2086,7 +2076,7 @@ module Wx
2086
2076
  class DropFilesEvent < Event
2087
2077
 
2088
2078
  # Constructor.
2089
- # @param id [Wx::StaticLine::EventType]
2079
+ # @param id [Wx::Notebook::EventType]
2090
2080
  # @param noFiles [Integer]
2091
2081
  # @param files [String]
2092
2082
  # @return [Wx::DropFilesEvent]
@@ -2672,27 +2662,15 @@ module Wx
2672
2662
  #
2673
2663
  class Origin < Wx::Enum
2674
2664
 
2675
- # unrecognized event source.
2676
- #
2677
- Origin_Unknown = Wx::HelpEvent::Origin.new(0)
2678
-
2679
- # event generated from F1 key press.
2680
- #
2681
- Origin_Keyboard = Wx::HelpEvent::Origin.new(1)
2682
-
2683
- # event generated by {Wx::ContextHelp} or from the [?] button on the title bar (Windows).
2684
- #
2685
- Origin_HelpButton = Wx::HelpEvent::Origin.new(2)
2686
-
2687
2665
  end # Origin
2688
2666
 
2689
2667
  # Constructor.
2690
- # @param type [Wx::StaticLine::EventType]
2668
+ # @param type [Wx::Notebook::EventType]
2691
2669
  # @param winid [Integer]
2692
2670
  # @param pt [Array(Integer, Integer), Wx::Point]
2693
2671
  # @param origin [Wx::HelpEvent::Origin]
2694
2672
  # @return [Wx::HelpEvent]
2695
- def initialize(type=Wx::EVT_NULL, winid=0, pt=Wx::DEFAULT_POSITION, origin=Wx::HelpEvent::Origin::Origin_Unknown) end
2673
+ def initialize(type=Wx::EVT_NULL, winid=0, pt=Wx::DEFAULT_POSITION, origin=ORIGIN_UNKNOWN) end
2696
2674
 
2697
2675
  # Returns the origin of the help event which is one of the {Wx::HelpEvent::Origin} values.
2698
2676
  #
@@ -2756,7 +2734,7 @@ module Wx
2756
2734
  class ClipboardTextEvent < CommandEvent
2757
2735
 
2758
2736
  # Constructor.
2759
- # @param commandType [Wx::StaticLine::EventType]
2737
+ # @param commandType [Wx::Notebook::EventType]
2760
2738
  # @param id [Integer]
2761
2739
  # @return [Wx::ClipboardTextEvent]
2762
2740
  def initialize(commandType=Wx::EVT_NULL, id=0) end
@@ -2782,7 +2760,7 @@ module Wx
2782
2760
  class ContextMenuEvent < CommandEvent
2783
2761
 
2784
2762
  # Constructor.
2785
- # @param type [Wx::StaticLine::EventType]
2763
+ # @param type [Wx::Notebook::EventType]
2786
2764
  # @param id [Integer]
2787
2765
  # @param pos [Array(Integer, Integer), Wx::Point]
2788
2766
  # @return [Wx::ContextMenuEvent]
@@ -27,7 +27,7 @@ module Wx
27
27
  class FileCtrlEvent < CommandEvent
28
28
 
29
29
  # Constructor.
30
- # @param type [Wx::StaticLine::EventType]
30
+ # @param type [Wx::Notebook::EventType]
31
31
  # @param evtObject [Wx::Object]
32
32
  # @param id [Integer]
33
33
  # @return [Wx::FileCtrlEvent]
@@ -108,7 +108,6 @@ module Wx
108
108
  # ```
109
109
  #
110
110
  # ## Wildcard Filters
111
- #
112
111
  # All implementations of the {Wx::FileDialog} provide a wildcard filter. Typing a filename containing wildcards (*, ?) in the filename text item, and clicking on Ok, will result in only those files matching the pattern being displayed. The wildcard may be a specification for multiple types of file with a description for each, such as:
113
112
  # ```
114
113
  # "BMP and GIF files (*.bmp;*.gif)|*.bmp;*.gif|PNG files (*.png)|*.png"
@@ -121,7 +120,6 @@ module Wx
121
120
  # But in contrast to Windows and Unix, where the file type choice filters only the selected files, on Mac macOS even in this case the dialog shows all files matching all file types. The files which does not match the currently selected file type are greyed out and are not selectable.
122
121
  #
123
122
  # ## Dialog Customization
124
- #
125
123
  # Uniquely among the other standard dialogs, {Wx::FileDialog} can be customized by adding extra controls to it. Moreover, there are two ways to do it: the first one is to define a callback function and use {Wx::FileDialog#set_extra_control_creator} to tell the dialog to call it, while the second one requires defining a class inheriting from {Wx::FileDialogCustomizeHook} and implementing its virtual functions, notably {Wx::FileDialogCustomizeHook#add_custom_controls} where the extra controls have to be created, and finally calling {Wx::FileDialog#set_customize_hook} with this custom hook object.
126
124
  # The first approach is somewhat simpler and more flexible, as it allows to create any kind of custom controls, but is not supported by the "new style" (where "new" means used since Windows Vista, i.e. circa 2007) file dialogs under MSW. Because of this, calling {Wx::FileDialog#set_extra_control_creator} in WXMSW forces the use of old style (Windows XP) dialogs, that may look out of place. The second approach is implemented by the MSW dialogs natively and doesn't suffer from this limitation, so its use is recommended, especially if the few simple control types supported by it (see {Wx::FileDialogCustomize} for more information about the supported controls) are sufficient for your needs.
127
125
  # Both of the approaches to the dialog customization are demonstrated in the Dialogs Sample, please check it for more details.
@@ -10,75 +10,65 @@ module Wx
10
10
  #
11
11
  # {Wx::FileDialogCustomizeHook} is an abstract base class, i.e. in order to use a concrete class inheriting from it and implementing its pure virtual {Wx::FileDialogCustomizeHook#add_custom_controls} function must be defined. Then an object of this class should be passed to {Wx::FileDialog#set_customize_hook}, which will result in its {Wx::FileDialogCustomizeHook#add_custom_controls} being called before the dialog is shown, {Wx::FileDialogCustomizeHook#update_custom_controls} being called whenever something changes in the dialog while it is shown and, finally, {Wx::FileDialogCustomizeHook#transfer_data_from_custom_controls} being called when the user accepts their choice in the dialog.
12
12
  # Putting all this together, here is an example of customizing the file dialog using this class:
13
- # ```
14
- # class EncryptHook : public wxFileDialogCustomizeHook
15
- # {
16
- # public:
17
- # // Override to add custom controls using the provided customizer object.
18
- # void AddCustomControls(wxFileDialogCustomize& customizer) override
19
- # {
20
- # // Suppose we can encrypt files when saving them.
21
- # m_checkbox = customizer.AddCheckBox("Encrypt");
22
- #
23
- # // While m_checkbox is not a wxCheckBox, it looks almost like one
24
- # // and, in particular, we can bind to custom control events as usual.
25
- # m_checkbox->Bind(wxEVT_CHECKBOX, [this](wxCommandEvent& event) {
26
- # // We can also call wxWindow-like functions on them.
27
- # m_button->Enable(event.IsChecked());
28
- # });
29
- #
30
- # // The encryption parameters can be edited in a dedicated dialog.
31
- # m_button = customizer.AddButton("Parameters...");
32
- # m_button->Bind(wxEVT_BUTTON, [](wxCommandEvent&) {
33
- # ... show the encryption parameters dialog here ...
34
- # });
35
- # }
36
- #
37
- # // Override to save the values of the custom controls.
38
- # void TransferDataFromCustomControls() override
39
- # {
40
- # // Save the checkbox value, as we won't be able to use it any more
41
- # // once this function returns.
42
- # m_encrypt = m_checkbox->GetValue();
43
- # }
44
- #
45
- # // Just a simple accessor to get the results.
46
- # bool Encrypt() const { return m_encrypt; }
47
- #
48
- # private:
49
- # wxFileDialogButton* m_button;
50
- # wxFileDialogCheckBox* m_checkbox;
51
- #
52
- # bool m_encrypt = false;
53
- # };
54
- #
55
- # void SomeFunc()
56
- # {
57
- # wxFileDialog dialog(NULL, "Save document", wxString(), "file.my",
58
- # "My files (*.my)|*.my",
59
- # wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
60
- #
61
- # // This object may be destroyed before the dialog, but must remain
62
- # // alive until ShowModal() returns.
63
- # EncryptHook customizeHook;
64
- # dialog.SetCustomizeHook(customHook);
65
- #
66
- # if ( dialog.ShowModal() == wxID_OK )
67
- # {
68
- # if ( customizeHook.Encrypt() )
69
- # ... save with encryption ...
70
- # else
71
- # ... save without encryption ...
72
- # }
73
- # }
13
+ # ```ruby
14
+ # class EncryptHook < Wx::FileDialogCustomizeHook
15
+ #
16
+ # attr_reader :encrypt
17
+ #
18
+ # # Override to add custom controls using the provided customizer object.
19
+ # def add_custom_controls(customizer)
20
+ # # Suppose we can encrypt files when saving them.
21
+ # @checkbox = customizer.add_check_box('Encrypt')
22
+ #
23
+ # # While @checkbox is not a Wx::CheckBox, it looks almost like one
24
+ # # and, in particular, we can bind to custom control events as usual.
25
+ # @checkbox.evt_checkbox(Wx::ID_ANY) do |event|
26
+ # # We can also call Wx::Window-like functions on them.
27
+ # @button.enable(event.checked?)
28
+ # end
29
+ #
30
+ # # The encryption parameters can be edited in a dedicated dialog.
31
+ # @button = customizer.add_button('Parameters...')
32
+ # @button.evt_button(Wx::ID_ANY) do |event|
33
+ # # ... show the encryption parameters dialog here ...
34
+ # end
35
+ # end
36
+ #
37
+ # # Override to save the values of the custom controls.
38
+ # def transfer_data_from_custom_controls
39
+ # # Save the checkbox value, as we won't be able to use it any more
40
+ # # once this function returns.
41
+ # @encrypt = @checkbox.get_value
42
+ # end
43
+ #
44
+ # end
45
+ #
46
+ # # ...
47
+ #
48
+ # def some_method
49
+ # Wx.FileDialog(nil, 'Save document', '', 'file.my',
50
+ # 'My files (*.my)|*.my',
51
+ # Wx::FD_SAVE | Wx::FD_OVERWRITE_PROMPT) do |dialog|
52
+ #
53
+ # # This object may be destroyed before the dialog, but must remain
54
+ # # alive until #show_modal returns.
55
+ # customize_hook = EncryptHook.new
56
+ # dialog.set_customize_hook(custom_hook)
57
+ #
58
+ # if dialog.show_modal == Wx::ID_OK
59
+ # if customize_hook.encrypt
60
+ # # ... save with encryption ...
61
+ # else
62
+ # # ... save without encryption ...
63
+ # end
64
+ # end
65
+ # end
74
66
  # ```
75
67
  #
76
68
  # Category: Common Dialogs
77
69
  # @see Wx::FileDialog
78
70
  #
79
71
  #
80
- #
81
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
82
72
  # @wxrb_require USE_FILEDLG
83
73
  class FileDialogCustomizeHook < ::Object
84
74
 
@@ -117,6 +107,8 @@ module Wx
117
107
  # @see Wx::FileDialog
118
108
  #
119
109
  #
110
+ #
111
+ # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
120
112
  # @wxrb_require USE_FILEDLG
121
113
  class FileDialogCustomize < ::Object
122
114
 
@@ -76,7 +76,7 @@ module Wx
76
76
  # @return [Wx::FileDirPickerEvent]
77
77
  # @overload initialize(type, generator, id, path)
78
78
  # The constructor is not normally used by the user code.
79
- # @param type [Wx::StaticLine::EventType]
79
+ # @param type [Wx::Notebook::EventType]
80
80
  # @param generator [Wx::Object]
81
81
  # @param id [Integer]
82
82
  # @param path [String]
@@ -91,14 +91,7 @@ module Wx
91
91
 
92
92
  # Returns true if the handler is able to open this file.
93
93
  #
94
- # This function doesn't check whether the file exists or not, it only checks if it knows the protocol. Example:
95
- #
96
- # ```
97
- # bool MyHand::CanOpen(const wxString& location)
98
- # {
99
- # return (GetProtocol(location) == "http");
100
- # }
101
- # ```
94
+ # This function doesn't check whether the file exists or not, it only checks if it knows the protocol.
102
95
  #
103
96
  # Must be overridden in derived handlers.
104
97
  # @param location [String]
@@ -132,10 +125,6 @@ module Wx
132
125
  # Returns the MIME type based on <b>extension</b> of location.
133
126
  #
134
127
  # (While {Wx::FSFile#get_mime_type} returns real MIME type - either extension-based or queried from HTTP.)
135
- # Example:
136
- # ```
137
- # GetMimeTypeFromExt("index.htm") == "text/html"
138
- # ```
139
128
  # @param location [String]
140
129
  # @return [String]
141
130
  def self.get_mime_type_from_ext(location) end
@@ -161,52 +150,6 @@ module Wx
161
150
  #
162
151
  # It is particularly suitable for storing bitmaps from resources or included XPM files so that they can be used with {Wx::HTML} or {Wx::WebView}.
163
152
  # Filenames are prefixed with <code>"memory:"</code>, e.g. <code>"memory:myfile.html"</code>.
164
- # Example:
165
- #
166
- # ```
167
- # \#ifndef __WXMSW__
168
- # \#include "logo.xpm"
169
- # \#endif
170
- #
171
- # void MyFrame::OnAbout(wxCommandEvent&)
172
- # {
173
- # wxFileSystem::AddHandler(new wxMemoryFSHandler);
174
- # wxMemoryFSHandler::AddFile("logo.png", wxBITMAP(logo), wxBITMAP_TYPE_PNG);
175
- # wxMemoryFSHandler::AddFile("about.htm",
176
- # "<html><body>About: "
177
- # "<img src=\"memory:logo.png\"></body></html>");
178
- #
179
- # wxDialog dlg(this, -1, wxString(_("About")));
180
- # wxBoxSizer *topsizer;
181
- # topsizer = new wxBoxSizer(wxVERTICAL);
182
- # \#ifdef USE_WEBVIEW
183
- # wxWebView* browser = wxWebView::New(&dlg, wxID_ANY, wxWebViewDefaultURLStr,
184
- # wxDefaultPosition, wxSize(380, 160));
185
- # browser->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewFSHandler("memory")));
186
- # browser->LoadURL("memory:about.htm");
187
- # \#else // Use wxHtml
188
- # wxHtmlWindow *browser;
189
- # browser = new wxHtmlWindow(&dlg, -1, wxDefaultPosition,
190
- # wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
191
- # browser->SetBorders(0);
192
- # browser->LoadPage("memory:about.htm");
193
- # browser->SetSize(browser->GetInternalRepresentation()->GetWidth(),
194
- # browser->GetInternalRepresentation()->GetHeight());
195
- # \#endif
196
- # topsizer->Add(browser, 1, wxALL, 10);
197
- # topsizer->Add(new wxStaticLine(&dlg, -1), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
198
- # topsizer->Add(new wxButton(&dlg, wxID_OK, "Ok"),
199
- # 0, wxALL | wxALIGN_RIGHT, 15);
200
- # dlg.SetAutoLayout(true);
201
- # dlg.SetSizer(topsizer);
202
- # topsizer->Fit(&dlg);
203
- # dlg.Centre();
204
- # dlg.ShowModal();
205
- #
206
- # wxMemoryFSHandler::RemoveFile("logo.png");
207
- # wxMemoryFSHandler::RemoveFile("about.htm");
208
- # }
209
- # ```
210
153
  #
211
154
  # Category: Virtual File System
212
155
  # @see Wx::MemoryFSHandler.add_file_with_mime_type
@@ -95,7 +95,7 @@ module Wx
95
95
  class FindDialogEvent < CommandEvent
96
96
 
97
97
  # Constructor used by wxWidgets only.
98
- # @param commandType [Wx::StaticLine::EventType]
98
+ # @param commandType [Wx::Notebook::EventType]
99
99
  # @param id [Integer]
100
100
  # @return [Wx::FindDialogEvent]
101
101
  def initialize(commandType=Wx::EVT_NULL, id=0) end
@@ -28,7 +28,6 @@ module Wx
28
28
  # </div>
29
29
  #
30
30
  # ## Default event processing
31
- #
32
31
  # {Wx::Frame} processes the following events:
33
32
  #
34
33
  # - {Wx::EVT_SIZE}: if the frame has exactly one child window, not counting the status and toolbar, this child is resized to take the entire frame client area. If two or more windows are present, they should be laid out explicitly either by manually handling {Wx::EVT_SIZE} or using sizers;
@@ -306,8 +306,6 @@ module Wx
306
306
  # <p>Use of this function is not recommended in the new code as it only works for the primary display. Use Wx::Display#get_depth to retrieve the depth of the appropriate display and compare it with 1 instead.
307
307
  # </p>
308
308
  # </div>
309
- #
310
- # Include file: \#include <wx/gdicmn.h>
311
309
  # @return [Boolean]
312
310
  def self.colour_display; end
313
311
 
@@ -318,8 +316,6 @@ module Wx
318
316
  # <p>Use of this function is not recommended in the new code as it only works for the primary display. Use Wx::Display#get_depth to retrieve the depth of the appropriate display instead.
319
317
  # </p>
320
318
  # </div>
321
- #
322
- # Include file: \#include <wx/gdicmn.h>
323
319
  # @return [Integer]
324
320
  def self.display_depth; end
325
321
 
@@ -348,8 +344,6 @@ module Wx
348
344
  # <p>Use of this function is not recommended in the new code as it only works for the primary display. Use Wx::Display#get_ppi to retrieve the resolution of the appropriate display instead.
349
345
  # </p>
350
346
  # </div>
351
- #
352
- # Include file: \#include <wx/gdicmn.h>
353
347
  # @see Wx::Display
354
348
  # @return [Wx::Size]
355
349
  def self.get_display_ppi; end
@@ -361,8 +355,6 @@ module Wx
361
355
  # <p>Use of this function is not recommended in the new code as it only works for the primary display. Use Wx::Display#get_geometry to retrieve the size of the appropriate display instead.
362
356
  # </p>
363
357
  # </div>
364
- #
365
- # Include file: \#include <wx/gdicmn.h>
366
358
  # @see Wx::Display
367
359
  # @return [Wx::Size]
368
360
  def self.get_display_size; end
@@ -10,8 +10,6 @@ module Wx::GRID
10
10
  #
11
11
  # Inheriting from this class makes it simpler to implement editors that support only activation, but not in-place editing, as they only need to implement {Wx::GRID::GridCellActivatableEditor#try_activate}, {Wx::GRID::GridCellActivatableEditor#do_activate} and {Wx::GRID::GridCellActivatableEditor#clone} methods, but not all the other pure virtual methods of {Wx::GRID::GridCellEditor}.
12
12
  #
13
- #
14
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
15
13
  # @wxrb_require USE_GRID
16
14
  class GridCellActivatableEditor < GridCellEditor
17
15
 
@@ -13,8 +13,6 @@ module Wx::GRID
13
13
  #
14
14
  # Category: Grid Related Classes
15
15
  #
16
- #
17
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
18
16
  # @wxrb_require USE_GRID
19
17
  class GridCellAttr < ::Object
20
18
 
@@ -19,8 +19,6 @@ module Wx::GRID
19
19
  # @see Wx::GRID::GridCellDateEditor
20
20
  #
21
21
  #
22
- #
23
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
24
22
  # @wxrb_require USE_GRID
25
23
  class GridCellAutoWrapStringEditor < GridCellTextEditor
26
24
 
@@ -20,8 +20,6 @@ module Wx::GRID
20
20
  # @see Wx::GRID::GridCellStringRenderer
21
21
  #
22
22
  #
23
- #
24
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
25
23
  # @wxrb_require USE_GRID
26
24
  class GridCellAutoWrapStringRenderer < GridCellStringRenderer
27
25
 
@@ -19,8 +19,6 @@ module Wx::GRID
19
19
  # @see Wx::GRID::GridCellDateEditor
20
20
  #
21
21
  #
22
- #
23
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
24
22
  # @wxrb_require USE_GRID
25
23
  class GridCellBoolEditor < GridCellEditor
26
24
 
@@ -18,8 +18,6 @@ module Wx::GRID
18
18
  # @see Wx::GRID::GridCellStringRenderer
19
19
  #
20
20
  #
21
- #
22
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
23
21
  # @wxrb_require USE_GRID
24
22
  class GridCellBoolRenderer < GridCellStringRenderer
25
23
 
@@ -19,8 +19,6 @@ module Wx::GRID
19
19
  # @see Wx::GRID::GridCellDateEditor
20
20
  #
21
21
  #
22
- #
23
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
24
22
  # @wxrb_require USE_GRID
25
23
  class GridCellChoiceEditor < GridCellEditor
26
24
 
@@ -20,8 +20,6 @@ module Wx::GRID
20
20
  # @see Wx::GRID::GridCellTextEditor
21
21
  #
22
22
  #
23
- #
24
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
25
23
  # @wxrb_require USE_GRID
26
24
  class GridCellDateEditor < GridCellEditor
27
25
 
@@ -21,8 +21,6 @@ module Wx::GRID
21
21
  # @see Wx::GRID::GridCellDateTimeRenderer
22
22
  #
23
23
  #
24
- #
25
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
26
24
  # @wxrb_require USE_GRID
27
25
  class GridCellDateRenderer < GridCellStringRenderer
28
26
 
@@ -21,8 +21,6 @@ module Wx::GRID
21
21
  # @see Wx::GRID::GridCellDateRenderer
22
22
  #
23
23
  #
24
- #
25
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
26
24
  # @wxrb_require USE_GRID
27
25
  class GridCellDateTimeRenderer < GridCellDateRenderer
28
26
 
@@ -22,8 +22,6 @@ module Wx::GRID
22
22
  # @see Wx::GRID::GridCellDateEditor
23
23
  #
24
24
  #
25
- #
26
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
27
25
  # @wxrb_require USE_GRID
28
26
  class GridCellEditor < ::Object
29
27
 
@@ -21,8 +21,6 @@ module Wx::GRID
21
21
  # @see Wx::GRID::GridCellDateEditor
22
22
  #
23
23
  #
24
- #
25
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
26
24
  # @wxrb_require USE_GRID
27
25
  class GridCellEnumEditor < GridCellChoiceEditor
28
26
 
@@ -20,8 +20,6 @@ module Wx::GRID
20
20
  # @see Wx::GRID::GridCellStringRenderer
21
21
  #
22
22
  #
23
- #
24
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
25
23
  # @wxrb_require USE_GRID
26
24
  class GridCellEnumRenderer < GridCellStringRenderer
27
25
 
@@ -19,8 +19,6 @@ module Wx::GRID
19
19
  # @see Wx::GRID::GridCellDateEditor
20
20
  #
21
21
  #
22
- #
23
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
24
22
  # @wxrb_require USE_GRID
25
23
  class GridCellFloatEditor < GridCellTextEditor
26
24
 
@@ -18,8 +18,6 @@ module Wx::GRID
18
18
  # @see Wx::GRID::GridCellStringRenderer
19
19
  #
20
20
  #
21
- #
22
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
23
21
  # @wxrb_require USE_GRID
24
22
  class GridCellFloatRenderer < GridCellStringRenderer
25
23
 
@@ -19,8 +19,6 @@ module Wx::GRID
19
19
  # @see Wx::GRID::GridCellDateEditor
20
20
  #
21
21
  #
22
- #
23
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
24
22
  # @wxrb_require USE_GRID
25
23
  class GridCellNumberEditor < GridCellTextEditor
26
24