wxruby3 0.9.0 → 0.9.2
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/ext/wxruby3/include/wxRubyApp.h +338 -0
- data/ext/wxruby3/include/wxruby-Config.h +6 -6
- data/ext/wxruby3/include/wxruby-runtime.h +3 -0
- data/ext/wxruby3/swig/common.i +22 -0
- data/ext/wxruby3/swig/custom/director.swg +296 -0
- data/ext/wxruby3/swig/custom/rubyapi.swg +19 -0
- data/ext/wxruby3/swig/custom/rubyerrors.swg +45 -0
- data/ext/wxruby3/swig/custom/rubyhead.swg +192 -0
- data/ext/wxruby3/swig/custom/rubyrun.swg +187 -0
- data/ext/wxruby3/swig/custom/swigrun.swg +363 -0
- data/ext/wxruby3/swig/custom/typemaps/swigtypemaps.swg +173 -0
- data/ext/wxruby3/swig/wx.i +50 -30
- data/lib/wx/aui/aui_tab_ctrl.rb +18 -0
- data/lib/wx/aui/auinotebook.rb +6 -2
- data/lib/wx/aui/require.rb +1 -0
- data/lib/wx/core/app.rb +2 -2
- data/lib/wx/core/collapsible_pane.rb +1 -1
- data/lib/wx/core/const.rb +83 -0
- data/lib/wx/core/controlwithitems.rb +8 -6
- data/lib/wx/core/menu.rb +10 -0
- data/lib/wx/core/notebook.rb +6 -2
- data/lib/wx/core/sizer.rb +11 -0
- data/lib/wx/core/task_bar_button.rb +19 -0
- data/lib/wx/core/textctrl.rb +11 -1
- data/lib/wx/core/{treectrl.rb → tree_ctrl.rb} +31 -12
- data/lib/wx/core/window.rb +10 -0
- data/lib/wx/doc/app.rb +48 -38
- data/lib/wx/doc/art_locator.rb +47 -43
- data/lib/wx/doc/aui/auimanager.rb +16 -8
- data/lib/wx/doc/aui/auinotebook.rb +20 -5
- data/lib/wx/doc/clipboard.rb +11 -7
- data/lib/wx/doc/colour_dialog.rb +14 -10
- data/lib/wx/doc/const.rb +66 -66
- data/lib/wx/doc/controlwithitems.rb +17 -7
- data/lib/wx/doc/data_object.rb +2 -2
- data/lib/wx/doc/event.rb +0 -6
- data/lib/wx/doc/evthandler.rb +113 -108
- data/lib/wx/doc/font.rb +1 -0
- data/lib/wx/doc/functions.rb +9 -9
- data/lib/wx/doc/gc_dc.rb +6 -1
- data/lib/wx/doc/graphics_context.rb +1 -0
- data/lib/wx/doc/grid/grid.rb +22 -1
- data/lib/wx/doc/help_controller.rb +11 -7
- data/lib/wx/doc/html/html_help_controller.rb +12 -4
- data/lib/wx/doc/list_ctrl.rb +33 -29
- data/lib/wx/doc/menu.rb +20 -0
- data/lib/wx/doc/notebook.rb +21 -0
- data/lib/wx/doc/pg/events.rb +13 -9
- data/lib/wx/doc/pg/pg_property.rb +18 -0
- data/lib/wx/doc/progress_dialog.rb +36 -32
- data/lib/wx/doc/prt/page_setup_dialog.rb +20 -12
- data/lib/wx/doc/prt/print_data.rb +13 -5
- data/lib/wx/doc/prt/print_dialog.rb +31 -23
- data/lib/wx/doc/prt/printer.rb +20 -12
- data/lib/wx/doc/radio_box.rb +19 -15
- data/lib/wx/doc/rbn/ribbon_bar.rb +13 -5
- data/lib/wx/doc/rbn/ribbon_button_bar.rb +13 -5
- data/lib/wx/doc/rbn/ribbon_gallery.rb +13 -5
- data/lib/wx/doc/rbn/ribbon_tool_bar.rb +13 -5
- data/lib/wx/doc/region_iterator.rb +32 -28
- data/lib/wx/doc/rtc/rich_text_composite_object.rb +24 -0
- data/lib/wx/doc/rtc/rich_text_ctrl.rb +24 -0
- data/lib/wx/doc/rtc/rich_text_paragraph.rb +24 -0
- data/lib/wx/doc/rtc/richtext_buffer.rb +27 -19
- data/lib/wx/doc/rtc/richtext_printing.rb +17 -9
- data/lib/wx/doc/rtc/richtext_style_sheet.rb +17 -9
- data/lib/wx/doc/sizer.rb +20 -0
- data/lib/wx/doc/stc/styled_text_ctrl.rb +24 -0
- data/lib/wx/doc/stream.rb +39 -35
- data/lib/wx/doc/system_settings.rb +30 -26
- data/lib/wx/doc/text_validator.rb +12 -8
- data/lib/wx/doc/textctrl.rb +16 -0
- data/lib/wx/doc/tree_ctrl.rb +95 -0
- data/lib/wx/doc/treebook.rb +9 -5
- data/lib/wx/doc/v_list_box.rb +9 -5
- data/lib/wx/doc/variant.rb +164 -160
- data/lib/wx/doc/window.rb +57 -42
- data/lib/wx/doc/window_disabler.rb +10 -6
- data/lib/wx/grid/grid.rb +27 -4
- data/lib/wx/keyword_defs.rb +43 -6
- data/lib/wx/pg/pg_property.rb +22 -0
- data/lib/wx/rtc/require.rb +3 -0
- data/lib/wx/rtc/rich_text_composite_object.rb +25 -0
- data/lib/wx/rtc/rich_text_ctrl.rb +25 -0
- data/lib/wx/rtc/rich_text_paragraph.rb +25 -0
- data/lib/wx/stc/require.rb +1 -0
- data/lib/wx/stc/styled_text_ctrl.rb +25 -0
- data/lib/wx/version.rb +1 -1
- data/rakelib/lib/config/linux.rb +0 -3
- data/rakelib/lib/config/macosx.rb +1 -1
- data/rakelib/lib/config/mingw.rb +1 -1
- data/rakelib/lib/config/unixish.rb +1 -1
- data/rakelib/lib/config.rb +14 -4
- data/rakelib/lib/core/include/funcall.inc +33 -14
- data/rakelib/lib/core/include/swigdirector.inc +384 -0
- data/rakelib/lib/core/include/swigrubyerrors.inc +161 -0
- data/{ext/wxruby3/swig/custom/swig4/rubyrun.swg → rakelib/lib/core/include/swigrubyrun.inc} +245 -120
- data/rakelib/lib/core/include/swigrun.inc +700 -0
- data/rakelib/lib/core/package.rb +19 -9
- data/rakelib/lib/core/parameter.rb +3 -0
- data/rakelib/lib/core/spec.rb +6 -1
- data/rakelib/lib/director/accelerator.rb +3 -4
- data/rakelib/lib/director/accessible.rb +47 -0
- data/rakelib/lib/director/animation.rb +1 -1
- data/rakelib/lib/director/animation_ctrl.rb +20 -0
- data/rakelib/lib/director/app.rb +15 -304
- data/rakelib/lib/director/app_traits.rb +10 -12
- data/rakelib/lib/director/art_provider.rb +1 -1
- data/rakelib/lib/director/ctrl_with_items.rb +17 -5
- data/rakelib/lib/director/data_format.rb +1 -1
- data/rakelib/lib/director/data_object_simple_base.rb +1 -2
- data/rakelib/lib/director/derived_dc.rb +1 -1
- data/rakelib/lib/director/dialog.rb +6 -0
- data/rakelib/lib/director/dialup_event.rb +44 -0
- data/rakelib/lib/director/dialup_manager.rb +45 -0
- data/rakelib/lib/director/drag_image.rb +2 -3
- data/rakelib/lib/director/event.rb +22 -4
- data/rakelib/lib/director/file_ctrl.rb +35 -0
- data/rakelib/lib/director/file_ctrl_event.rb +26 -0
- data/rakelib/lib/director/frame.rb +1 -3
- data/rakelib/lib/director/gdicommon.rb +27 -11
- data/rakelib/lib/director/graphics_context.rb +2 -4
- data/rakelib/lib/director/grid_cell_editor.rb +6 -6
- data/rakelib/lib/director/grid_ctrl.rb +34 -3
- data/rakelib/lib/director/help_controller.rb +1 -1
- data/rakelib/lib/director/icon.rb +5 -2
- data/rakelib/lib/director/list_ctrl.rb +5 -6
- data/rakelib/lib/director/locale.rb +1 -3
- data/rakelib/lib/director/log.rb +1 -4
- data/rakelib/lib/director/media_ctrl.rb +54 -0
- data/rakelib/lib/director/menu.rb +16 -1
- data/rakelib/lib/director/menu_item.rb +2 -2
- data/rakelib/lib/director/pgarray_editor_dialog.rb +0 -6
- data/rakelib/lib/director/pgeditor.rb +2 -2
- data/rakelib/lib/director/pgproperties.rb +3 -3
- data/rakelib/lib/director/pgproperty.rb +24 -1
- data/rakelib/lib/director/property_grid_interface.rb +5 -10
- data/rakelib/lib/director/richtext_buffer.rb +1 -1
- data/rakelib/lib/director/richtext_composite_object.rb +25 -0
- data/rakelib/lib/director/richtext_ctrl.rb +15 -5
- data/rakelib/lib/director/richtext_formatting_dialog.rb +7 -5
- data/rakelib/lib/director/richtext_paragraph_layout_box.rb +9 -7
- data/rakelib/lib/director/sash_event.rb +42 -0
- data/rakelib/lib/director/sizer.rb +79 -1
- data/rakelib/lib/director/sizer_item.rb +22 -0
- data/rakelib/lib/director/static_box.rb +4 -5
- data/rakelib/lib/director/styled_text_ctrl.rb +12 -0
- data/rakelib/lib/director/task_bar_button.rb +30 -0
- data/rakelib/lib/director/task_bar_icon.rb +6 -14
- data/rakelib/lib/director/textctrl.rb +12 -1
- data/rakelib/lib/director/tool_tip.rb +1 -1
- data/rakelib/lib/director/top_level_window.rb +4 -5
- data/rakelib/lib/director/tree_ctrl.rb +24 -50
- data/rakelib/lib/director/variant.rb +1 -1
- data/rakelib/lib/director/window.rb +24 -5
- data/rakelib/lib/director.rb +4 -4
- data/rakelib/lib/extractor/function.rb +6 -6
- data/rakelib/lib/extractor.rb +34 -5
- data/rakelib/lib/generate/analyzer.rb +8 -3
- data/rakelib/lib/generate/doc/animation_ctrl.yaml +15 -0
- data/rakelib/lib/generate/doc/busy_info.yaml +0 -2
- data/rakelib/lib/generate/doc/clipboard.yaml +0 -2
- data/rakelib/lib/generate/doc/cursor.yaml +0 -2
- data/rakelib/lib/generate/doc/events.yaml +10 -4
- data/rakelib/lib/generate/doc/panel.yaml +7 -0
- data/rakelib/lib/generate/doc/static_box.yaml +8 -0
- data/rakelib/lib/generate/doc/xml_resource.yaml +3 -0
- data/rakelib/lib/generate/doc.rb +89 -16
- data/rakelib/lib/generate/interface.rb +4 -3
- data/rakelib/lib/specs/interfaces.rb +161 -156
- data/rakelib/lib/swig_runner.rb +4 -50
- data/rakelib/lib/typemap/common.rb +54 -10
- data/rakelib/lib/typemap/data_format.rb +1 -1
- data/rakelib/lib/typemap/data_object_data.rb +2 -2
- data/rakelib/lib/typemap/pgprop_arg.rb +7 -2
- data/rakelib/lib/typemap/points_list.rb +5 -7
- data/rakelib/lib/util/string.rb +10 -8
- data/rakelib/yard/templates/default/fulldoc/html/css/wxruby3.css +74 -2
- data/rakelib/yard/templates/default/fulldoc/html/full_list.erb +38 -0
- data/rakelib/yard/templates/default/fulldoc/html/setup.rb +39 -0
- data/rakelib/yard/templates/default/tags/html/wxrb_require.erb +10 -0
- data/rakelib/yard/templates/default/tags/setup.rb +16 -0
- data/rakelib/yard/yard-custom-templates.rb +3 -0
- data/samples/text/richtext.rb +0 -30
- data/samples/treectrl/treectrl.rb +1 -1
- data/tests/media/beep_lo.wav +0 -0
- data/tests/test_app_exit_exception.rb +36 -0
- data/tests/test_app_init_exception.rb +20 -0
- data/tests/test_book_controls.rb +29 -0
- data/tests/test_exceptions.rb +41 -0
- data/tests/test_list_ctrl.rb +1 -1
- data/tests/test_media_ctrl.rb +38 -0
- data/tests/test_menu.rb +69 -0
- data/tests/test_pg.rb +27 -0
- data/tests/test_richtext.rb +45 -0
- data/tests/test_sizer.rb +59 -0
- data/tests/test_std_controls.rb +78 -1
- data/tests/test_styled_text_ctrl.rb +46 -0
- data/tests/test_tree_ctrl.rb +138 -0
- data/tests/test_window.rb +12 -0
- data/tests/testapp_noframe.rb +1 -1
- metadata +54 -5
- data/ext/wxruby3/swig/custom/swig3/rubyrun.swg +0 -456
@@ -0,0 +1,161 @@
|
|
1
|
+
// Copyright (c) 2023 M.J.N. Corino, The Netherlands
|
2
|
+
//
|
3
|
+
// This software is released under the MIT license.
|
4
|
+
|
5
|
+
// SWIG Ruby error handling
|
6
|
+
|
7
|
+
/* Define some additional error types */
|
8
|
+
#define SWIG_ObjectPreviouslyDeletedError -100
|
9
|
+
|
10
|
+
|
11
|
+
/* Define custom exceptions for errors that do not map to existing Ruby
|
12
|
+
exceptions. Note this only works for C++ since a global cannot be
|
13
|
+
initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
|
14
|
+
|
15
|
+
WXRB_EXPORT_FLAG VALUE
|
16
|
+
getNullReferenceError(void)
|
17
|
+
{
|
18
|
+
static int init = 0;
|
19
|
+
static VALUE rb_eNullReferenceError ;
|
20
|
+
if (!init)
|
21
|
+
{
|
22
|
+
init = 1;
|
23
|
+
rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
|
24
|
+
}
|
25
|
+
return rb_eNullReferenceError;
|
26
|
+
}
|
27
|
+
|
28
|
+
WXRB_EXPORT_FLAG VALUE
|
29
|
+
getObjectPreviouslyDeletedError(void)
|
30
|
+
{
|
31
|
+
static int init = 0;
|
32
|
+
static VALUE rb_eObjectPreviouslyDeleted ;
|
33
|
+
if (!init)
|
34
|
+
{
|
35
|
+
init = 1;
|
36
|
+
rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
|
37
|
+
}
|
38
|
+
return rb_eObjectPreviouslyDeleted;
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
WXRB_EXPORT_FLAG VALUE
|
43
|
+
SWIG_Ruby_ErrorType(int SWIG_code)
|
44
|
+
{
|
45
|
+
VALUE type;
|
46
|
+
switch (SWIG_code)
|
47
|
+
{
|
48
|
+
case SWIG_MemoryError:
|
49
|
+
type = rb_eNoMemError;
|
50
|
+
break;
|
51
|
+
case SWIG_IOError:
|
52
|
+
type = rb_eIOError;
|
53
|
+
break;
|
54
|
+
case SWIG_RuntimeError:
|
55
|
+
type = rb_eRuntimeError;
|
56
|
+
break;
|
57
|
+
case SWIG_IndexError:
|
58
|
+
type = rb_eIndexError;
|
59
|
+
break;
|
60
|
+
case SWIG_TypeError:
|
61
|
+
type = rb_eTypeError;
|
62
|
+
break;
|
63
|
+
case SWIG_DivisionByZero:
|
64
|
+
type = rb_eZeroDivError;
|
65
|
+
break;
|
66
|
+
case SWIG_OverflowError:
|
67
|
+
type = rb_eRangeError;
|
68
|
+
break;
|
69
|
+
case SWIG_SyntaxError:
|
70
|
+
type = rb_eSyntaxError;
|
71
|
+
break;
|
72
|
+
case SWIG_ValueError:
|
73
|
+
type = rb_eArgError;
|
74
|
+
break;
|
75
|
+
case SWIG_SystemError:
|
76
|
+
type = rb_eFatal;
|
77
|
+
break;
|
78
|
+
case SWIG_AttributeError:
|
79
|
+
type = rb_eRuntimeError;
|
80
|
+
break;
|
81
|
+
case SWIG_NullReferenceError:
|
82
|
+
type = getNullReferenceError();
|
83
|
+
break;
|
84
|
+
case SWIG_ObjectPreviouslyDeletedError:
|
85
|
+
type = getObjectPreviouslyDeletedError();
|
86
|
+
break;
|
87
|
+
case SWIG_UnknownError:
|
88
|
+
type = rb_eRuntimeError;
|
89
|
+
break;
|
90
|
+
default:
|
91
|
+
type = rb_eRuntimeError;
|
92
|
+
}
|
93
|
+
return type;
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
/* This function is called when a user inputs a wrong argument to
|
98
|
+
a method.
|
99
|
+
*/
|
100
|
+
WXRB_EXPORT_FLAG
|
101
|
+
const char* Ruby_Format_TypeError( const char* msg,
|
102
|
+
const char* type,
|
103
|
+
const char* name,
|
104
|
+
const int argn,
|
105
|
+
VALUE input )
|
106
|
+
{
|
107
|
+
char buf[128];
|
108
|
+
VALUE str;
|
109
|
+
VALUE asStr;
|
110
|
+
if ( msg && *msg )
|
111
|
+
{
|
112
|
+
str = rb_str_new2(msg);
|
113
|
+
}
|
114
|
+
else
|
115
|
+
{
|
116
|
+
str = rb_str_new(NULL, 0);
|
117
|
+
}
|
118
|
+
|
119
|
+
str = rb_str_cat2( str, "Expected argument " );
|
120
|
+
sprintf( buf, "%d of type ", argn-1 );
|
121
|
+
str = rb_str_cat2( str, buf );
|
122
|
+
str = rb_str_cat2( str, type );
|
123
|
+
str = rb_str_cat2( str, ", but got " );
|
124
|
+
str = rb_str_cat2( str, rb_obj_classname(input) );
|
125
|
+
str = rb_str_cat2( str, " " );
|
126
|
+
asStr = rb_inspect(input);
|
127
|
+
if ( RSTRING_LEN(asStr) > 30 )
|
128
|
+
{
|
129
|
+
str = rb_str_cat( str, StringValuePtr(asStr), 30 );
|
130
|
+
str = rb_str_cat2( str, "..." );
|
131
|
+
}
|
132
|
+
else
|
133
|
+
{
|
134
|
+
str = rb_str_append( str, asStr );
|
135
|
+
}
|
136
|
+
|
137
|
+
if ( name )
|
138
|
+
{
|
139
|
+
str = rb_str_cat2( str, "\n\tin SWIG method '" );
|
140
|
+
str = rb_str_cat2( str, name );
|
141
|
+
str = rb_str_cat2( str, "'" );
|
142
|
+
}
|
143
|
+
|
144
|
+
return StringValuePtr( str );
|
145
|
+
}
|
146
|
+
|
147
|
+
/* This function is called when an overloaded method fails */
|
148
|
+
WXRB_EXPORT_FLAG
|
149
|
+
void Ruby_Format_OverloadedError(
|
150
|
+
const int argc,
|
151
|
+
const int maxargs,
|
152
|
+
const char* method,
|
153
|
+
const char* prototypes
|
154
|
+
)
|
155
|
+
{
|
156
|
+
const char* msg = "Wrong # of arguments";
|
157
|
+
if ( argc <= maxargs ) msg = "Wrong arguments";
|
158
|
+
rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
|
159
|
+
"Possible C/C++ prototypes are:\n%s",
|
160
|
+
msg, method, prototypes);
|
161
|
+
}
|