wxruby3 0.9.0.pre.beta.13-x64-mingw-ucrt → 0.9.0.pre.rc.1-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/README.md +47 -4
- data/assets/hello_button.png +0 -0
- data/assets/hello_button_clicked.png +0 -0
- data/assets/hello_world.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/accessors.rb +8 -2
- 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/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 +12 -0
- data/lib/wx/core/evthandler.rb +36 -0
- data/lib/wx/core/find_replace_dialog.rb +24 -0
- data/lib/wx/core/icon.rb +1 -1
- data/lib/wx/core/image.rb +1 -1
- data/lib/wx/core/paintdc.rb +8 -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 +1 -1
- 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/gen/about_dialog_info.rb +27 -24
- data/lib/wx/doc/gen/accelerator.rb +11 -12
- 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/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/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 +49 -0
- data/lib/wx/doc/gen/event_filter.rb +95 -0
- data/lib/wx/doc/gen/event_list.rb +16 -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 +8 -4
- data/lib/wx/doc/gen/find_replace_dialog.rb +1 -1
- data/lib/wx/doc/gen/font.rb +10 -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/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 -2
- 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 -2
- 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/prt/printer_dc.rb +26 -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_disabler.rb +10 -0
- data/lib/wx/global_const.rb +24 -18
- 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 +7 -0
- 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 +3 -1
- data/rakelib/yard/yard/relative_markdown_links.rb +5 -1
- 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 +23 -21
- data/samples/ribbon/ribbon.rb +47 -46
- data/tests/lib/wxapp_runner.rb +3 -3
- data/tests/lib/wxframe_runner.rb +59 -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_gdi_object.rb +161 -0
- data/tests/test_intl.rb +11 -14
- data/tests/test_item_data.rb +33 -1
- data/tests/test_std_controls.rb +147 -0
- metadata +38 -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/gcdc.rb
CHANGED
@@ -18,30 +18,10 @@ module Wx
|
|
18
18
|
# @see Wx::GraphicsContext
|
19
19
|
#
|
20
20
|
#
|
21
|
+
#
|
22
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
21
23
|
class GCDC < DC
|
22
24
|
|
23
|
-
# @overload initialize(windowDC)
|
24
|
-
# Constructs a {Wx::GCDC} from a {Wx::WindowDC}.
|
25
|
-
# @param windowDC [Wx::WindowDC]
|
26
|
-
# @return [GCDC]
|
27
|
-
# @overload initialize(memoryDC)
|
28
|
-
# Constructs a {Wx::GCDC} from a {Wx::MemoryDC}.
|
29
|
-
# @param memoryDC [Wx::MemoryDC]
|
30
|
-
# @return [GCDC]
|
31
|
-
# @overload initialize(printerDC)
|
32
|
-
# Constructs a {Wx::GCDC} from a {Wx::PRT::PrinterDC}.
|
33
|
-
# @param printerDC [Wx::PrinterDC]
|
34
|
-
# @return [GCDC]
|
35
|
-
# @overload initialize(context)
|
36
|
-
# Construct a {Wx::GCDC} from an existing graphics context.
|
37
|
-
# Note that this object takes ownership of context and will delete it when it is destroyed or when {Wx::GCDC#set_graphics_context} is called with a different context object.
|
38
|
-
# Also notice that context will continue using the same font, pen and brush as before until {Wx::GCDC#set_font}, {Wx::GCDC#set_pen} or {Wx::GCDC#set_brush} is explicitly called to change them. This means that the code can use this {Wx::DC}-derived object to work using pens and brushes with alpha component, for example (which normally isn't supported by {Wx::DC} API), but it also means that the return values of {Wx::GCDC#get_font}, {Wx::GCDC#get_pen} and {Wx::GCDC#get_brush} won't really correspond to the actually used objects because they simply can't represent them anyhow. If you wish to avoid such discrepancy, you need to call the setter methods to bring {Wx::DC} and {Wx::GraphicsContext} font, pen and brush in sync with each other.
|
39
|
-
# @param context [Wx::GraphicsContext]
|
40
|
-
# @return [GCDC]
|
41
|
-
# @overload initialize()
|
42
|
-
# @return [GCDC]
|
43
|
-
def initialize(*args) end
|
44
|
-
|
45
25
|
# Retrieves associated {Wx::GraphicsContext}.
|
46
26
|
# @return [Wx::GraphicsContext]
|
47
27
|
def get_graphics_context; end
|
@@ -352,6 +352,8 @@ module Wx
|
|
352
352
|
# @see Wx::RealPoint
|
353
353
|
#
|
354
354
|
#
|
355
|
+
#
|
356
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
355
357
|
class Point < ::Object
|
356
358
|
|
357
359
|
# Returns true if neither of the point components is equal to {Wx::DEFAULT_COORD}.
|
@@ -363,10 +365,12 @@ module Wx
|
|
363
365
|
# Combine this object with another one replacing the uninitialized values.
|
364
366
|
# It is typically used like this:
|
365
367
|
#
|
368
|
+
# ```
|
366
369
|
# if ( !pos.IsFullySpecified() )
|
367
370
|
# {
|
368
371
|
# pos.SetDefaults(GetDefaultPosition());
|
369
372
|
# }
|
373
|
+
# ```
|
370
374
|
# @see Wx::Point#is_fully_specified
|
371
375
|
# @param pt [Array(Integer, Integer), Wx::Point]
|
372
376
|
# @return [void]
|
@@ -409,11 +413,12 @@ module Wx
|
|
409
413
|
# @overload initialize(pt)
|
410
414
|
# Converts the given {Wx::RealPoint} (with floating point coordinates) to a {Wx::Point} instance.
|
411
415
|
# Notice that this truncates the floating point values of pt components, if you want to round them instead you need to do it manually, e.g.
|
412
|
-
#
|
416
|
+
# ```
|
413
417
|
# #include <wx/math.h> // for wxRound()
|
414
418
|
#
|
415
419
|
# wxRealPoint rp = ...;
|
416
420
|
# wxPoint p(wxRound(rp.x), wxRound(rp.y));
|
421
|
+
# ```
|
417
422
|
# @param pt [Wx::RealPoint]
|
418
423
|
# @return [Point]
|
419
424
|
def initialize(*args) end
|
@@ -432,6 +437,8 @@ module Wx
|
|
432
437
|
# @see Wx::RealPoint
|
433
438
|
#
|
434
439
|
#
|
440
|
+
#
|
441
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
435
442
|
class Size < ::Object
|
436
443
|
|
437
444
|
# @overload dec_by(pt)
|
@@ -551,10 +558,12 @@ module Wx
|
|
551
558
|
# Combine this size object with another one replacing the default (i.e. equal to -1) components of this object with those of the other.
|
552
559
|
# It is typically used like this:
|
553
560
|
#
|
561
|
+
# ```
|
554
562
|
# if ( !size.IsFullySpecified() )
|
555
563
|
# {
|
556
564
|
# size.SetDefaults(GetDefaultSize());
|
557
565
|
# }
|
566
|
+
# ```
|
558
567
|
# @see Wx::Size#is_fully_specified
|
559
568
|
# @param sizeDefault [Array(Integer, Integer), Wx::Size]
|
560
569
|
# @return [void]
|
@@ -577,9 +586,10 @@ module Wx
|
|
577
586
|
|
578
587
|
# Represents a rectangle with integer coordinates.
|
579
588
|
# x and y members specify the coordinates of the rectangle top-left corner and width and height specify its width and height respectively. The usual C++ semi-open interval convention is used: point p lies inside the rectangle if and only if both conditions below are satisfied:
|
580
|
-
#
|
589
|
+
# ```
|
581
590
|
# x <= p.x < x + width
|
582
591
|
# y <= p.y < y + height
|
592
|
+
# ```
|
583
593
|
#
|
584
594
|
# In other words, the rectangle left and right boundaries are at x and <code>x+width-1</code> and its top and bottom boundaries are at y and <code>y+height-1</code> respectively.
|
585
595
|
# Note that the x and y coordinates may be negative, but width and height are always strictly positive for non-empty rectangles.
|
@@ -590,6 +600,8 @@ module Wx
|
|
590
600
|
# @see Wx::Size
|
591
601
|
#
|
592
602
|
#
|
603
|
+
#
|
604
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
593
605
|
class Rect < ::Object
|
594
606
|
|
595
607
|
# Returns the rectangle having the same size as this one but centered relatively to the given rectangle r.
|
@@ -887,6 +899,8 @@ module Wx
|
|
887
899
|
# @see Wx::Point
|
888
900
|
#
|
889
901
|
#
|
902
|
+
#
|
903
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
890
904
|
class RealPoint < ::Object
|
891
905
|
|
892
906
|
# X coordinate of this point.
|
@@ -1073,6 +1087,8 @@ module Wx
|
|
1073
1087
|
# @see Wx::Colour
|
1074
1088
|
#
|
1075
1089
|
#
|
1090
|
+
#
|
1091
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
1076
1092
|
class ColourDatabase < ::Object
|
1077
1093
|
|
1078
1094
|
# Constructs the colour database.
|
@@ -165,6 +165,7 @@ module Wx
|
|
165
165
|
# A {Wx::GraphicsContext} instance is the object that is drawn upon.
|
166
166
|
# It is created by a renderer using Wx::GraphicsRenderer#create_context. This can be either directly using a renderer instance, or indirectly using the static convenience {Wx::GraphicsContext.create} functions of {Wx::GraphicsContext} that always delegate the task to the default renderer.
|
167
167
|
#
|
168
|
+
# ```
|
168
169
|
# void MyCanvas::OnPaint(wxPaintEvent &event)
|
169
170
|
# {
|
170
171
|
# // Create paint DC
|
@@ -191,6 +192,7 @@ module Wx
|
|
191
192
|
# delete gc;
|
192
193
|
# }
|
193
194
|
# }
|
195
|
+
# ```
|
194
196
|
#
|
195
197
|
# For some renderers (like Direct2D or Cairo) processing of drawing operations may be deferred (Direct2D render target normally builds up a batch of rendering commands but defers processing of these commands, Cairo operates on a separate surface) so to make drawing results visible you need to update the content of the context by calling {Wx::GraphicsContext#flush} or by destroying the context.
|
196
198
|
#
|
@@ -202,51 +204,10 @@ module Wx
|
|
202
204
|
# @see Wx::DC
|
203
205
|
#
|
204
206
|
#
|
207
|
+
#
|
208
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
205
209
|
class GraphicsContext < GraphicsObject
|
206
210
|
|
207
|
-
# @overload self.create(window)
|
208
|
-
# Creates a {Wx::GraphicsContext} from a {Wx::Window}.
|
209
|
-
#
|
210
|
-
# @see Wx::GraphicsRenderer#create_context
|
211
|
-
# @param window [Wx::Window]
|
212
|
-
# @return [Wx::GraphicsContext]
|
213
|
-
# @overload self.create(windowDC)
|
214
|
-
# Creates a {Wx::GraphicsContext} from a {Wx::WindowDC}.
|
215
|
-
#
|
216
|
-
# @see Wx::GraphicsRenderer#create_context
|
217
|
-
# @param windowDC [Wx::WindowDC]
|
218
|
-
# @return [Wx::GraphicsContext]
|
219
|
-
# @overload self.create(memoryDC)
|
220
|
-
# Creates a {Wx::GraphicsContext} from a {Wx::MemoryDC}.
|
221
|
-
#
|
222
|
-
# @see Wx::GraphicsRenderer#create_context
|
223
|
-
# @param memoryDC [Wx::MemoryDC]
|
224
|
-
# @return [Wx::GraphicsContext]
|
225
|
-
# @overload self.create(printerDC)
|
226
|
-
# Creates a {Wx::GraphicsContext} from a {Wx::PRT::PrinterDC}.
|
227
|
-
# Under GTK+, this will only work when using the GtkPrint printing backend which is available since GTK+ 2.10.
|
228
|
-
# @see Wx::GraphicsRenderer#create_context
|
229
|
-
# @see Printing Under Unix (GTK+)
|
230
|
-
# @param printerDC [Wx::PrinterDC]
|
231
|
-
# @return [Wx::GraphicsContext]
|
232
|
-
# @overload self.create(image)
|
233
|
-
# Creates a {Wx::GraphicsContext} associated with a {Wx::Image}.
|
234
|
-
# The image specifies the size of the context as well as whether alpha is supported (if {Wx::Image#has_alpha}) or not and the initial contents of the context. The image object must have a life time greater than that of the new context as the context copies its contents back to the image when it is destroyed.
|
235
|
-
# @param image [Wx::Image]
|
236
|
-
# @return [Wx::GraphicsContext]
|
237
|
-
# @overload self.create()
|
238
|
-
# Create a lightweight context that can be used only for measuring text.
|
239
|
-
# @return [Wx::GraphicsContext]
|
240
|
-
def self.create(*args) end
|
241
|
-
|
242
|
-
# Creates a {Wx::GraphicsContext} from a DC of unknown specific type.
|
243
|
-
# Creates a {Wx::GraphicsContext} if dc is a supported type (i.e. has a corresponding {Wx::GraphicsContext.create} method, e.g. {Wx::WindowDC} or {Wx::MemoryDC}). Returns NULL if the DC is unsupported.
|
244
|
-
# This method is only useful as a helper in generic code that operates with {Wx::DC} and doesn't known its exact type. Use {Wx::GraphicsContext.create} instead if you know that the DC is e.g. {Wx::WindowDC}.
|
245
|
-
# @see Wx::GraphicsRenderer#create_context_from_unknown_dc
|
246
|
-
# @param dc [Wx::DC]
|
247
|
-
# @return [Wx::GraphicsContext]
|
248
|
-
def self.create_from_unknown_dc(dc) end
|
249
|
-
|
250
211
|
# Resets the clipping to original shape.
|
251
212
|
# @return [void]
|
252
213
|
def reset_clip; end
|
@@ -407,7 +407,9 @@ module Wx
|
|
407
407
|
# Concatenates the matrix passed with the current matrix.
|
408
408
|
# The effect of the resulting transformation is to first apply the transformation in t to the coordinates and then apply the transformation in the current matrix to the coordinates.
|
409
409
|
#
|
410
|
+
# ```
|
410
411
|
# // matrix = t x matrix
|
412
|
+
# ```
|
411
413
|
# @param t [Wx::GraphicsMatrix] The parameter matrix is the multiplicand.
|
412
414
|
# @return [void]
|
413
415
|
def concat(t) end
|
@@ -97,10 +97,11 @@ module Wx::GRID
|
|
97
97
|
# Get the alignment defined by this attribute.
|
98
98
|
# Unlike {Wx::GRID::GridCellAttr#get_alignment} this function only modifies hAlign and vAlign if this attribute does define a non-default alignment. This means that they must be initialized before calling this function and that their values will be preserved unchanged if they are different from {Wx::Alignment::ALIGN_INVALID}.
|
99
99
|
# For example, the following fragment can be used to use the cell alignment if one is defined but right-align its contents by default (instead of left-aligning it by default) while still using the default vertical alignment:
|
100
|
-
#
|
100
|
+
# ```
|
101
101
|
# int hAlign = wxALIGN_RIGHT,
|
102
102
|
# vAlign = wxALIGN_INVALID;
|
103
103
|
# attr.GetNonDefaultAlignment(&hAlign, &vAlign);
|
104
|
+
# ```
|
104
105
|
# @return [Array(Integer,Integer)]
|
105
106
|
def get_non_default_alignment; end
|
106
107
|
alias_method :non_default_alignment, :get_non_default_alignment
|
@@ -374,7 +374,7 @@ module Wx::GRID
|
|
374
374
|
# Returns the pen used for horizontal grid lines.
|
375
375
|
# This virtual function may be overridden in derived classes in order to change the appearance of individual grid line for the given row.
|
376
376
|
# Example:
|
377
|
-
#
|
377
|
+
# ```
|
378
378
|
# // in a grid displaying music notation, use a solid black pen between
|
379
379
|
# // octaves (C0=row 127, C1=row 115 etc.)
|
380
380
|
# wxPen MidiGrid::GetRowGridLinePen(int row)
|
@@ -384,6 +384,7 @@ module Wx::GRID
|
|
384
384
|
# else
|
385
385
|
# return GetDefaultGridLinePen();
|
386
386
|
# }
|
387
|
+
# ```
|
387
388
|
# @param row [Integer]
|
388
389
|
# @return [Wx::Pen]
|
389
390
|
def get_row_grid_line_pen(row) end
|
@@ -1258,7 +1259,7 @@ module Wx::GRID
|
|
1258
1259
|
# For normal cells, the function fills both num_rows and num_cols with 1 and returns CellSpan_None. For cells which span multiple cells, i.e. for which {Wx::GRID::Grid#set_cell_size} had been called, the returned values are the same ones as were passed to {Wx::GRID::Grid#set_cell_size} call and the function return value is CellSpan_Main.
|
1259
1260
|
# More unexpectedly, perhaps, the returned values may be negative for the cells which are inside a span covered by a cell occupying multiple rows or columns. They correspond to the offset of the main cell of the span from the cell passed to this functions and the function returns CellSpan_Inside value to indicate this.
|
1260
1261
|
# As an example, consider a 3*3 grid with the cell (1, 1) (the one in the middle) having a span of 2 rows and 2 columns, i.e. the grid looks like
|
1261
|
-
#
|
1262
|
+
# ```
|
1262
1263
|
# +----+----+----+
|
1263
1264
|
# | | | |
|
1264
1265
|
# +----+----+----+
|
@@ -1266,6 +1267,7 @@ module Wx::GRID
|
|
1266
1267
|
# +----+ |
|
1267
1268
|
# | | |
|
1268
1269
|
# +----+----+----+
|
1270
|
+
# ```
|
1269
1271
|
# Then the function returns 2 and 2 in num_rows and num_cols for the cell (1, 1) itself and -1 and -1 for the cell (2, 2) as well as -1 and 0 for the cell (2, 1).
|
1270
1272
|
#
|
1271
1273
|
# The kind of this cell span (the return value is new in wxWidgets 2.9.1, this function was void in previous wxWidgets versions).
|
@@ -9,6 +9,8 @@ module Wx::GRID
|
|
9
9
|
# Message class used by the grid table to send requests and notifications to the grid view.
|
10
10
|
# A message object of this class must be sent to the grid using {Wx::GRID::Grid#process_table_message} every time the table changes, e.g. rows are added/deleted. The messages are just notifications and don't result in any actual changes but just allow the view to react to changes to the model.
|
11
11
|
#
|
12
|
+
#
|
13
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
12
14
|
class GridTableMessage < ::Object
|
13
15
|
|
14
16
|
# @overload initialize()
|
@@ -207,6 +207,8 @@ module Wx
|
|
207
207
|
#
|
208
208
|
# Category: Window Layout
|
209
209
|
#
|
210
|
+
#
|
211
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
210
212
|
class GBSpan < ::Object
|
211
213
|
|
212
214
|
# @overload initialize()
|
@@ -253,6 +255,8 @@ module Wx
|
|
253
255
|
#
|
254
256
|
# Category: Window Layout
|
255
257
|
#
|
258
|
+
#
|
259
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
256
260
|
class GBPosition < ::Object
|
257
261
|
|
258
262
|
# @overload initialize()
|
@@ -34,8 +34,9 @@ module Wx
|
|
34
34
|
# The remaining help controller classes need to be named explicitly by an application that wishes to make use of them.
|
35
35
|
# The following help controller classes are defined:
|
36
36
|
# - {Wx::WinHelpController}, for controlling Windows Help.- {Wx::CHMHelpController}, for controlling MS HTML Help. To use this, you need to set {Wx::Setup::USE_MS_HTML_HELP} to 1 in setup.h and have the htmlhelp.h header from Microsoft's HTML Help kit. (You don't need the VC++-specific htmlhelp.lib because wxWidgets loads necessary DLL at runtime and so it works with all compilers.)- {Wx::BestHelpController}, for controlling MS HTML Help or, if Microsoft's runtime is not available, {Wx::HTML::HtmlHelpController}. You need to provide <b>both</b> CHM and HTB versions of the help file. For {Wx::MSW} only.- {Wx::ExtHelpController}, for controlling external browsers under Unix. The default browser is Netscape Navigator. The 'help' sample shows its use.- {Wx::HTML::HtmlHelpController}, a sophisticated help controller using {Wx::HTML}, in a similar style to the Microsoft HTML Help viewer and using some of the same files. Although it has an API compatible with other help controllers, it has more advanced features, so it is recommended that you use the specific API for this class instead. Note that if you use .zip or .htb formats for your books, you must add this line to your application initialization:
|
37
|
-
#
|
37
|
+
# ```
|
38
38
|
# wxFileSystem::AddHandler(new wxArchiveFSHandler);
|
39
|
+
# ```
|
39
40
|
# or nothing will be shown in your help window.
|
40
41
|
#
|
41
42
|
# ===
|
@@ -119,9 +120,11 @@ module Wx
|
|
119
120
|
# Sets detailed viewer information.
|
120
121
|
# So far this is only relevant to {Wx::ExtHelpController}. Some examples of usage:
|
121
122
|
#
|
123
|
+
# ```
|
122
124
|
# m_help.SetViewer("kdehelp");
|
123
125
|
# m_help.SetViewer("gnome-help-browser");
|
124
126
|
# m_help.SetViewer("netscape", wxHELP_NETSCAPE);
|
127
|
+
# ```
|
125
128
|
#
|
126
129
|
# Todomodernize this function with {Wx::LaunchDefaultBrowser}
|
127
130
|
# @param viewer [String] This defaults to "netscape" for {Wx::ExtHelpController}.
|
@@ -269,6 +269,8 @@ module Wx::HTML
|
|
269
269
|
#
|
270
270
|
# Category: {Wx::HTML}
|
271
271
|
#
|
272
|
+
#
|
273
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
272
274
|
class HtmlLinkInfo < Object
|
273
275
|
|
274
276
|
# @overload initialize()
|
@@ -420,8 +422,9 @@ module Wx::HTML
|
|
420
422
|
# Sets floating width adjustment.
|
421
423
|
# The normal behaviour of container is that its width is the same as the width of parent container (and thus you can have only one sub-container per line). You can change this by setting the floating width adjustment.
|
422
424
|
# @param w [Integer] Width of the container. If the value is negative it means complement to full width of parent container. E.g.
|
423
|
-
#
|
425
|
+
# ```
|
424
426
|
# SetWidthFloat(-50, wxHTML_UNITS_PIXELS)
|
427
|
+
# ```
|
425
428
|
# sets the width of container to parent's width minus 50 pixels. This is useful when creating tables - you can call SetWidthFloat(50) and SetWidthFloat(-50).
|
426
429
|
# @param units [Integer] Units of w This parameter affects the interpretation of value.
|
427
430
|
# - {Wx::HTML::HTML_UNITS_PIXELS}: w is number of pixels- {Wx::HTML::HTML_UNITS_PERCENT}: w is interpreted as percents of width of parent container
|
@@ -73,8 +73,9 @@ module Wx::HTML
|
|
73
73
|
# Adds a book (i.e.
|
74
74
|
# a .hhp file; an HTML Help Workshop project file) into the list of loaded books.
|
75
75
|
# This must be called at least once before displaying any help. bookFile or bookUrl may be either <code>".hhp"</code> file or a ZIP archive that contains an arbitrary number of <code>".hhp"</code> files in its top-level directory. This ZIP archive must have <code>".zip"</code> or <code>".htb"</code> extension (the latter stands for "HTML book"). In other words,
|
76
|
-
#
|
76
|
+
# ```
|
77
77
|
# AddBook(wxFileName("help.zip"))
|
78
|
+
# ```
|
78
79
|
# is possible and is the recommended way.
|
79
80
|
# @param bookFile [Wx::FileName] Help book filename. It is recommended to use this prototype instead of the one taking URL, because it is less error-prone.
|
80
81
|
# @param showWaitMsg [true,false] If true then a decoration-less window with progress message is displayed.
|
@@ -239,9 +240,11 @@ module Wx::HTML
|
|
239
240
|
# Sets detailed viewer information.
|
240
241
|
# So far this is only relevant to {Wx::ExtHelpController}. Some examples of usage:
|
241
242
|
#
|
243
|
+
# ```
|
242
244
|
# m_help.SetViewer("kdehelp");
|
243
245
|
# m_help.SetViewer("gnome-help-browser");
|
244
246
|
# m_help.SetViewer("netscape", wxHELP_NETSCAPE);
|
247
|
+
# ```
|
245
248
|
#
|
246
249
|
# Todomodernize this function with {Wx::LaunchDefaultBrowser}
|
247
250
|
# @param viewer [String] This defaults to "netscape" for {Wx::ExtHelpController}.
|
@@ -62,6 +62,8 @@ module Wx::HTML
|
|
62
62
|
# Helper class for {Wx::HTML::HtmlHelpData}.
|
63
63
|
#
|
64
64
|
#
|
65
|
+
#
|
66
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
65
67
|
class HtmlBookRecord < ::Object
|
66
68
|
|
67
69
|
# @param bookfile [String]
|
@@ -125,6 +127,8 @@ module Wx::HTML
|
|
125
127
|
# Helper class for {Wx::HTML::HtmlHelpData}.
|
126
128
|
#
|
127
129
|
#
|
130
|
+
#
|
131
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
128
132
|
class HtmlHelpDataItem < ::Object
|
129
133
|
|
130
134
|
# @return [HtmlHelpDataItem]
|
@@ -108,7 +108,7 @@ module Wx::HTML
|
|
108
108
|
|
109
109
|
# This class is used by {Wx::HTML::HtmlHelpController} to display help within a frame or dialog, but you can use it yourself to create an embedded HTML help window.
|
110
110
|
# For example:
|
111
|
-
#
|
111
|
+
# ```
|
112
112
|
# // m_embeddedHelpWindow is a wxHtmlHelpWindow
|
113
113
|
# // m_embeddedHtmlHelp is a wxHtmlHelpController
|
114
114
|
#
|
@@ -119,6 +119,7 @@ module Wx::HTML
|
|
119
119
|
# m_embeddedHelpWindow->Create(this, wxID_ANY, wxDefaultPosition, GetClientSize(),
|
120
120
|
# wxTAB_TRAVERSAL|wxBORDER_NONE, wxHF_DEFAULT_STYLE);
|
121
121
|
# m_embeddedHtmlHelp.AddBook(wxFileName(wxT("doc.zip")));
|
122
|
+
# ```
|
122
123
|
#
|
123
124
|
# You should pass the style {Wx::HTML::HF_EMBEDDED} to the style parameter of {Wx::HTML::HtmlHelpController} to allow the embedded window to be destroyed independently of the help controller.
|
124
125
|
# ===
|
@@ -56,6 +56,46 @@ module Wx::HTML
|
|
56
56
|
# @return [true,false]
|
57
57
|
def create(parent, id=Wx::StandardID::ID_ANY, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, name=Wx::HtmlListBoxNameStr) end
|
58
58
|
|
59
|
+
|
60
|
+
protected
|
61
|
+
|
62
|
+
# Called when the user clicks on hypertext link.
|
63
|
+
# Does nothing by default. Overloading this method is deprecated; intercept the event instead.
|
64
|
+
# @see Wx::HTML::HtmlLinkInfo.
|
65
|
+
# @param n [Integer] Index of the item containing the link.
|
66
|
+
# @param link [Wx::HtmlLinkInfo] Description of the link.
|
67
|
+
# @return [void]
|
68
|
+
def on_link_clicked(n, link) end
|
69
|
+
|
70
|
+
# This virtual function may be overridden to change the appearance of the background of the selected cells in the same way as {Wx::HTML::HtmlListBox#get_selected_text_colour}.
|
71
|
+
# It should be rarely, if ever, used because {Wx::VListBox#set_selection_background} allows changing the selection background for all cells at once and doing anything more fancy is probably going to look strangely.
|
72
|
+
# @see Wx::HTML::HtmlListBox#get_selected_text_colour
|
73
|
+
# @param colBg [Wx::Colour,String,Symbol]
|
74
|
+
# @return [Wx::Colour]
|
75
|
+
def get_selected_text_bg_colour(colBg) end
|
76
|
+
alias_method :selected_text_bg_colour, :get_selected_text_bg_colour
|
77
|
+
|
78
|
+
# This virtual function may be overridden to customize the appearance of the selected cells.
|
79
|
+
# It is used to determine how the colour colFg is going to look inside selection. By default all original colours are completely ignored and the standard, system-dependent, selection colour is used but the program may wish to override this to achieve some custom appearance.
|
80
|
+
# @see Wx::HTML::HtmlListBox#get_selected_text_bg_colour
|
81
|
+
# @see Wx::VListBox#set_selection_background
|
82
|
+
# @see Wx::SystemSettings.get_colour
|
83
|
+
# @param colFg [Wx::Colour,String,Symbol]
|
84
|
+
# @return [Wx::Colour]
|
85
|
+
def get_selected_text_colour(colFg) end
|
86
|
+
alias_method :selected_text_colour, :get_selected_text_colour
|
87
|
+
|
88
|
+
# This function may be overridden to decorate HTML returned by {Wx::HTML::HtmlListBox#on_get_item}.
|
89
|
+
# @param n [Integer]
|
90
|
+
# @return [String]
|
91
|
+
def on_get_item_markup(n) end
|
92
|
+
|
93
|
+
# This method must be implemented in the derived class and should return the body (i.e. without html nor body tags) of the HTML fragment for the given item.
|
94
|
+
# Note that this function should always return a text fragment for the n item which renders with the same height both when it is selected and when it's not: i.e. if you call, inside your {Wx::HTML::HtmlListBox#on_get_item} implementation, <code>IsSelected(n)</code> to make the items appear differently when they are selected, then you should make sure that the returned HTML fragment will render with the same height or else you'll see some artifacts when the user selects an item.
|
95
|
+
# @param n [Integer]
|
96
|
+
# @return [String]
|
97
|
+
def on_get_item(n) end
|
98
|
+
|
59
99
|
end # HtmlListBox
|
60
100
|
|
61
101
|
# {Wx::HTML::SimpleHtmlListBox} is an implementation of {Wx::HTML::HtmlListBox} which shows HTML content in the listbox rows.
|
@@ -117,17 +157,6 @@ module Wx::HTML
|
|
117
157
|
# @return [true,false]
|
118
158
|
def create(*args) end
|
119
159
|
|
120
|
-
# @overload initialize(parent, id, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, choices=nil, style=Wx::HTML::HLB_DEFAULT_STYLE, validator=Wx::DEFAULT_VALIDATOR, name=Wx::SimpleHtmlListBoxNameStr)
|
121
|
-
# Constructor, creating and showing the HTML list box.
|
122
|
-
# @param parent [Wx::Window] Parent window. Must not be NULL.
|
123
|
-
# @param id [Integer] Window identifier. A value of -1 indicates a default value.
|
124
|
-
# @param pos [Array(Integer, Integer), Wx::Point] Window position. If {Wx::DEFAULT_POSITION} is specified then a default position is chosen.
|
125
|
-
# @param size [Array(Integer, Integer), Wx::Size] Window size. If {Wx::DEFAULT_SIZE} is specified then the window is sized appropriately.
|
126
|
-
# @param choices [Array<String>] An array of strings with which to initialise the control.
|
127
|
-
# @param style [Integer] Window style. See {Wx::HLB_}* flags.
|
128
|
-
# @param validator [Wx::Validator] Window validator.
|
129
|
-
# @param name [String] Window name.
|
130
|
-
# @return [SimpleHtmlListBox]
|
131
160
|
# @overload initialize(parent, id, pos, size, choices, style=Wx::HTML::HLB_DEFAULT_STYLE, validator=Wx::DEFAULT_VALIDATOR, name=Wx::SimpleHtmlListBoxNameStr)
|
132
161
|
# Constructor, creating and showing the HTML list box.
|
133
162
|
# @param parent [Wx::Window] Parent window. Must not be NULL.
|
@@ -144,6 +173,104 @@ module Wx::HTML
|
|
144
173
|
# @return [SimpleHtmlListBox]
|
145
174
|
def initialize(*args) end
|
146
175
|
|
176
|
+
# @overload append(item)
|
177
|
+
# Appends item into the control.
|
178
|
+
# The return value is the index of the newly inserted item. Note that this may be different from the last one if the control is sorted (e.g. has {Wx::LB_SORT} or {Wx::CB_SORT} style).
|
179
|
+
# @param item [String] String to add.
|
180
|
+
# @return [Integer]
|
181
|
+
# @overload append(item, clientData)
|
182
|
+
# Appends item into the control.
|
183
|
+
# The return value is the index of the newly inserted item. Note that this may be different from the last one if the control is sorted (e.g. has {Wx::LB_SORT} or {Wx::CB_SORT} style).
|
184
|
+
# @param item [String] String to add.
|
185
|
+
# @param clientData [Object] Pointer to client data to associate with the new item.
|
186
|
+
# @return [Integer]
|
187
|
+
# @overload append(items)
|
188
|
+
# Appends several items at once into the control.
|
189
|
+
# Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
|
190
|
+
# @param items [Array<String>] Array of strings to insert.
|
191
|
+
# @return [Integer]
|
192
|
+
# @overload append(items, clientData)
|
193
|
+
# Appends several items at once into the control.
|
194
|
+
# Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
|
195
|
+
# @param items [Array<String>] Array of strings to insert.
|
196
|
+
# @param clientData [Array] Array of client data pointers of the same size as items to associate with the new items.
|
197
|
+
# @return [Integer]
|
198
|
+
def append(*args) end
|
199
|
+
|
200
|
+
# Returns a pointer to the client data associated with the given item (if any).
|
201
|
+
# It is an error to call this function for a control which doesn't have untyped client data at all although it is OK to call it even if the given item doesn't have any client data associated with it (but other items do).
|
202
|
+
#
|
203
|
+
# A pointer to the client data, or NULL if not present.
|
204
|
+
# @param n [Integer] The zero-based position of the item.
|
205
|
+
# @return [Object]
|
206
|
+
def get_client_data(n) end
|
207
|
+
alias_method :client_data, :get_client_data
|
208
|
+
|
209
|
+
# Associates the given untyped client data pointer with the given item.
|
210
|
+
# Note that it is an error to call this function if any typed client data pointers had been associated with the control items before.
|
211
|
+
# @param n [Integer] The zero-based item index.
|
212
|
+
# @param data [Object] The client data to associate with the item.
|
213
|
+
# @return [void]
|
214
|
+
def set_client_data(n, data) end
|
215
|
+
|
216
|
+
# @overload insert(item, pos)
|
217
|
+
# Inserts item into the control.
|
218
|
+
# The return value is the index of the newly inserted item. If the insertion failed for some reason, -1 is returned.
|
219
|
+
# @param item [String] String to add.
|
220
|
+
# @param pos [Integer] Position to insert item before, zero based.
|
221
|
+
# @return [Integer]
|
222
|
+
# @overload insert(item, pos, clientData)
|
223
|
+
# Inserts item into the control.
|
224
|
+
# The return value is the index of the newly inserted item. If the insertion failed for some reason, -1 is returned.
|
225
|
+
# @param item [String] String to add.
|
226
|
+
# @param pos [Integer] Position to insert item before, zero based.
|
227
|
+
# @param clientData [Object] Pointer to client data to associate with the new item.
|
228
|
+
# @return [Integer]
|
229
|
+
# @overload insert(items, pos)
|
230
|
+
# Inserts several items at once into the control.
|
231
|
+
# Notice that calling this method is usually much faster than inserting them one by one if you need to insert a lot of items.
|
232
|
+
#
|
233
|
+
# The return value is the index of the last inserted item. If the insertion failed for some reason, -1 is returned.
|
234
|
+
# @param items [Array<String>] Array of strings to insert.
|
235
|
+
# @param pos [Integer] Position to insert the items before, zero based.
|
236
|
+
# @return [Integer]
|
237
|
+
# @overload insert(items, pos, clientData)
|
238
|
+
# Inserts several items at once into the control.
|
239
|
+
# Notice that calling this method is usually much faster than inserting them one by one if you need to insert a lot of items.
|
240
|
+
#
|
241
|
+
# The return value is the index of the last inserted item. If the insertion failed for some reason, -1 is returned.
|
242
|
+
# @param items [Array<String>] Array of strings to insert.
|
243
|
+
# @param pos [Integer] Position to insert the items before, zero based.
|
244
|
+
# @param clientData [Array] Array of client data pointers of the same size as items to associate with the new items.
|
245
|
+
# @return [Integer]
|
246
|
+
def insert(*args) end
|
247
|
+
|
248
|
+
# @overload set(items)
|
249
|
+
# Replaces the current control contents with the given items.
|
250
|
+
# Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
|
251
|
+
# @param items [Array<String>] Array of strings to insert.
|
252
|
+
# @return [void]
|
253
|
+
# @overload set(items, clientData)
|
254
|
+
# Replaces the current control contents with the given items.
|
255
|
+
# Notice that calling this method is usually much faster than appending them one by one if you need to add a lot of items.
|
256
|
+
# @param items [Array<String>] Array of strings to insert.
|
257
|
+
# @param clientData [Array] Array of client data pointers of the same size as items to associate with the new items.
|
258
|
+
# @return [void]
|
259
|
+
def set(*args) end
|
260
|
+
|
261
|
+
# Deletes an item from the control.
|
262
|
+
# The client data associated with the item will be also deleted if it is owned by the control. Note that it is an error (signalled by an assert failure in debug builds) to remove an item with the index negative or greater or equal than the number of items in the control.
|
263
|
+
# If there is a currently selected item below the item being deleted, i.e. if {Wx::HTML::SimpleHtmlListBox#get_selection} returns a valid index greater than or equal to n, the selection is invalidated when this function is called. However if the selected item appears before the item being deleted, the selection is preserved unchanged.
|
264
|
+
# @see Wx::HTML::SimpleHtmlListBox#clear
|
265
|
+
# @param n [Integer] The zero-based item index.
|
266
|
+
# @return [void]
|
267
|
+
def delete(n) end
|
268
|
+
|
269
|
+
# Returns true, if either untyped data (<code>void*</code>) or object data ({Wx::ClientData}*) is associated with the items of the control.
|
270
|
+
# @return [true,false]
|
271
|
+
def has_client_data; end
|
272
|
+
alias_method :has_client_data?, :has_client_data
|
273
|
+
|
147
274
|
end # SimpleHtmlListBox
|
148
275
|
|
149
276
|
|
@@ -273,7 +273,9 @@ module Wx::HTML
|
|
273
273
|
alias_method :standard_fonts=, :set_standard_fonts
|
274
274
|
|
275
275
|
# Sets the source of a page and displays it, for example:
|
276
|
-
#
|
276
|
+
# ```
|
277
|
+
# htmlwin -> SetPage("<html><body>Hello, world!</body></html>");
|
278
|
+
# ```
|
277
279
|
#
|
278
280
|
# If you want to load a document from some location use {Wx::HTML::HtmlWindow#load_page} instead.
|
279
281
|
#
|
@@ -319,9 +321,11 @@ module Wx::HTML
|
|
319
321
|
# Adds an input filter to the static list of available filters.
|
320
322
|
# These filters are present by default:
|
321
323
|
#
|
324
|
+
# ```
|
322
325
|
# text/html
|
323
326
|
# text/plain
|
324
327
|
# image/*
|
328
|
+
# ```
|
325
329
|
#
|
326
330
|
# The plain text filter will be used if no other filter matches.
|
327
331
|
# @param filter [Wx::HtmlFilter]
|
@@ -358,11 +362,12 @@ module Wx::HTML
|
|
358
362
|
|
359
363
|
# Returns true if this filter is capable of reading file file.
|
360
364
|
# Example:
|
361
|
-
#
|
365
|
+
# ```
|
362
366
|
# bool MyFilter::CanRead(const wxFSFile& file)
|
363
367
|
# {
|
364
368
|
# return (file.GetMimeType() == "application/x-ugh");
|
365
369
|
# }
|
370
|
+
# ```
|
366
371
|
# @param file [Wx::FSFile]
|
367
372
|
# @return [true,false]
|
368
373
|
def can_read(file) end
|
@@ -370,12 +375,13 @@ module Wx::HTML
|
|
370
375
|
|
371
376
|
# Reads the file and returns string with HTML document.
|
372
377
|
# Example:
|
373
|
-
#
|
378
|
+
# ```
|
374
379
|
# wxString MyImgFilter::ReadFile(const wxFSFile& file)
|
375
380
|
# {
|
376
381
|
# return "<html><body><img src=\"" + file.GetLocation() +
|
377
382
|
# "\"></body></html>";
|
378
383
|
# }
|
384
|
+
# ```
|
379
385
|
# @param file [Wx::FSFile]
|
380
386
|
# @return [String]
|
381
387
|
def read_file(file) end
|
data/lib/wx/doc/gen/icon.rb
CHANGED
@@ -32,6 +32,8 @@ module Wx
|
|
32
32
|
# @see Wx::Cursor
|
33
33
|
#
|
34
34
|
#
|
35
|
+
#
|
36
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
35
37
|
class Icon < GDIObject
|
36
38
|
|
37
39
|
# @overload initialize()
|
@@ -149,6 +151,8 @@ module Wx
|
|
149
151
|
# Category: Graphics Device Interface (GDI)
|
150
152
|
# Predefined objects/pointers: {Wx::NULL_ICON_BUNDLE}
|
151
153
|
#
|
154
|
+
#
|
155
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
152
156
|
class IconBundle < GDIObject
|
153
157
|
|
154
158
|
# Return invalid icon if exact size is not found.
|
@@ -231,7 +235,9 @@ module Wx
|
|
231
235
|
# @return [Wx::Icon]
|
232
236
|
# @overload get_icon(size=Wx::DEFAULT_COORD, flags=Wx::IconBundle::FALLBACK_SYSTEM)
|
233
237
|
# Same as.
|
234
|
-
#
|
238
|
+
# ```
|
239
|
+
# GetIcon( wxSize( size, size ) )
|
240
|
+
# ```
|
235
241
|
# .
|
236
242
|
# @param size [Integer]
|
237
243
|
# @param flags [Integer]
|
@@ -16,6 +16,8 @@ module Wx
|
|
16
16
|
# @see Wx::FileType::GetIcon
|
17
17
|
#
|
18
18
|
#
|
19
|
+
#
|
20
|
+
# @note This class is <b>untracked</b> and should not be derived from nor instances extended!
|
19
21
|
class IconLocation < ::Object
|
20
22
|
|
21
23
|
# Returns true if the object is valid, i.e. was properly initialized, and false otherwise.
|