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
@@ -0,0 +1,75 @@
|
|
1
|
+
|
2
|
+
module Wx
|
3
|
+
|
4
|
+
class MemoryDC < Wx::DC
|
5
|
+
|
6
|
+
# Creates a Memory DC and passes that to the given block to draw on.
|
7
|
+
# Automatically unselects any source object of the MemoryDC after the block finishes.
|
8
|
+
# @overload self.draw_on()
|
9
|
+
# @yieldparam [Wx::MemoryDC] dc
|
10
|
+
# @overload self.draw_on(bitmap)
|
11
|
+
# @param [Wx::Bitmap]
|
12
|
+
# @yieldparam [Wx::MemoryDC] dc
|
13
|
+
# @overload self.draw_on(dc)
|
14
|
+
# @param [Wx::DC]
|
15
|
+
# @yieldparam [Wx::MemoryDC] dc
|
16
|
+
def self.draw_on(*arg) end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
class BufferedDC < Wx::MemoryDC
|
21
|
+
|
22
|
+
# Creates a Buffered DC and passes that to the given block to draw on.
|
23
|
+
# Destroys the DC after the block returns.
|
24
|
+
# @overload self.draw_on()
|
25
|
+
# Creates a buffer for the provided dc.
|
26
|
+
# @yieldparam [Wx::BufferedDC] dc
|
27
|
+
# @overload self.draw_on(tgt, area, style=Wx::BUFFER_CLIENT_AREA)
|
28
|
+
# Creates a buffer for the provided dc. #init must not be called when using this constructor.
|
29
|
+
# @param [Wx::DC] tgt The underlying DC: everything drawn to this object will be flushed to this DC when this object is destroyed. You may pass nil in order to just initialize the buffer, and not flush it.
|
30
|
+
# @param [Wx::Size] area The size of the bitmap to be used for buffering (this bitmap is created internally when it is not given explicitly).
|
31
|
+
# @param [Integer] style Wx::BUFFER_CLIENT_AREA to indicate that just the client area of the window is buffered, or Wx::BUFFER_VIRTUAL_AREA to indicate that the buffer bitmap covers the virtual area.
|
32
|
+
# @yieldparam [Wx::BufferedDC] dc
|
33
|
+
# @overload self.draw_on(tgt, buffer=Wx::NULL_BITMAP, style=Wx::BUFFER_CLIENT_AREA)
|
34
|
+
# Creates a buffer for the provided dc. #init must not be called when using this constructor.
|
35
|
+
# @param [Wx::DC] tgt The underlying DC: everything drawn to this object will be flushed to this DC when this object is destroyed. You may pass nil in order to just initialize the buffer, and not flush it.
|
36
|
+
# @param [Wx::Bitmap] buffer Explicitly provided bitmap to be used for buffering: this is the most efficient solution as the bitmap doesn't have to be recreated each time but it also requires more memory as the bitmap is never freed. The bitmap should have appropriate size, anything drawn outside of its bounds is clipped.
|
37
|
+
# @param [Integer] style Wx::BUFFER_CLIENT_AREA to indicate that just the client area of the window is buffered, or Wx::BUFFER_VIRTUAL_AREA to indicate that the buffer bitmap covers the virtual area.
|
38
|
+
# @yieldparam [Wx::BufferedDC] dc
|
39
|
+
def self.draw_on(*arg) end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
class BufferedPaintDC < Wx::BufferedDC
|
44
|
+
|
45
|
+
# Creates a Buffered DC and passes that to the given block to draw on.
|
46
|
+
# Destroys the DC after the block returns.
|
47
|
+
# As with Wx::BufferedDC, you may either provide the bitmap to be used for buffering or let this object create one internally (in the latter case, the size of the client part of the window is used).
|
48
|
+
#
|
49
|
+
# Pass W::xBUFFER_CLIENT_AREA for the style parameter to indicate that just the client area of the window is buffered, or Wx::BUFFER_VIRTUAL_AREA to indicate that the buffer bitmap covers the virtual area.
|
50
|
+
# @overload self.draw_on(win, style=Wx::BUFFER_CLIENT_AREA)
|
51
|
+
# @param [Wx::Window] win The underlying window; everything drawn to this object will be flushed to this window when this object is destroyed.
|
52
|
+
# @param [Integer] style Wx::BUFFER_CLIENT_AREA to indicate that just the client area of the window is buffered, or Wx::BUFFER_VIRTUAL_AREA to indicate that the buffer bitmap covers the virtual area.
|
53
|
+
# @yieldparam [Wx::BufferedPaintDC] dc
|
54
|
+
# @overload self.draw_on(win, buffer=Wx::NULL_BITMAP, style=Wx::BUFFER_CLIENT_AREA)
|
55
|
+
# @param [Wx::Window] win The underlying window; everything drawn to this object will be flushed to this window when this object is destroyed.
|
56
|
+
# @param [Wx::Bitmap] buffer Explicitly provided bitmap to be used for buffering: this is the most efficient solution as the bitmap doesn't have to be recreated each time but it also requires more memory as the bitmap is never freed. The bitmap should have appropriate size, anything drawn outside of its bounds is clipped.
|
57
|
+
# @param [Integer] style Wx::BUFFER_CLIENT_AREA to indicate that just the client area of the window is buffered, or Wx::BUFFER_VIRTUAL_AREA to indicate that the buffer bitmap covers the virtual area.
|
58
|
+
# @yieldparam [Wx::BufferedPaintDC] dc
|
59
|
+
def self.draw_on(*arg) end
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
class AutoBufferedPaintDC < Wx::BufferedPaintDC
|
64
|
+
|
65
|
+
# Creates a Buffered DC and passes that to the given block to draw on.
|
66
|
+
# Destroys the DC after the block returns.
|
67
|
+
# Pass a pointer to the window on which you wish to paint.
|
68
|
+
# @note In wxRuby this method mostly exists to be consistent with the other DC classes. It is however recommended to use Wx::Window#paint_buffered instead.
|
69
|
+
# @param [Wx::Window] win The underlying window; everything drawn to this object will be flushed to this window when this object is destroyed.
|
70
|
+
# @yieldparam [Wx::AutoBufferedPaintDC] dc
|
71
|
+
def self.draw_on(win, &block) end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
module Wx
|
3
|
+
|
4
|
+
class MirrorDC < Wx::DC
|
5
|
+
|
6
|
+
# Executes the given block providing a temporary (mirror) dc as
|
7
|
+
# it's single argument.
|
8
|
+
# @param [Wx::DC] dc DC to duplicate the (mirrored) drawing on
|
9
|
+
# @param [Boolean] mirror whether to mirror or not
|
10
|
+
# @yieldparam [Wx::MirrorDC] dc the MirrorDC instance to paint on
|
11
|
+
# @return [Object] result of the block
|
12
|
+
def self.draw_on(dc, mirror) end
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
data/lib/wx/doc/pen.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
module Wx
|
3
|
+
|
4
|
+
class Pen
|
5
|
+
|
6
|
+
# Finds a pen with the specified attributes in the global list and returns it, else creates a new pen, adds it to the global pen list, and returns it.
|
7
|
+
# @param [Wx::Colour, String, Symbol] colour Colour of the pen.
|
8
|
+
# @param [Integer] width Width of the pen.
|
9
|
+
# @param [Wx::PenStyle] style Pen style. See {Wx::PenStyle} for a list of styles.
|
10
|
+
# @return [Wx::Pen]
|
11
|
+
def self.find_or_create_pen(colour, width=1, style=Wx::PenStyle::PENSTYLE_SOLID) end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
ThePenList = Wx::Pen
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
module Wx::PRT
|
3
|
+
|
4
|
+
class PrinterDC < Wx::DC
|
5
|
+
|
6
|
+
# Executes the given block providing a temporary (printer) dc as
|
7
|
+
# it's single argument.
|
8
|
+
# @param [Wx::PRT::PrintData] print_data print_data defining the print settings
|
9
|
+
# @yieldparam [Wx::PrinterDC] dc the PrinterDC instance to paint on
|
10
|
+
# @return [Object] result of the block
|
11
|
+
def self.draw_on(win) end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
class PostScriptDC < Wx::DC
|
16
|
+
|
17
|
+
# Executes the given block providing a temporary (postscript) dc as
|
18
|
+
# it's single argument.
|
19
|
+
# @param [Wx::PRT::PrintData] print_data print_data defining the print settings
|
20
|
+
# @yieldparam [Wx::PostScriptDC] dc the PostScriptDC instance to paint on
|
21
|
+
# @return [Object] result of the block
|
22
|
+
def self.draw_on(win) end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
class Wx::RadioBox
|
3
|
+
|
4
|
+
# Enables od disables individual buttons.
|
5
|
+
# true if the item has been enabled or disabled or false if nothing was done because it already was in the requested state.
|
6
|
+
# @see Wx::Window#enable
|
7
|
+
# @param item [Integer] The zero-based position of the button to enable or disable.
|
8
|
+
# @param enable [true,false] true to enable, false to disable.
|
9
|
+
# @return [true,false]
|
10
|
+
def enable_item(item, enable=true) end
|
11
|
+
|
12
|
+
# Shows or hides individual buttons.
|
13
|
+
# true if the item has been shown or hidden or false if nothing was done because it already was in the requested state.
|
14
|
+
# @see Wx::Window#show
|
15
|
+
# @param item [Integer] The zero-based position of the button to show or hide.
|
16
|
+
# @param show [true,false] true to show, false to hide.
|
17
|
+
# @return [true,false]
|
18
|
+
def show_item(item, show=true) end
|
19
|
+
|
20
|
+
end
|
data/lib/wx/doc/screen_dc.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
module Wx
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
class ScreenDC < Wx::DC
|
5
|
+
|
6
|
+
# Executes the given block providing a temporary (screen) dc as
|
7
|
+
# it's single argument.
|
8
|
+
# @yieldparam [Wx::ScreenDC] dc the ScreenDC instance to paint on
|
9
|
+
# @return [Object] result of the block
|
10
|
+
def self.draw_on; end
|
11
|
+
|
12
|
+
end
|
9
13
|
|
10
14
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
module Wx
|
3
|
+
|
4
|
+
class SVGFileDC < Wx::DC
|
5
|
+
|
6
|
+
# Executes the given block providing a temporary dc as it's single argument.
|
7
|
+
# Initializes a wxSVGFileDC with the given filename, width and height at dpi resolution, and an optional title.
|
8
|
+
# The title provides a readable name for the SVG document.
|
9
|
+
# @param [String] filename name of file to create
|
10
|
+
# @param [Integer] width width for SVG image
|
11
|
+
# @param [Integer] height height for SVG image
|
12
|
+
# @param [Float] dpi resolution for SVG image
|
13
|
+
# @param [String] title readable name for the SVG document
|
14
|
+
# @yieldparam [Wx::SVGFileDC] dc the SVGFileDC instance to paint on
|
15
|
+
# @return [Object] result of the block
|
16
|
+
def self.draw_on(filename, width=320, height=240, dpi=72, title='') end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
|
2
|
+
class Wx::VListBox
|
3
|
+
|
4
|
+
# Iterate selected items. Returns Enumerator if no block given.
|
5
|
+
# @yieldparam [Integer] sel selected item index
|
6
|
+
# @return [Enumerator,Object] if block given returns last return value of block, Enumerator otherwise
|
7
|
+
def each_selected; end
|
8
|
+
|
9
|
+
end
|
data/lib/wx/doc/window.rb
CHANGED
@@ -15,4 +15,31 @@ class Wx::Window
|
|
15
15
|
# @return [Object] result from block
|
16
16
|
def paint_buffered; end
|
17
17
|
|
18
|
+
# Locks the window from updates while executing the given block.
|
19
|
+
# @param [Proc] block
|
20
|
+
def locked(&block); end
|
21
|
+
|
22
|
+
# Find the first child window with the given id recursively in the window hierarchy of this window.
|
23
|
+
#
|
24
|
+
# Window with the given id or nil if not found.
|
25
|
+
# @see Wx::Window.find_window_by_id
|
26
|
+
# @param id [Integer]
|
27
|
+
# @return [Wx::Window]
|
28
|
+
def find_window_by_id(id) end
|
29
|
+
|
30
|
+
# Find the first child window with the given label recursively in the window hierarchy of this window.
|
31
|
+
#
|
32
|
+
# Window with the given label or nil if not found.
|
33
|
+
# @see Wx::Window.find_window_by_label
|
34
|
+
# @param label [String]
|
35
|
+
# @return [Wx::Window]
|
36
|
+
def find_window_by_label(label) end
|
37
|
+
|
38
|
+
# Find the first child window with the given name (as given in a window constructor or {Wx::Window#create} function call) recursively in the window hierarchy of this window.
|
39
|
+
#
|
40
|
+
# Window with the given name or nil if not found.
|
41
|
+
# @param name [String]
|
42
|
+
# @return [Wx::Window]
|
43
|
+
def find_window_by_name(name) end
|
44
|
+
|
18
45
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
|
2
|
+
class Wx::WindowDisabler
|
3
|
+
|
4
|
+
# Disables all top level windows of the application (maybe with the exception of one of them) in
|
5
|
+
# and enables them back after the given block has returned.
|
6
|
+
# @param [Wx::Window,nil] to_skip window to exclude from disabling
|
7
|
+
# @return [void]
|
8
|
+
def self.disable(to_skip = nil) end
|
9
|
+
|
10
|
+
end
|
data/lib/wx/html/keyword_defs.rb
CHANGED
@@ -10,13 +10,12 @@ Wx::define_keyword_ctors(Wx::HTML::HtmlWindow) do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
# wxHtmlListBox A listbox showing HTML content
|
13
|
-
|
14
|
-
|
15
|
-
wx_ctor_params :id, :pos, :size, :choices => []
|
16
|
-
wx_ctor_params :style
|
17
|
-
wx_ctor_params :validator, :name => 'listBox'
|
13
|
+
Wx::define_keyword_ctors(Wx::HTML::HtmlListBox) do
|
14
|
+
wx_ctor_params :id, :pos, :size, :style, :name => 'HtmlListBox'
|
18
15
|
end
|
19
16
|
|
20
|
-
Wx::define_keyword_ctors(
|
21
|
-
wx_ctor_params :id, :pos, :size
|
17
|
+
Wx::define_keyword_ctors(Wx::HTML::SimpleHtmlListBox) do
|
18
|
+
wx_ctor_params :id, :pos, :size
|
19
|
+
wx_ctor_params :choices => []
|
20
|
+
wx_ctor_params :style, :validator, :name => 'SimpleHtmlListBox'
|
22
21
|
end
|
data/lib/wx/html/require.rb
CHANGED
@@ -0,0 +1,105 @@
|
|
1
|
+
|
2
|
+
class Wx::HTML::SimpleHtmlListBox
|
3
|
+
|
4
|
+
# Make this a Ruby enumerable so find, find_all, map etc are available
|
5
|
+
include Enumerable
|
6
|
+
|
7
|
+
# Passes each valid item index into the passed block
|
8
|
+
def each
|
9
|
+
get_count.times { | i | yield i }
|
10
|
+
end
|
11
|
+
|
12
|
+
# We need to cache client data in Ruby variables as we cannot access items
|
13
|
+
# during the GC mark phase as for some platforms (WXMSW at least) that would
|
14
|
+
# involve calling methods that would break in that phase.
|
15
|
+
|
16
|
+
def client_data_store
|
17
|
+
@client_data ||= []
|
18
|
+
end
|
19
|
+
private :client_data_store
|
20
|
+
|
21
|
+
wx_set_client_data = instance_method :set_client_data
|
22
|
+
define_method :set_client_data do |item, data|
|
23
|
+
item = item.to_i
|
24
|
+
wx_set_client_data.bind(self).call(item, data)
|
25
|
+
client_data_store[item] = data
|
26
|
+
end
|
27
|
+
|
28
|
+
def get_client_data(item)
|
29
|
+
client_data_store[item.to_i]
|
30
|
+
end
|
31
|
+
|
32
|
+
wx_append = instance_method :append
|
33
|
+
define_method :append do |item, data=nil|
|
34
|
+
if data
|
35
|
+
if ::Array === item
|
36
|
+
if !(::Array === data)
|
37
|
+
::Kernel.raise ::TypeError.new("Expected Array for argument 3")
|
38
|
+
elsif data.size != item.size
|
39
|
+
::Kernel.raise ::ArgumentError.new("item and data array must be equal size")
|
40
|
+
end
|
41
|
+
offs = get_count
|
42
|
+
wx_append.bind(self).call(item)
|
43
|
+
item.size.times { |ix| set_client_data(offs+ix, data[ix]) }
|
44
|
+
else
|
45
|
+
wx_append.bind(self).call(item, data)
|
46
|
+
client_data_store[get_count-1] = data
|
47
|
+
end
|
48
|
+
else
|
49
|
+
wx_append.bind(self).call(item)
|
50
|
+
# no changes to data store
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
wx_insert = instance_method :insert
|
55
|
+
define_method :insert do |item, pos, data=nil|
|
56
|
+
if data
|
57
|
+
if ::Array === item
|
58
|
+
if !(::Array === data)
|
59
|
+
::Kernel.raise ::TypeError.new("Expected Array for argument 3")
|
60
|
+
elsif data.size != item.size
|
61
|
+
::Kernel.raise ::ArgumentError.new("item and data array must be equal size")
|
62
|
+
end
|
63
|
+
wx_insert.bind(self).call(item, pos)
|
64
|
+
client_data_store.insert(pos, *::Array.new(item.size))
|
65
|
+
item.size.times { |ix| set_client_data(pos+ix, data[ix]) }
|
66
|
+
else
|
67
|
+
wx_insert.bind(self).call(item, pos, data)
|
68
|
+
client_data_store.insert(pos, data)
|
69
|
+
end
|
70
|
+
else
|
71
|
+
wx_insert.bind(self).call(item, pos)
|
72
|
+
if ::Array === item
|
73
|
+
client_data_store.insert(pos, *::Array.new(item.size))
|
74
|
+
else
|
75
|
+
client_data_store.insert(pos, nil)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
wx_set = instance_method :set
|
81
|
+
define_method :set do |items, data=nil|
|
82
|
+
if data
|
83
|
+
if !(::Array === data)
|
84
|
+
::Kernel.raise ::TypeError.new("Expected Array for argument 2")
|
85
|
+
elsif data.size != items.size
|
86
|
+
::Kernel.raise ::ArgumentError.new("items and data array must be equal size")
|
87
|
+
end
|
88
|
+
end
|
89
|
+
wx_set.bind(self).call(items)
|
90
|
+
client_data_store.clear
|
91
|
+
items.each_with_index { |item, ix| set_client_data(item, data[ix]) }
|
92
|
+
end
|
93
|
+
|
94
|
+
wx_clear = instance_method :clear
|
95
|
+
define_method :clear do
|
96
|
+
wx_clear.bind(self).call
|
97
|
+
client_data_store.clear
|
98
|
+
end
|
99
|
+
|
100
|
+
wx_delete = instance_method :delete
|
101
|
+
define_method :delete do |item|
|
102
|
+
wx_delete.bind(self).call(item.to_i)
|
103
|
+
client_data_store.slice!(item.to_i)
|
104
|
+
end
|
105
|
+
end
|