glimmer 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +123 -37
- data/lib/glimmer/command_handlers/layout_command_handler.rb +23 -0
- data/lib/glimmer/command_handlers/layout_data_command_handler.rb +22 -0
- data/lib/glimmer/command_handlers/models/g_layout.rb +71 -0
- data/lib/glimmer/command_handlers/models/g_layout_data.rb +55 -0
- data/lib/glimmer/command_handlers/models/g_swt.rb +8 -1
- data/lib/glimmer/command_handlers/models/g_widget.rb +1 -0
- data/lib/glimmer/command_handlers/{widget_method_command_handler.rb → property_command_handler.rb} +6 -6
- data/lib/glimmer/command_handlers.rb +6 -2
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb4ee177a1d05942e3d76fd1af52f2d182a8141ffe70c2d15edb868d1c117f4c
|
4
|
+
data.tar.gz: 26302fbf093855d4c789431752d79b7bfd07e9a763538215cf8aebacbf3bb51f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c182686702c73057df5d04454804950002a63e58f9be27aeab6142bec34ae6aad35306390ed9d4978a9d235ee1cbb7b7b465126f4986163139d2e8781127bb6e
|
7
|
+
data.tar.gz: 4a6137b7b492595072795dcd641d7d1c9d1e9ef5da42e66397604249ab021d24645dc73faa321d645d2d51507899235134ab3eaa2b39d342b3514f6111d30e52
|
data/README.markdown
CHANGED
@@ -102,14 +102,14 @@ Please follow these instructions to make the `glimmer` command available on your
|
|
102
102
|
|
103
103
|
Run this command to install directly:
|
104
104
|
```
|
105
|
-
jgem install glimmer -v 0.4.
|
105
|
+
jgem install glimmer -v 0.4.1
|
106
106
|
```
|
107
107
|
|
108
108
|
### Option 2: Bundler
|
109
109
|
|
110
110
|
Add the following to `Gemfile`:
|
111
111
|
```
|
112
|
-
gem 'glimmer', '~> 0.4.
|
112
|
+
gem 'glimmer', '~> 0.4.1'
|
113
113
|
```
|
114
114
|
|
115
115
|
And, then run:
|
@@ -231,6 +231,118 @@ button {
|
|
231
231
|
|
232
232
|
In the above example, the `text` widget `enabled` property was data-bound to `#empty` method on `@tic_tac_toe_board.box(row, column)` (learn more about data-binding below)
|
233
233
|
|
234
|
+
### Layouts
|
235
|
+
|
236
|
+
Glimmer lays widgets out visually using SWT layouts, which can only be set on composite widget and subclasses.
|
237
|
+
|
238
|
+
The most common SWT layouts are:
|
239
|
+
- `FillLayout`: lays widgets out in equal proportion horizontally or vertically with spacing/margin options
|
240
|
+
- `RowLayout`: lays widgets out horizontally or vertically in varying proportions with advanced spacing/margin/justify options
|
241
|
+
- `GridLayout`(**default**): lays widgets out in a grid with advanced spacing/margin/alignment/indentation options. This is the **default** layout in Glimmer. It is important to master.
|
242
|
+
|
243
|
+
In Glimmer DSL, just like widgets, layouts can be specified with lowercase underscored names followed by a block containing properties (e.g. `RowLayout` is `row_layout`).
|
244
|
+
|
245
|
+
Example:
|
246
|
+
|
247
|
+
```ruby
|
248
|
+
composite {
|
249
|
+
row_layout {
|
250
|
+
wrap true
|
251
|
+
pack false
|
252
|
+
justify true
|
253
|
+
type :vertical
|
254
|
+
margin_left 1
|
255
|
+
margin_top 2
|
256
|
+
margin_right 3
|
257
|
+
margin_bottom 4
|
258
|
+
spacing 5
|
259
|
+
}
|
260
|
+
# ... widgets follow
|
261
|
+
}
|
262
|
+
```
|
263
|
+
|
264
|
+
Alternatively, a layout may be constructed by following the SWT API for the layout object. For example, a `RowLayout` can be constructed by passing it an SWT style constant.
|
265
|
+
|
266
|
+
```ruby
|
267
|
+
composite {
|
268
|
+
row_layout(:horizontal)
|
269
|
+
# ... widgets follow
|
270
|
+
}
|
271
|
+
```
|
272
|
+
|
273
|
+
Check out the samples directory for more advanced examples of layouts in Glimmer.
|
274
|
+
|
275
|
+
**Defaults**:
|
276
|
+
|
277
|
+
Glimmer composites always come with grid_layout by default, but you can still specify explicitly if you'd like to set specific properties on it.
|
278
|
+
|
279
|
+
Glimmer shell always comes containing one composite by default that wraps around specified shell content. That specific composite (the one directly under shell) has fill_layout with :horizontal type.
|
280
|
+
|
281
|
+
This is a great guide for learning more about SWT layouts:
|
282
|
+
|
283
|
+
https://www.eclipse.org/articles/Article-Understanding-Layouts/Understanding-Layouts.htm
|
284
|
+
|
285
|
+
Also, for a reference, check the SWT API:
|
286
|
+
|
287
|
+
https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/index.html
|
288
|
+
|
289
|
+
### Layout Data
|
290
|
+
|
291
|
+
Layouts organize widgets following common rules for all widgets directly under a composite. But, what if a specific widget needs its own rules. That's where layout data comes into play.
|
292
|
+
|
293
|
+
By convention, SWT layouts expect widgets to set layout data with a class matching their class name with the word "Data" replacing "Layout":
|
294
|
+
- `GridLayout` on a composite demands `GridData` on contained widgets
|
295
|
+
- `RowLayout` on a composite demands `RowData` on contained widgets
|
296
|
+
|
297
|
+
Not all layouts support layout data to further customize widget layouts. For example, `FillLayout` supports no layout data.
|
298
|
+
|
299
|
+
Unlike widgets and layouts in Glimmer DSL, layout data is simply specified with `layout_data` keyword nested inside a widget block body, and followed by arguments and/or a block of its own properties. Glimmer automatically deduces layout data class name by convention as per rule above, with the assumption that the layout data class lives under the same exact Java package as the layout (one can set custom layout data that breaks convention if needed in rare cases. See code below for an example)
|
300
|
+
|
301
|
+
Examples:
|
302
|
+
|
303
|
+
```ruby
|
304
|
+
composite {
|
305
|
+
row_layout(:horizontal)
|
306
|
+
label {
|
307
|
+
layout_data { # followed by properties
|
308
|
+
width 50
|
309
|
+
height 30
|
310
|
+
}
|
311
|
+
}
|
312
|
+
# ... more widgets follow
|
313
|
+
}
|
314
|
+
```
|
315
|
+
|
316
|
+
```ruby
|
317
|
+
composite {
|
318
|
+
grid_layout(3, false) # grid layout with 3 columns not of equal width
|
319
|
+
label {
|
320
|
+
# layout data followed by arguments passed to SWT constructor
|
321
|
+
layout_data(GSWT[:fill], GSWT[:end], true, false)
|
322
|
+
}
|
323
|
+
}
|
324
|
+
```
|
325
|
+
|
326
|
+
```ruby
|
327
|
+
composite {
|
328
|
+
grid_layout(3, false) # grid layout with 3 columns not of equal width
|
329
|
+
label {
|
330
|
+
# layout data set explicitly via an object (helps in rare cases that break convention)
|
331
|
+
layout_data GridData.new(GSWT[:fill], GSWT[:end], true, false)
|
332
|
+
}
|
333
|
+
}
|
334
|
+
```
|
335
|
+
|
336
|
+
**NOTE**: Layout data must never be reused between widgets. Always specify or clone again for every widget.
|
337
|
+
|
338
|
+
This is a great guide for learning more about SWT layouts:
|
339
|
+
|
340
|
+
https://www.eclipse.org/articles/Article-Understanding-Layouts/Understanding-Layouts.htm
|
341
|
+
|
342
|
+
Also, for a reference, check the SWT API:
|
343
|
+
|
344
|
+
https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/index.html
|
345
|
+
|
234
346
|
### Colors
|
235
347
|
|
236
348
|
Colors make up a subset of widget properties. SWT accepts color objects created with RGB (Red Green Blue) or RGBA (Red Green Blue Alpha). Glimmer supports constructing color objects using the `rgb` and `rgba` DSL methods.
|
@@ -410,7 +522,7 @@ https://wiki.eclipse.org/SWT_Widget_Style_Bits
|
|
410
522
|
|
411
523
|
Glimmer automatically imports all SWT Java packages upon adding `include Glimmer` to a class or module.
|
412
524
|
|
413
|
-
Still, if you'd like to import manually elsewhere, you may add the following lines to your code import
|
525
|
+
Still, if you'd like to import manually elsewhere, you may add the following lines to your code (in the class or module body) to import SWT Java packages using `include_package`:
|
414
526
|
|
415
527
|
```ruby
|
416
528
|
include_package 'org.eclipse.swt'
|
@@ -419,7 +531,7 @@ include_package 'org.eclipse.swt.layout'
|
|
419
531
|
include_package 'org.eclipse.swt.graphics'
|
420
532
|
```
|
421
533
|
|
422
|
-
|
534
|
+
To import a specific SWT Java class using `java_import`, add the following:
|
423
535
|
|
424
536
|
```ruby
|
425
537
|
java_import 'org.eclipse.swt.SWT'
|
@@ -427,7 +539,7 @@ java_import 'org.eclipse.swt.SWT'
|
|
427
539
|
|
428
540
|
This allows you to call SWT Java classes from Ruby without mentioning package namespaces.
|
429
541
|
|
430
|
-
For example, after imports, `org.eclipse.swt.graphics.Color` can be
|
542
|
+
For example, after imports, `org.eclipse.swt.graphics.Color` can be referenced by just `Color`
|
431
543
|
|
432
544
|
## Girb (Glimmer irb)
|
433
545
|
|
@@ -488,41 +600,15 @@ jruby -J-XstartOnFirstThread -J-classpath "path_to/swt.jar" -r glimmer -S applic
|
|
488
600
|
|
489
601
|
These features have been suggested. You might see them in a future version of Glimmer. You are welcome to contribute more feature suggestions.
|
490
602
|
|
491
|
-
|
492
|
-
- Glimmer Component: Glimmer already supports components by externalizing to objects, but it would be good if there is a module to include so Glimmer would automatically register
|
493
|
-
a new component and extend the DSL with it
|
494
|
-
- Glimmer Wizard: provide a standard structure for building a Glimmer wizard (multi-step/multi-screen process)
|
495
|
-
- bind_collection: an iterator that enables spawning widgets based on a variable collection (e.g. `bind_collection('user.addresses') { |address| address_widget {...} }` spawns 3 `AddressWidget`s if `user.addresses` is set with 3 addresses; and replaces with 2 `AddressWidget`s if `user.addresses` is reset with 2 addresses only). Needs further thought on naming and functionality.
|
496
|
-
- Automatic relayout of "glimmer components" when disposing one or as an option
|
497
|
-
- Consider using Ruby Refinements for Glimmer
|
498
|
-
- Add 'font' to Glimmer DSL to build font objects easily
|
499
|
-
- Add grid layout support to Glimmer DSL to layout grid components easily
|
500
|
-
- Add rerendering support to Glimmer to rerender any widget easily
|
501
|
-
- Avoid disposing display when disposing a shell to allow recycling
|
502
|
-
- Provide a display builder method to use independently of shell
|
503
|
-
- Supported a single computed data binding as a string (not array)
|
504
|
-
- Support data binding translator option via a block
|
505
|
-
- Center windows upon launching
|
506
|
-
- Add TruffleRuby support
|
507
|
-
- Make Shell automatically use last instantiated Display if not disposed
|
508
|
-
- Allow ability to instantiate Display independently of Shell
|
509
|
-
|
510
|
-
## Release Notes
|
511
|
-
|
512
|
-
[RELEASE.md](https://github.com/AndyObtiva/glimmer/blob/master/RELEASE.md)
|
603
|
+
[TODO.md](https://github.com/AndyObtiva/glimmer/blob/master/TODO.md)
|
513
604
|
|
514
|
-
##
|
605
|
+
## Change Log
|
606
|
+
|
607
|
+
[CHANGELOG.md](https://github.com/AndyObtiva/glimmer/blob/master/CHANGELOG.md)
|
515
608
|
|
516
|
-
|
517
|
-
- Setup pre-requisites (installing JRuby via RVM on the Mac)
|
518
|
-
- cd into project again to activiate RVM glimmer gemset
|
519
|
-
- gem install bundler
|
520
|
-
- bundle
|
521
|
-
- rake # runs specs (ensure they finish successfully)
|
522
|
-
- rake install # builds/installs glimmer gem to be able to run samples via (glimmer samples/**)
|
609
|
+
## Contributing
|
523
610
|
|
524
|
-
|
525
|
-
`rake SPEC=spec_file_path`
|
611
|
+
[CONTRIBUTING.md](https://github.com/AndyObtiva/glimmer/blob/master/CONTRIBUTING.md)
|
526
612
|
|
527
613
|
## Contributors
|
528
614
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/../command_handler"
|
2
|
+
require File.dirname(__FILE__) + "/models/g_layout"
|
3
|
+
|
4
|
+
module Glimmer
|
5
|
+
class LayoutCommandHandler
|
6
|
+
include CommandHandler
|
7
|
+
|
8
|
+
include_package 'org.eclipse.swt.widgets'
|
9
|
+
include_package 'org.eclipse.swt.layout'
|
10
|
+
|
11
|
+
def can_handle?(parent, command_symbol, *args, &block)
|
12
|
+
parent.is_a?(GWidget) and
|
13
|
+
parent.widget.is_a?(Composite) and
|
14
|
+
command_symbol.to_s.end_with?('_layout') and
|
15
|
+
GLayout.layout_exists?(command_symbol.to_s)
|
16
|
+
end
|
17
|
+
|
18
|
+
def do_handle(parent, command_symbol, *args, &block)
|
19
|
+
Glimmer.logger.debug "Layout #{command_symbol} args are: #{args.inspect}"
|
20
|
+
GLayout.new(command_symbol.to_s, parent.widget, args)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/../command_handler"
|
2
|
+
require File.dirname(__FILE__) + "/models/g_widget"
|
3
|
+
require File.dirname(__FILE__) + "/models/g_layout_data"
|
4
|
+
|
5
|
+
module Glimmer
|
6
|
+
class LayoutDataCommandHandler
|
7
|
+
include CommandHandler
|
8
|
+
|
9
|
+
include_package 'org.eclipse.swt.widgets'
|
10
|
+
include_package 'org.eclipse.swt.layout'
|
11
|
+
|
12
|
+
def can_handle?(parent, command_symbol, *args, &block)
|
13
|
+
parent.is_a?(GWidget) and
|
14
|
+
command_symbol.to_s == 'layout_data'
|
15
|
+
end
|
16
|
+
|
17
|
+
def do_handle(parent, command_symbol, *args, &block)
|
18
|
+
Glimmer.logger.debug "Layout Data args are: #{args.inspect}"
|
19
|
+
GLayoutData.new(parent.widget, args)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require_relative '../../parent'
|
2
|
+
require_relative 'g_swt'
|
3
|
+
|
4
|
+
module Glimmer
|
5
|
+
class GLayout
|
6
|
+
include_package 'org.eclipse.swt.layout'
|
7
|
+
|
8
|
+
include Parent
|
9
|
+
|
10
|
+
attr_reader :composite
|
11
|
+
attr_reader :layout
|
12
|
+
|
13
|
+
class << self
|
14
|
+
include_package 'org.eclipse.swt.layout'
|
15
|
+
|
16
|
+
def layout_exists?(underscored_layout_name)
|
17
|
+
begin
|
18
|
+
swt_layout_class_for(underscored_layout_name)
|
19
|
+
true
|
20
|
+
rescue NameError => e
|
21
|
+
false
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# This supports layouts in and out of basic SWT
|
26
|
+
def swt_layout_class_for(underscored_layout_name)
|
27
|
+
swt_layout_name = underscored_layout_name.camelcase(:upper)
|
28
|
+
swt_layout_class = eval(swt_layout_name)
|
29
|
+
unless swt_layout_class.ancestors.include?(org.eclipse.swt.widgets.Layout)
|
30
|
+
raise NameError, "Class #{swt_layout_class} matching #{underscored_layout_name} is not a subclass of org.eclipse.swt.widgets.Layout"
|
31
|
+
end
|
32
|
+
swt_layout_class
|
33
|
+
rescue => e
|
34
|
+
Glimmer.logger.debug "#{e.message}\n#{e.backtrace.join("\n")}"
|
35
|
+
raise e
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def initialize(underscored_layout_name, composite, args)
|
40
|
+
@underscored_layout_name = underscored_layout_name
|
41
|
+
@composite = composite
|
42
|
+
args = args.map {|arg| GSWT.constant(arg)}
|
43
|
+
@layout = self.class.swt_layout_class_for(underscored_layout_name).new(*args)
|
44
|
+
@composite.setLayout(@layout)
|
45
|
+
end
|
46
|
+
|
47
|
+
def process_block(block)
|
48
|
+
block.call(@layout)
|
49
|
+
end
|
50
|
+
|
51
|
+
def has_attribute?(attribute_name, *args)
|
52
|
+
@layout.respond_to?(attribute_setter(attribute_name), args)
|
53
|
+
end
|
54
|
+
|
55
|
+
def set_attribute(attribute_name, *args)
|
56
|
+
apply_property_type_converters(attribute_name, args)
|
57
|
+
@layout.send(attribute_setter(attribute_name), *args)
|
58
|
+
end
|
59
|
+
|
60
|
+
def apply_property_type_converters(attribute_name, args)
|
61
|
+
if args.count == 1 && GSWT.has_constant?(args.first)
|
62
|
+
args[0] = GSWT.constant(args.first)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def attribute_setter(attribute_name)
|
67
|
+
"#{attribute_name.to_s.camelcase(:lower)}="
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require_relative '../../parent'
|
2
|
+
require_relative 'g_swt'
|
3
|
+
|
4
|
+
module Glimmer
|
5
|
+
class GLayoutData
|
6
|
+
include_package 'org.eclipse.swt.layout'
|
7
|
+
|
8
|
+
include Parent
|
9
|
+
|
10
|
+
attr_reader :widget
|
11
|
+
attr_reader :layout_data
|
12
|
+
|
13
|
+
def initialize(widget, args)
|
14
|
+
@widget = widget
|
15
|
+
args = args.map {|arg| GSWT.constant(arg)}
|
16
|
+
begin
|
17
|
+
@layout_data = swt_layout_data_class.new(*args)
|
18
|
+
rescue => e
|
19
|
+
Glimmer.logger.debug "#{e.message}\n#{e.backtrace.join("\n")}"
|
20
|
+
@layout_data = args.first if args.count == 1
|
21
|
+
end
|
22
|
+
@widget.setLayoutData(@layout_data)
|
23
|
+
end
|
24
|
+
|
25
|
+
def process_block(block)
|
26
|
+
block.call(@layout)
|
27
|
+
end
|
28
|
+
|
29
|
+
def swt_layout_data_class
|
30
|
+
parent_layout_class_name = @widget.getParent.getLayout.class.name
|
31
|
+
layout_data_class_name = parent_layout_class_name.sub(/Layout$/, 'Data')
|
32
|
+
eval(layout_data_class_name)
|
33
|
+
end
|
34
|
+
|
35
|
+
def has_attribute?(attribute_name, *args)
|
36
|
+
@layout_data.respond_to?(attribute_setter(attribute_name), args)
|
37
|
+
end
|
38
|
+
|
39
|
+
def set_attribute(attribute_name, *args)
|
40
|
+
apply_property_type_converters(attribute_name, args)
|
41
|
+
@layout_data.send(attribute_setter(attribute_name), *args)
|
42
|
+
end
|
43
|
+
|
44
|
+
def apply_property_type_converters(attribute_name, args)
|
45
|
+
if args.count == 1 && GSWT.has_constant?(args.first)
|
46
|
+
args[0] = GSWT.constant(args.first)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def attribute_setter(attribute_name)
|
51
|
+
"#{attribute_name.to_s.camelcase(:lower)}="
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
@@ -10,13 +10,20 @@ module Glimmer
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def constant(symbol)
|
13
|
-
return symbol
|
13
|
+
return symbol unless symbol.is_a?(Symbol) || symbol.is_a?(String)
|
14
14
|
swt_constant_symbol = symbol.to_s.upcase.to_sym
|
15
15
|
SWT.const_get(swt_constant_symbol)
|
16
16
|
rescue
|
17
17
|
swt_constant_symbol = SWT.constants.find {|c| c.to_s.upcase == swt_constant_symbol.to_s}
|
18
18
|
SWT.const_get(swt_constant_symbol)
|
19
19
|
end
|
20
|
+
|
21
|
+
def has_constant?(symbol)
|
22
|
+
return false unless symbol.is_a?(Symbol) || symbol.is_a?(String)
|
23
|
+
!!constant(symbol)
|
24
|
+
rescue
|
25
|
+
false
|
26
|
+
end
|
20
27
|
end
|
21
28
|
end
|
22
29
|
end
|
data/lib/glimmer/command_handlers/{widget_method_command_handler.rb → property_command_handler.rb}
RENAMED
@@ -1,15 +1,15 @@
|
|
1
1
|
require File.dirname(__FILE__) + "/../command_handler"
|
2
|
-
require File.dirname(__FILE__) + "/models/g_widget"
|
3
2
|
|
4
3
|
module Glimmer
|
5
|
-
class
|
4
|
+
class PropertyCommandHandler
|
6
5
|
include CommandHandler
|
7
6
|
|
8
7
|
def can_handle?(parent, command_symbol, *args, &block)
|
9
|
-
parent.
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
parent.respond_to?(:set_attribute) and
|
9
|
+
parent.respond_to?(:has_attribute?) and
|
10
|
+
args.size > 0 and
|
11
|
+
block == nil and
|
12
|
+
parent.has_attribute?(command_symbol, *args)
|
13
13
|
end
|
14
14
|
|
15
15
|
def do_handle(parent, command_symbol, *args, &block)
|
@@ -2,6 +2,8 @@ require_relative "command_handler_chain_factory"
|
|
2
2
|
require_relative "command_handlers/color_command_handler"
|
3
3
|
require_relative "command_handlers/display_command_handler"
|
4
4
|
require_relative "command_handlers/shell_command_handler"
|
5
|
+
require_relative "command_handlers/layout_command_handler"
|
6
|
+
require_relative "command_handlers/layout_data_command_handler"
|
5
7
|
require_relative "command_handlers/widget_listener_command_handler"
|
6
8
|
require_relative "command_handlers/bind_command_handler"
|
7
9
|
require_relative "command_handlers/tab_item_command_handler"
|
@@ -12,7 +14,7 @@ require_relative "command_handlers/tree_properties_data_binding_command_handler"
|
|
12
14
|
require_relative "command_handlers/table_items_data_binding_command_handler"
|
13
15
|
require_relative "command_handlers/table_column_properties_data_binding_command_handler"
|
14
16
|
require_relative "command_handlers/data_binding_command_handler"
|
15
|
-
require_relative "command_handlers/
|
17
|
+
require_relative "command_handlers/property_command_handler"
|
16
18
|
require_relative "command_handlers/widget_command_handler"
|
17
19
|
|
18
20
|
module Glimmer
|
@@ -20,6 +22,8 @@ module Glimmer
|
|
20
22
|
CommandHandlerChainFactory.def_dsl(:swt,
|
21
23
|
DisplayCommandHandler.new,
|
22
24
|
ShellCommandHandler.new,
|
25
|
+
LayoutDataCommandHandler.new,
|
26
|
+
LayoutCommandHandler.new,
|
23
27
|
WidgetListenerCommandHandler.new,
|
24
28
|
BindCommandHandler.new,
|
25
29
|
TabItemCommandHandler.new,
|
@@ -31,7 +35,7 @@ module Glimmer
|
|
31
35
|
TableColumnPropertiesDataBindingCommandHandler.new,
|
32
36
|
DataBindingCommandHandler.new,
|
33
37
|
ColorCommandHandler.new,
|
34
|
-
|
38
|
+
PropertyCommandHandler.new,
|
35
39
|
WidgetCommandHandler.new
|
36
40
|
)
|
37
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AndyMaleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,10 +161,14 @@ files:
|
|
161
161
|
- lib/glimmer/command_handlers/combo_selection_data_binding_command_handler.rb
|
162
162
|
- lib/glimmer/command_handlers/data_binding_command_handler.rb
|
163
163
|
- lib/glimmer/command_handlers/display_command_handler.rb
|
164
|
+
- lib/glimmer/command_handlers/layout_command_handler.rb
|
165
|
+
- lib/glimmer/command_handlers/layout_data_command_handler.rb
|
164
166
|
- lib/glimmer/command_handlers/list_selection_data_binding_command_handler.rb
|
165
167
|
- lib/glimmer/command_handlers/models/g_color.rb
|
166
168
|
- lib/glimmer/command_handlers/models/g_display.rb
|
167
169
|
- lib/glimmer/command_handlers/models/g_font.rb
|
170
|
+
- lib/glimmer/command_handlers/models/g_layout.rb
|
171
|
+
- lib/glimmer/command_handlers/models/g_layout_data.rb
|
168
172
|
- lib/glimmer/command_handlers/models/g_runnable.rb
|
169
173
|
- lib/glimmer/command_handlers/models/g_shell.rb
|
170
174
|
- lib/glimmer/command_handlers/models/g_swt.rb
|
@@ -180,6 +184,7 @@ files:
|
|
180
184
|
- lib/glimmer/command_handlers/models/table_items_binding.rb
|
181
185
|
- lib/glimmer/command_handlers/models/tree_items_binding.rb
|
182
186
|
- lib/glimmer/command_handlers/models/widget_binding.rb
|
187
|
+
- lib/glimmer/command_handlers/property_command_handler.rb
|
183
188
|
- lib/glimmer/command_handlers/shell_command_handler.rb
|
184
189
|
- lib/glimmer/command_handlers/tab_item_command_handler.rb
|
185
190
|
- lib/glimmer/command_handlers/table_column_properties_data_binding_command_handler.rb
|
@@ -188,7 +193,6 @@ files:
|
|
188
193
|
- lib/glimmer/command_handlers/tree_properties_data_binding_command_handler.rb
|
189
194
|
- lib/glimmer/command_handlers/widget_command_handler.rb
|
190
195
|
- lib/glimmer/command_handlers/widget_listener_command_handler.rb
|
191
|
-
- lib/glimmer/command_handlers/widget_method_command_handler.rb
|
192
196
|
- lib/glimmer/parent.rb
|
193
197
|
- lib/glimmer/shine.rb
|
194
198
|
- lib/glimmer/swt_packages.rb
|