glimmer-dsl-swt 4.24.0.0 → 4.24.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,7 +82,6 @@
82
82
  - [Snake](#snake)
83
83
  - [External Samples](#external-samples)
84
84
  - [Glimmer Calculator](#glimmer-calculator)
85
- - [Gladiator](#gladiator)
86
85
  - [Timer](#timer)
87
86
  - [Contact Manager App](#contact-manager-app)
88
87
  - [License](#license)
@@ -863,7 +862,7 @@ Hello, Canvas! Colors Changed
863
862
 
864
863
  Hello, Canvas! Data-Binding (changing a `text` shape `string` via data-binding changes from another thread)
865
864
 
866
- ![Hello Canvas Data Binding](/images/glimmer-hello-canvas-data-binding.gif)
865
+ ![Hello Canvas Text Data Binding](/images/glimmer-hello-canvas-text-data-binding.gif)
867
866
 
868
867
  #### Hello, Canvas Animation!
869
868
 
@@ -923,9 +922,7 @@ Code:
923
922
 
924
923
  Hello, Canvas Data Binding!
925
924
 
926
- ![Hello Canvas Data Binding](/images/glimmer-hello-canvas-data-binding.png)
927
-
928
- ![Hello Canvas Data Binding Line Changed](/images/glimmer-hello-canvas-data-binding-line-changed.png)
925
+ ![Hello Canvas Data Binding](/images/glimmer-hello-canvas-data-binding.gif)
929
926
 
930
927
  #### Hello, Canvas Shape Listeners!
931
928
 
@@ -1407,23 +1404,6 @@ Snake
1407
1404
 
1408
1405
  [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-calculator/master/glimmer-cs-calculator-screenshot.png" />](https://github.com/AndyObtiva/glimmer-cs-calculator)
1409
1406
 
1410
- #### Gladiator
1411
-
1412
- [<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.png' height=40 /> Gladiator](https://github.com/AndyObtiva/glimmer-cs-gladiator) (short for Glimmer Editor) is a Glimmer sample project under on-going development.
1413
- You may check it out to learn how to build a Glimmer Custom Shell gem.
1414
-
1415
- [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-gladiator.png" />](https://github.com/AndyObtiva/glimmer-cs-gladiator)
1416
-
1417
- Gladiator is a good demonstration of:
1418
- - MVP Pattern
1419
- - Tree data-binding
1420
- - List data-binding
1421
- - Text selection data-binding
1422
- - Tabs
1423
- - Context menus
1424
- - Custom Shell
1425
- - Custom widget
1426
-
1427
1407
  #### Timer
1428
1408
 
1429
1409
  [<img alt="Glimmer Timer Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-timer/master/images/glimmer-timer-logo.png" height=40 /> Timer](https://github.com/AndyObtiva/glimmer-cs-timer) is a sample app demonstrating data-binding, multi-threading, and JSound (Java Sound) library integration in a desktop application.
Binary file
@@ -195,16 +195,12 @@ module Glimmer
195
195
  system "bash -c '#{RVM_FUNCTION}\n cd .\n bundle\n rspec --init\n'"
196
196
  end
197
197
  write 'spec/spec_helper.rb', spec_helper_file
198
- if OS.windows?
199
- system "glimmer package" # TODO handle Windows with batch file
200
- system "\"packages/bundles/#{human_name(app_name)}/#{human_name(app_name)}.exe\""
198
+ if OS.mac?
199
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n JRUBY_OPTS=\"$JRUBY_OPTS -J-XstartOnFirstThread\" glimmer run\n'"
200
+ elsif OS.linux?
201
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer run\n'"
201
202
  else
202
- system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer package\n'"
203
- if OS.mac?
204
- system "bash -c '#{RVM_FUNCTION}\n cd .\n JRUBY_OPTS=\"$JRUBY_OPTS -J-XstartOnFirstThread\" glimmer run\n'"
205
- else
206
- system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer run\n'"
207
- end
203
+ system "glimmer run"
208
204
  end
209
205
  end
210
206
 
@@ -294,16 +290,12 @@ module Glimmer
294
290
  cp File.expand_path('../../../../icons/scaffold_app.png', __FILE__), icon_file
295
291
  puts "Created #{current_dir_name}/#{icon_file}"
296
292
 
297
- if OS.windows?
298
- system "glimmer package" # TODO handle windows properly with batch file
299
- system "\"packages/bundles/#{human_name(custom_shell_name)}/#{human_name(custom_shell_name)}.exe\""
293
+ if OS.mac?
294
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n JRUBY_OPTS=\"$JRUBY_OPTS -J-XstartOnFirstThread\" glimmer run\n'"
295
+ elsif OS.linux?
296
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer run\n'"
300
297
  else
301
- system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer package\n'"
302
- if OS.mac?
303
- system "bash -c '#{RVM_FUNCTION}\n cd .\n JRUBY_OPTS=\"$JRUBY_OPTS -J-XstartOnFirstThread\" glimmer run\n'"
304
- else
305
- system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer run\n'"
306
- end
298
+ system "glimmer run"
307
299
  end
308
300
  puts "Finished creating #{gem_name} Ruby gem."
309
301
  puts 'Edit Rakefile to configure gem details.'
@@ -98,6 +98,7 @@ module Glimmer
98
98
 
99
99
  def add_to_swt_path(swt_path)
100
100
  the_path_segment_args = path_segment_args.dup
101
+ the_path_segment_args = the_path_segment_args.first if the_path_segment_args.size == 1 && the_path_segment_args.first.is_a?(Array)
101
102
  if !is_a?(Point) && self.class != Path
102
103
  if !previous_point_connected?
103
104
  if the_path_segment_args.count == default_path_segment_arg_count
@@ -562,7 +562,8 @@ module Glimmer
562
562
  end
563
563
 
564
564
  def has_attribute?(attribute_name, *args)
565
- self.class.gc_instance_methods.include?(attribute_setter(attribute_name)) or
565
+ attribute_name == 'data' or
566
+ self.class.gc_instance_methods.include?(attribute_setter(attribute_name)) or
566
567
  parameter_name?(attribute_name) or
567
568
  (respond_to?(attribute_name, super: true) and respond_to?(ruby_attribute_setter(attribute_name), super: true))
568
569
  end
@@ -577,7 +578,9 @@ module Glimmer
577
578
  property_change = nil
578
579
  ruby_attribute_getter_name = ruby_attribute_getter(attribute_name)
579
580
  ruby_attribute_setter_name = ruby_attribute_setter(attribute_name)
580
- if parameter_name?(attribute_name)
581
+ if attribute_name == 'data'
582
+ set_data(*args)
583
+ elsif parameter_name?(attribute_name)
581
584
  return if ruby_attribute_getter_name == (args.size == 1 ? args.first : args)
582
585
  set_parameter_attribute(ruby_attribute_getter_name, *args)
583
586
  elsif (respond_to?(attribute_name, super: true) and respond_to?(ruby_attribute_setter_name, super: true))
@@ -48,7 +48,7 @@ class GameOfLife
48
48
  (0...HEIGHT).each do |row_index|
49
49
  (0...WIDTH).each do |column_index|
50
50
  rectangle(column_index*CELL_WIDTH, row_index*CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT) {
51
- background <= [@grid.cell_rows[row_index][column_index], "alive", on_read: ->(a) {a ? :black : :white}]
51
+ background <= [@grid.cell_rows[row_index][column_index], :alive, on_read: ->(a) {a ? :black : :white}]
52
52
 
53
53
  on_mouse_down do
54
54
  @grid.cell_rows[row_index][column_index].toggle_aliveness!
@@ -59,7 +59,7 @@ class GameOfLife
59
59
  end
60
60
 
61
61
  on_mouse_move do
62
- @grid.cell_rows[row_index][column_index].alive = true if @drag_detected
62
+ @grid.cell_rows[row_index][column_index].live! if @drag_detected
63
63
  end
64
64
 
65
65
  on_mouse_up do
@@ -19,3 +19,7 @@ Hello, Date Time!: MpXbPEMUrns
19
19
  Hello, Sash Form!: F7j2TTpbX6s
20
20
  Hello, Cursor!: 4AYlo8n3WFc
21
21
  Hello, Tray Item!: VYXgIr5zxMM
22
+ Hello, Drag And Drop!: zJSG5ysow0M
23
+ Hello, Canvas Drag And Drop!: e7taTbRrDAM
24
+ Game Of Life: pDE79YRjOjs
25
+ Hello, Canvas Data Binding!: PQ_Y8e5VeDo