wxruby 1.9.1-i686-linux → 1.9.2-i686-linux
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +53 -0
- data/README +299 -0
- data/lib/wx/classes/app.rb +15 -1
- data/lib/wx/classes/bitmap.rb +2 -2
- data/lib/wx/classes/checklistbox.rb +30 -0
- data/lib/wx/classes/clientdc.rb +1 -1
- data/lib/wx/classes/commandevent.rb +7 -0
- data/lib/wx/classes/controlwithitems.rb +10 -0
- data/lib/wx/classes/evthandler.rb +63 -7
- data/lib/wx/classes/listctrl.rb +9 -0
- data/lib/wx/classes/menu.rb +62 -0
- data/lib/wx/classes/menuitem.rb +7 -0
- data/lib/wx/classes/paintdc.rb +1 -1
- data/lib/wx/classes/timer.rb +2 -2
- data/lib/wx/classes/treectrl.rb +18 -0
- data/lib/wx/classes/window.rb +11 -4
- data/lib/wx/keyword_ctors.rb +1 -15
- data/lib/wx/keyword_defs.rb +68 -58
- data/lib/wx/version.rb +1 -1
- data/lib/wxruby2.so +0 -0
- data/samples/bigdemo/wxScrolledWindow.rbw +8 -3
- data/samples/calendar/calendar.rb +1 -1
- data/samples/caret/caret.rb +29 -39
- data/samples/etc/threaded.rb +81 -0
- data/samples/etc/wizard.rb +22 -24
- data/samples/html/html.rb +25 -12
- data/samples/listbook/listbook.rb +65 -67
- data/samples/minimal/minimal.rb +38 -36
- data/samples/minimal/mondrian.ico +0 -0
- data/samples/minimal/nothing.rb +5 -30
- data/samples/treectrl/treectrl.rb +197 -226
- metadata +26 -16
- data/samples/minimal/text.rb +0 -35
@@ -42,6 +42,7 @@ class Wx::EvtHandler
|
|
42
42
|
|
43
43
|
# Given the Integer constant Wx::EVT_XXX, returns the convenience
|
44
44
|
# handler method name associated with that type of event.
|
45
|
+
|
45
46
|
def self.event_name_for_type(name)
|
46
47
|
EVENT_NAME_TYPE_MAP.index(name)
|
47
48
|
end
|
@@ -63,33 +64,85 @@ class Wx::EvtHandler
|
|
63
64
|
end
|
64
65
|
|
65
66
|
# Registers the event type +ev_type+, which should be an instance of
|
66
|
-
# the Struct class +Wx::EvtHandler::EventType+.
|
67
|
+
# the Struct class +Wx::EvtHandler::EventType+. This sets up the
|
68
|
+
# mapping of events of that type (identified by integer id) to the
|
69
|
+
# appropriate ruby event class, and defines a convenience evt_xxx
|
70
|
+
# instance method in the class EvtHandler.
|
67
71
|
def self.register_event_type(ev_type)
|
72
|
+
# set up the event type mapping
|
68
73
|
EVENT_TYPE_CLASS_MAP[ev_type.const] = ev_type.evt_class
|
69
74
|
EVENT_NAME_TYPE_MAP[ev_type.name.intern] = ev_type.const
|
70
75
|
|
71
76
|
unless ev_type.arity and ev_type.name
|
72
77
|
return
|
73
78
|
end
|
79
|
+
|
80
|
+
# set up the evt_xxx method
|
74
81
|
case ev_type.arity
|
75
82
|
when 0 # events without an id
|
76
83
|
class_eval %Q|
|
77
|
-
def #{ev_type.name}(&block)
|
78
|
-
|
84
|
+
def #{ev_type.name}(meth = nil, &block)
|
85
|
+
handler = acquire_handler(meth, block)
|
86
|
+
connect(Wx::ID_ANY, Wx::ID_ANY, #{ev_type.const}, &handler)
|
79
87
|
end |
|
80
88
|
when 1 # events with an id
|
81
89
|
class_eval %Q|
|
82
|
-
def #{ev_type.name}(id, &block)
|
83
|
-
|
90
|
+
def #{ev_type.name}(id, meth = nil, &block)
|
91
|
+
handler = acquire_handler(meth, block)
|
92
|
+
id = acquire_id(id)
|
93
|
+
connect(id, Wx::ID_ANY, #{ev_type.const}, &handler)
|
84
94
|
end |
|
85
95
|
when 2 # events with id range
|
86
96
|
class_eval %Q|
|
87
|
-
def #{ev_type.name}(first_id, last_id, &block)
|
88
|
-
|
97
|
+
def #{ev_type.name}(first_id, last_id, meth = nil, &block)
|
98
|
+
handler = acquire_handler(meth, block)
|
99
|
+
first_id = acquire_id(first_id)
|
100
|
+
last_id = acquire_id(last_id)
|
101
|
+
connect( first_id, last_id, #{ev_type.const}, &handler)
|
89
102
|
end |
|
90
103
|
end
|
91
104
|
end
|
92
105
|
|
106
|
+
# Not for external use; determines whether to use a block or call a
|
107
|
+
# method in self to handle an event, passed to connect. Makes evt_xxx
|
108
|
+
# liberal about what it accepts - aside from a block, it can be a
|
109
|
+
# method name (as Symbol or String), a (bound) method object, or a
|
110
|
+
# Proc object
|
111
|
+
def acquire_handler(meth, block)
|
112
|
+
if block and not meth
|
113
|
+
return block
|
114
|
+
elsif meth and not block
|
115
|
+
h_meth = case meth
|
116
|
+
when Symbol, String : self.method(meth)
|
117
|
+
when Proc : meth
|
118
|
+
when Method : meth.to_proc
|
119
|
+
end
|
120
|
+
if h_meth.arity == 1
|
121
|
+
return lambda { | evt | h_meth.call(evt) }
|
122
|
+
else
|
123
|
+
return lambda { h_meth.call }
|
124
|
+
end
|
125
|
+
else
|
126
|
+
Kernel.raise ArgumentError,
|
127
|
+
"Specify event handler with a method, name, proc OR block"
|
128
|
+
caller
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# Not for external use; acquires an id either from an explicit Fixnum
|
133
|
+
# parameter or by calling the wx_id method of a passed Window.
|
134
|
+
def acquire_id(window_or_id)
|
135
|
+
case window_or_id
|
136
|
+
when Fixnum : window_or_id
|
137
|
+
when Wx::Window, Wx::MenuItem : window_or_id.wx_id
|
138
|
+
else Kernel.raise ArgumentError,
|
139
|
+
"Must specify Wx::Window event source or its Wx id, " +
|
140
|
+
"not '#{window_or_id.inspect}'",
|
141
|
+
caller
|
142
|
+
end
|
143
|
+
end
|
144
|
+
private :acquire_id, :acquire_handler
|
145
|
+
|
93
146
|
# Definitions for all event types that are part by core wxRuby. Events
|
94
147
|
# that are mapped to class Wx::Event are TODO as they are not
|
95
148
|
# currently wrapped by the correct class. All StyledTextCtrl
|
@@ -195,6 +248,9 @@ class Wx::EvtHandler
|
|
195
248
|
EventType['evt_close', 0,
|
196
249
|
Wx::EVT_CLOSE_WINDOW,
|
197
250
|
Wx::CloseEvent],
|
251
|
+
EventType['evt_collapsiblepane_changed', 1,
|
252
|
+
Wx::EVT_COMMAND_COLLPANE_CHANGED,
|
253
|
+
Wx::CollapsiblePaneEvent],
|
198
254
|
EventType['evt_combobox', 1,
|
199
255
|
Wx::EVT_COMMAND_COMBOBOX_SELECTED,
|
200
256
|
Wx::CommandEvent],
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Multi-item control with numerous possible view styles
|
2
|
+
class Wx::ListCtrl
|
3
|
+
# Make these ruby enumerables so find, find_all, map are available
|
4
|
+
include Enumerable
|
5
|
+
# Passes each valid item index into the passed block
|
6
|
+
def each
|
7
|
+
0.upto(item_count - 1) { | i | yield i }
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# A single labelled list within a drop-down menu, or a popup menu
|
2
|
+
class Wx::Menu
|
3
|
+
|
4
|
+
# In the standard WxWidgets API, the methods append, prepend, insert
|
5
|
+
# (and their variants) require a constant integer id as the identifier
|
6
|
+
# of the menu item. This is then used in event handling.
|
7
|
+
#
|
8
|
+
# In WxRuby the use of explicit ids can be avoided in most cases,
|
9
|
+
# being a most unruby-ish practice. So, by analogy with the general
|
10
|
+
# use of Wx::Window classes and event handlers, where the id is
|
11
|
+
# implicit in the constructor, and the window can be passed direct to
|
12
|
+
# the event handler setup method, the below sets up a similar facility
|
13
|
+
# for adding items to Wx::Menu.
|
14
|
+
#
|
15
|
+
# For all these methods, the only required argument is the string name
|
16
|
+
# of the menu item; a system-default id will be supplied if no
|
17
|
+
# explicit one is given. The return value of these methods in all
|
18
|
+
# cases is a Wx::MenuItem object, which can be passed directly as the
|
19
|
+
# first argument to an evt_menu handler.
|
20
|
+
def self.methods_with_optional_ids(*meth_names)
|
21
|
+
class_eval do
|
22
|
+
meth_names.each do | meth |
|
23
|
+
old_meth = instance_method(meth)
|
24
|
+
define_method(meth) do | *args |
|
25
|
+
case args.first
|
26
|
+
when Fixnum : old_meth.bind(self).call(*args)
|
27
|
+
when String : old_meth.bind(self).call(Wx::ID_ANY, *args)
|
28
|
+
when Wx::MenuItem : old_meth.bind(self).call(args.first)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Create the optional-id methods
|
36
|
+
methods_with_optional_ids :append, :prepend,
|
37
|
+
:append_check_item, :prepend_check_item,
|
38
|
+
:append_radio_item, :prepend_radio_item
|
39
|
+
|
40
|
+
# This is much the same as above, except for insert and variants,
|
41
|
+
# which take an additional first argument, the position at which to
|
42
|
+
# insert the new item.
|
43
|
+
def self.methods_with_optional_ids_and_pos(*meth_names)
|
44
|
+
class_eval do
|
45
|
+
meth_names.each do | meth |
|
46
|
+
old_meth = instance_method(meth)
|
47
|
+
define_method(meth) do | pos, *args |
|
48
|
+
case args.first
|
49
|
+
when Fixnum : old_meth.bind(self).call(pos, *args)
|
50
|
+
when String : old_meth.bind(self).call(pos, Wx::ID_ANY, *args)
|
51
|
+
when Wx::MenuItem : old_meth.bind(self).call(pos, args.first)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Create the optional-id methods
|
59
|
+
methods_with_optional_ids_and_pos :insert,
|
60
|
+
:insert_check_item,
|
61
|
+
:insert_radio_item
|
62
|
+
end
|
data/lib/wx/classes/paintdc.rb
CHANGED
@@ -4,7 +4,7 @@ class Wx::PaintDC
|
|
4
4
|
# always be used via Window#paint, which takes a block receiving the
|
5
5
|
# DC. This ensures that the DC is cleaned up at the correct time,
|
6
6
|
# preventing serious errors on some platforms.
|
7
|
-
|
7
|
+
define_method(:initialize) do | *args |
|
8
8
|
Kernel.raise RuntimeError,
|
9
9
|
"Do not instantiate PaintDC directly; use Window#paint",
|
10
10
|
caller[1..-1]
|
data/lib/wx/classes/timer.rb
CHANGED
@@ -34,7 +34,7 @@ class Wx::Timer
|
|
34
34
|
@@__unowned_timers__ ||= []
|
35
35
|
|
36
36
|
# remove from list of previous owner
|
37
|
-
if @__owner__
|
37
|
+
if defined?(@__owner__) and @__owner__
|
38
38
|
@__owner__.instance_eval { @__owned_timers__.delete(this_timer) }
|
39
39
|
end
|
40
40
|
|
@@ -51,7 +51,7 @@ class Wx::Timer
|
|
51
51
|
|
52
52
|
# Then add to list of new owner, setting destructor hook if required
|
53
53
|
new_owner.instance_eval do
|
54
|
-
if not @__owned_timers__
|
54
|
+
if not defined?(@__owned_timers__)
|
55
55
|
@__owned_timers__ = []
|
56
56
|
unless self.kind_of?(Wx::App) # Don't set up hook on App
|
57
57
|
evt_window_destroy do | evt |
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Hierarchical control with items
|
2
|
+
class Wx::TreeCtrl
|
3
|
+
# Make these ruby enumerables so find, find_all, map etc are available
|
4
|
+
include Enumerable
|
5
|
+
# Iterate over all items
|
6
|
+
alias :each :traverse
|
7
|
+
|
8
|
+
# Return the children of +parent+ as an array of TreeItemIDs.
|
9
|
+
def get_children(parent)
|
10
|
+
kids = [ get_first_child(parent) ]
|
11
|
+
return [] if kids[0].zero?
|
12
|
+
|
13
|
+
while kid = get_next_sibling(kids.last) and not kid.zero?
|
14
|
+
kids << kid
|
15
|
+
end
|
16
|
+
kids
|
17
|
+
end
|
18
|
+
end
|
data/lib/wx/classes/window.rb
CHANGED
@@ -1,11 +1,17 @@
|
|
1
1
|
# Copyright 2004-2007 by Kevin Smith
|
2
2
|
# released under the MIT-style wxruby2 license
|
3
3
|
|
4
|
+
# The base class for all things displayed on screen
|
4
5
|
class Wx::Window
|
5
|
-
|
6
|
-
#
|
6
|
+
|
7
|
+
# Ruby's Object#id is deprecated and will be removed in 1.9; therefore
|
8
|
+
# for classes inheriting from Wx::Window, the id method returns the
|
9
|
+
# wxRuby Window id
|
10
|
+
alias :id :get_id
|
11
|
+
# In case a more explicit option is preferred.
|
7
12
|
alias :wx_id :get_id
|
8
13
|
|
14
|
+
|
9
15
|
# Recursively searches all windows below +self+ and returns the first
|
10
16
|
# window which has the id +an_id+. This corresponds to the find_window
|
11
17
|
# method method in WxWidgets when called with an integer.
|
@@ -31,10 +37,11 @@ class Wx::Window
|
|
31
37
|
# paint event is being handled just before running the event
|
32
38
|
# handler. This ensures that any call to Window#paint within the
|
33
39
|
# handler will supply a Wx::PaintDC (see swig/Window.i).
|
34
|
-
def evt_paint(&block)
|
40
|
+
def evt_paint(meth = nil, &block)
|
41
|
+
paint_proc = acquire_handler(meth, block)
|
35
42
|
wrapped_block = proc do | event |
|
36
43
|
instance_variable_set("@__painting__", true)
|
37
|
-
|
44
|
+
paint_proc.call(event)
|
38
45
|
remove_instance_variable("@__painting__")
|
39
46
|
end
|
40
47
|
__old_evt_paint(&wrapped_block)
|
data/lib/wx/keyword_ctors.rb
CHANGED
@@ -101,6 +101,7 @@ module Wx
|
|
101
101
|
:size => Wx::DEFAULT_SIZE,
|
102
102
|
:pos => Wx::DEFAULT_POSITION,
|
103
103
|
:style => 0,
|
104
|
+
:title => '',
|
104
105
|
:validator => Wx::DEFAULT_VALIDATOR,
|
105
106
|
:choices => [] # for Choice, ComboBox etc
|
106
107
|
}
|
@@ -113,12 +114,6 @@ module Wx
|
|
113
114
|
def param_spec
|
114
115
|
@param_spec ||= []
|
115
116
|
end
|
116
|
-
|
117
|
-
attr_writer :param_flags
|
118
|
-
def param_flags
|
119
|
-
@param_flags ||= {}
|
120
|
-
end
|
121
|
-
|
122
117
|
|
123
118
|
# Adds a list of named parameters *params* to the parameter
|
124
119
|
# specification for this Wx class's constructor. Each parameter
|
@@ -183,13 +178,6 @@ module Wx
|
|
183
178
|
return
|
184
179
|
end
|
185
180
|
|
186
|
-
# Allow classes to ignore :id argument in positional args
|
187
|
-
unless self.class < Wx::Dialog
|
188
|
-
if not mixed_args[0].kind_of?(Fixnum)
|
189
|
-
mixed_args.unshift(-1)
|
190
|
-
end
|
191
|
-
end
|
192
|
-
|
193
181
|
real_args = [ parent ] + self.class.args_as_list(*mixed_args)
|
194
182
|
begin
|
195
183
|
pre_wx_kwctor_init(*real_args)
|
@@ -210,8 +198,6 @@ module Wx
|
|
210
198
|
def klass.inherited(sub_klass)
|
211
199
|
sub_klass.instance_variable_set(:@param_spec,
|
212
200
|
instance_variable_get(:@param_spec) )
|
213
|
-
sub_klass.instance_variable_set(:@param_flags,
|
214
|
-
instance_variable_get(:@param_flags) )
|
215
201
|
end
|
216
202
|
end
|
217
203
|
end
|
data/lib/wx/keyword_defs.rb
CHANGED
@@ -4,7 +4,18 @@
|
|
4
4
|
# widgets, windows and frames. It's for use with *Keyword Constructors*
|
5
5
|
# and is no use on its own - except if you are looking for a bug or want
|
6
6
|
# to add a missing class.
|
7
|
-
|
7
|
+
#
|
8
|
+
# For each class, the parameters *must* be declared in the order that
|
9
|
+
# they are supplied to wxRuby. A parameter is specified by a symbol
|
10
|
+
# name, and, optionally, a default argument which will of whatever type
|
11
|
+
# the wxRuby core library accepts. Because hashes are unordered in Ruby
|
12
|
+
# 1.8, if a default argument is specified, this must be the last in a
|
13
|
+
# list of parameters.
|
14
|
+
#
|
15
|
+
# Some common parameters to constructors such as size, position, title,
|
16
|
+
# id and so forth always have a standard default argumnet, which is
|
17
|
+
# defined in keyword_ctors. In these cases, it is not necessary to
|
18
|
+
# supply the default argument in the definition.
|
8
19
|
module Wx
|
9
20
|
@defined_kw_classes = {}
|
10
21
|
|
@@ -27,18 +38,13 @@ module Wx
|
|
27
38
|
return nil
|
28
39
|
end
|
29
40
|
klass.module_eval { include Wx::KeywordConstructor }
|
30
|
-
# automatically add :id as the first argument, unless this is a
|
31
|
-
# Dialog subclass - which don't require this argument
|
32
|
-
unless klass < Wx::Dialog
|
33
|
-
klass.wx_ctor_params :id
|
34
|
-
end
|
35
41
|
klass.instance_eval(&block)
|
36
42
|
end
|
37
43
|
end
|
38
44
|
|
39
45
|
# Window : base class for all widgets and frames
|
40
46
|
Wx::define_keyword_ctors('Window') do
|
41
|
-
wx_ctor_params :pos, :size, :style
|
47
|
+
wx_ctor_params :id, :pos, :size, :style
|
42
48
|
wx_ctor_params :name => 'window'
|
43
49
|
end
|
44
50
|
|
@@ -49,30 +55,26 @@ end
|
|
49
55
|
|
50
56
|
# Normal frame
|
51
57
|
Wx::define_keyword_ctors('Frame') do
|
52
|
-
wx_ctor_params :title =>
|
53
|
-
wx_ctor_params :pos, :size, :style => Wx::DEFAULT_FRAME_STYLE
|
58
|
+
wx_ctor_params :id, :title, :pos, :size, :style => Wx::DEFAULT_FRAME_STYLE
|
54
59
|
wx_ctor_params :name => 'frame'
|
55
60
|
end
|
56
61
|
|
57
62
|
# MDI child frame
|
58
63
|
Wx::define_keyword_ctors('MDIChildFrame') do
|
59
|
-
wx_ctor_params :title =>
|
60
|
-
wx_ctor_params :pos, :size, :style => Wx::DEFAULT_FRAME_STYLE
|
64
|
+
wx_ctor_params :id, :title, :pos, :size, :style => Wx::DEFAULT_FRAME_STYLE
|
61
65
|
wx_ctor_params :name => 'frame'
|
62
66
|
end
|
63
67
|
|
64
68
|
# MDI parent frame
|
65
69
|
Wx::define_keyword_ctors('MDIParentFrame') do
|
66
|
-
wx_ctor_params :title
|
67
|
-
wx_ctor_params :pos, :size
|
70
|
+
wx_ctor_params :id, :title, :pos, :size
|
68
71
|
wx_ctor_params :style => Wx::DEFAULT_FRAME_STYLE|Wx::VSCROLL|Wx::HSCROLL
|
69
72
|
wx_ctor_params :name => 'frame'
|
70
73
|
end
|
71
74
|
|
72
75
|
# wxMiniFrame A frame with a small title bar
|
73
76
|
Wx::define_keyword_ctors('MiniFrame') do
|
74
|
-
wx_ctor_params :title
|
75
|
-
wx_ctor_params :pos, :size
|
77
|
+
wx_ctor_params :id, :title, :pos, :size
|
76
78
|
wx_ctor_params :style => Wx::DEFAULT_FRAME_STYLE
|
77
79
|
wx_ctor_params :name => 'frame'
|
78
80
|
end
|
@@ -95,9 +97,8 @@ end
|
|
95
97
|
|
96
98
|
# wxWizard A wizard dialog
|
97
99
|
Wx::define_keyword_ctors('Wizard') do
|
98
|
-
wx_ctor_params :title =>
|
99
|
-
wx_ctor_params :
|
100
|
-
wx_ctor_params :pos, :size
|
100
|
+
wx_ctor_params :id, :title, :bitmap => Wx::NULL_BITMAP
|
101
|
+
wx_ctor_params :pos # NB - no size argument for this class
|
101
102
|
wx_ctor_params :style => Wx::DEFAULT_DIALOG_STYLE
|
102
103
|
end
|
103
104
|
|
@@ -106,58 +107,58 @@ end
|
|
106
107
|
|
107
108
|
# A window whose colour changes according to current user settings
|
108
109
|
Wx::define_keyword_ctors('Panel') do
|
109
|
-
wx_ctor_params :pos, :size, :style => Wx::TAB_TRAVERSAL
|
110
|
+
wx_ctor_params :id, :pos, :size, :style => Wx::TAB_TRAVERSAL
|
110
111
|
wx_ctor_params :name => 'panel'
|
111
112
|
end
|
112
113
|
|
113
114
|
# wxScrolledWindow Window with automatically managed scrollbars
|
114
115
|
Wx::define_keyword_ctors('ScrolledWindow') do
|
115
|
-
wx_ctor_params :pos, :size, :style => Wx::VSCROLL|Wx::HSCROLL
|
116
|
+
wx_ctor_params :id, :pos, :size, :style => Wx::VSCROLL|Wx::HSCROLL
|
116
117
|
wx_ctor_params :name => 'scrolledWindow'
|
117
118
|
end
|
118
119
|
|
119
120
|
# wxGrid A grid (table) window
|
120
121
|
Wx::define_keyword_ctors('Grid') do
|
121
|
-
wx_ctor_params :pos, :size, :style => Wx::WANTS_CHARS
|
122
|
+
wx_ctor_params :id, :pos, :size, :style => Wx::WANTS_CHARS
|
122
123
|
wx_ctor_params :name => 'grid'
|
123
124
|
end
|
124
125
|
|
125
126
|
# Window which can be split vertically or horizontally
|
126
127
|
Wx::define_keyword_ctors('SplitterWindow') do
|
127
|
-
wx_ctor_params :pos, :size, :style => Wx::SP_3D
|
128
|
+
wx_ctor_params :id, :pos, :size, :style => Wx::SP_3D
|
128
129
|
wx_ctor_params :name => 'splitterWindow'
|
129
130
|
end
|
130
131
|
|
131
132
|
# Implements the status bar on a frame
|
132
133
|
Wx::define_keyword_ctors('StatusBar') do
|
133
|
-
wx_ctor_params :style => Wx::ST_SIZEGRIP
|
134
|
+
wx_ctor_params :id, :style => Wx::ST_SIZEGRIP
|
134
135
|
wx_ctor_params :name => 'statusBar'
|
135
136
|
end
|
136
137
|
|
137
138
|
# Toolbar class
|
138
139
|
Wx::define_keyword_ctors('ToolBar') do
|
139
|
-
wx_ctor_params :pos, :size, :style => Wx::TB_HORIZONTAL|Wx::NO_BORDER
|
140
|
+
wx_ctor_params :id, :pos, :size, :style => Wx::TB_HORIZONTAL|Wx::NO_BORDER
|
140
141
|
wx_ctor_params :name => 'toolBar' # not as documented in Wx 2.6.3
|
141
142
|
end
|
142
143
|
|
143
144
|
# Notebook class
|
144
145
|
Wx::define_keyword_ctors('Notebook') do
|
145
|
-
wx_ctor_params :pos, :size, :style, :name => 'noteBook'
|
146
|
+
wx_ctor_params :id, :pos, :size, :style, :name => 'noteBook'
|
146
147
|
end
|
147
148
|
|
148
149
|
# Similar to notebook but using list control - undocumented
|
149
150
|
Wx::define_keyword_ctors('Listbook') do
|
150
|
-
wx_ctor_params :pos, :size, :style, :name => 'listBook'
|
151
|
+
wx_ctor_params :id, :pos, :size, :style, :name => 'listBook'
|
151
152
|
end
|
152
153
|
|
153
154
|
# Similar to notebook but using choice control
|
154
155
|
Wx::define_keyword_ctors('Choicebook') do
|
155
|
-
wx_ctor_params :pos, :size, :style, :name => 'choiceBook'
|
156
|
+
wx_ctor_params :id, :pos, :size, :style, :name => 'choiceBook'
|
156
157
|
end
|
157
158
|
|
158
159
|
# wxSashWindow: Window with four optional sashes that can be dragged
|
159
160
|
Wx::define_keyword_ctors('SashWindow') do
|
160
|
-
wx_ctor_params :pos, :size
|
161
|
+
wx_ctor_params :id, :pos, :size
|
161
162
|
wx_ctor_params :style => Wx::CLIP_CHILDREN|Wx::SW_3D
|
162
163
|
wx_ctor_params :name => 'sashWindow'
|
163
164
|
end
|
@@ -165,7 +166,7 @@ end
|
|
165
166
|
# wxSashLayoutWindow: Window that can be involved in an IDE-like layout
|
166
167
|
# arrangement
|
167
168
|
Wx::define_keyword_ctors('SashLayoutWindow') do
|
168
|
-
wx_ctor_params :pos, :size
|
169
|
+
wx_ctor_params :id, :pos, :size
|
169
170
|
wx_ctor_params :style => Wx::CLIP_CHILDREN|Wx::SW_3D
|
170
171
|
wx_ctor_params :name => 'layoutWindow'
|
171
172
|
end
|
@@ -179,13 +180,15 @@ end
|
|
179
180
|
|
180
181
|
# wxWizardPageSimple: A page in wizard dialog.
|
181
182
|
Wx::define_keyword_ctors('WizardPageSimple') do
|
182
|
-
wx_ctor_params :prev
|
183
|
+
wx_ctor_params :prev => nil
|
184
|
+
wx_ctor_params :next => nil
|
185
|
+
wx_ctor_params :bitmap => Wx::NULL_BITMAP
|
183
186
|
end
|
184
187
|
|
185
188
|
### DIALOGS
|
186
189
|
# wxDialog Base class for common dialogs
|
187
190
|
Wx::define_keyword_ctors('Dialog') do
|
188
|
-
wx_ctor_params :title => ''
|
191
|
+
wx_ctor_params :id, :title => ''
|
189
192
|
wx_ctor_params :pos, :size, :style => Wx::DEFAULT_DIALOG_STYLE
|
190
193
|
wx_ctor_params :name => 'dialogBox'
|
191
194
|
end
|
@@ -263,52 +266,52 @@ end
|
|
263
266
|
|
264
267
|
# Push button control, displaying text
|
265
268
|
Wx::define_keyword_ctors('Button') do
|
266
|
-
wx_ctor_params :label => ''
|
269
|
+
wx_ctor_params :id, :label => ''
|
267
270
|
wx_ctor_params :pos, :size, :style
|
268
271
|
wx_ctor_params :validator, :name => 'button'
|
269
272
|
end
|
270
273
|
|
271
274
|
# Push button control, displaying a bitmap
|
272
275
|
Wx::define_keyword_ctors('BitmapButton') do
|
273
|
-
wx_ctor_params :bitmap, :pos, :size, :style => Wx::BU_AUTODRAW
|
276
|
+
wx_ctor_params :id, :bitmap, :pos, :size, :style => Wx::BU_AUTODRAW
|
274
277
|
wx_ctor_params :validator, :name => 'button'
|
275
278
|
end
|
276
279
|
|
277
280
|
# A button which stays pressed when clicked by user.
|
278
281
|
Wx::define_keyword_ctors('ToggleButton') do
|
279
|
-
wx_ctor_params :label, :pos, :size, :style
|
282
|
+
wx_ctor_params :id, :label, :pos, :size, :style
|
280
283
|
wx_ctor_params :validator, :name => 'checkBox'
|
281
284
|
end
|
282
285
|
|
283
286
|
# Control showing an entire calendar month
|
284
287
|
Wx::define_keyword_ctors('CalendarCtrl') do
|
285
|
-
wx_ctor_params :date => Time.now()
|
288
|
+
wx_ctor_params :id, :date => Time.now()
|
286
289
|
wx_ctor_params :pos, :size, :style => Wx::CAL_SHOW_HOLIDAYS
|
287
290
|
wx_ctor_params :name => 'calendar'
|
288
291
|
end
|
289
292
|
|
290
293
|
# Checkbox control
|
291
294
|
Wx::define_keyword_ctors('CheckBox') do
|
292
|
-
wx_ctor_params :label => ''
|
295
|
+
wx_ctor_params :id, :label => ''
|
293
296
|
wx_ctor_params :pos, :size, :style
|
294
297
|
wx_ctor_params :validator, :name => 'checkBox'
|
295
298
|
end
|
296
299
|
|
297
300
|
# A listbox with a checkbox to the left of each item
|
298
301
|
Wx::define_keyword_ctors('CheckListBox') do
|
299
|
-
wx_ctor_params :pos, :size, :choices, :style
|
302
|
+
wx_ctor_params :id, :pos, :size, :choices, :style
|
300
303
|
wx_ctor_params :validator, :name => 'listBox'
|
301
304
|
end
|
302
305
|
|
303
306
|
# wxChoice Choice control (a combobox without the editable area)
|
304
307
|
Wx::define_keyword_ctors('Choice') do
|
305
|
-
wx_ctor_params :pos, :size, :choices, :style
|
308
|
+
wx_ctor_params :id, :pos, :size, :choices, :style
|
306
309
|
wx_ctor_params :validator, :name => 'choice'
|
307
310
|
end
|
308
311
|
|
309
312
|
# wxComboBox A choice with an editable area
|
310
313
|
Wx::define_keyword_ctors('ComboBox') do
|
311
|
-
wx_ctor_params :value => ''
|
314
|
+
wx_ctor_params :id, :value => ''
|
312
315
|
wx_ctor_params :pos, :size, :choices => []
|
313
316
|
wx_ctor_params :style
|
314
317
|
wx_ctor_params :validator, :name => 'comboBox'
|
@@ -316,7 +319,7 @@ end
|
|
316
319
|
|
317
320
|
# wxBitmapComboBox A choice with an editable area
|
318
321
|
Wx::define_keyword_ctors('BitmapComboBox') do
|
319
|
-
wx_ctor_params :value => ''
|
322
|
+
wx_ctor_params :id, :value => ''
|
320
323
|
wx_ctor_params :pos, :size, :choices => []
|
321
324
|
wx_ctor_params :style
|
322
325
|
wx_ctor_params :validator, :name => 'comboBox'
|
@@ -327,14 +330,14 @@ end
|
|
327
330
|
# wxGauge A control to represent a varying quantity, such as time
|
328
331
|
# remaining
|
329
332
|
Wx::define_keyword_ctors('Gauge') do
|
330
|
-
wx_ctor_params :range, :pos, :size, :style => Wx::GA_HORIZONTAL
|
333
|
+
wx_ctor_params :id, :range, :pos, :size, :style => Wx::GA_HORIZONTAL
|
331
334
|
wx_ctor_params :validator, :name => 'gauge'
|
332
335
|
end
|
333
336
|
|
334
337
|
# wxGenericDirCtrl A control for displaying a directory tree
|
335
338
|
Wx::define_keyword_ctors('GenericDirCtrl') do
|
336
339
|
# TODO :dir => Wx::DIR_DIALOG_DEFAULT_FOLDER_STR
|
337
|
-
wx_ctor_params :dir => ''
|
340
|
+
wx_ctor_params :id, :dir => ''
|
338
341
|
wx_ctor_params :pos, :size,
|
339
342
|
:style => Wx::DIRCTRL_3D_INTERNAL|Wx::SUNKEN_BORDER
|
340
343
|
wx_ctor_params :filter => ''
|
@@ -346,14 +349,14 @@ end
|
|
346
349
|
# wxHtmlListBox A listbox showing HTML content
|
347
350
|
# wxListBox A list of strings for single or multiple selection
|
348
351
|
Wx::define_keyword_ctors('ListBox') do
|
349
|
-
wx_ctor_params :pos, :size, :choices => []
|
352
|
+
wx_ctor_params :id, :pos, :size, :choices => []
|
350
353
|
wx_ctor_params :style
|
351
354
|
wx_ctor_params :validator, :name => 'listBox'
|
352
355
|
end
|
353
356
|
|
354
357
|
# wxListCtrl A control for displaying lists of strings and/or icons, plus a multicolumn report view
|
355
358
|
Wx::define_keyword_ctors('ListCtrl') do
|
356
|
-
wx_ctor_params :pos, :size, :style => Wx::LC_ICON
|
359
|
+
wx_ctor_params :id, :pos, :size, :style => Wx::LC_ICON
|
357
360
|
wx_ctor_params :validator, :name => 'listCtrl'
|
358
361
|
end
|
359
362
|
|
@@ -361,13 +364,13 @@ end
|
|
361
364
|
|
362
365
|
# wxTreeCtrl Tree (hierarchy) control
|
363
366
|
Wx::define_keyword_ctors('TreeCtrl') do
|
364
|
-
wx_ctor_params :pos, :size, :style => Wx::TR_HAS_BUTTONS
|
367
|
+
wx_ctor_params :id, :pos, :size, :style => Wx::TR_HAS_BUTTONS
|
365
368
|
wx_ctor_params :validator, :name => 'treeCtrl'
|
366
369
|
end
|
367
370
|
|
368
371
|
# wxSpinCtrl A spin control - i.e. spin button and text control
|
369
372
|
Wx::define_keyword_ctors('SpinCtrl') do
|
370
|
-
wx_ctor_params :value => ''
|
373
|
+
wx_ctor_params :id, :value => ''
|
371
374
|
wx_ctor_params :pos, :size, :style => Wx::SP_ARROW_KEYS
|
372
375
|
wx_ctor_params :min => 0
|
373
376
|
wx_ctor_params :max => 100
|
@@ -377,27 +380,27 @@ end
|
|
377
380
|
|
378
381
|
# One or more lines of non-editable text
|
379
382
|
Wx::define_keyword_ctors('StaticText') do
|
380
|
-
wx_ctor_params :label, :pos, :size, :style, :name => 'staticText'
|
383
|
+
wx_ctor_params :id, :label, :pos, :size, :style, :name => 'staticText'
|
381
384
|
end
|
382
385
|
|
383
386
|
Wx::define_keyword_ctors('StaticBox') do
|
384
|
-
wx_ctor_params :label, :pos, :size, :style, :name => 'staticBox'
|
387
|
+
wx_ctor_params :id, :label, :pos, :size, :style, :name => 'staticBox'
|
385
388
|
end
|
386
389
|
|
387
390
|
Wx::define_keyword_ctors('StaticLine') do
|
388
|
-
wx_ctor_params :pos, :size, :style => Wx::LI_HORIZONTAL
|
391
|
+
wx_ctor_params :id, :pos, :size, :style => Wx::LI_HORIZONTAL
|
389
392
|
wx_ctor_params :name => 'staticBox'
|
390
393
|
end
|
391
394
|
|
392
395
|
# wxStaticBitmap A control to display a bitmap
|
393
396
|
Wx::define_keyword_ctors('StaticBitmap') do
|
394
|
-
wx_ctor_params :label, :pos, :size, :style
|
397
|
+
wx_ctor_params :id, :label, :pos, :size, :style
|
395
398
|
end
|
396
399
|
|
397
400
|
|
398
401
|
# wxRadioBox A group of radio buttons
|
399
402
|
Wx::define_keyword_ctors('RadioBox') do
|
400
|
-
wx_ctor_params :label => ''
|
403
|
+
wx_ctor_params :id, :label => ''
|
401
404
|
wx_ctor_params :pos, :size, :choices => []
|
402
405
|
wx_ctor_params :major_dimension => 0
|
403
406
|
wx_ctor_params :style => Wx::RA_SPECIFY_COLS
|
@@ -406,14 +409,14 @@ end
|
|
406
409
|
|
407
410
|
# wxRadioButton: A round button used with others in a mutually exclusive way
|
408
411
|
Wx::define_keyword_ctors('RadioButton') do
|
409
|
-
wx_ctor_params :label => ''
|
412
|
+
wx_ctor_params :id, :label => ''
|
410
413
|
wx_ctor_params :pos, :size, :style => 0
|
411
414
|
wx_ctor_params :validator, :name => 'radioButton'
|
412
415
|
end
|
413
416
|
|
414
417
|
# wxSlider A slider that can be dragged by the user
|
415
418
|
Wx::define_keyword_ctors('Slider') do
|
416
|
-
wx_ctor_params :value => 0
|
419
|
+
wx_ctor_params :id, :value => 0
|
417
420
|
wx_ctor_params :min_value, :max_value
|
418
421
|
wx_ctor_params :pos, :size, :style => Wx::SL_HORIZONTAL
|
419
422
|
wx_ctor_params :validator, :name => 'slider'
|
@@ -421,7 +424,7 @@ end
|
|
421
424
|
|
422
425
|
# wxSpinButton - Has two small up and down (or left and right) arrow buttons
|
423
426
|
Wx::define_keyword_ctors('SpinButton') do
|
424
|
-
wx_ctor_params :pos, :size, :style => Wx::SP_HORIZONTAL
|
427
|
+
wx_ctor_params :id, :pos, :size, :style => Wx::SP_HORIZONTAL
|
425
428
|
wx_ctor_params :name => 'spinButton'
|
426
429
|
end
|
427
430
|
|
@@ -429,27 +432,34 @@ end
|
|
429
432
|
|
430
433
|
# wxTextCtrl Single or multiline text editing control
|
431
434
|
Wx::define_keyword_ctors('TextCtrl') do
|
432
|
-
wx_ctor_params :value => ''
|
435
|
+
wx_ctor_params :id, :value => ''
|
433
436
|
wx_ctor_params :pos, :size, :style
|
434
437
|
wx_ctor_params :validator, :name => 'textCtrl'
|
435
438
|
end
|
436
439
|
|
437
440
|
# wxHtmlWindow - Control for displaying HTML
|
438
441
|
Wx::define_keyword_ctors('HtmlWindow') do
|
439
|
-
wx_ctor_params :pos, :size, :style => Wx::HW_DEFAULT_STYLE
|
442
|
+
wx_ctor_params :id, :pos, :size, :style => Wx::HW_DEFAULT_STYLE
|
440
443
|
wx_ctor_params :name => 'htmlWindow'
|
441
444
|
end
|
442
445
|
|
443
446
|
# wxHyperTextCtrl - display a clickable URL
|
444
447
|
Wx::define_keyword_ctors('HyperlinkCtrl') do
|
445
|
-
wx_ctor_params :label => ''
|
448
|
+
wx_ctor_params :id, :label => ''
|
446
449
|
wx_ctor_params :url => ''
|
447
450
|
wx_ctor_params :pos, :size, :style => 0
|
448
451
|
wx_ctor_params :name => 'hyperlink'
|
449
452
|
end
|
450
453
|
|
451
454
|
Wx::define_keyword_ctors('StyledTextCtrl') do
|
452
|
-
wx_ctor_params :pos, :size, :style => 0
|
455
|
+
wx_ctor_params :id, :pos, :size, :style => 0
|
453
456
|
wx_ctor_params :name => 'styledTextCtrl'
|
454
457
|
end
|
455
458
|
|
459
|
+
|
460
|
+
Wx::define_keyword_ctors('CollapsiblePane') do
|
461
|
+
wx_ctor_params :id, :label => ''
|
462
|
+
wx_ctor_params :pos, :size, :style => 0
|
463
|
+
wx_ctor_params :validator, :name => 'collapsiblePane'
|
464
|
+
end
|
465
|
+
|