wxruby 1.9.0-i386-mswin32 → 1.9.1-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. data/lib/wx.rb +42 -35
  2. data/lib/wx/accessors.rb +52 -0
  3. data/lib/wx/classes/evthandler.rb +36 -32
  4. data/lib/wx/classes/grid.rb +13 -13
  5. data/lib/wx/classes/point.rb +43 -0
  6. data/lib/wx/classes/size.rb +44 -0
  7. data/lib/wx/classes/styledtextctrl.rb +92 -0
  8. data/lib/wx/classes/textctrl.rb +14 -0
  9. data/lib/wx/classes/window.rb +4 -0
  10. data/lib/wx/keyword_ctors.rb +219 -0
  11. data/lib/wx/keyword_defs.rb +455 -0
  12. data/lib/wx/version.rb +1 -1
  13. data/lib/wxruby2.exp +0 -0
  14. data/lib/wxruby2.lib +0 -0
  15. data/lib/wxruby2.so +0 -0
  16. data/samples/SAMPLES-LICENSE.TXT +17 -17
  17. data/samples/aui/aui.rb +6 -5
  18. data/samples/bigdemo/About.rbw +39 -39
  19. data/samples/bigdemo/ColorPanel.rbw +25 -25
  20. data/samples/bigdemo/GridSimple.rbw +80 -80
  21. data/samples/bigdemo/MDIDemo.rbw +59 -59
  22. data/samples/bigdemo/PopupMenu.rbw +151 -151
  23. data/samples/bigdemo/Sizers.rbw +545 -545
  24. data/samples/bigdemo/bigdemo.rb +826 -826
  25. data/samples/bigdemo/demoTemplate.rbw +37 -37
  26. data/samples/bigdemo/icons/choice.xpm +27 -27
  27. data/samples/bigdemo/icons/combo.xpm +27 -27
  28. data/samples/bigdemo/icons/copy.xpm +25 -25
  29. data/samples/bigdemo/icons/cut.xpm +24 -24
  30. data/samples/bigdemo/icons/gauge.xpm +27 -27
  31. data/samples/bigdemo/icons/help.xpm +25 -25
  32. data/samples/bigdemo/icons/list.xpm +27 -27
  33. data/samples/bigdemo/icons/mondrian.xpm +44 -44
  34. data/samples/bigdemo/icons/new.xpm +24 -24
  35. data/samples/bigdemo/icons/ogl.ico +0 -0
  36. data/samples/bigdemo/icons/ogl.xpm +45 -45
  37. data/samples/bigdemo/icons/open.xpm +26 -26
  38. data/samples/bigdemo/icons/paste.xpm +38 -38
  39. data/samples/bigdemo/icons/preview.xpm +26 -26
  40. data/samples/bigdemo/icons/print.xpm +26 -26
  41. data/samples/bigdemo/icons/radio.xpm +27 -27
  42. data/samples/bigdemo/icons/robert.xpm +415 -415
  43. data/samples/bigdemo/icons/save.xpm +25 -25
  44. data/samples/bigdemo/icons/smiles.xpm +39 -39
  45. data/samples/bigdemo/icons/smiley.xpm +42 -42
  46. data/samples/bigdemo/icons/stattext.xpm +24 -24
  47. data/samples/bigdemo/icons/test2.bmp +0 -0
  48. data/samples/bigdemo/icons/test2.xpm +79 -79
  49. data/samples/bigdemo/icons/text.xpm +27 -27
  50. data/samples/bigdemo/icons/tog1.xpm +38 -38
  51. data/samples/bigdemo/icons/tog2.xpm +38 -38
  52. data/samples/bigdemo/icons/wxwin16x16.xpm +25 -25
  53. data/samples/bigdemo/tips.txt +7 -7
  54. data/samples/bigdemo/utils.rb +11 -11
  55. data/samples/bigdemo/wxButton.rbw +66 -66
  56. data/samples/bigdemo/wxCalendarCtrl.rbw +72 -72
  57. data/samples/bigdemo/wxCheckBox.rbw +52 -52
  58. data/samples/bigdemo/wxCheckListBox.rbw +77 -77
  59. data/samples/bigdemo/wxChoice.rbw +49 -49
  60. data/samples/bigdemo/wxColourDialog.rbw +34 -34
  61. data/samples/bigdemo/wxComboBox.rbw +79 -79
  62. data/samples/bigdemo/wxDialog.rbw +92 -92
  63. data/samples/bigdemo/wxDirDialog.rbw +32 -32
  64. data/samples/bigdemo/wxFileDialog.rbw +39 -39
  65. data/samples/bigdemo/wxFileDialog_Save.rbw +38 -38
  66. data/samples/bigdemo/wxFindReplaceDialog.rbw +85 -85
  67. data/samples/bigdemo/wxFontDialog.rbw +176 -176
  68. data/samples/bigdemo/wxFrame.rbw +55 -55
  69. data/samples/bigdemo/wxGauge.rbw +73 -73
  70. data/samples/bigdemo/wxGrid.rbw +68 -68
  71. data/samples/bigdemo/wxListBox.rbw +142 -142
  72. data/samples/bigdemo/wxListCtrl_virtual.rbw +109 -109
  73. data/samples/bigdemo/wxMDIWindows.rbw +52 -52
  74. data/samples/bigdemo/wxMenu.rbw +238 -238
  75. data/samples/bigdemo/wxMessageDialog.rbw +30 -30
  76. data/samples/bigdemo/wxMultipleChoiceDialog.rbw +34 -34
  77. data/samples/bigdemo/wxNotebook.rbw +138 -138
  78. data/samples/bigdemo/wxProgressDialog.rbw +45 -45
  79. data/samples/bigdemo/wxRadioBox.rbw +74 -74
  80. data/samples/bigdemo/wxRadioButton.rbw +127 -127
  81. data/samples/bigdemo/wxScrolledMessageDialog.rbw +59 -59
  82. data/samples/bigdemo/wxScrolledWindow.rbw +196 -196
  83. data/samples/bigdemo/wxSingleChoiceDialog.rbw +35 -35
  84. data/samples/bigdemo/wxSlider.rbw +44 -44
  85. data/samples/bigdemo/wxSpinButton.rbw +52 -52
  86. data/samples/bigdemo/wxSpinCtrl.rbw +53 -53
  87. data/samples/bigdemo/wxSplitterWindow.rbw +65 -65
  88. data/samples/bigdemo/wxStaticBitmap.rbw +53 -53
  89. data/samples/bigdemo/wxStaticText.rbw +57 -57
  90. data/samples/bigdemo/wxStatusBar.rbw +128 -128
  91. data/samples/bigdemo/wxTextCtrl.rbw +151 -151
  92. data/samples/bigdemo/wxTextEntryDialog.rbw +34 -34
  93. data/samples/bigdemo/wxToggleButton.rbw +51 -51
  94. data/samples/bigdemo/wxToolBar.rbw +133 -133
  95. data/samples/bigdemo/wxTreeCtrl.rbw +192 -192
  96. data/samples/calendar/calendar.rb +275 -275
  97. data/samples/caret/caret.rb +296 -296
  98. data/samples/caret/mondrian.xpm +44 -44
  99. data/samples/controls/controls.rb +1140 -1140
  100. data/samples/controls/get_item_sample.rb +87 -87
  101. data/samples/controls/icons/choice.xpm +27 -27
  102. data/samples/controls/icons/combo.xpm +27 -27
  103. data/samples/controls/icons/gauge.xpm +27 -27
  104. data/samples/controls/icons/list.xpm +27 -27
  105. data/samples/controls/icons/radio.xpm +27 -27
  106. data/samples/controls/icons/stattext.xpm +24 -24
  107. data/samples/controls/icons/text.xpm +27 -27
  108. data/samples/controls/mondrian.xpm +44 -44
  109. data/samples/dialogs/dialogs.rb +724 -724
  110. data/samples/dialogs/tips.txt +18 -18
  111. data/samples/etc/activation.rb +108 -108
  112. data/samples/etc/choice.rb +72 -72
  113. data/samples/etc/miniframe.rb +84 -84
  114. data/samples/etc/sash.rb +135 -135
  115. data/samples/etc/scrollwin.rb +116 -116
  116. data/samples/etc/system_settings.rb +258 -258
  117. data/samples/etc/wizard.rb +81 -81
  118. data/samples/event/event.rb +184 -0
  119. data/samples/images/images.rb +48 -48
  120. data/samples/listbook/listbook.rb +183 -183
  121. data/samples/listbook/listbook.xrc +370 -370
  122. data/samples/mdi/mdi.rb +87 -87
  123. data/samples/minimal/minimal.rb +83 -95
  124. data/samples/minimal/mondrian.png +0 -0
  125. data/samples/minimal/nothing.rb +46 -46
  126. data/samples/minimal/text.rb +35 -35
  127. data/samples/text/scintilla.rb +22 -28
  128. data/samples/text/textctrl.rb +124 -124
  129. data/samples/text/unicode.rb +238 -238
  130. data/samples/text/utf8.txt +14 -14
  131. data/samples/treectrl/treectrl.rb +1210 -1210
  132. data/samples/xrc/samples.xrc +46 -46
  133. data/samples/xrc/xrc_sample.rb +107 -107
  134. metadata +13 -5
  135. data/samples/minimal/mondrian.ico +0 -0
  136. data/samples/minimal/mondrian.xpm +0 -44
@@ -0,0 +1,14 @@
1
+ class Wx::TextCtrl
2
+ # Fix position_to_xy so it returns a two-element array - the internal
3
+ # version returns a three-element array with a Boolean that doesn't
4
+ # really make sense in Ruby
5
+ wx_position_to_xy = instance_method(:position_to_xy)
6
+ define_method(:position_to_xy) do | pos |
7
+ retval, x, y = wx_position_to_xy.bind(self).call(pos)
8
+ if retval
9
+ return [x, y]
10
+ else
11
+ return nil
12
+ end
13
+ end
14
+ end
@@ -2,6 +2,10 @@
2
2
  # released under the MIT-style wxruby2 license
3
3
 
4
4
  class Wx::Window
5
+ # Create a wx-specific name for get_id, to prevent confusion with
6
+ # ruby's (deprecated) Object#id
7
+ alias :wx_id :get_id
8
+
5
9
  # Recursively searches all windows below +self+ and returns the first
6
10
  # window which has the id +an_id+. This corresponds to the find_window
7
11
  # method method in WxWidgets when called with an integer.
@@ -0,0 +1,219 @@
1
+ # = WxRuby Extensions - Keyword Constructors
2
+ #
3
+ # The *Keyword Constructors* extension allows the use of Ruby hash-style
4
+ # keyword arguments in constructors of common WxWidgets Windows, Frame,
5
+ # Dialog and Control classes.
6
+ #
7
+ # == Introduction
8
+ #
9
+ # Building a GUI in WxWidgets involves lots of calls to +new+, but
10
+ # these methods often have long parameter lists. Often the default
11
+ # values for many of these parameters are correct. For example, if
12
+ # you're using a sizer-based layout, you usually don't want to specify a
13
+ # size for widgets, but you still have to type
14
+ #
15
+ # Wx::TreeCtrl.new( parent, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE,
16
+ # Wx::NO_BUTTONS )
17
+ #
18
+ # just to create a standard TreeCtrl with the 'no buttons' style. If you
19
+ # want to specify the 'NO BUTTONS' style, you can't avoid all the typing
20
+ # of DEFAULT_POSITION etc.
21
+ #
22
+ # == Basic Keyword Constructors
23
+ #
24
+ # With keyword_constructors, you could write the above as
25
+ #
26
+ # TreeCtrl.new(parent, :style => Wx::NO_BUTTONS)
27
+ #
28
+ # And it will assume you want the default id (-1), and the default size
29
+ # and position. If you want to specify an explicit size, you can do so:
30
+ #
31
+ # TreeCtrl.new(parent, :size => Wx::Size.new(100, 300))
32
+ #
33
+ # For brevity, this module also allows you to specify positions and
34
+ # sizes using a a two-element array:
35
+ #
36
+ # TreeCtrl.new(parent, :size => [100, 300])
37
+ #
38
+ # Similarly with position:
39
+ #
40
+ # TreeCtrl.new(parent, :pos => Wx::Point.new(5, 25))
41
+ #
42
+ # TreeCtrl.new(parent, :pos => [5, 25])
43
+ #
44
+ # You can have multiple keyword arguments:
45
+ #
46
+ # TreeCtrl.new(parent, :pos => [5, 25], :size => [100, 300] )
47
+ #
48
+ # == No ID required
49
+ #
50
+ # As with position and size, you usually don't want to deal with
51
+ # assigning unique ids to every widget and frame you create - it's a C++
52
+ # hangover that often seems clunky in Ruby. The *Event Connectors*
53
+ # extension allows you to set up event handling without having to use
54
+ # ids, and if no :id argument is supplied to a constructor, the default
55
+ # (-1) will be passed.
56
+ #
57
+ # There are occasions when a specific ID does need to be used - for
58
+ # example, to tell WxWidgets that a button is a 'stock' item, so that it
59
+ # can be displayed using platform-standard text and icon. To do this,
60
+ # simply pass an :id argument to the constructor - here, the system's
61
+ # standard 'preview' button
62
+ #
63
+ # Wx::Button.new(parent, :id => Wx::ID_PREVIEW)
64
+ #
65
+ # == Class-specific arguments
66
+ #
67
+ # The arguments :size, :pos and :style are common to many WxWidgets
68
+ # window classes. The +new+ methods of these classes also have
69
+ # parameters that are specific to those classes; for example, the text
70
+ # label on a button, or the initial value of a text control.
71
+ #
72
+ # Wx::Button.new(parent, :label => 'press me')
73
+ # Wx::TextCtrl.new(parent, :value => 'type some text here')
74
+ #
75
+ # The keyword names of these arguments can be found by looking at the
76
+ # WxRuby documentation, in the relevant class's +new+ method. You can
77
+ # also get a string description of the class's +new+ method parameters
78
+ # within Ruby by doing:
79
+ #
80
+ # puts Wx::TextCtrl.describe_constructor()
81
+ #
82
+ # This will print a list of the argument names expected by the class's
83
+ # +new+ method, and the correct type for them.
84
+ #
85
+ # == Mixing positional and keyword arguments
86
+ #
87
+ # To support existing code, and to avoid forcing the use of more verbose
88
+ # keyword-style arguments where they're not desired, you can mix
89
+ # positional and keyword arguments, omitting or including +id+s as
90
+ # desired.
91
+ #
92
+ # Wx::Button.new(parent, 'press me', :style => Wx::BU_RIGHT)
93
+
94
+ module Wx
95
+ module KeywordConstructor
96
+ module ClassMethods
97
+
98
+ # Common Wx constructor argument keywords, with their default values.
99
+ STANDARD_DEFAULTS = {
100
+ :id => -1,
101
+ :size => Wx::DEFAULT_SIZE,
102
+ :pos => Wx::DEFAULT_POSITION,
103
+ :style => 0,
104
+ :validator => Wx::DEFAULT_VALIDATOR,
105
+ :choices => [] # for Choice, ComboBox etc
106
+ }
107
+
108
+
109
+ # A named parameter in a Wx constructor parameter list
110
+ Parameter = Struct.new( :name, :default )
111
+
112
+ attr_writer :param_spec
113
+ def param_spec
114
+ @param_spec ||= []
115
+ end
116
+
117
+ attr_writer :param_flags
118
+ def param_flags
119
+ @param_flags ||= {}
120
+ end
121
+
122
+
123
+ # Adds a list of named parameters *params* to the parameter
124
+ # specification for this Wx class's constructor. Each parameter
125
+ # should be specified as a either a common known symbol, such as
126
+ # +:size+ or +:pos:+ or +:style:+ (corresponding to the common
127
+ # constructor arguments in WxWidgets API), or a single-key with the
128
+ # key the name of the argument, and the value a default value.
129
+ #
130
+ # Parameters should be specified in the order they occur in the Wx
131
+ # API constructor
132
+ def wx_ctor_params(*params)
133
+ self.param_spec += params.map do | param |
134
+ param.kind_of?(Hash) ? Parameter[*param.to_a.flatten] :
135
+ Parameter[param, STANDARD_DEFAULTS[param] ]
136
+ end
137
+ end
138
+
139
+ def args_as_list(*mixed_args)
140
+ # get keyword arguments from mixed args if supplied, else empty
141
+ kwa = mixed_args.last.kind_of?(Hash) ? mixed_args.pop : {}
142
+ out_args = []
143
+ param_spec.zip(mixed_args) do | param, arg |
144
+ if arg # use the supplied list arg
145
+ out_args << arg
146
+ elsif kwa.key?(param.name) # use the keyword arg
147
+ out_args << kwa[param.name]
148
+ else # use the default argument
149
+ out_args << param.default
150
+ end
151
+ end
152
+ out_args
153
+ rescue
154
+ Kernel.raise ArgumentError,
155
+ "Bad arg composition of #{mixed_args.inspect}"
156
+ end
157
+
158
+ def args_as_hash(*mixed_args)
159
+ kwa = mixed_args.last.kind_of?(Hash) ? mixed_args.pop : {}
160
+ param_spec.zip(mixed_args) do | param, arg |
161
+ kwa[param.name] = arg if arg
162
+ end
163
+ kwa
164
+ end
165
+
166
+ def describe_constructor()
167
+ param_spec.inject("") do | desc, param |
168
+ desc << "#{param.name} (#{param.default.class.name})\n"
169
+ end
170
+ end
171
+ end
172
+
173
+ def self.included(klass)
174
+ klass.extend ClassMethods
175
+ klass.module_eval do
176
+
177
+ alias :pre_wx_kwctor_init :initialize
178
+
179
+ def initialize(parent = :default_ctor, *mixed_args)
180
+ # allow zero-args ctor for use with XRC
181
+ if parent == :default_ctor
182
+ pre_wx_kwctor_init()
183
+ return
184
+ end
185
+
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
+ real_args = [ parent ] + self.class.args_as_list(*mixed_args)
194
+ begin
195
+ pre_wx_kwctor_init(*real_args)
196
+ rescue
197
+ msg = "Error initializing #{self.inspect} \n" +
198
+ "Sent parameters: #{real_args.inspect}\n" +
199
+ "Correct parameters are:\n" +
200
+ self.class.describe_constructor()
201
+ Kernel.raise ArgumentError, msg
202
+ end
203
+
204
+ yield self if block_given?
205
+ end
206
+ end
207
+
208
+ # Any class inheriting from a class including this module must have
209
+ # its own copy of the param_spec
210
+ def klass.inherited(sub_klass)
211
+ sub_klass.instance_variable_set(:@param_spec,
212
+ instance_variable_get(:@param_spec) )
213
+ sub_klass.instance_variable_set(:@param_flags,
214
+ instance_variable_get(:@param_flags) )
215
+ end
216
+ end
217
+ end
218
+ end
219
+
@@ -0,0 +1,455 @@
1
+ # = WxSugar - Keyword Constructors Classes
2
+ #
3
+ # This extension defines the keyword parameters for +new+ methods for
4
+ # widgets, windows and frames. It's for use with *Keyword Constructors*
5
+ # and is no use on its own - except if you are looking for a bug or want
6
+ # to add a missing class.
7
+
8
+ module Wx
9
+ @defined_kw_classes = {}
10
+
11
+ # accepts a string unadorned name of a WxWidgets class, and block, which
12
+ # defines the constructor parameters and style flags for that class.
13
+ # If the named class exists in the available WxRuby, the block is run and
14
+ # the class may use keyword constructors. If the class is not available, the
15
+ # block is ignored.
16
+ def self.define_keyword_ctors(klass_name, &block)
17
+ # check this class hasn't already been defined
18
+ if @defined_kw_classes[klass_name]
19
+ raise ArgumentError, "Keyword ctor for #{klass_name} already defined"
20
+ else
21
+ @defined_kw_classes[klass_name] = true
22
+ end
23
+
24
+ begin
25
+ klass = Wx::const_get(klass_name)
26
+ rescue NameError
27
+ return nil
28
+ end
29
+ 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
+ klass.instance_eval(&block)
36
+ end
37
+ end
38
+
39
+ # Window : base class for all widgets and frames
40
+ Wx::define_keyword_ctors('Window') do
41
+ wx_ctor_params :pos, :size, :style
42
+ wx_ctor_params :name => 'window'
43
+ end
44
+
45
+
46
+ ### FRAMES
47
+
48
+ # wxTopLevelWindow ABSTRACT: Any top level window, dialog or frame
49
+
50
+ # Normal frame
51
+ Wx::define_keyword_ctors('Frame') do
52
+ wx_ctor_params :title => ''
53
+ wx_ctor_params :pos, :size, :style => Wx::DEFAULT_FRAME_STYLE
54
+ wx_ctor_params :name => 'frame'
55
+ end
56
+
57
+ # MDI child frame
58
+ Wx::define_keyword_ctors('MDIChildFrame') do
59
+ wx_ctor_params :title => ''
60
+ wx_ctor_params :pos, :size, :style => Wx::DEFAULT_FRAME_STYLE
61
+ wx_ctor_params :name => 'frame'
62
+ end
63
+
64
+ # MDI parent frame
65
+ Wx::define_keyword_ctors('MDIParentFrame') do
66
+ wx_ctor_params :title => ''
67
+ wx_ctor_params :pos, :size
68
+ wx_ctor_params :style => Wx::DEFAULT_FRAME_STYLE|Wx::VSCROLL|Wx::HSCROLL
69
+ wx_ctor_params :name => 'frame'
70
+ end
71
+
72
+ # wxMiniFrame A frame with a small title bar
73
+ Wx::define_keyword_ctors('MiniFrame') do
74
+ wx_ctor_params :title => ''
75
+ wx_ctor_params :pos, :size
76
+ wx_ctor_params :style => Wx::DEFAULT_FRAME_STYLE
77
+ wx_ctor_params :name => 'frame'
78
+ end
79
+
80
+ # wxSplashScreen Splash screen class
81
+ # FIXME - this probably won't work at present because the 'parent' arg
82
+ # comes in a funny place in this class's ctor
83
+ #
84
+ # Wx::define_keyword_ctors('SplashScreen') do
85
+ # wx_ctor_params :bitmap => Wx::NULL_BITMAP
86
+ # wx_ctor_params :splashstyle, :milliseconds, :id => 1
87
+ # wx_ctor_params :parent => nil
88
+ # wx_ctor_params :title => ''
89
+ # wx_ctor_params :pos, :size
90
+ # wx_ctor_params :style => Wx::SIMPLE_BORDER|Wx::FRAME_NO_TASKBAR|Wx::STAY_ON_TOP
91
+ # end
92
+
93
+ # wxPropertySheetDialog Property sheet dialog
94
+ # wxTipWindow Shows text in a small window
95
+
96
+ # wxWizard A wizard dialog
97
+ Wx::define_keyword_ctors('Wizard') do
98
+ wx_ctor_params :title => ''
99
+ wx_ctor_params :bitmap => Wx::NULL_BITMAP
100
+ wx_ctor_params :pos, :size
101
+ wx_ctor_params :style => Wx::DEFAULT_DIALOG_STYLE
102
+ end
103
+
104
+
105
+ # MISCELLANEOUS WINDOWS
106
+
107
+ # A window whose colour changes according to current user settings
108
+ Wx::define_keyword_ctors('Panel') do
109
+ wx_ctor_params :pos, :size, :style => Wx::TAB_TRAVERSAL
110
+ wx_ctor_params :name => 'panel'
111
+ end
112
+
113
+ # wxScrolledWindow Window with automatically managed scrollbars
114
+ Wx::define_keyword_ctors('ScrolledWindow') do
115
+ wx_ctor_params :pos, :size, :style => Wx::VSCROLL|Wx::HSCROLL
116
+ wx_ctor_params :name => 'scrolledWindow'
117
+ end
118
+
119
+ # wxGrid A grid (table) window
120
+ Wx::define_keyword_ctors('Grid') do
121
+ wx_ctor_params :pos, :size, :style => Wx::WANTS_CHARS
122
+ wx_ctor_params :name => 'grid'
123
+ end
124
+
125
+ # Window which can be split vertically or horizontally
126
+ Wx::define_keyword_ctors('SplitterWindow') do
127
+ wx_ctor_params :pos, :size, :style => Wx::SP_3D
128
+ wx_ctor_params :name => 'splitterWindow'
129
+ end
130
+
131
+ # Implements the status bar on a frame
132
+ Wx::define_keyword_ctors('StatusBar') do
133
+ wx_ctor_params :style => Wx::ST_SIZEGRIP
134
+ wx_ctor_params :name => 'statusBar'
135
+ end
136
+
137
+ # Toolbar class
138
+ Wx::define_keyword_ctors('ToolBar') do
139
+ wx_ctor_params :pos, :size, :style => Wx::TB_HORIZONTAL|Wx::NO_BORDER
140
+ wx_ctor_params :name => 'toolBar' # not as documented in Wx 2.6.3
141
+ end
142
+
143
+ # Notebook class
144
+ Wx::define_keyword_ctors('Notebook') do
145
+ wx_ctor_params :pos, :size, :style, :name => 'noteBook'
146
+ end
147
+
148
+ # Similar to notebook but using list control - undocumented
149
+ Wx::define_keyword_ctors('Listbook') do
150
+ wx_ctor_params :pos, :size, :style, :name => 'listBook'
151
+ end
152
+
153
+ # Similar to notebook but using choice control
154
+ Wx::define_keyword_ctors('Choicebook') do
155
+ wx_ctor_params :pos, :size, :style, :name => 'choiceBook'
156
+ end
157
+
158
+ # wxSashWindow: Window with four optional sashes that can be dragged
159
+ Wx::define_keyword_ctors('SashWindow') do
160
+ wx_ctor_params :pos, :size
161
+ wx_ctor_params :style => Wx::CLIP_CHILDREN|Wx::SW_3D
162
+ wx_ctor_params :name => 'sashWindow'
163
+ end
164
+
165
+ # wxSashLayoutWindow: Window that can be involved in an IDE-like layout
166
+ # arrangement
167
+ Wx::define_keyword_ctors('SashLayoutWindow') do
168
+ wx_ctor_params :pos, :size
169
+ wx_ctor_params :style => Wx::CLIP_CHILDREN|Wx::SW_3D
170
+ wx_ctor_params :name => 'layoutWindow'
171
+ end
172
+
173
+ # wxVScrolledWindow: As wxScrolledWindow but supports lines of variable height
174
+
175
+ # wxWizardPage: A base class for the page in wizard dialog.
176
+ Wx::define_keyword_ctors('WizardPage') do
177
+ wx_ctor_params :bitmap => Wx::NULL_BITMAP
178
+ end
179
+
180
+ # wxWizardPageSimple: A page in wizard dialog.
181
+ Wx::define_keyword_ctors('WizardPageSimple') do
182
+ wx_ctor_params :prev, :next, :bitmap => Wx::NULL_BITMAP
183
+ end
184
+
185
+ ### DIALOGS
186
+ # wxDialog Base class for common dialogs
187
+ Wx::define_keyword_ctors('Dialog') do
188
+ wx_ctor_params :title => ''
189
+ wx_ctor_params :pos, :size, :style => Wx::DEFAULT_DIALOG_STYLE
190
+ wx_ctor_params :name => 'dialogBox'
191
+ end
192
+
193
+ # wxColourDialog Colour chooser dialog
194
+ Wx::define_keyword_ctors('ColourDialog') do
195
+ wx_ctor_params :colour_data => nil
196
+ end
197
+
198
+ # wxDirDialog Directory selector dialog
199
+ Wx::define_keyword_ctors('DirDialog') do
200
+ wx_ctor_params :message => 'Choose a directory'
201
+ wx_ctor_params :default_path => ''
202
+ wx_ctor_params :style, :pos, :size, :name => 'wxDirCtrl'
203
+ end
204
+
205
+ # wxFileDialog File selector dialog
206
+ Wx::define_keyword_ctors('FileDialog') do
207
+ wx_ctor_params :message => 'Choose a file'
208
+ wx_ctor_params :default_dir => ''
209
+ wx_ctor_params :default_file => ''
210
+ wx_ctor_params :wildcard => '*.*'
211
+ wx_ctor_params :style, :pos
212
+ end
213
+
214
+ # wxFindReplaceDialog Text search/replace dialog
215
+ Wx::define_keyword_ctors('FindReplaceDialog') do
216
+ wx_ctor_params :find_replace_data => Wx::FindReplaceData.new()
217
+ wx_ctor_params :title => 'findReplaceDialog'
218
+ wx_ctor_params :style
219
+ end
220
+
221
+ # wxMultiChoiceDialog Dialog to get one or more selections from a list
222
+ # wxSingleChoiceDialog Dialog to get a single selection from a list and return the string
223
+
224
+ # Dialog to get a single line of text from the user
225
+ Wx::define_keyword_ctors('TextEntryDialog') do
226
+ wx_ctor_params :message => ''
227
+ wx_ctor_params :caption => 'Please enter text'
228
+ wx_ctor_params :default_value => ''
229
+ wx_ctor_params :style => Wx::OK|Wx::CANCEL|Wx::CENTRE
230
+ wx_ctor_params :pos
231
+ end
232
+
233
+ # wxPasswordEntryDialog Dialog to get a password from the user
234
+ # Wx::define_keyword_ctors('PasswordEntryDialog') do
235
+ # wx_ctor_params :message => ''
236
+ # wx_ctor_params :caption => 'Enter password'
237
+ # wx_ctor_params :default_value => ''
238
+ # wx_ctor_params :style => Wx::OK|Wx::CANCEL|Wx::CENTRE
239
+ # wx_ctor_params :pos
240
+ # end
241
+
242
+ # wxFontDialog Font chooser dialog
243
+ # wxPageSetupDialog Standard page setup dialog
244
+ Wx::define_keyword_ctors('PageSetupDialog') do
245
+ wx_ctor_params :data
246
+ end
247
+
248
+ # wxPrintDialog Standard print dialog
249
+ Wx::define_keyword_ctors('PrintDialog') do
250
+ wx_ctor_params :data
251
+ end
252
+
253
+
254
+ # Simple message box dialog
255
+ Wx::define_keyword_ctors('MessageDialog') do
256
+ wx_ctor_params :message => ''
257
+ wx_ctor_params :caption => 'Message box'
258
+ wx_ctor_params :style => Wx::OK|Wx::CANCEL
259
+ wx_ctor_params :pos
260
+ end
261
+
262
+ ### CONTROLS
263
+
264
+ # Push button control, displaying text
265
+ Wx::define_keyword_ctors('Button') do
266
+ wx_ctor_params :label => ''
267
+ wx_ctor_params :pos, :size, :style
268
+ wx_ctor_params :validator, :name => 'button'
269
+ end
270
+
271
+ # Push button control, displaying a bitmap
272
+ Wx::define_keyword_ctors('BitmapButton') do
273
+ wx_ctor_params :bitmap, :pos, :size, :style => Wx::BU_AUTODRAW
274
+ wx_ctor_params :validator, :name => 'button'
275
+ end
276
+
277
+ # A button which stays pressed when clicked by user.
278
+ Wx::define_keyword_ctors('ToggleButton') do
279
+ wx_ctor_params :label, :pos, :size, :style
280
+ wx_ctor_params :validator, :name => 'checkBox'
281
+ end
282
+
283
+ # Control showing an entire calendar month
284
+ Wx::define_keyword_ctors('CalendarCtrl') do
285
+ wx_ctor_params :date => Time.now()
286
+ wx_ctor_params :pos, :size, :style => Wx::CAL_SHOW_HOLIDAYS
287
+ wx_ctor_params :name => 'calendar'
288
+ end
289
+
290
+ # Checkbox control
291
+ Wx::define_keyword_ctors('CheckBox') do
292
+ wx_ctor_params :label => ''
293
+ wx_ctor_params :pos, :size, :style
294
+ wx_ctor_params :validator, :name => 'checkBox'
295
+ end
296
+
297
+ # A listbox with a checkbox to the left of each item
298
+ Wx::define_keyword_ctors('CheckListBox') do
299
+ wx_ctor_params :pos, :size, :choices, :style
300
+ wx_ctor_params :validator, :name => 'listBox'
301
+ end
302
+
303
+ # wxChoice Choice control (a combobox without the editable area)
304
+ Wx::define_keyword_ctors('Choice') do
305
+ wx_ctor_params :pos, :size, :choices, :style
306
+ wx_ctor_params :validator, :name => 'choice'
307
+ end
308
+
309
+ # wxComboBox A choice with an editable area
310
+ Wx::define_keyword_ctors('ComboBox') do
311
+ wx_ctor_params :value => ''
312
+ wx_ctor_params :pos, :size, :choices => []
313
+ wx_ctor_params :style
314
+ wx_ctor_params :validator, :name => 'comboBox'
315
+ end
316
+
317
+ # wxBitmapComboBox A choice with an editable area
318
+ Wx::define_keyword_ctors('BitmapComboBox') do
319
+ wx_ctor_params :value => ''
320
+ wx_ctor_params :pos, :size, :choices => []
321
+ wx_ctor_params :style
322
+ wx_ctor_params :validator, :name => 'comboBox'
323
+ end
324
+
325
+ # wxDatePickerCtrl Small date picker control
326
+
327
+ # wxGauge A control to represent a varying quantity, such as time
328
+ # remaining
329
+ Wx::define_keyword_ctors('Gauge') do
330
+ wx_ctor_params :range, :pos, :size, :style => Wx::GA_HORIZONTAL
331
+ wx_ctor_params :validator, :name => 'gauge'
332
+ end
333
+
334
+ # wxGenericDirCtrl A control for displaying a directory tree
335
+ Wx::define_keyword_ctors('GenericDirCtrl') do
336
+ # TODO :dir => Wx::DIR_DIALOG_DEFAULT_FOLDER_STR
337
+ wx_ctor_params :dir => ''
338
+ wx_ctor_params :pos, :size,
339
+ :style => Wx::DIRCTRL_3D_INTERNAL|Wx::SUNKEN_BORDER
340
+ wx_ctor_params :filter => ''
341
+ wx_ctor_params :default_filter => 0
342
+ wx_ctor_params :name => 'genericDirCtrl'
343
+ end
344
+
345
+
346
+ # wxHtmlListBox A listbox showing HTML content
347
+ # wxListBox A list of strings for single or multiple selection
348
+ Wx::define_keyword_ctors('ListBox') do
349
+ wx_ctor_params :pos, :size, :choices => []
350
+ wx_ctor_params :style
351
+ wx_ctor_params :validator, :name => 'listBox'
352
+ end
353
+
354
+ # wxListCtrl A control for displaying lists of strings and/or icons, plus a multicolumn report view
355
+ Wx::define_keyword_ctors('ListCtrl') do
356
+ wx_ctor_params :pos, :size, :style => Wx::LC_ICON
357
+ wx_ctor_params :validator, :name => 'listCtrl'
358
+ end
359
+
360
+ # wxListView A simpler interface (facade for wxListCtrl in report mode
361
+
362
+ # wxTreeCtrl Tree (hierarchy) control
363
+ Wx::define_keyword_ctors('TreeCtrl') do
364
+ wx_ctor_params :pos, :size, :style => Wx::TR_HAS_BUTTONS
365
+ wx_ctor_params :validator, :name => 'treeCtrl'
366
+ end
367
+
368
+ # wxSpinCtrl A spin control - i.e. spin button and text control
369
+ Wx::define_keyword_ctors('SpinCtrl') do
370
+ wx_ctor_params :value => ''
371
+ wx_ctor_params :pos, :size, :style => Wx::SP_ARROW_KEYS
372
+ wx_ctor_params :min => 0
373
+ wx_ctor_params :max => 100
374
+ wx_ctor_params :initial => 0
375
+ wx_ctor_params :name => 'spinCtrl'
376
+ end
377
+
378
+ # One or more lines of non-editable text
379
+ Wx::define_keyword_ctors('StaticText') do
380
+ wx_ctor_params :label, :pos, :size, :style, :name => 'staticText'
381
+ end
382
+
383
+ Wx::define_keyword_ctors('StaticBox') do
384
+ wx_ctor_params :label, :pos, :size, :style, :name => 'staticBox'
385
+ end
386
+
387
+ Wx::define_keyword_ctors('StaticLine') do
388
+ wx_ctor_params :pos, :size, :style => Wx::LI_HORIZONTAL
389
+ wx_ctor_params :name => 'staticBox'
390
+ end
391
+
392
+ # wxStaticBitmap A control to display a bitmap
393
+ Wx::define_keyword_ctors('StaticBitmap') do
394
+ wx_ctor_params :label, :pos, :size, :style
395
+ end
396
+
397
+
398
+ # wxRadioBox A group of radio buttons
399
+ Wx::define_keyword_ctors('RadioBox') do
400
+ wx_ctor_params :label => ''
401
+ wx_ctor_params :pos, :size, :choices => []
402
+ wx_ctor_params :major_dimension => 0
403
+ wx_ctor_params :style => Wx::RA_SPECIFY_COLS
404
+ wx_ctor_params :validator, :name => 'radioBox'
405
+ end
406
+
407
+ # wxRadioButton: A round button used with others in a mutually exclusive way
408
+ Wx::define_keyword_ctors('RadioButton') do
409
+ wx_ctor_params :label => ''
410
+ wx_ctor_params :pos, :size, :style => 0
411
+ wx_ctor_params :validator, :name => 'radioButton'
412
+ end
413
+
414
+ # wxSlider A slider that can be dragged by the user
415
+ Wx::define_keyword_ctors('Slider') do
416
+ wx_ctor_params :value => 0
417
+ wx_ctor_params :min_value, :max_value
418
+ wx_ctor_params :pos, :size, :style => Wx::SL_HORIZONTAL
419
+ wx_ctor_params :validator, :name => 'slider'
420
+ end
421
+
422
+ # wxSpinButton - Has two small up and down (or left and right) arrow buttons
423
+ Wx::define_keyword_ctors('SpinButton') do
424
+ wx_ctor_params :pos, :size, :style => Wx::SP_HORIZONTAL
425
+ wx_ctor_params :name => 'spinButton'
426
+ end
427
+
428
+ # wxVListBox A listbox supporting variable height rows
429
+
430
+ # wxTextCtrl Single or multiline text editing control
431
+ Wx::define_keyword_ctors('TextCtrl') do
432
+ wx_ctor_params :value => ''
433
+ wx_ctor_params :pos, :size, :style
434
+ wx_ctor_params :validator, :name => 'textCtrl'
435
+ end
436
+
437
+ # wxHtmlWindow - Control for displaying HTML
438
+ Wx::define_keyword_ctors('HtmlWindow') do
439
+ wx_ctor_params :pos, :size, :style => Wx::HW_DEFAULT_STYLE
440
+ wx_ctor_params :name => 'htmlWindow'
441
+ end
442
+
443
+ # wxHyperTextCtrl - display a clickable URL
444
+ Wx::define_keyword_ctors('HyperlinkCtrl') do
445
+ wx_ctor_params :label => ''
446
+ wx_ctor_params :url => ''
447
+ wx_ctor_params :pos, :size, :style => 0
448
+ wx_ctor_params :name => 'hyperlink'
449
+ end
450
+
451
+ Wx::define_keyword_ctors('StyledTextCtrl') do
452
+ wx_ctor_params :pos, :size, :style => 0
453
+ wx_ctor_params :name => 'styledTextCtrl'
454
+ end
455
+