wxruby3 0.9.0.pre.beta.14-x64-mingw-ucrt → 0.9.0.pre.rc.2-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/INSTALL.md +51 -22
- data/README.md +81 -6
- data/assets/hello_button-macos.png +0 -0
- data/assets/hello_button-msw.png +0 -0
- data/assets/hello_button.png +0 -0
- data/assets/hello_button_clicked-macos.png +0 -0
- data/assets/hello_button_clicked-msw.png +0 -0
- data/assets/hello_button_clicked.png +0 -0
- data/assets/hello_button_clicked_combi.png +0 -0
- data/assets/hello_world-macos.png +0 -0
- data/assets/hello_world-msw.png +0 -0
- data/assets/hello_world.png +0 -0
- data/assets/hello_world_combi.png +0 -0
- data/assets/repo-social-preview.png +0 -0
- 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/art_locator.rb +2 -2
- data/lib/wx/core/artprovider.rb +2 -2
- data/lib/wx/core/bitmap.rb +6 -5
- data/lib/wx/core/bitmap_combobox.rb +34 -0
- data/lib/wx/core/brush.rb +6 -0
- data/lib/wx/core/controlwithitems.rb +52 -14
- data/lib/wx/core/cursor.rb +1 -1
- data/lib/wx/core/dc.rb +0 -20
- data/lib/wx/core/event_blocker.rb +14 -0
- data/lib/wx/core/events/evt_list.rb +19 -0
- data/lib/wx/core/evthandler.rb +48 -2
- data/lib/wx/core/find_replace_dialog.rb +24 -0
- data/lib/wx/core/font.rb +22 -14
- data/lib/wx/core/helpprovider.rb +2 -2
- data/lib/wx/core/icon.rb +1 -1
- data/lib/wx/core/image.rb +1 -1
- data/lib/wx/core/menu.rb +5 -0
- data/lib/wx/core/paintdc.rb +8 -0
- data/lib/wx/core/pen.rb +6 -0
- data/lib/wx/core/text_entry.rb +15 -0
- data/lib/wx/core/v_list_box.rb +13 -0
- data/lib/wx/core/window.rb +29 -2
- data/lib/wx/doc/app.rb +40 -0
- data/lib/wx/doc/brush.rb +17 -0
- data/lib/wx/doc/busy_info.rb +21 -0
- data/lib/wx/doc/client_dc.rb +28 -0
- data/lib/wx/doc/controlwithitems.rb +11 -0
- data/lib/wx/doc/dc.rb +0 -14
- data/lib/wx/doc/event_blocker.rb +27 -0
- data/lib/wx/doc/evthandler.rb +4 -0
- data/lib/wx/doc/extra/02_lifecycles.md +49 -0
- data/lib/wx/doc/extra/10_art.md +1 -1
- data/lib/wx/doc/extra/11_drawing_and_dc.md +62 -0
- data/lib/wx/doc/font.rb +27 -0
- data/lib/wx/doc/gen/about_dialog_info.rb +27 -24
- data/lib/wx/doc/gen/accelerator.rb +11 -12
- data/lib/wx/doc/gen/activity_indicator.rb +65 -0
- data/lib/wx/doc/gen/app.rb +6 -3
- data/lib/wx/doc/gen/art_provider.rb +53 -29
- data/lib/wx/doc/gen/aui/aui_manager.rb +4 -0
- data/lib/wx/doc/gen/aui/aui_mdi_child_frame.rb +1 -1
- data/lib/wx/doc/gen/aui/aui_pane_info.rb +2 -0
- data/lib/wx/doc/gen/aui/aui_tab_ctrl.rb +2 -0
- data/lib/wx/doc/gen/aui/aui_tool_bar.rb +2 -2
- data/lib/wx/doc/gen/bitmap.rb +25 -25
- data/lib/wx/doc/gen/bitmap_combo_box.rb +157 -0
- data/lib/wx/doc/gen/box_sizer.rb +6 -8
- data/lib/wx/doc/gen/brush.rb +2 -0
- data/lib/wx/doc/gen/busy_info.rb +52 -46
- data/lib/wx/doc/gen/caret.rb +0 -4
- data/lib/wx/doc/gen/check_list_box.rb +0 -2
- data/lib/wx/doc/gen/choice.rb +1 -5
- data/lib/wx/doc/gen/client_dc.rb +13 -18
- data/lib/wx/doc/gen/clipboard.rb +30 -27
- data/lib/wx/doc/gen/collapsible_pane.rb +11 -9
- data/lib/wx/doc/gen/colour.rb +6 -3
- data/lib/wx/doc/gen/colour_dialog.rb +111 -23
- data/lib/wx/doc/gen/combo_box.rb +2 -4
- data/lib/wx/doc/gen/context_help_button.rb +48 -0
- data/lib/wx/doc/gen/control.rb +20 -18
- data/lib/wx/doc/gen/core.rb +2 -2
- data/lib/wx/doc/gen/cursor.rb +18 -50
- data/lib/wx/doc/gen/data_format.rb +0 -2
- data/lib/wx/doc/gen/data_object.rb +37 -44
- data/lib/wx/doc/gen/dc.rb +16 -24
- data/lib/wx/doc/gen/defs.rb +3 -40
- data/lib/wx/doc/gen/dialog.rb +21 -17
- data/lib/wx/doc/gen/dir_dialog.rb +10 -8
- data/lib/wx/doc/gen/event.rb +2 -2
- data/lib/wx/doc/gen/event_blocker.rb +51 -0
- data/lib/wx/doc/gen/event_filter.rb +88 -0
- data/lib/wx/doc/gen/event_list.rb +23 -2
- data/lib/wx/doc/gen/events.rb +103 -112
- data/lib/wx/doc/gen/evt_handler.rb +28 -52
- data/lib/wx/doc/gen/file_dialog.rb +53 -50
- data/lib/wx/doc/gen/find_replace_dialog.rb +1 -1
- data/lib/wx/doc/gen/font.rb +19 -2
- data/lib/wx/doc/gen/font_data.rb +2 -0
- data/lib/wx/doc/gen/font_dialog.rb +1 -1
- data/lib/wx/doc/gen/frame.rb +4 -3
- data/lib/wx/doc/gen/fs_file.rb +8 -0
- data/lib/wx/doc/gen/gcdc.rb +2 -22
- data/lib/wx/doc/gen/gdi_common.rb +18 -2
- data/lib/wx/doc/gen/gdi_object.rb +2 -0
- data/lib/wx/doc/gen/graphics_context.rb +4 -43
- data/lib/wx/doc/gen/graphics_object.rb +2 -0
- data/lib/wx/doc/gen/grid/grid_cell_attr.rb +2 -1
- data/lib/wx/doc/gen/grid/grid_ctrl.rb +4 -2
- data/lib/wx/doc/gen/grid/grid_table_message.rb +2 -0
- data/lib/wx/doc/gen/grid_bag_sizer.rb +4 -0
- data/lib/wx/doc/gen/help_controller.rb +4 -1
- data/lib/wx/doc/gen/html/html_cell.rb +4 -1
- data/lib/wx/doc/gen/html/html_help_controller.rb +4 -1
- data/lib/wx/doc/gen/html/html_help_data.rb +4 -0
- data/lib/wx/doc/gen/html/html_help_window.rb +2 -1
- data/lib/wx/doc/gen/html/html_list_box.rb +138 -11
- data/lib/wx/doc/gen/html/html_window.rb +9 -3
- data/lib/wx/doc/gen/hyperlink_ctrl.rb +147 -0
- data/lib/wx/doc/gen/hyperlink_event.rb +43 -0
- data/lib/wx/doc/gen/icon.rb +7 -1
- data/lib/wx/doc/gen/icon_location.rb +2 -0
- data/lib/wx/doc/gen/image.rb +15 -8
- data/lib/wx/doc/gen/keyboard_state.rb +6 -0
- data/lib/wx/doc/gen/list_box.rb +0 -11
- data/lib/wx/doc/gen/list_ctrl.rb +10 -13
- data/lib/wx/doc/gen/locale.rb +7 -3
- data/lib/wx/doc/gen/log.rb +6 -2
- data/lib/wx/doc/gen/mdi_frame.rb +2 -0
- data/lib/wx/doc/gen/media_ctrl.rb +2 -0
- data/lib/wx/doc/gen/memory_dc.rb +105 -18
- data/lib/wx/doc/gen/menu.rb +4 -2
- data/lib/wx/doc/gen/menu_bar.rb +0 -8
- data/lib/wx/doc/gen/menu_item.rb +9 -3
- data/lib/wx/doc/gen/message_dialog.rb +6 -3
- data/lib/wx/doc/gen/mirror_dc.rb +2 -8
- data/lib/wx/doc/gen/mouse_state.rb +2 -0
- data/lib/wx/doc/gen/multi_choice_dialog.rb +0 -2
- data/lib/wx/doc/gen/non_owned_window.rb +2 -1
- data/lib/wx/doc/gen/notebook.rb +4 -2
- data/lib/wx/doc/gen/paint_dc.rb +2 -6
- data/lib/wx/doc/gen/palette.rb +3 -3
- data/lib/wx/doc/gen/pen.rb +6 -1
- data/lib/wx/doc/gen/pg/pg_editor.rb +2 -1
- data/lib/wx/doc/gen/pg/pg_multi_button.rb +4 -0
- data/lib/wx/doc/gen/pg/pg_properties.rb +30 -3
- data/lib/wx/doc/gen/pg/pg_property.rb +30 -4
- data/lib/wx/doc/gen/pg/pg_validation_info.rb +2 -0
- data/lib/wx/doc/gen/pg/property_grid.rb +5 -2
- data/lib/wx/doc/gen/pg/property_grid_interface.rb +6 -2
- data/lib/wx/doc/gen/pg/property_grid_manager.rb +2 -0
- data/lib/wx/doc/gen/pg/property_grid_page_state.rb +2 -0
- data/lib/wx/doc/gen/picker_base.rb +2 -1
- data/lib/wx/doc/gen/platform_info.rb +4 -1
- data/lib/wx/doc/gen/property_sheet_dialog.rb +2 -0
- data/lib/wx/doc/gen/prt/post_script_dc.rb +2 -8
- data/lib/wx/doc/gen/prt/print_data.rb +6 -0
- data/lib/wx/doc/gen/prt/printer.rb +0 -3
- data/lib/wx/doc/gen/prt/printer_dc.rb +2 -6
- data/lib/wx/doc/gen/radio_box.rb +2 -10
- data/lib/wx/doc/gen/rbn/ribbon_art_provider.rb +6 -0
- data/lib/wx/doc/gen/rbn/ribbon_panel.rb +1 -1
- data/lib/wx/doc/gen/region.rb +2 -0
- data/lib/wx/doc/gen/rtc/rich_text_buffer.rb +6 -0
- data/lib/wx/doc/gen/rtc/rich_text_ctrl.rb +0 -4
- data/lib/wx/doc/gen/rtc/rich_text_header_footer_data.rb +2 -0
- data/lib/wx/doc/gen/rtc/rich_text_html_handler.rb +2 -1
- data/lib/wx/doc/gen/rtc/symbol_picker_dialog.rb +2 -0
- data/lib/wx/doc/gen/screen_dc.rb +2 -0
- data/lib/wx/doc/gen/scroll_bar.rb +2 -1
- data/lib/wx/doc/gen/scrolled_canvas.rb +4 -8
- data/lib/wx/doc/gen/scrolled_control.rb +4 -8
- data/lib/wx/doc/gen/scrolled_window.rb +4 -8
- data/lib/wx/doc/gen/search_ctrl.rb +131 -0
- data/lib/wx/doc/gen/single_choice_dialog.rb +0 -2
- data/lib/wx/doc/gen/sizer.rb +14 -3
- data/lib/wx/doc/gen/splash_screen.rb +2 -0
- data/lib/wx/doc/gen/static_box.rb +6 -3
- data/lib/wx/doc/gen/static_box_sizer.rb +2 -1
- data/lib/wx/doc/gen/status_bar.rb +0 -5
- data/lib/wx/doc/gen/stc/styled_text_ctrl.rb +4 -5
- data/lib/wx/doc/gen/svg_file_dc.rb +10 -11
- data/lib/wx/doc/gen/text_ctrl.rb +10 -3
- data/lib/wx/doc/gen/text_entry.rb +8 -3
- data/lib/wx/doc/gen/text_entry_dialog.rb +4 -2
- data/lib/wx/doc/gen/timer_event.rb +2 -0
- data/lib/wx/doc/gen/tool_bar.rb +8 -4
- data/lib/wx/doc/gen/top_level_window.rb +5 -2
- data/lib/wx/doc/gen/tree_ctrl.rb +0 -6
- data/lib/wx/doc/gen/ui_action_simulator.rb +100 -0
- data/lib/wx/doc/gen/utils.rb +1 -1
- data/lib/wx/doc/gen/v_list_box.rb +36 -26
- data/lib/wx/doc/gen/validator.rb +2 -1
- data/lib/wx/doc/gen/variant.rb +10 -0
- data/lib/wx/doc/gen/window.rb +38 -17
- data/lib/wx/doc/gen/window_dc.rb +2 -0
- data/lib/wx/doc/gen/window_disabler.rb +2 -0
- data/lib/wx/doc/gen/wizard_page_simple.rb +2 -0
- data/lib/wx/doc/gen/xml_node.rb +6 -0
- data/lib/wx/doc/gen/xml_resource.rb +4 -1
- data/lib/wx/doc/memory_dc.rb +75 -0
- data/lib/wx/doc/mirror_dc.rb +16 -0
- data/lib/wx/doc/pen.rb +17 -0
- data/lib/wx/doc/prt/printer_dc.rb +26 -0
- data/lib/wx/doc/radio_box.rb +20 -0
- data/lib/wx/doc/screen_dc.rb +10 -6
- data/lib/wx/doc/svg_file_dc.rb +20 -0
- data/lib/wx/doc/v_list_box.rb +9 -0
- data/lib/wx/doc/window.rb +27 -0
- data/lib/wx/doc/window_disabler.rb +10 -0
- data/lib/wx/html/keyword_defs.rb +6 -7
- data/lib/wx/html/require.rb +1 -0
- data/lib/wx/html/simple_html_listbox.rb +105 -0
- data/lib/wx/keyword_defs.rb +83 -75
- data/lib/wx/prt/keyword_defs.rb +5 -1
- data/lib/wx/version.rb +1 -1
- data/lib/wx/wxruby/cmd/test.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/rakelib/install.rb +20 -7
- data/rakelib/lib/config/linux.rb +4 -2
- data/rakelib/lib/config/macosx.rb +120 -1
- data/rakelib/lib/config/mingw.rb +6 -1
- data/rakelib/lib/config/unixish.rb +26 -11
- data/rakelib/lib/config.rb +15 -6
- data/rakelib/yard/yard/relative_markdown_links.rb +5 -1
- data/samples/aui/aui.rb +432 -363
- data/samples/bigdemo/wxArtProvider.rbw +5 -4
- data/samples/controls/controls.rb +2 -2
- data/samples/controls/htlbox.rb +411 -0
- data/samples/controls/tn_htlbox.png +0 -0
- data/samples/drawing/graphics_drawing.rb +1 -2
- data/samples/drawing/{svgtest.rb → image_prt.rb} +49 -18
- data/samples/drawing/tn_image_prt.png +0 -0
- data/samples/propgrid/propgrid.rb +26 -21
- data/samples/ribbon/ribbon.rb +47 -46
- data/samples/sampler/editor.rb +33 -25
- data/samples/sampler/sample.rb +2 -2
- data/samples/sampler/stc_editor.rb +4 -2
- data/tests/lib/item_container_tests.rb +82 -0
- data/tests/lib/text_entry_tests.rb +80 -0
- data/tests/lib/wxapp_runner.rb +15 -3
- data/tests/lib/wxframe_runner.rb +144 -0
- data/tests/test_app_event_filter.rb +74 -0
- data/tests/test_art_provider.rb +52 -0
- data/tests/test_clipboard.rb +2 -1
- data/tests/test_event_handling.rb +199 -16
- data/tests/test_events.rb +4 -11
- data/tests/test_ext_controls.rb +28 -0
- data/tests/test_font.rb +239 -0
- data/tests/test_gdi_object.rb +161 -0
- data/tests/test_intl.rb +16 -15
- data/tests/test_item_data.rb +33 -1
- data/tests/test_std_controls.rb +373 -0
- data/tests/test_window.rb +340 -0
- metadata +61 -8
- data/lib/wx/doc/gen/auto_buffered_paint_dc.rb +0 -47
- data/lib/wx/doc/gen/buffered_dc.rb +0 -95
- data/lib/wx/doc/gen/buffered_paint_dc.rb +0 -55
- data/lib/wx/doc/gen/colour_data.rb +0 -96
- data/samples/drawing/tn_svgtest.png +0 -0
data/lib/wx/doc/gen/sizer.rb
CHANGED
@@ -222,8 +222,9 @@ module Wx
|
|
222
222
|
|
223
223
|
# This base function adds non-stretchable space to both the horizontal and vertical orientation of the sizer.
|
224
224
|
# More readable way of calling:
|
225
|
-
#
|
225
|
+
# ```
|
226
226
|
# wxSizer::Add(size, size, 0).
|
227
|
+
# ```
|
227
228
|
# @see Wx::BoxSizer#add_spacer
|
228
229
|
# @param size [Integer]
|
229
230
|
# @return [Wx::SizerItem]
|
@@ -231,8 +232,9 @@ module Wx
|
|
231
232
|
|
232
233
|
# Adds stretchable space to the sizer.
|
233
234
|
# More readable way of calling:
|
234
|
-
#
|
235
|
+
# ```
|
235
236
|
# wxSizer::Add(0, 0, prop).
|
237
|
+
# ```
|
236
238
|
# @param prop [Integer]
|
237
239
|
# @return [Wx::SizerItem]
|
238
240
|
def add_stretch_spacer(prop=1) end
|
@@ -623,7 +625,7 @@ module Wx
|
|
623
625
|
# This method first calls {Wx::Sizer#fit} and then {Wx::TopLevelWindow#set_size_hints} on the window passed to it.
|
624
626
|
# This function is only when window is actually a {Wx::TopLevelWindow} such as a {Wx::Frame} or a {Wx::Dialog}, since SetSizeHints only has any effect in these classes. It does nothing in normal windows or controls.
|
625
627
|
# Note that window does not need to be the window using this sizer and it is, in fact, common to call this function on the sizer associated with the panel covering the client area of a frame passing it the frame pointer, as this has the desired effect of adjusting the frame size to the size fitting the panel, e.g.:
|
626
|
-
#
|
628
|
+
# ```
|
627
629
|
# MyFrame::MyFrame(...) : wxFrame(...)
|
628
630
|
# {
|
629
631
|
# wxPanel* panel = new wxPanel(this);
|
@@ -636,6 +638,7 @@ module Wx
|
|
636
638
|
# // frame to fit its contents.
|
637
639
|
# sizer->SetSizeHints(this);
|
638
640
|
# }
|
641
|
+
# ```
|
639
642
|
#
|
640
643
|
# This function is also used by {Wx::Window#set_sizer_and_fit} which is commonly invoked in the constructor of {Wx::Dialog}-derived classes, which don't need to use an intermediate panel, see the example in wxBoxSizer overview.
|
641
644
|
# @param window [Wx::Window]
|
@@ -686,19 +689,25 @@ module Wx
|
|
686
689
|
# Container for sizer items flags providing readable names for them.
|
687
690
|
# Normally, when you add an item to a sizer via {Wx::Sizer#add}, you have to specify a lot of flags and parameters which can be unwieldy. This is where {Wx::SizerFlags} comes in: it allows you to specify all parameters using the named methods instead. For example, instead of
|
688
691
|
#
|
692
|
+
# ```
|
689
693
|
# sizer->Add(ctrl, 0, wxEXPAND | wxALL, 10);
|
694
|
+
# ```
|
690
695
|
#
|
691
696
|
# you can now write
|
692
697
|
#
|
698
|
+
# ```
|
693
699
|
# sizer->Add(ctrl, wxSizerFlags().Expand().Border(wxALL, 10));
|
700
|
+
# ```
|
694
701
|
#
|
695
702
|
# This is more readable and also allows you to create {Wx::SizerFlags} objects which can be reused for several sizer items.
|
696
703
|
#
|
704
|
+
# ```
|
697
705
|
# wxSizerFlags flagsExpand(1);
|
698
706
|
# flagsExpand.Expand().Border(wxALL, 10);
|
699
707
|
#
|
700
708
|
# sizer->Add(ctrl1, flagsExpand);
|
701
709
|
# sizer->Add(ctrl2, flagsExpand);
|
710
|
+
# ```
|
702
711
|
#
|
703
712
|
# Note that by specification, all methods of {Wx::SizerFlags} return the {Wx::SizerFlags} object itself to allowing chaining multiple methods calls like in the examples above.
|
704
713
|
# ===
|
@@ -707,6 +716,8 @@ module Wx
|
|
707
716
|
# @see Wx::Sizer
|
708
717
|
#
|
709
718
|
#
|
719
|
+
#
|
720
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
710
721
|
class SizerFlags < ::Object
|
711
722
|
|
712
723
|
# Creates the {Wx::Sizer} with the proportion specified by proportion.
|
@@ -25,6 +25,7 @@ module Wx
|
|
25
25
|
# Show it in application initialisation, and then either explicitly destroy it or let it time-out.
|
26
26
|
# Example usage:
|
27
27
|
#
|
28
|
+
# ```
|
28
29
|
# wxBitmap bitmap;
|
29
30
|
# if (bitmap.LoadFile("splash16.png", wxBITMAP_TYPE_PNG))
|
30
31
|
# {
|
@@ -34,6 +35,7 @@ module Wx
|
|
34
35
|
# wxBORDER_SIMPLE|wxSTAY_ON_TOP);
|
35
36
|
# }
|
36
37
|
# wxYield();
|
38
|
+
# ```
|
37
39
|
#
|
38
40
|
# ===
|
39
41
|
#
|
@@ -9,7 +9,7 @@ module Wx
|
|
9
9
|
# A static box is a rectangle drawn around other windows to denote a logical grouping of items.
|
10
10
|
# Note that while the previous versions required that windows appearing inside a static box be created as its siblings (i.e. use the same parent as the static box itself), since wxWidgets 2.9.1 it is possible to create them as children of {Wx::StaticBox} itself and doing this is strongly recommended and avoids several different repainting problems that could happen when creating the other windows as siblings of the box.
|
11
11
|
# So the recommended way to create static box and the controls inside it is:
|
12
|
-
#
|
12
|
+
# ```
|
13
13
|
# void MyFrame::CreateControls()
|
14
14
|
# {
|
15
15
|
# wxPanel *panel = new wxPanel(this);
|
@@ -18,6 +18,7 @@ module Wx
|
|
18
18
|
# new wxStaticText(box, wxID_ANY, "This window is a child of the staticbox");
|
19
19
|
# ...
|
20
20
|
# }
|
21
|
+
# ```
|
21
22
|
#
|
22
23
|
# Creating the windows with the static box parent (i.e. panel in the example above) as parent still works but can result in refresh and repaint problems.
|
23
24
|
# Also note that there is a specialized {Wx::Sizer} class ({Wx::StaticBoxSizer}) which can be used as an easier way to pack items into a static box.
|
@@ -53,7 +54,7 @@ module Wx
|
|
53
54
|
# This constructor takes a pointer to an arbitrary window (although usually a {Wx::CheckBox} or a {Wx::RadioButton}) instead of just the usual text label and puts this window at the top of the box at the place where the label would be shown.
|
54
55
|
# The label window must be a non-null, fully created window and will become a child of this {Wx::StaticBox}, i.e. it will be owned by this control and will be deleted when the {Wx::StaticBox} itself is deleted.
|
55
56
|
# An example of creating a {Wx::StaticBox} with window as a label:
|
56
|
-
#
|
57
|
+
# ```
|
57
58
|
# void MyFrame::CreateControls()
|
58
59
|
# {
|
59
60
|
# wxPanel* panel = new wxPanel(this);
|
@@ -61,6 +62,7 @@ module Wx
|
|
61
62
|
# wxStaticBox* box = new wxStaticBox(panel, wxID_ANY, checkbox);
|
62
63
|
# ...
|
63
64
|
# }
|
65
|
+
# ```
|
64
66
|
#
|
65
67
|
# Currently this constructor is only available in {Wx::GTK} and {Wx::MSW}, use {Wx::HAS_WINDOW_LABEL_IN_STATIC_BOX} to check whether it can be used at compile-time.
|
66
68
|
# @param parent [Wx::Window]
|
@@ -102,13 +104,14 @@ module Wx
|
|
102
104
|
# Enables or disables the box without affecting its label window, if any.
|
103
105
|
# {Wx::StaticBox} overrides {Wx::Window#enable} in order to avoid disabling the control used as a label, if this box is using one. This is done in order to allow using a {Wx::CheckBox}, for example, label and enable or disable the box according to the state of the checkbox: if disabling the box also disabled the checkbox in this situation, it would make it impossible for the user to re-enable the box after disabling it, so the checkbox stays enabled even if <code>box->Enable(false)</code> is called.
|
104
106
|
# However with the actual behaviour, implemented in this overridden method, the following code (shown using C++11 only for convenience, this behaviour is not C++11-specific):
|
105
|
-
#
|
107
|
+
# ```
|
106
108
|
# auto check = new wxCheckBox(parent, wxID_ANY, "Use the box");
|
107
109
|
# auto box = new wxStaticBox(parent, wxID_ANY, check);
|
108
110
|
# check->Bind(wxEVT_CHECKBOX,
|
109
111
|
# [box](wxCommandEvent& event) {
|
110
112
|
# box->Enable(event.IsChecked());
|
111
113
|
# });
|
114
|
+
# ```
|
112
115
|
# does work as expected.
|
113
116
|
# Please note that overriding {Wx::StaticBox#enable} to not actually disable this window itself has two possibly unexpected consequences:
|
114
117
|
#
|
@@ -10,7 +10,7 @@ module Wx
|
|
10
10
|
# The static box may be either created independently or the sizer may create it itself as a convenience. In any case, the sizer owns the {Wx::StaticBox} control and will delete it in the {Wx::StaticBoxSizer} destructor.
|
11
11
|
# Note that since wxWidgets 2.9.1 you are strongly encouraged to create the windows which are added to {Wx::StaticBoxSizer} as children of {Wx::StaticBox} itself, see this class documentation for more details.
|
12
12
|
# Example of use of this class:
|
13
|
-
#
|
13
|
+
# ```
|
14
14
|
# void MyFrame::CreateControls()
|
15
15
|
# {
|
16
16
|
# wxPanel *panel = new wxPanel(this);
|
@@ -20,6 +20,7 @@ module Wx
|
|
20
20
|
# "This window is a child of the staticbox"));
|
21
21
|
# ...
|
22
22
|
# }
|
23
|
+
# ```
|
23
24
|
#
|
24
25
|
# ===
|
25
26
|
#
|
@@ -90,8 +90,6 @@ module Wx
|
|
90
90
|
|
91
91
|
# Returns the size and position of a field's internal bounding rectangle.
|
92
92
|
# true if the field index is valid, false otherwise.
|
93
|
-
#
|
94
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this function returns a Wx::Rect if the field index is valid, undef otherwise.
|
95
93
|
# @see Wx::Rect
|
96
94
|
# @param i [Integer] The field in question.
|
97
95
|
# @return [Array(true,false,Wx::Rect)]
|
@@ -153,7 +151,6 @@ module Wx
|
|
153
151
|
def push_status_text(string, field=0) end
|
154
152
|
|
155
153
|
# Sets the number of fields, and optionally the field widths.
|
156
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this function accepts only the number parameter. Use SetStatusWidths to set the field widths.
|
157
154
|
# @param number [Integer] The number of fields. If this is greater than the previous number, then new fields with empty strings will be added to the status bar.
|
158
155
|
# @param widths [Array<Integer>] An array of n integers interpreted in the same way as in {Wx::StatusBar#set_status_widths}.
|
159
156
|
# @return [void]
|
@@ -189,8 +186,6 @@ module Wx
|
|
189
186
|
# For example, to create one fixed width field of width 100 in the right part of the status bar and two more fields which get 66% and 33% of the remaining space correspondingly, you should use an array containing -2, -1 and 100.
|
190
187
|
#
|
191
188
|
# The widths of the variable fields are calculated from the total width of all fields, minus the sum of widths of the non-variable fields, divided by the number of variable fields.
|
192
|
-
#
|
193
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method takes as parameters the field widths.
|
194
189
|
# @see Wx::StatusBar#set_fields_count
|
195
190
|
# @see Wx::Frame#set_status_widths
|
196
191
|
# @param widths_field [Array<Integer>] Contains an array of n integers, each of which is either an absolute status field width in pixels if positive or indicates a variable width field if negative. The special value NULL means that all fields should get the same width.
|
@@ -25,6 +25,8 @@ module Wx::STC
|
|
25
25
|
#
|
26
26
|
class StyledTextCtrl < Control
|
27
27
|
|
28
|
+
include Wx::TextEntry
|
29
|
+
|
28
30
|
# @overload initialize(parent, id=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, name=Wx::STCNameStr)
|
29
31
|
# Ctor.
|
30
32
|
# @param parent [Wx::Window]
|
@@ -3850,6 +3852,7 @@ module Wx::STC
|
|
3850
3852
|
# Notice that insertion position is, in general, different from the index of the character the cursor position at in the string returned by {Wx::STC::StyledTextCtrl#get_value}. While this is always the case for the single line controls, multi-line controls can use two characters <code>"\\r\\n"</code> as line separator (this is notably the case under MSW) meaning that indices in the control and its string value are offset by 1 for every line.
|
3851
3853
|
# Hence to correctly get the character at the current cursor position, taking into account that there can be none if the cursor is at the end of the string, you could do the following:
|
3852
3854
|
#
|
3855
|
+
# ```
|
3853
3856
|
# wxString GetCurrentChar(wxTextCtrl *tc)
|
3854
3857
|
# {
|
3855
3858
|
# long pos = tc->GetInsertionPoint();
|
@@ -3858,6 +3861,7 @@ module Wx::STC
|
|
3858
3861
|
#
|
3859
3862
|
# return tc->GetRange(pos, pos + 1);
|
3860
3863
|
# }
|
3864
|
+
# ```
|
3861
3865
|
# @return [Integer]
|
3862
3866
|
def get_insertion_point; end
|
3863
3867
|
alias_method :insertion_point, :get_insertion_point
|
@@ -3882,8 +3886,6 @@ module Wx::STC
|
|
3882
3886
|
|
3883
3887
|
# Gets the current selection span.
|
3884
3888
|
# If the returned values are equal, there was no selection. Please note that the indices returned may be used with the other {Wx::TextCtrl} methods but don't necessarily represent the correct indices into the string returned by {Wx::STC::StyledTextCtrl#get_value} for multiline controls under Windows (at least,) you should use {Wx::STC::StyledTextCtrl#get_string_selection} to get the selected text.
|
3885
|
-
#
|
3886
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method takes no parameters and returns a 2-element list (from, to).
|
3887
3889
|
# @return [Array(Integer, Integer)]
|
3888
3890
|
def get_selection; end
|
3889
3891
|
alias_method :selection, :get_selection
|
@@ -3968,8 +3970,6 @@ module Wx::STC
|
|
3968
3970
|
|
3969
3971
|
# Converts given position to a zero-based column, line number pair.
|
3970
3972
|
# true on success, false on failure (most likely due to a too large position parameter).
|
3971
|
-
#
|
3972
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this function takes only the pos argument and returns a 2-element list (x, y).
|
3973
3973
|
# @see Wx::STC::StyledTextCtrl#xy_to_position
|
3974
3974
|
# @param pos [Integer] Position.
|
3975
3975
|
# @return [Array(true,false,Array(Integer, Integer))]
|
@@ -3983,7 +3983,6 @@ module Wx::STC
|
|
3983
3983
|
# Finds the row and column of the character at the specified point.
|
3984
3984
|
# If the return code is not {Wx::TextCtrlHitTestResult::TE_HT_UNKNOWN} the row and column of the character closest to this position are returned, otherwise the output parameters are not modified.
|
3985
3985
|
# Please note that this function is currently only implemented in {Wx::Univ}, {Wx::MSW} and {Wx::GTK2} ports and always returns {Wx::TextCtrlHitTestResult::TE_HT_UNKNOWN} in the other ports.
|
3986
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this function takes only the pt argument and returns a 3-element list (result, col, row).
|
3987
3986
|
# @see Wx::STC::StyledTextCtrl#position_to_xy
|
3988
3987
|
# @see Wx::STC::StyledTextCtrl#xy_to_position
|
3989
3988
|
# @param pt [Array(Integer, Integer), Wx::Point] The position of the point to check, in window device coordinates.
|
@@ -43,26 +43,19 @@ module Wx
|
|
43
43
|
#
|
44
44
|
# Category: Device Contexts
|
45
45
|
#
|
46
|
+
#
|
47
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
46
48
|
class SVGFileDC < DC
|
47
49
|
|
48
|
-
# Initializes a {Wx::SVGFileDC} with the given filename, width and height at dpi resolution, and an optional title.
|
49
|
-
# The title provides a readable name for the SVG document.
|
50
|
-
# @param filename [String]
|
51
|
-
# @param width [Integer]
|
52
|
-
# @param height [Integer]
|
53
|
-
# @param dpi [Float]
|
54
|
-
# @param title [String]
|
55
|
-
# @return [SVGFileDC]
|
56
|
-
def initialize(filename, width=320, height=240, dpi=72, title=(())) end
|
57
|
-
|
58
50
|
# Draws a rectangle the size of the SVG using the {Wx::DC#set_background} brush.
|
59
51
|
# @return [void]
|
60
52
|
def clear; end
|
61
53
|
|
62
54
|
# Replaces the default bitmap handler with handler.
|
63
55
|
# By default, an object of {Wx::SVGBitmapFileHandler} class is used as bitmap handler. You may want to replace it with an object of predefined {Wx::SVGBitmapEmbedHandler} class to embed the bitmaps in the generated SVG instead of storing them in separate files like this:
|
64
|
-
#
|
56
|
+
# ```
|
65
57
|
# mySVGFileDC->SetBitmapHandler(new wxSVGBitmapEmbedHandler());
|
58
|
+
# ```
|
66
59
|
#
|
67
60
|
# or derive your own bitmap handler class and use it if you need to customize the bitmap handling further.
|
68
61
|
# @param handler [Wx::SVGBitmapHandler] The new bitmap handler. If non-NULL, this object takes ownership of this handler and will delete it when it is not needed any more.
|
@@ -88,6 +81,8 @@ module Wx
|
|
88
81
|
#
|
89
82
|
# Category: Device Contexts
|
90
83
|
#
|
84
|
+
#
|
85
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
91
86
|
class SVGBitmapHandler < ::Object
|
92
87
|
|
93
88
|
# Writes the bitmap representation as SVG to the given stream.
|
@@ -111,6 +106,8 @@ module Wx
|
|
111
106
|
# @see Wx::SVGFileDC#set_bitmap_handler.
|
112
107
|
#
|
113
108
|
#
|
109
|
+
#
|
110
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
114
111
|
class SVGBitmapFileHandler < SVGBitmapHandler
|
115
112
|
|
116
113
|
# Create a {Wx::SVGBitmapFileHandler} and specify the location where the file will be saved.
|
@@ -136,6 +133,8 @@ module Wx
|
|
136
133
|
# @see Wx::SVGFileDC#set_bitmap_handler.
|
137
134
|
#
|
138
135
|
#
|
136
|
+
#
|
137
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
139
138
|
class SVGBitmapEmbedHandler < SVGBitmapHandler
|
140
139
|
|
141
140
|
# Writes the bitmap representation as SVG to the given stream.
|
data/lib/wx/doc/gen/text_ctrl.rb
CHANGED
@@ -522,33 +522,40 @@ module Wx
|
|
522
522
|
# In either case, if the style doesn't specify some of the attributes (for example you only want to set the text colour but without changing the font nor the text background), the values of the default style will be used for them. If there is no default style, the attributes of the text control itself are used.
|
523
523
|
# So the following code correctly describes what it does: the second call to {Wx::TextCtrl#set_default_style} doesn't change the text foreground colour (which stays red) while the last one doesn't change the background colour (which stays grey):
|
524
524
|
#
|
525
|
+
# ```
|
525
526
|
# text->SetDefaultStyle(wxTextAttr(*wxRED));
|
526
527
|
# text->AppendText("Red text\n");
|
527
528
|
# text->SetDefaultStyle(wxTextAttr(wxNullColour, *wxLIGHT_GREY));
|
528
529
|
# text->AppendText("Red on grey text\n");
|
529
530
|
# text->SetDefaultStyle(wxTextAttr(*wxBLUE));
|
530
531
|
# text->AppendText("Blue on grey text\n");
|
532
|
+
# ```
|
531
533
|
#
|
532
534
|
# == wxTextCtrl and C++ Streams
|
533
535
|
#
|
534
536
|
# This class multiply-inherits from std::streambuf (except for some really old compilers using non-standard iostream library), allowing code such as the following:
|
535
537
|
#
|
538
|
+
# ```
|
536
539
|
# wxTextCtrl *control = new wxTextCtrl(...);
|
537
540
|
#
|
538
541
|
# ostream stream(control)
|
539
542
|
#
|
540
543
|
# stream << 123.456 << " some text\n";
|
541
544
|
# stream.flush();
|
545
|
+
# ```
|
542
546
|
#
|
543
547
|
# Note that even if your build of wxWidgets doesn't support this (the symbol {Wx::HAS_TEXT_WINDOW_STREAM} has value of 0 then) you can still use {Wx::TextCtrl} itself in a stream-like manner:
|
544
548
|
#
|
549
|
+
# ```
|
545
550
|
# wxTextCtrl *control = new wxTextCtrl(...);
|
546
551
|
#
|
547
552
|
# *control << 123.456 << " some text\n";
|
553
|
+
# ```
|
548
554
|
#
|
549
555
|
# However the possibility to create a std::ostream associated with {Wx::TextCtrl} may be useful if you need to redirect the output of a function taking a std::ostream as parameter to a text control.
|
550
556
|
# Another commonly requested need is to redirect std::cout to the text control. This may be done in the following way:
|
551
557
|
#
|
558
|
+
# ```
|
552
559
|
# #include <iostream>
|
553
560
|
#
|
554
561
|
# wxTextCtrl *control = new wxTextCtrl(...);
|
@@ -560,9 +567,11 @@ module Wx
|
|
560
567
|
# ...
|
561
568
|
#
|
562
569
|
# std::cout.rdbuf(sbOld);
|
570
|
+
# ```
|
563
571
|
#
|
564
572
|
# But wxWidgets provides a convenient class to make it even simpler so instead you may just do
|
565
573
|
#
|
574
|
+
# ```
|
566
575
|
# #include <iostream>
|
567
576
|
#
|
568
577
|
# wxTextCtrl *control = new wxTextCtrl(...);
|
@@ -571,6 +580,7 @@ module Wx
|
|
571
580
|
#
|
572
581
|
# // all output to cout goes into the text control until the exit from
|
573
582
|
# // current scope
|
583
|
+
# ```
|
574
584
|
#
|
575
585
|
# See {Wx::StreamToTextRedirector} for more details.
|
576
586
|
#
|
@@ -708,7 +718,6 @@ module Wx
|
|
708
718
|
# Finds the row and column of the character at the specified point.
|
709
719
|
# If the return code is not {Wx::TextCtrlHitTestResult::TE_HT_UNKNOWN} the row and column of the character closest to this position are returned, otherwise the output parameters are not modified.
|
710
720
|
# Please note that this function is currently only implemented in {Wx::Univ}, {Wx::MSW} and {Wx::GTK} ports and always returns {Wx::TextCtrlHitTestResult::TE_HT_UNKNOWN} in the other ports.
|
711
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this function takes only the pt argument and returns a 3-element list (result, col, row).
|
712
721
|
# @see Wx::TextCtrl#position_to_xy
|
713
722
|
# @see Wx::TextCtrl#xy_to_position
|
714
723
|
# @param pt [Array(Integer, Integer), Wx::Point] The position of the point to check, in window device coordinates.
|
@@ -765,8 +774,6 @@ module Wx
|
|
765
774
|
|
766
775
|
# Converts given position to a zero-based column, line number pair.
|
767
776
|
# true on success, false on failure (most likely due to a too large position parameter).
|
768
|
-
#
|
769
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this function takes only the pos argument and returns a 2-element list (x, y).
|
770
777
|
# @see Wx::TextCtrl#xy_to_position
|
771
778
|
# @param pos [Integer] Position.
|
772
779
|
# @return [Array(Integer, Integer), nil]
|
@@ -135,6 +135,7 @@ module Wx
|
|
135
135
|
# Notice that insertion position is, in general, different from the index of the character the cursor position at in the string returned by {Wx::TextEntry#get_value}. While this is always the case for the single line controls, multi-line controls can use two characters <code>"\\r\\n"</code> as line separator (this is notably the case under MSW) meaning that indices in the control and its string value are offset by 1 for every line.
|
136
136
|
# Hence to correctly get the character at the current cursor position, taking into account that there can be none if the cursor is at the end of the string, you could do the following:
|
137
137
|
#
|
138
|
+
# ```
|
138
139
|
# wxString GetCurrentChar(wxTextCtrl *tc)
|
139
140
|
# {
|
140
141
|
# long pos = tc->GetInsertionPoint();
|
@@ -143,6 +144,7 @@ module Wx
|
|
143
144
|
#
|
144
145
|
# return tc->GetRange(pos, pos + 1);
|
145
146
|
# }
|
147
|
+
# ```
|
146
148
|
# @return [Integer]
|
147
149
|
def get_insertion_point; end
|
148
150
|
alias_method :insertion_point, :get_insertion_point
|
@@ -162,8 +164,6 @@ module Wx
|
|
162
164
|
|
163
165
|
# Gets the current selection span.
|
164
166
|
# If the returned values are equal, there was no selection. Please note that the indices returned may be used with the other {Wx::TextCtrl} methods but don't necessarily represent the correct indices into the string returned by {Wx::TextEntry#get_value} for multiline controls under Windows (at least,) you should use {Wx::TextEntry#get_string_selection} to get the selected text.
|
165
|
-
#
|
166
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method takes no parameters and returns a 2-element list (from, to).
|
167
167
|
# @return [Array(Integer,Integer)]
|
168
168
|
def get_selection; end
|
169
169
|
alias_method :selection, :get_selection
|
@@ -317,6 +317,8 @@ module Wx
|
|
317
317
|
# Custom completer objects used with {Wx::TextEntry#auto_complete} must derive from this class and implement its pure virtual method returning the completions. You would typically use a custom completer when the total number of completions is too big for performance to be acceptable if all of them need to be returned at once but if they can be generated hierarchically, i.e. only the first component initially, then the second one after the user finished entering the first one and so on.
|
318
318
|
# When inheriting from this class you need to implement its two pure virtual methods. This allows returning the results incrementally and may or not be convenient depending on where do they come from. If you prefer to return all the completions at once, you should inherit from {Wx::TextCompleterSimple} instead.
|
319
319
|
#
|
320
|
+
#
|
321
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
320
322
|
class TextCompleter < ::Object
|
321
323
|
|
322
324
|
# Function called to start iteration over the completions for the given prefix.
|
@@ -341,7 +343,7 @@ module Wx
|
|
341
343
|
# A simpler base class for custom completer objects.
|
342
344
|
# This class may be simpler to use than the base {Wx::TextCompleter} as it allows to implement only a single virtual method instead of two of them (at the price of storing all completions in a temporary array).
|
343
345
|
# Here is a simple example of a custom completer that completes the names of some chess pieces. Of course, as the total list here has only four items it would have been much simpler to just specify the array containing all the completions in this example but the same approach could be used when the total number of completions is much higher provided the number of possibilities for each word is still relatively small:
|
344
|
-
#
|
346
|
+
# ```
|
345
347
|
# class MyTextCompleter : public wxTextCompleterSimple
|
346
348
|
# {
|
347
349
|
# public:
|
@@ -368,9 +370,12 @@ module Wx
|
|
368
370
|
# ...
|
369
371
|
# wxTextCtrl *text = ...;
|
370
372
|
# text->AutoComplete(new MyTextCompleter);
|
373
|
+
# ```
|
371
374
|
#
|
372
375
|
# ===
|
373
376
|
#
|
377
|
+
#
|
378
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
374
379
|
class TextCompleterSimple < TextCompleter
|
375
380
|
|
376
381
|
# Pure virtual method returning all possible completions for the given prefix.
|
@@ -53,7 +53,7 @@ module Wx
|
|
53
53
|
# @overload set_text_validator(validator)
|
54
54
|
# Associate a validator with the text control used by the dialog.
|
55
55
|
# These methods can be used to limit the user entry to only some characters, e.g.
|
56
|
-
#
|
56
|
+
# ```
|
57
57
|
# wxTextEntryDialog dlg(this, ...);
|
58
58
|
# dlg.SetTextValidator(wxFILTER_ALPHA);
|
59
59
|
# if ( dlg.ShowModal() == wxID_OK )
|
@@ -61,6 +61,7 @@ module Wx
|
|
61
61
|
# // We can be certain that this string contains letters only.
|
62
62
|
# wxString value = dlg.GetValue();
|
63
63
|
# }
|
64
|
+
# ```
|
64
65
|
#
|
65
66
|
# The first overload uses the provided validator which can be of a custom class derived from {Wx::TextValidator} while the second one creates a {Wx::TextValidator} with the specified style.
|
66
67
|
# @param validator [Wx::TextValidator]
|
@@ -68,7 +69,7 @@ module Wx
|
|
68
69
|
# @overload set_text_validator(style=Wx::TextValidatorStyle::FILTER_NONE)
|
69
70
|
# Associate a validator with the text control used by the dialog.
|
70
71
|
# These methods can be used to limit the user entry to only some characters, e.g.
|
71
|
-
#
|
72
|
+
# ```
|
72
73
|
# wxTextEntryDialog dlg(this, ...);
|
73
74
|
# dlg.SetTextValidator(wxFILTER_ALPHA);
|
74
75
|
# if ( dlg.ShowModal() == wxID_OK )
|
@@ -76,6 +77,7 @@ module Wx
|
|
76
77
|
# // We can be certain that this string contains letters only.
|
77
78
|
# wxString value = dlg.GetValue();
|
78
79
|
# }
|
80
|
+
# ```
|
79
81
|
#
|
80
82
|
# The first overload uses the provided validator which can be of a custom class derived from {Wx::TextValidator} while the second one creates a {Wx::TextValidator} with the specified style.
|
81
83
|
# @param style [TextValidatorStyle]
|
@@ -19,6 +19,7 @@ module Wx
|
|
19
19
|
# {Wx::TimerEvent} object is passed to the event handler of timer events (see {Wx::Timer#set_owner}).
|
20
20
|
# For example:
|
21
21
|
#
|
22
|
+
# ```
|
22
23
|
# class MyFrame : public wxFrame
|
23
24
|
# {
|
24
25
|
# public:
|
@@ -44,6 +45,7 @@ module Wx
|
|
44
45
|
# {
|
45
46
|
# // do whatever you want to do every second here
|
46
47
|
# }
|
48
|
+
# ```
|
47
49
|
#
|
48
50
|
# ===
|
49
51
|
#
|
data/lib/wx/doc/gen/tool_bar.rb
CHANGED
@@ -96,14 +96,17 @@ module Wx
|
|
96
96
|
# Note that many methods in {Wx::ToolBar} such as {Wx::ToolBar#add_tool} return a <code>wxToolBarToolBase*</code> object. This should be regarded as an opaque handle representing the newly added toolbar item, providing access to its id and position within the toolbar. Changes to the item's state should be made through calls to {Wx::ToolBar} methods, for example {Wx::ToolBar#enable_tool}. Calls to {Wx::ToolBarToolBase} methods (undocumented by purpose) will not change the visible state of the item within the tool bar.
|
97
97
|
# After you have added all the tools you need, you must call {Wx::ToolBar#realize} to effectively construct and display the toolbar.
|
98
98
|
# <b>{Wx::MSW} note</b>: Note that under {Wx::MSW} toolbar paints tools to reflect system-wide colours. If you use more than 16 colours in your tool bitmaps, you may wish to suppress this behaviour, otherwise system colours in your bitmaps will inadvertently be mapped to system colours. To do this, set the msw.remap system option before creating the toolbar:
|
99
|
-
#
|
99
|
+
# ```
|
100
100
|
# wxSystemOptions::SetOption("msw.remap", 0);
|
101
|
+
# ```
|
101
102
|
# If you wish to use 32-bit images (which include an alpha channel for transparency) use:
|
102
|
-
#
|
103
|
+
# ```
|
103
104
|
# wxSystemOptions::SetOption("msw.remap", 2);
|
105
|
+
# ```
|
104
106
|
# Then colour remapping is switched off, and a transparent background used. But only use this option under Windows XP with true colour:
|
105
|
-
#
|
107
|
+
# ```
|
106
108
|
# if (wxTheApp->GetComCtl32Version() >= 600 && ::wxDisplayDepth() >= 32)
|
109
|
+
# ```
|
107
110
|
#
|
108
111
|
# === Styles
|
109
112
|
#
|
@@ -506,11 +509,12 @@ module Wx
|
|
506
509
|
# It is usually unnecessary to call this function, as the tools will always be made big enough to fit the size of the bitmaps used in them. Moreover, calling it forces {Wx::ToolBar} to scale its images in high DPI using the provided size, instead of letting {Wx::BitmapBundle} used for the tool bitmaps determine the best suitable bitmap size, which may result in suboptimal appearance.
|
507
510
|
# If you do call it, it must be done before toolbar is {Wx::ToolBar#realize}'d.
|
508
511
|
# Example of using this function to force the bitmaps to be at least 32 pixels wide and tall (at normal DPI):
|
509
|
-
#
|
512
|
+
# ```
|
510
513
|
# toolbar->SetToolBitmapSize(FromDIP(wxSize(32, 32)));
|
511
514
|
# toolbar->AddTool(wxID_NEW, "New", wxBitmapBundle::FromXXX(...));
|
512
515
|
# ...
|
513
516
|
# toolbar->Realize();
|
517
|
+
# ```
|
514
518
|
# @see Wx::ToolBar#get_tool_bitmap_size
|
515
519
|
# @see Wx::ToolBar#get_tool_size
|
516
520
|
# @param size [Array(Integer, Integer), Wx::Size] The size of the bitmaps in the toolbar in logical pixels.
|
@@ -164,7 +164,7 @@ module Wx
|
|
164
164
|
# Returns all icons associated with the window, there will be none of them if neither {Wx::TopLevelWindow#set_icon} nor {Wx::TopLevelWindow#set_icons} had been called before.
|
165
165
|
# Use {Wx::TopLevelWindow#get_icon} to get the main icon of the window.
|
166
166
|
# @see Wx::IconBundle
|
167
|
-
# @return [
|
167
|
+
# @return [Wx::IconBundle]
|
168
168
|
def get_icons; end
|
169
169
|
alias_method :icons, :get_icons
|
170
170
|
|
@@ -239,8 +239,9 @@ module Wx
|
|
239
239
|
# Notice that because of the native system limitations the identifiers of the items added to the system menu must be multiples of 16, otherwise no events will be generated for them.
|
240
240
|
# The returned pointer must not be deleted, it is owned by the window and will be only deleted when the window itself is destroyed.
|
241
241
|
# This function is not available in the other ports by design, any occurrences of it in the portable code must be guarded by
|
242
|
-
#
|
242
|
+
# ```
|
243
243
|
# #ifdef __WXMSW__
|
244
|
+
# ```
|
244
245
|
# preprocessor guards.
|
245
246
|
# @return [Wx::Menu]
|
246
247
|
def msw_get_system_menu; end
|
@@ -434,9 +435,11 @@ module Wx
|
|
434
435
|
# This method is specific to {Wx::Universal} port.
|
435
436
|
# Use native or custom-drawn decorations for this window only. Notice that to have any effect this method must be called before really creating the window, i.e. two step creation must be used:
|
436
437
|
#
|
438
|
+
# ```
|
437
439
|
# MyFrame *frame = new MyFrame; // use default ctor
|
438
440
|
# frame->UseNativeDecorations(false); // change from default "true"
|
439
441
|
# frame->Create(parent, title, ...); // really create the frame
|
442
|
+
# ```
|
440
443
|
# @see Wx::TopLevelWindow#use_native_decorations_by_default
|
441
444
|
# @see Wx::TopLevelWindow#is_using_native_decorations
|
442
445
|
# @param native [true,false]
|
data/lib/wx/doc/gen/tree_ctrl.rb
CHANGED
@@ -437,7 +437,6 @@ module Wx
|
|
437
437
|
# If textOnly is true, only the rectangle around the item's label will be returned, otherwise the item's image is also taken into account.
|
438
438
|
# The return value is true if the rectangle was successfully retrieved or <code></code> false if it was not (in this case rect is not changed) for example, if the item is currently invisible.
|
439
439
|
# Notice that the rectangle coordinates are logical, not physical ones. So, for example, the x coordinate may be negative if the tree has a horizontal scrollbar and its position is not 0.
|
440
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method only takes the item and textOnly parameters and returns a Wx::Rect (or undef).
|
441
440
|
# @param item [Wx::TreeItemId]
|
442
441
|
# @param rect [Wx::Rect]
|
443
442
|
# @param textOnly [true,false]
|
@@ -504,7 +503,6 @@ module Wx
|
|
504
503
|
alias_method :item_background_colour, :get_item_background_colour
|
505
504
|
|
506
505
|
# Returns the tree item data associated with the item.
|
507
|
-
# <b>{Wx::Perl} Note:</b> {Wx::Perl} provides the following shortcut method:
|
508
506
|
# - GetPlData(item): returns the Perl data associated with the Wx::TreeItemData. It is just the same as tree->GetItemData(item)->GetData().
|
509
507
|
# @see Wx::TreeItemData
|
510
508
|
# @param item [Wx::TreeItemId]
|
@@ -619,8 +617,6 @@ module Wx
|
|
619
617
|
# flags is a bitlist of the following:
|
620
618
|
#
|
621
619
|
# - {Wx::TREE_HITTEST_ABOVE}: Above the client area.- {Wx::TREE_HITTEST_BELOW}: Below the client area.- {Wx::TREE_HITTEST_NOWHERE}: In the client area but below the last item.- {Wx::TREE_HITTEST_ONITEMBUTTON}: On the button associated with an item.- {Wx::TREE_HITTEST_ONITEMICON}: On the bitmap associated with an item.- {Wx::TREE_HITTEST_ONITEMINDENT}: In the indentation associated with an item.- {Wx::TREE_HITTEST_ONITEMLABEL}: On the label (string) associated with an item.- {Wx::TREE_HITTEST_ONITEMRIGHT}: In the area to the right of an item.- {Wx::TREE_HITTEST_ONITEMSTATEICON}: On the state icon for a tree view item that is in a user-defined state.- {Wx::TREE_HITTEST_TOLEFT}: To the right of the client area.- {Wx::TREE_HITTEST_TORIGHT}: To the left of the client area.
|
622
|
-
#
|
623
|
-
# <b>{Wx::Perl} Note:</b> In {Wx::Perl} this method only takes the point parameter and returns a 2-element list (item, flags).
|
624
620
|
# @param point [Array(Integer, Integer), Wx::Point]
|
625
621
|
# @return [Array(Wx::TreeItemId,Integer)]
|
626
622
|
def hit_test(point) end
|
@@ -736,8 +732,6 @@ module Wx
|
|
736
732
|
|
737
733
|
# Sets the item client data.
|
738
734
|
# Notice that the client data previously associated with the item (if any) is not freed by this function and so calling this function multiple times for the same item will result in memory leaks unless you delete the old item data pointer yourself.
|
739
|
-
# <b>{Wx::Perl} Note:</b> {Wx::Perl} provides the following shortcut method:
|
740
|
-
# - SetPlData(item, data): sets the Perl data associated with the Wx::TreeItemData. It is just the same as tree->GetItemData(item)->SetData(data).
|
741
735
|
# @param item [Wx::TreeItemId]
|
742
736
|
# @param data [Object]
|
743
737
|
# @return [void]
|