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
@@ -19,93 +19,96 @@ module Wx
19
19
  # In addition it has other customization features. For instance, position and size of the dropdown button can be changed.
20
20
  #
21
21
  # ## Setting Custom Popup for wxComboCtrl
22
- #
23
22
  # {Wx::ComboCtrl} needs to be told somehow which control to use and this is done by {Wx::ComboCtrl#set_popup_control}. However, we need something more than just a {Wx::Control} in this method as, for example, we need to call SetStringValue("initial text value") and {Wx::Control} doesn't have such method. So we also need a {Wx::ComboPopup} which is an interface which must be implemented by a control to be usable as a popup.
24
23
  # We couldn't derive {Wx::ComboPopup} from {Wx::Control} as this would make it impossible to have a class deriving from a wxWidgets control and from it, so instead it is just a mix-in.
25
24
  # Here's a minimal sample of {Wx::ListView} popup:
26
25
  #
27
- # ```
28
- # \#include <wx/combo.h>
29
- # \#include <wx/listctrl.h>
30
- #
31
- # class wxListViewComboPopup : public wxListView, public wxComboPopup
32
- # {
33
- # public:
34
- # // Initialize member variables
35
- # virtual void Init()
36
- # {
37
- # m_value = -1;
38
- # }
39
- #
40
- # // Create popup control
41
- # virtual bool Create(wxWindow* parent)
42
- # {
43
- # return wxListView::Create(parent,1,wxPoint(0,0),wxDefaultSize);
44
- # }
45
- #
46
- # // Return pointer to the created control
47
- # virtual wxWindow *GetControl() { return this; }
48
- #
49
- # // Translate string into a list selection
50
- # virtual void SetStringValue(const wxString& s)
51
- # {
52
- # int n = wxListView::FindItem(-1,s);
53
- # if ( n >= 0 && n < wxListView::GetItemCount() )
54
- # wxListView::Select(n);
55
- # }
26
+ # ```ruby
27
+ # class ListViewComboPopup < Wx::ListView
28
+ #
29
+ # include Wx::ComboPopup
56
30
  #
57
- # // Get list selection as a string
58
- # virtual wxString GetStringValue() const
59
- # {
60
- # if ( m_value >= 0 )
61
- # return wxListView::GetItemText(m_value);
62
- # return wxEmptyString;
63
- # }
31
+ # # Allow only default ctor
32
+ # def initialize
33
+ # # call default control ctor; need to call Wx::ListView#create later
34
+ # super
35
+ # end
64
36
  #
65
- # // Do mouse hot-tracking (which is typical in list popups)
66
- # void OnMouseMove(wxMouseEvent& event)
67
- # {
68
- # // TODO: Move selection to cursor
69
- # }
37
+ # # Initialize member variables
38
+ # def init
39
+ # @value = -1
40
+ # end
70
41
  #
71
- # // On mouse left up, set the value and close the popup
72
- # void OnMouseClick(wxMouseEvent& WXUNUSED(event))
73
- # {
74
- # m_value = wxListView::GetFirstSelected();
42
+ # # Create popup control
43
+ # def create(parent)
44
+ # # need to finish creating the list view here
45
+ # # as calling super here would just call Wx::ComboPopup#create and not Wx::ListView#create
46
+ # # we need to use Ruby magic
47
+ # wx_lv_create = (Wx::ListView.instance_method :create).bind(self)
48
+ # wx_lv_create.call(parent, 1, [0,0], Wx::DEFAULT_SIZE)
49
+ # evt_motion :on_mouse_move
50
+ # evt_left_up :on_mouse_click
51
+ # end
75
52
  #
76
- # // TODO: Send event as well
53
+ # # Return pointer to the created control
54
+ # def get_control
55
+ # self
56
+ # end
77
57
  #
78
- # Dismiss();
79
- # }
58
+ # def lv_find_item(*args)
59
+ # unless @wx_lv_find_item
60
+ # @wx_lv_find_item = (Wx::ListView.instance_method :find_item).bind(self)
61
+ # end
62
+ # @wx_lv_find_item.call(*args)
63
+ # end
64
+ # protected :lv_find_item
80
65
  #
81
- # protected:
66
+ # # Translate string into a list selection
67
+ # def set_string_value(s)
68
+ # n = lv_find_item(-1, s)
69
+ # if n >= 0 && n < get_item_count
70
+ # select(n)
71
+ # @value = n
72
+ # end
73
+ # end
82
74
  #
83
- # int m_value; // current item index
75
+ # # Get list selection as a string
76
+ # def get_string_value
77
+ # return get_item_text(@value) if @value >= 0
78
+ # ''
79
+ # end
84
80
  #
85
- # private:
86
- # wxDECLARE_EVENT_TABLE();
87
- # };
81
+ # # Do mouse hot-tracking (which is typical in list popups)
82
+ # def on_mouse_move(event)
83
+ # # Move selection to cursor ...
84
+ # end
88
85
  #
89
- # wxBEGIN_EVENT_TABLE(wxListViewComboPopup, wxListView)
90
- # EVT_MOTION(wxListViewComboPopup::OnMouseMove)
91
- # EVT_LEFT_UP(wxListViewComboPopup::OnMouseClick)
92
- # wxEND_EVENT_TABLE()
86
+ # # On mouse left up, set the value and close the popup
87
+ # def on_mouse_click(_event)
88
+ # @value = get_first_selected
89
+ #
90
+ # # Send event as well ...
91
+ #
92
+ # dismiss
93
+ # end
94
+ #
95
+ # end
93
96
  # ```
94
97
  #
95
98
  # Here's how you would create and populate it in a dialog constructor:
96
99
  #
97
- # ```
98
- # wxComboCtrl* comboCtrl = new wxComboCtrl(this, wxID_ANY, wxEmptyString);
100
+ # ```ruby
101
+ # comboCtrl = Wx::ComboCtrl.new(self, Wx::ID_ANY, '')
99
102
  #
100
- # wxListViewComboPopup* popupCtrl = new wxListViewComboPopup();
103
+ # popupCtrl = ListViewComboPopup.new
101
104
  #
102
- # // It is important to call SetPopupControl() as soon as possible
103
- # comboCtrl->SetPopupControl(popupCtrl);
105
+ # # It is important to call #set_popup_control as soon as possible
106
+ # comboCtrl.set_popup_control(popupCtrl)
104
107
  #
105
- # // Populate using wxListView methods
106
- # popupCtrl->InsertItem(popupCtrl->GetItemCount(), "First Item");
107
- # popupCtrl->InsertItem(popupCtrl->GetItemCount(), "Second Item");
108
- # popupCtrl->InsertItem(popupCtrl->GetItemCount(), "Third Item");
108
+ # # Populate using Wx::ListView methods
109
+ # popupCtrl.insert_item((popupCtrl.item_count, 'First Item')
110
+ # popupCtrl.insert_item((popupCtrl.item_count, 'Second Item')
111
+ # popupCtrl.insert_item((popupCtrl.item_count, 'Third Item')
109
112
  # ```
110
113
  #
111
114
  # ### Styles
@@ -231,7 +234,7 @@ module Wx
231
234
  # Prepare background of combo control or an item in a dropdown list in a way typical on platform.
232
235
  #
233
236
  # This includes painting the focus/disabled background and setting the clipping region.
234
- # Unless you plan to paint your own focus indicator, you should always call this in your {Wx::ComboPopup#paint_combo_control} implementation. In addition, it sets pen and text colour to what looks good and proper against the background.
237
+ # Unless you plan to paint your own focus indicator, you should always call this in your {Wx::ComboPopup::PaintComboControl} implementation. In addition, it sets pen and text colour to what looks good and proper against the background.
235
238
  # flags: {Wx::RendererNative} flags: {Wx::CONTROL_ISSUBMENU}: is drawing a list item instead of combo control {Wx::CONTROL_SELECTED}: list item is selected {Wx::CONTROL_DISABLED}: control/item is disabled
236
239
  # @param dc [Wx::DC]
237
240
  # @param rect [Wx::Rect]
@@ -456,23 +459,23 @@ module Wx
456
459
  # By default, combo controls without {Wx::CB_READONLY} style create a {Wx::TextCtrl} which shows the current value and allows to edit it. This method allows to use some other window instead of this {Wx::TextCtrl}.
457
460
  # This method can be called after creating the combo fully, however in this case a {Wx::TextCtrl} is unnecessarily created just to be immediately destroyed when it's replaced by a custom window. If you wish to avoid this, you can use the following approach, also shown in the combo sample:
458
461
  #
459
- # ```
460
- # // Create the combo control using its default ctor.
461
- # wxComboCtrl* combo = new wxComboCtrl();
462
+ # ```ruby
463
+ # # Create the combo control using its default ctor.
464
+ # combo = Wx::ComboCtrl.new
462
465
  #
463
- # // Create the custom main control using its default ctor too.
464
- # SomeWindow* main = new SomeWindow();
466
+ # # Create the custom main control using its default ctor too.
467
+ # main = SomeWindow.new
465
468
  #
466
- # // Set the custom main control before creating the combo.
467
- # combo->SetMainControl(main);
469
+ # # Set the custom main control before creating the combo.
470
+ # combo.set_main_control(main)
468
471
  #
469
- # // And only create it now: wxTextCtrl won't be unnecessarily
470
- # // created because the combo already has a main window.
471
- # combo->Create(panel, wxID_ANY, wxEmptyString);
472
+ # # And only create it now: Wx::TextCtrl won't be unnecessarily
473
+ # # created because the combo already has a main window.
474
+ # combo.create(panel, Wx::ID_ANY, '')
472
475
  #
473
- # // Finally create the main window itself, now that its parent was
474
- # // created.
475
- # main->Create(combo, ...);
476
+ # # Finally create the main window itself, now that its parent was
477
+ # # created.
478
+ # main.create(combo, ...)
476
479
  # ```
477
480
  #
478
481
  # Note that when a custom main window is used, none of the methods of this class inherited from {Wx::TextEntry}, such as {Wx::ComboCtrl#set_value}, {Wx::ComboCtrl#replace}, {Wx::ComboCtrl#set_insertion_point} etc do anything and simply return.
@@ -492,10 +495,9 @@ module Wx
492
495
  # Set popup interface class derived from {Wx::ComboPopup}.
493
496
  #
494
497
  # This method should be called as soon as possible after the control has been created, unless {Wx::ComboCtrl#on_button_click} has been overridden.
495
- # @param popup [Wx::ComboPopup]
498
+ # @param popup [Wx::ComboPopup,nil]
496
499
  # @return [void]
497
500
  def set_popup_control(popup) end
498
- alias_method :popup_control=, :set_popup_control
499
501
 
500
502
  # Extends popup size horizontally, relative to the edges of the combo control.
501
503
  #
@@ -553,13 +555,13 @@ module Wx
553
555
  #
554
556
  # Usually you will need to use this during two-step creation, just before {Wx::ComboCtrl#create}. For example:
555
557
  #
556
- # ```
557
- # wxComboCtrl* comboCtrl = new wxComboCtrl();
558
+ # ```ruby
559
+ # comboCtrl = Wx::ComboCtrl.new
558
560
  #
559
- # // Let's make the text right-aligned
560
- # comboCtrl->SetTextCtrlStyle(wxTE_RIGHT);
561
+ # # Let's make the text right-aligned
562
+ # comboCtrl.set_text_ctrl_style(Wx::TE_RIGHT)
561
563
  #
562
- # comboCtrl->Create(parent, wxID_ANY, wxEmptyString);
564
+ # comboCtrl.create(parent, Wx::ID_ANY, '')
563
565
  # ```
564
566
  # @param style [Integer]
565
567
  # @return [void]
@@ -626,7 +628,7 @@ module Wx
626
628
  # <p>If you have implemented {Wx::ComboCtrl#on_button_click} to do something else than show the popup, then {Wx::ComboCtrl#do_set_popup_control} must always set popup to NULL.
627
629
  # </p>
628
630
  # </div>
629
- # @param popup [Wx::ComboPopup]
631
+ # @param popup [Wx::ComboPopup,nil]
630
632
  # @return [void]
631
633
  def do_set_popup_control(popup) end
632
634
 
@@ -640,143 +642,5 @@ module Wx
640
642
 
641
643
  end # ComboCtrl
642
644
 
643
- # In order to use a custom popup with {Wx::ComboCtrl}, an interface class must be derived from {Wx::ComboPopup}.
644
- #
645
- # For more information on how to use it, see Setting Custom Popup for wxComboCtrl.
646
- #
647
- # Category: {Wx::Controls}
648
- # @see Wx::ComboCtrl
649
- #
650
- #
651
- #
652
- # @note In wxRuby this is a mixin module instead of a (base) class.
653
- # @wxrb_require USE_COMBOCTRL
654
- module ComboPopup
655
-
656
- # Default constructor.
657
- #
658
- # It is recommended that internal variables are prepared in {Wx::ComboPopup#init} instead (because m_combo is not valid in constructor).
659
- # @return [Wx::ComboPopup]
660
- def initialize; end
661
-
662
- # The derived class must implement this to create the popup control.
663
- #
664
- # true if the call succeeded, false otherwise.
665
- # @param parent [Wx::Window]
666
- # @return [Boolean]
667
- def create(parent) end
668
-
669
- # You only need to implement this member function if you create your popup class in non-standard way.
670
- #
671
- # The default implementation can handle both multiple-inherited popup control (as seen in {Wx::ComboCtrl} samples) and one allocated separately in heap.
672
- # If you do completely re-implement this function, make sure it calls Destroy() for the popup control and also deletes this object (usually as the last thing).
673
- # @return [void]
674
- def destroy_popup; end
675
-
676
- # Utility function that hides the popup.
677
- # @return [void]
678
- def dismiss; end
679
-
680
- # Implement to customize matching of value string to an item container entry.
681
- #
682
- # <div class="wxrb-remark">
683
- # <b>Remark:</b>
684
- # <p>Default implementation always return true and does not alter trueItem.
685
- # </p>
686
- # </div>
687
- # @param item [String] String entered, usually by user or from SetValue() call.
688
- # @param trueItem [String] When item matches an entry, but the entry's string representation is not exactly the same (case mismatch, for example), then the true item string should be written back to here, if it is not a NULL pointer.
689
- # @return [Boolean]
690
- def find_item(item, trueItem=nil) end
691
-
692
- # The derived class may implement this to return adjusted size for the popup control, according to the variables given.
693
- #
694
- # <div class="wxrb-remark">
695
- # <b>Remark:</b>
696
- # <p>This function is called each time popup is about to be shown.
697
- # </p>
698
- # </div>
699
- # @param minWidth [Integer] Preferred minimum width.
700
- # @param prefHeight [Integer] Preferred height. May be -1 to indicate no preference.
701
- # @param maxHeight [Integer] Max height for window, as limited by screen size.
702
- # @return [Wx::Size]
703
- def get_adjusted_size(minWidth, prefHeight, maxHeight) end
704
- alias_method :adjusted_size, :get_adjusted_size
705
-
706
- # Returns pointer to the associated parent {Wx::ComboCtrl}.
707
- # @return [Wx::ComboCtrl]
708
- def get_combo_ctrl; end
709
- alias_method :combo_ctrl, :get_combo_ctrl
710
-
711
- # The derived class must implement this to return pointer to the associated control created in {Wx::ComboPopup#create}.
712
- # @return [Wx::Window]
713
- def get_control; end
714
- alias_method :control, :get_control
715
-
716
- # The derived class must implement this to return string representation of the value.
717
- # @return [String]
718
- def get_string_value; end
719
- alias_method :string_value, :get_string_value
720
-
721
- # The derived class must implement this to initialize its internal variables.
722
- #
723
- # This method is called immediately after construction finishes. m_combo member variable has been initialized before the call.
724
- # @return [void]
725
- def init; end
726
-
727
- # Utility method that returns true if Create has been called.
728
- #
729
- # Useful in conjunction with {Wx::ComboPopup#lazy_create}.
730
- # @return [Boolean]
731
- def is_created; end
732
- alias_method :created?, :is_created
733
-
734
- # The derived class may implement this to return true if it wants to delay call to {Wx::ComboPopup#create} until the popup is shown for the first time.
735
- #
736
- # It is more efficient, but on the other hand it is often more convenient to have the control created immediately.
737
- #
738
- # <div class="wxrb-remark">
739
- # <b>Remark:</b>
740
- # <p>Base implementation returns false.
741
- # </p>
742
- # </div>
743
- # @return [Boolean]
744
- def lazy_create; end
745
-
746
- # The derived class may implement this to do something when the parent {Wx::ComboCtrl} gets double-clicked.
747
- # @return [void]
748
- def on_combo_double_click; end
749
-
750
- # The derived class may implement this to receive key events from the parent {Wx::ComboCtrl}.
751
- #
752
- # Events not handled should be skipped, as usual.
753
- # @param event [Wx::KeyEvent]
754
- # @return [void]
755
- def on_combo_key_event(event) end
756
-
757
- # The derived class may implement this to do special processing when popup is hidden.
758
- # @return [void]
759
- def on_dismiss; end
760
-
761
- # The derived class may implement this to do special processing when popup is shown.
762
- # @return [void]
763
- def on_popup; end
764
-
765
- # The derived class may implement this to paint the parent {Wx::ComboCtrl}.
766
- #
767
- # Default implementation draws value as string.
768
- # @param dc [Wx::DC]
769
- # @param rect [Wx::Rect]
770
- # @return [void]
771
- def paint_combo_control(dc, rect) end
772
-
773
- # The derived class must implement this to receive string value changes from {Wx::ComboCtrl}.
774
- # @param value [String]
775
- # @return [void]
776
- def set_string_value(value) end
777
- alias_method :string_value=, :set_string_value
778
-
779
- end # ComboPopup
780
-
781
645
 
782
646
  end
@@ -7,7 +7,7 @@
7
7
  module Wx
8
8
 
9
9
  # wxRuby version string
10
- Wx::WXRUBY_VERSION = '0.9.3'
10
+ Wx::WXRUBY_VERSION = '0.9.5'
11
11
 
12
12
  # wxRuby version release type (alpha, beta, rc)
13
13
  Wx::WXRUBY_RELEASE_TYPE = ''
@@ -16,7 +16,7 @@ module Wx
16
16
  # wxRuby minor version number
17
17
  Wx::WXRUBY_MINOR = 9
18
18
  # wxRuby release number
19
- Wx::WXRUBY_RELEASE = 3
19
+ Wx::WXRUBY_RELEASE = 5
20
20
 
21
21
  # Convenience string for WxWidgets version info
22
22
  WXWIDGETS_VERSION = '3.2.4'
@@ -28,7 +28,7 @@ module Wx
28
28
  # @overload initialize(win, dt, type)
29
29
  # @param win [Wx::Window]
30
30
  # @param dt [Time,Date,DateTime]
31
- # @param type [Wx::StaticLine::EventType]
31
+ # @param type [Wx::Notebook::EventType]
32
32
  # @return [Wx::DateEvent]
33
33
  def initialize(*args) end
34
34
 
data/lib/wx/doc/gen/dc.rb CHANGED
@@ -139,18 +139,15 @@ module Wx
139
139
  # Beginning with wxWidgets 2.9.0 the entire {Wx::DC} code has been reorganized. All platform dependent code (actually all drawing code) has been moved into backend classes which derive from a common {Wx::DCImpl} class. The user-visible classes such as {Wx::ClientDC} and {Wx::PaintDC} merely forward all calls to the backend implementation.
140
140
  #
141
141
  # ## Device and logical units
142
- #
143
142
  # In the {Wx::DC} context there is a distinction between logical units and device units.
144
143
  # <b>Device</b> units are the units native to the particular device; e.g. for a screen, a device unit is a pixel. For a printer, the device unit is defined by the resolution of the printer (usually given in DPI: dot-per-inch).
145
144
  # All {Wx::DC} functions use instead <b>logical</b> units, unless where explicitly stated. Logical units are arbitrary units mapped to device units using the current mapping mode (see {Wx::DC#set_map_mode}).
146
145
  # This mechanism allows reusing the same code which prints on e.g. a window on the screen to print on e.g. a paper.
147
146
  #
148
147
  # ## Support for Transparency / Alpha Channel
149
- #
150
148
  # In general {Wx::DC} methods don't support alpha transparency and the alpha component of {Wx::Colour} is simply ignored and you need to use {Wx::GraphicsContext} for full transparency support. There are, however, a few exceptions: first, under macOS and GTK+ 3 colours with alpha channel are supported in all the normal {Wx::DC}-derived classes as they use {Wx::GraphicsContext} internally. Second, under all platforms {Wx::SVGFileDC} also fully supports alpha channel. In both of these cases the instances of {Wx::Pen} or {Wx::Brush} that are built from {Wx::Colour} use the colour's alpha values when stroking or filling.
151
149
  #
152
150
  # ## Support for Transformation Matrix
153
- #
154
151
  # On some platforms (currently under MSW, GTK+ 3, macOS) {Wx::DC} has support for applying an arbitrary affine transformation matrix to its coordinate system (since 3.1.1 this feature is also supported by {Wx::GCDC} in all ports). Call {Wx::DC#can_use_transform_matrix} to check if this support is available and then call {Wx::DC#set_transform_matrix} if it is. If the transformation matrix is not supported, {Wx::DC#set_transform_matrix} always simply returns false and doesn't do anything.
155
152
  # This feature is only available when {Wx::Setup::USE_DC_TRANSFORM_MATRIX} build option is enabled.
156
153
  #
@@ -52,7 +52,6 @@ module Wx
52
52
  # Also notice that the {Wx::Dialog#create_button_sizer} should be used to create the buttons appropriate for the current platform and positioned correctly (including their order which is platform-dependent).
53
53
  #
54
54
  # ## Modal and Modeless
55
- #
56
55
  # There are two kinds of dialog, modal and modeless. A modal dialog blocks program flow and user input on other windows until it is dismissed, whereas a modeless dialog behaves more like a frame in that program flow continues, and input in other windows is still possible. To show a modal dialog you should use the {Wx::Dialog#show_modal} method while to show a dialog modelessly you simply use {Wx::Dialog#show}, just as with frames.
57
56
  # Note that dialogs need to be explicitly destroyed when closed and not used anymore. The traditional code for this would be like:
58
57
  #
@@ -699,7 +699,7 @@ module Wx
699
699
  # Generates a new unique event type.
700
700
  #
701
701
  # Usually this function is only used by {define_event} and not called directly.
702
- # @return [Wx::StaticLine::EventType]
702
+ # @return [Wx::Notebook::EventType]
703
703
  def self.new_event_type; end
704
704
 
705
705
  # In a GUI application, this function posts event to the specified dest object using {Wx::EvtHandler#add_pending_event}.
@@ -728,7 +728,7 @@ module Wx
728
728
  alias_method :event_object, :get_event_object
729
729
 
730
730
  # Returns the identifier of the given event type, such as {Wx::EVT_BUTTON}.
731
- # @return [Wx::StaticLine::EventType]
731
+ # @return [Wx::Notebook::EventType]
732
732
  def get_event_type; end
733
733
  alias_method :event_type, :get_event_type
734
734
 
@@ -781,7 +781,7 @@ module Wx
781
781
  alias_method :event_object=, :set_event_object
782
782
 
783
783
  # Sets the event type.
784
- # @param type [Wx::StaticLine::EventType]
784
+ # @param type [Wx::Notebook::EventType]
785
785
  # @return [void]
786
786
  def set_event_type(type) end
787
787
  alias_method :event_type=, :set_event_type
@@ -894,7 +894,7 @@ module Wx
894
894
  class CommandEvent < Event
895
895
 
896
896
  # Constructor.
897
- # @param commandEventType [Wx::StaticLine::EventType]
897
+ # @param commandEventType [Wx::Notebook::EventType]
898
898
  # @param id [Integer]
899
899
  # @return [Wx::CommandEvent]
900
900
  def initialize(commandEventType=Wx::EVT_NULL, id=0) end
@@ -40,7 +40,7 @@ module Wx
40
40
  class EventBlocker < EvtHandler
41
41
 
42
42
  # Adds to the list of event types which should be blocked the given eventType.
43
- # @param eventType [Wx::StaticLine::EventType]
43
+ # @param eventType [Wx::Notebook::EventType]
44
44
  # @return [void]
45
45
  def block(eventType) end
46
46
 
@@ -53,8 +53,6 @@ module Wx
53
53
  # Notice that {Wx::App} derives from {Wx::EventFilter} and is registered as an event filter during its creation so you may also override {Wx::EventFilter#filter_event} method in your {Wx::App}-derived class and, in fact, this is often the most convenient way to do it. However creating a new class deriving directly from {Wx::EventFilter} allows isolating the event filtering code in its own separate class and also having several independent filters, if necessary.
54
54
  # Category: {Wx::Events}
55
55
  #
56
- #
57
- # @note This class is <b>untracked</b> and should not be derived from nor instances extended!
58
56
  class EventFilter < ::Object
59
57
 
60
58
  # Process event as usual.