wxruby3 0.9.4-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.
- checksums.yaml +4 -4
- data/INSTALL.md +1 -1
- data/README.md +2 -2
- data/ext/wxbase32u_gcc_custom.dll +0 -0
- data/ext/wxbase32u_net_gcc_custom.dll +0 -0
- data/ext/wxbase32u_xml_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_aui_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_core_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_gl_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_html_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_media_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_propgrid_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_qa_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_ribbon_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_richtext_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_stc_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_webview_gcc_custom.dll +0 -0
- data/ext/wxmsw32u_xrc_gcc_custom.dll +0 -0
- data/lib/wx/core/combo_ctrl.rb +171 -0
- data/lib/wx/doc/comboctrl.rb +128 -3
- data/lib/wx/doc/gen/app_traits.rb +2 -54
- data/lib/wx/doc/gen/art_provider.rb +0 -2
- data/lib/wx/doc/gen/aui/aui_dock_art.rb +77 -77
- data/lib/wx/doc/gen/aui/aui_manager.rb +0 -1
- data/lib/wx/doc/gen/aui/aui_mdi_client_window.rb +5 -4
- data/lib/wx/doc/gen/aui/aui_tool_bar_event.rb +20 -20
- data/lib/wx/doc/gen/colour.rb +0 -1
- data/lib/wx/doc/gen/colour_dialog.rb +1 -1
- data/lib/wx/doc/gen/combo_box.rb +3 -2
- data/lib/wx/doc/gen/combo_ctrl.rb +91 -227
- data/lib/wx/doc/gen/core.rb +2 -2
- data/lib/wx/doc/gen/dc.rb +0 -3
- data/lib/wx/doc/gen/dialog.rb +0 -1
- data/lib/wx/doc/gen/events.rb +2 -24
- data/lib/wx/doc/gen/file_dialog.rb +0 -2
- data/lib/wx/doc/gen/file_dialog_customize_hook.rb +53 -61
- data/lib/wx/doc/gen/file_system.rb +1 -58
- data/lib/wx/doc/gen/frame.rb +0 -1
- data/lib/wx/doc/gen/grid/grid_ctrl.rb +0 -12
- data/lib/wx/doc/gen/header_ctrl.rb +0 -1
- data/lib/wx/doc/gen/image.rb +0 -2
- data/lib/wx/doc/gen/list_ctrl.rb +0 -1
- data/lib/wx/doc/gen/media_ctrl.rb +0 -6
- data/lib/wx/doc/gen/menu.rb +0 -2
- data/lib/wx/doc/gen/notebook.rb +0 -1
- data/lib/wx/doc/gen/pg/pg_property.rb +0 -13
- data/lib/wx/doc/gen/pg/pg_validation_info.rb +0 -2
- data/lib/wx/doc/gen/pg/property_grid.rb +0 -2
- data/lib/wx/doc/gen/pg/property_grid_interface.rb +2 -2
- data/lib/wx/doc/gen/pg/property_grid_manager.rb +0 -2
- data/lib/wx/doc/gen/pg/property_grid_page.rb +0 -2
- data/lib/wx/doc/gen/pg/property_grid_page_state.rb +0 -1
- data/lib/wx/doc/gen/prt/post_script_dc.rb +0 -1
- data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +0 -1
- data/lib/wx/doc/gen/rtc/rich_text_style_list_box.rb +3 -0
- data/lib/wx/doc/gen/rtc/rich_text_xml_handler.rb +0 -1
- data/lib/wx/doc/gen/scroll_bar.rb +0 -1
- data/lib/wx/doc/gen/sizer.rb +0 -1
- data/lib/wx/doc/gen/slider.rb +0 -1
- data/lib/wx/doc/gen/splash_screen.rb +1 -1
- data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +0 -1
- data/lib/wx/doc/gen/stc/styled_text_event.rb +0 -1
- data/lib/wx/doc/gen/task_bar_icon.rb +0 -1
- data/lib/wx/doc/gen/text_ctrl.rb +0 -5
- data/lib/wx/doc/gen/tree_ctrl.rb +0 -2
- data/lib/wx/doc/gen/v_scrolled_window.rb +0 -1
- data/lib/wx/doc/gen/wizard.rb +0 -1
- data/lib/wx/doc/gen/wizard_page.rb +0 -1
- data/lib/wx/doc/owner_drawn_combobox.rb +5 -1
- data/lib/wx/version.rb +1 -1
- data/lib/wxruby_aui.so +0 -0
- data/lib/wxruby_core.so +0 -0
- data/lib/wxruby_grid.so +0 -0
- data/lib/wxruby_html.so +0 -0
- data/lib/wxruby_pg.so +0 -0
- data/lib/wxruby_prt.so +0 -0
- data/lib/wxruby_rbn.so +0 -0
- data/lib/wxruby_rtc.so +0 -0
- data/lib/wxruby_stc.so +0 -0
- data/tests/test_combo_ctrl.rb +196 -0
- metadata +4 -2
@@ -28,7 +28,6 @@ module Wx::AUI
|
|
28
28
|
# ```
|
29
29
|
#
|
30
30
|
# ## Layers, Rows and Directions, Positions
|
31
|
-
#
|
32
31
|
# Inside {Wx::AUI}, the docking layout is figured out by checking several pane parameters. Four of these are important for determining where a pane will end up:
|
33
32
|
#
|
34
33
|
# - Direction: Each docked pane has a direction, Top, Bottom, Left, Right, or Center. This is fairly self-explanatory. The pane will be placed in the location specified by this variable.
|
@@ -26,12 +26,13 @@ module Wx::AUI
|
|
26
26
|
# @return [Boolean]
|
27
27
|
def create_client(parent, style=(Wx::VSCROLL|Wx::HSCROLL)) end
|
28
28
|
|
29
|
-
# Sets the page selection.
|
29
|
+
# Sets the selection to the given page, returning the previous selection.
|
30
30
|
#
|
31
|
-
#
|
32
|
-
# @
|
31
|
+
# Notice that the call to this function generates the page changing events, use the {Wx::AUI::AuiMDIClientWindow#change_selection} function if you don't want these events to be generated.
|
32
|
+
# @see Wx::AUI::AuiMDIClientWindow#get_selection
|
33
|
+
# @param page [Integer]
|
33
34
|
# @return [Integer]
|
34
|
-
def set_selection(
|
35
|
+
def set_selection(page) end
|
35
36
|
alias_method :selection=, :set_selection
|
36
37
|
|
37
38
|
# @return [Wx::AUI::AuiMDIChildFrame]
|
@@ -6,6 +6,26 @@
|
|
6
6
|
|
7
7
|
module Wx::AUI
|
8
8
|
|
9
|
+
#
|
10
|
+
#
|
11
|
+
EVT_AUITOOLBAR_TOOL_DROPDOWN = 10406
|
12
|
+
|
13
|
+
#
|
14
|
+
#
|
15
|
+
EVT_AUITOOLBAR_OVERFLOW_CLICK = 10407
|
16
|
+
|
17
|
+
#
|
18
|
+
#
|
19
|
+
EVT_AUITOOLBAR_RIGHT_CLICK = 10408
|
20
|
+
|
21
|
+
#
|
22
|
+
#
|
23
|
+
EVT_AUITOOLBAR_MIDDLE_CLICK = 10409
|
24
|
+
|
25
|
+
#
|
26
|
+
#
|
27
|
+
EVT_AUITOOLBAR_BEGIN_DRAG = 10410
|
28
|
+
|
9
29
|
# {Wx::AUI::AuiToolBarStyle} is part of the {Wx::AUI} class framework, used to define the appearance of a {Wx::AUI::AuiToolBar}.
|
10
30
|
#
|
11
31
|
# See also wxAUI Overview.
|
@@ -111,26 +131,6 @@ module Wx::AUI
|
|
111
131
|
|
112
132
|
end # AuiToolBarToolTextOrientation
|
113
133
|
|
114
|
-
#
|
115
|
-
#
|
116
|
-
EVT_AUITOOLBAR_TOOL_DROPDOWN = 10406
|
117
|
-
|
118
|
-
#
|
119
|
-
#
|
120
|
-
EVT_AUITOOLBAR_OVERFLOW_CLICK = 10407
|
121
|
-
|
122
|
-
#
|
123
|
-
#
|
124
|
-
EVT_AUITOOLBAR_RIGHT_CLICK = 10408
|
125
|
-
|
126
|
-
#
|
127
|
-
#
|
128
|
-
EVT_AUITOOLBAR_MIDDLE_CLICK = 10409
|
129
|
-
|
130
|
-
#
|
131
|
-
#
|
132
|
-
EVT_AUITOOLBAR_BEGIN_DRAG = 10410
|
133
|
-
|
134
134
|
# {Wx::AUI::AuiToolBarEvent} is used for the events generated by {Wx::AUI::AuiToolBar}.
|
135
135
|
#
|
136
136
|
# Category: Window Docking (wxAUI), {Wx::Events}
|
data/lib/wx/doc/gen/colour.rb
CHANGED
@@ -55,7 +55,6 @@ module Wx
|
|
55
55
|
# You can retrieve the current system colour settings with {Wx::SystemSettings}.
|
56
56
|
#
|
57
57
|
# ## Channel Accessor Functions
|
58
|
-
#
|
59
58
|
# Note that this class provides pairs of functions for each of the colour channels, i.e. red, green, blue and alpha values. The one word functions {Wx::Colour#red}, {Wx::Colour#green}, {Wx::Colour#blue} and {Wx::Colour#alpha} return the values of type unsigned char, while {Wx::Colour#get_red}, {Wx::Colour#get_green}, {Wx::Colour#get_blue} and {Wx::Colour#get_alpha} returns the same value as unsigned int. According to the C++ integer promotion rules, the result of any arithmetic expression involving the former will be (signed) int, while that of the latter will be unsigned, which is what would be commonly expected, so the latter family of functions should be typically preferred (but they are only available since wxWidgets 3.1.6).
|
60
59
|
#
|
61
60
|
# Category: Graphics Device Interface (GDI)
|
data/lib/wx/doc/gen/combo_box.rb
CHANGED
@@ -228,9 +228,10 @@ module Wx
|
|
228
228
|
def get_string(n) end
|
229
229
|
alias_method :string, :get_string
|
230
230
|
|
231
|
-
#
|
231
|
+
# Returns the label of the selected item or an empty string if no item is selected.
|
232
232
|
#
|
233
|
-
#
|
233
|
+
#
|
234
|
+
# @see Wx::ComboBox#get_selection
|
234
235
|
# @return [String]
|
235
236
|
def get_string_selection; end
|
236
237
|
alias_method :string_selection, :get_string_selection
|
@@ -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
|
-
#
|
29
|
-
#
|
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
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
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
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
# }
|
37
|
+
# # Initialize member variables
|
38
|
+
# def init
|
39
|
+
# @value = -1
|
40
|
+
# end
|
70
41
|
#
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
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
|
-
#
|
53
|
+
# # Return pointer to the created control
|
54
|
+
# def get_control
|
55
|
+
# self
|
56
|
+
# end
|
77
57
|
#
|
78
|
-
#
|
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
|
-
#
|
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
|
-
#
|
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
|
-
#
|
86
|
-
#
|
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
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
#
|
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
|
-
#
|
100
|
+
# ```ruby
|
101
|
+
# comboCtrl = Wx::ComboCtrl.new(self, Wx::ID_ANY, '')
|
99
102
|
#
|
100
|
-
#
|
103
|
+
# popupCtrl = ListViewComboPopup.new
|
101
104
|
#
|
102
|
-
#
|
103
|
-
# comboCtrl
|
105
|
+
# # It is important to call #set_popup_control as soon as possible
|
106
|
+
# comboCtrl.set_popup_control(popupCtrl)
|
104
107
|
#
|
105
|
-
#
|
106
|
-
# popupCtrl
|
107
|
-
# popupCtrl
|
108
|
-
# popupCtrl
|
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
|
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
|
-
#
|
461
|
-
#
|
462
|
+
# ```ruby
|
463
|
+
# # Create the combo control using its default ctor.
|
464
|
+
# combo = Wx::ComboCtrl.new
|
462
465
|
#
|
463
|
-
#
|
464
|
-
#
|
466
|
+
# # Create the custom main control using its default ctor too.
|
467
|
+
# main = SomeWindow.new
|
465
468
|
#
|
466
|
-
#
|
467
|
-
# combo
|
469
|
+
# # Set the custom main control before creating the combo.
|
470
|
+
# combo.set_main_control(main)
|
468
471
|
#
|
469
|
-
#
|
470
|
-
#
|
471
|
-
# combo
|
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
|
-
#
|
474
|
-
#
|
475
|
-
# main
|
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
|
-
#
|
558
|
+
# ```ruby
|
559
|
+
# comboCtrl = Wx::ComboCtrl.new
|
558
560
|
#
|
559
|
-
#
|
560
|
-
# comboCtrl
|
561
|
+
# # Let's make the text right-aligned
|
562
|
+
# comboCtrl.set_text_ctrl_style(Wx::TE_RIGHT)
|
561
563
|
#
|
562
|
-
# comboCtrl
|
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
|
data/lib/wx/doc/gen/core.rb
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
module Wx
|
8
8
|
|
9
9
|
# wxRuby version string
|
10
|
-
Wx::WXRUBY_VERSION = '0.9.
|
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 =
|
19
|
+
Wx::WXRUBY_RELEASE = 5
|
20
20
|
|
21
21
|
# Convenience string for WxWidgets version info
|
22
22
|
WXWIDGETS_VERSION = '3.2.4'
|
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
|
#
|
data/lib/wx/doc/gen/dialog.rb
CHANGED
@@ -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
|
#
|
data/lib/wx/doc/gen/events.rb
CHANGED
@@ -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.
|
@@ -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.
|
@@ -1612,14 +1610,6 @@ 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.
|
@@ -1628,7 +1618,7 @@ module Wx
|
|
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=
|
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]
|
@@ -2672,18 +2662,6 @@ 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.
|
@@ -2692,7 +2670,7 @@ module Wx
|
|
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=
|
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
|
#
|
@@ -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.
|