glimmer-dsl-swt 4.18.4.8 → 4.18.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +70 -0
  3. data/README.md +24 -11
  4. data/VERSION +1 -1
  5. data/bin/glimmer +3 -3
  6. data/docs/reference/GLIMMER_CONFIGURATION.md +7 -3
  7. data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +353 -145
  8. data/docs/reference/GLIMMER_SAMPLES.md +207 -41
  9. data/glimmer-dsl-swt.gemspec +33 -15
  10. data/lib/ext/glimmer/config.rb +3 -7
  11. data/lib/glimmer/data_binding/list_selection_binding.rb +13 -7
  12. data/lib/glimmer/data_binding/table_items_binding.rb +22 -17
  13. data/lib/glimmer/data_binding/tree_items_binding.rb +19 -15
  14. data/lib/glimmer/data_binding/widget_binding.rb +13 -15
  15. data/lib/glimmer/dsl/swt/{file_dialog_expression.rb → auto_exec_expression.rb} +6 -18
  16. data/lib/glimmer/dsl/swt/checkbox_group_selection_data_binding_expression.rb +9 -6
  17. data/lib/glimmer/dsl/swt/color_expression.rb +1 -1
  18. data/lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb +16 -14
  19. data/lib/glimmer/dsl/swt/custom_widget_expression.rb +4 -1
  20. data/lib/glimmer/dsl/swt/data_binding_expression.rb +2 -2
  21. data/lib/glimmer/dsl/swt/dialog_expression.rb +18 -9
  22. data/lib/glimmer/dsl/swt/dsl.rb +1 -0
  23. data/lib/glimmer/dsl/swt/exec_expression.rb +1 -1
  24. data/lib/glimmer/dsl/swt/font_expression.rb +1 -1
  25. data/lib/glimmer/dsl/swt/image_expression.rb +18 -3
  26. data/lib/glimmer/dsl/swt/list_selection_data_binding_expression.rb +11 -8
  27. data/lib/glimmer/dsl/swt/pixel_expression.rb +1 -1
  28. data/lib/glimmer/dsl/swt/radio_group_selection_data_binding_expression.rb +9 -5
  29. data/lib/glimmer/dsl/swt/shape_expression.rb +1 -1
  30. data/lib/glimmer/dsl/swt/shell_expression.rb +5 -2
  31. data/lib/glimmer/dsl/swt/widget_expression.rb +8 -4
  32. data/lib/glimmer/launcher.rb +3 -0
  33. data/lib/glimmer/rake_task/scaffold.rb +3 -0
  34. data/lib/glimmer/swt/color_proxy.rb +1 -1
  35. data/lib/glimmer/swt/custom/code_text.rb +33 -11
  36. data/lib/glimmer/swt/custom/drawable.rb +50 -2
  37. data/lib/glimmer/swt/custom/radio_group.rb +2 -1
  38. data/lib/glimmer/swt/custom/shape.rb +166 -34
  39. data/lib/glimmer/{dsl/swt/directory_dialog_expression.rb → swt/custom/shape/arc.rb} +15 -20
  40. data/lib/glimmer/swt/custom/shape/focus.rb +43 -0
  41. data/lib/glimmer/swt/custom/shape/image.rb +86 -0
  42. data/lib/glimmer/swt/custom/shape/line.rb +58 -0
  43. data/lib/glimmer/swt/custom/shape/oval.rb +43 -0
  44. data/lib/glimmer/swt/custom/shape/point.rb +52 -0
  45. data/lib/glimmer/swt/custom/shape/polygon.rb +73 -0
  46. data/lib/glimmer/swt/custom/shape/polyline.rb +73 -0
  47. data/lib/glimmer/swt/custom/shape/rectangle.rb +87 -0
  48. data/lib/glimmer/swt/custom/shape/text.rb +73 -0
  49. data/lib/glimmer/swt/date_time_proxy.rb +9 -3
  50. data/lib/glimmer/swt/dialog_proxy.rb +92 -0
  51. data/lib/glimmer/swt/display_proxy.rb +62 -2
  52. data/lib/glimmer/swt/expand_item_proxy.rb +18 -12
  53. data/lib/glimmer/swt/font_proxy.rb +13 -7
  54. data/lib/glimmer/swt/image_proxy.rb +16 -5
  55. data/lib/glimmer/swt/layout_data_proxy.rb +21 -15
  56. data/lib/glimmer/swt/layout_proxy.rb +19 -15
  57. data/lib/glimmer/swt/menu_proxy.rb +2 -2
  58. data/lib/glimmer/swt/message_box_proxy.rb +21 -7
  59. data/lib/glimmer/swt/properties.rb +3 -0
  60. data/lib/glimmer/swt/proxy_properties.rb +145 -0
  61. data/lib/glimmer/swt/scrolled_composite_proxy.rb +20 -7
  62. data/lib/glimmer/swt/shell_proxy.rb +96 -80
  63. data/lib/glimmer/swt/swt_proxy.rb +17 -0
  64. data/lib/glimmer/swt/tab_item_proxy.rb +6 -3
  65. data/lib/glimmer/swt/table_proxy.rb +32 -11
  66. data/lib/glimmer/swt/transform_proxy.rb +26 -38
  67. data/lib/glimmer/swt/tree_proxy.rb +11 -16
  68. data/lib/glimmer/swt/widget_listener_proxy.rb +6 -2
  69. data/lib/glimmer/swt/widget_proxy.rb +194 -137
  70. data/lib/glimmer/ui.rb +5 -0
  71. data/lib/glimmer/ui/custom_shell.rb +13 -7
  72. data/lib/glimmer/ui/custom_widget.rb +4 -5
  73. data/samples/elaborate/contact_manager.rb +7 -7
  74. data/samples/elaborate/login.rb +25 -21
  75. data/samples/elaborate/mandelbrot_fractal.rb +346 -39
  76. data/samples/elaborate/meta_sample.rb +1 -1
  77. data/samples/elaborate/tetris.rb +1 -0
  78. data/samples/elaborate/tic_tac_toe.rb +16 -14
  79. data/samples/elaborate/tic_tac_toe/board.rb +5 -5
  80. data/samples/elaborate/tic_tac_toe/cell.rb +5 -5
  81. data/samples/hello/hello_button.rb +7 -7
  82. data/samples/hello/hello_canvas.rb +145 -41
  83. data/samples/hello/hello_checkbox.rb +16 -14
  84. data/samples/hello/hello_checkbox_group.rb +11 -9
  85. data/samples/hello/hello_color_dialog.rb +66 -0
  86. data/samples/hello/hello_combo.rb +14 -12
  87. data/samples/hello/hello_computed.rb +7 -7
  88. data/samples/hello/hello_cursor.rb +58 -0
  89. data/samples/hello/hello_custom_shell.rb +17 -21
  90. data/samples/hello/hello_custom_widget.rb +4 -6
  91. data/samples/hello/hello_date_time.rb +14 -12
  92. data/samples/hello/hello_directory_dialog.rb +7 -7
  93. data/samples/hello/hello_expand_bar.rb +8 -8
  94. data/samples/hello/hello_file_dialog.rb +7 -7
  95. data/samples/hello/hello_font_dialog.rb +82 -0
  96. data/samples/hello/hello_group.rb +18 -16
  97. data/samples/hello/hello_list_multi_selection.rb +13 -11
  98. data/samples/hello/hello_list_single_selection.rb +13 -11
  99. data/samples/hello/hello_progress_bar.rb +125 -0
  100. data/samples/hello/hello_radio.rb +18 -16
  101. data/samples/hello/hello_radio_group.rb +14 -12
  102. data/samples/hello/hello_spinner.rb +7 -7
  103. data/samples/hello/hello_tab.rb +5 -5
  104. data/samples/hello/hello_table.rb +10 -5
  105. data/samples/hello/hello_tree.rb +485 -0
  106. metadata +30 -23
  107. data/lib/glimmer/swt/directory_dialog_proxy.rb +0 -65
  108. data/lib/glimmer/swt/file_dialog_proxy.rb +0 -66
@@ -1,6 +1,59 @@
1
+ - [Samples](#samples)
2
+ - [Hello Samples](#hello-samples)
3
+ - [Hello, World!](#hello-world)
4
+ - [Hello, Tab!](#hello-tab)
5
+ - [Hello, Combo!](#hello-combo)
6
+ - [Hello, List Single Selection!](#hello-list-single-selection)
7
+ - [Hello, List Multi Selection!](#hello-list-multi-selection)
8
+ - [Hello, Computed!](#hello-computed)
9
+ - [Hello, Message Box!](#hello-message-box)
10
+ - [Hello, Browser!](#hello-browser)
11
+ - [Hello, Drag and Drop!](#hello-drag-and-drop)
12
+ - [Hello, Menu Bar!](#hello-menu-bar)
13
+ - [Hello, Pop Up Context Menu!](#hello-pop-up-context-menu)
14
+ - [Hello, Custom Widget!](#hello-custom-widget)
15
+ - [Hello, Custom Shell!](#hello-custom-shell)
16
+ - [Hello, Sash Form!](#hello-sash-form)
17
+ - [Hello, Styled Text!](#hello-styled-text)
18
+ - [Hello, Expand Bar!](#hello-expand-bar)
19
+ - [Hello, Radio!](#hello-radio)
20
+ - [Hello, Radio Group!](#hello-radio-group)
21
+ - [Hello, Group!](#hello-group)
22
+ - [Hello, Checkbox!](#hello-checkbox)
23
+ - [Hello, Checkbox Group!](#hello-checkbox-group)
24
+ - [Hello, Directory Dialog!](#hello-directory-dialog)
25
+ - [Hello, File Dialog!](#hello-file-dialog)
26
+ - [Hello, Date Time!](#hello-date-time)
27
+ - [Hello, Spinner!](#hello-spinner)
28
+ - [Hello, Table!](#hello-table)
29
+ - [Hello, Button!](#hello-button)
30
+ - [Hello, Link!](#hello-link)
31
+ - [Hello, Dialog!](#hello-dialog)
32
+ - [Hello, Code Text!](#hello-code-text)
33
+ - [Hello, Canvas!](#hello-canvas)
34
+ - [Hello, Canvas Animation!](#hello-canvas-animation)
35
+ - [Hello, Canvas Transform!](#hello-canvas-transform)
36
+ - [Hello, Cursor!](#hello-cursor)
37
+ - [Hello, Progress Bar!](#hello-progress-bar)
38
+ - [Hello, Tree!](#hello-tree)
39
+ - [Hello, Color Dialog!](#hello-color-dialog)
40
+ - [Hello, Font Dialog!](#hello-font-dialog)
41
+ - [Elaborate Samples](#elaborate-samples)
42
+ - [User Profile](#user-profile)
43
+ - [Login](#login)
44
+ - [Tic Tac Toe](#tic-tac-toe)
45
+ - [Contact Manager](#contact-manager)
46
+ - [Glimmer Tetris](#glimmer-tetris)
47
+ - [Mandelbrot Fractal](#mandelbrot-fractal)
48
+ - [External Samples](#external-samples)
49
+ - [Glimmer Calculator](#glimmer-calculator)
50
+ - [Gladiator](#gladiator)
51
+ - [Timer](#timer)
52
+ - [License](#license)
53
+
1
54
  ## Samples
2
55
 
3
- Check the [samples](samples) directory in [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt) for examples on how to write Glimmer applications. To run a sample, make sure to install the `glimmer` gem first and then use the `glimmer samples` command to run it (alternatively, you may clone the repo, follow [CONTRIBUTING.md](CONTRIBUTING.md) instructions, and run samples locally with development glimmer command: `bin/glimmer`).
56
+ Check the [samples](/samples) directory in [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt) for examples on how to write Glimmer applications. To run a sample, make sure to install the `glimmer-dsl-swt` gem first and then use the `glimmer samples` command to run it (alternatively, you may clone the repo, follow [CONTRIBUTING.md](CONTRIBUTING.md) instructions, and run samples locally with development glimmer command: `bin/glimmer`).
4
57
 
5
58
  You may run any sample via this command:
6
59
 
@@ -8,7 +61,7 @@ You may run any sample via this command:
8
61
  glimmer samples
9
62
  ```
10
63
 
11
- This brings up the [Glimmer Meta-Sample (The Sample of Samples)](samples/elaborate/meta_sample.rb)
64
+ This brings up the [Glimmer Meta-Sample (The Sample of Samples)](/samples/elaborate/meta_sample.rb)
12
65
 
13
66
  ![Glimmer Meta-Sample](/images/glimmer-meta-sample.png)
14
67
 
@@ -28,7 +81,7 @@ For hello-type simple samples, check the following.
28
81
 
29
82
  Code:
30
83
 
31
- [samples/hello/hello_world.rb](samples/hello/hello_world.rb)
84
+ [samples/hello/hello_world.rb](/samples/hello/hello_world.rb)
32
85
 
33
86
  ![Hello World](/images/glimmer-hello-world.png)
34
87
 
@@ -36,7 +89,7 @@ Code:
36
89
 
37
90
  Code:
38
91
 
39
- [samples/hello/hello_tab.rb](samples/hello/hello_tab.rb)
92
+ [samples/hello/hello_tab.rb](/samples/hello/hello_tab.rb)
40
93
 
41
94
  ![Hello Tab English](/images/glimmer-hello-tab-english.png)
42
95
  ![Hello Tab French](/images/glimmer-hello-tab-french.png)
@@ -47,7 +100,7 @@ This sample demonstrates combo data-binding.
47
100
 
48
101
  Code:
49
102
 
50
- [samples/hello/hello_combo.rb](samples/hello/hello_combo.rb)
103
+ [samples/hello/hello_combo.rb](/samples/hello/hello_combo.rb)
51
104
 
52
105
  ![Hello Combo](/images/glimmer-hello-combo.png)
53
106
  ![Hello Combo Expanded](/images/glimmer-hello-combo-expanded.png)
@@ -58,7 +111,7 @@ This sample demonstrates list single-selection data-binding.
58
111
 
59
112
  Code:
60
113
 
61
- [samples/hello/hello_list_single_selection.rb](samples/hello/hello_list_single_selection.rb)
114
+ [samples/hello/hello_list_single_selection.rb](/samples/hello/hello_list_single_selection.rb)
62
115
 
63
116
  ![Hello List Single Selection](/images/glimmer-hello-list-single-selection.png)
64
117
 
@@ -68,7 +121,7 @@ This sample demonstrates list multi-selection data-binding.
68
121
 
69
122
  Code:
70
123
 
71
- [samples/hello/hello_list_multi_selection.rb](samples/hello/hello_list_multi_selection.rb)
124
+ [samples/hello/hello_list_multi_selection.rb](/samples/hello/hello_list_multi_selection.rb)
72
125
 
73
126
  ![Hello List Multi Selection](/images/glimmer-hello-list-multi-selection.png)
74
127
 
@@ -78,7 +131,7 @@ This sample demonstrates computed data-binding.
78
131
 
79
132
  Code:
80
133
 
81
- [samples/hello/hello_computed.rb](samples/hello/hello_computed.rb)
134
+ [samples/hello/hello_computed.rb](/samples/hello/hello_computed.rb)
82
135
 
83
136
  ![Hello Browser](/images/glimmer-hello-computed.png)
84
137
 
@@ -88,7 +141,7 @@ This sample demonstrates a `message_box` dialog.
88
141
 
89
142
  Code:
90
143
 
91
- [samples/hello/hello_message_box.rb](samples/hello/hello_message_box.rb)
144
+ [samples/hello/hello_message_box.rb](/samples/hello/hello_message_box.rb)
92
145
 
93
146
  ![Hello Message Box](/images/glimmer-hello-message-box.png)
94
147
  ![Hello Message Box Dialog](/images/glimmer-hello-message-box-dialog.png)
@@ -99,7 +152,7 @@ This sample demonstrates the `browser` widget.
99
152
 
100
153
  Code:
101
154
 
102
- [samples/hello/hello_browser.rb](samples/hello/hello_browser.rb)
155
+ [samples/hello/hello_browser.rb](/samples/hello/hello_browser.rb)
103
156
 
104
157
  ![Hello Browser](/images/glimmer-hello-browser.png)
105
158
 
@@ -109,7 +162,7 @@ This sample demonstrates drag and drop in Glimmer.
109
162
 
110
163
  Code:
111
164
 
112
- [samples/hello/hello_drag_and_drop.rb](samples/hello/hello_drag_and_drop.rb)
165
+ [samples/hello/hello_drag_and_drop.rb](/samples/hello/hello_drag_and_drop.rb)
113
166
 
114
167
  ![Hello Drag and Drop](/images/glimmer-hello-drag-and-drop.gif)
115
168
 
@@ -119,7 +172,7 @@ This sample demonstrates menus in Glimmer, including accelerators on the Mac.
119
172
 
120
173
  Code:
121
174
 
122
- [samples/hello/hello_menu_bar.rb](samples/hello/hello_menu_bar.rb)
175
+ [samples/hello/hello_menu_bar.rb](/samples/hello/hello_menu_bar.rb)
123
176
 
124
177
  ![Hello Menu Bar](/images/glimmer-hello-menu-bar.png)
125
178
 
@@ -163,7 +216,7 @@ This sample demonstrates pop up context menus in Glimmer.
163
216
 
164
217
  Code:
165
218
 
166
- [samples/hello/hello_pop_up_context_menu.rb](samples/hello/hello_pop_up_context_menu.rb)
219
+ [samples/hello/hello_pop_up_context_menu.rb](/samples/hello/hello_pop_up_context_menu.rb)
167
220
 
168
221
  ![Hello Pop Up Context Menu](/images/glimmer-hello-pop-up-context-menu.png)
169
222
  ![Hello Pop Up Context Menu Popped Up](/images/glimmer-hello-pop-up-context-menu-popped-up.png)
@@ -174,7 +227,7 @@ This sample demonstrates the use of a custom widget in Glimmer.
174
227
 
175
228
  Code:
176
229
 
177
- [samples/hello/hello_custom_widget.rb](samples/hello/hello_custom_widget.rb)
230
+ [samples/hello/hello_custom_widget.rb](/samples/hello/hello_custom_widget.rb)
178
231
 
179
232
  ![Hello Custom Widget](/images/glimmer-hello-custom-widget.gif)
180
233
 
@@ -184,7 +237,7 @@ This sample demonstrates the use of a custom shell (aka custom window) in Glimme
184
237
 
185
238
  Code:
186
239
 
187
- [samples/hello/hello_custom_shell.rb](samples/hello/hello_custom_shell.rb)
240
+ [samples/hello/hello_custom_shell.rb](/samples/hello/hello_custom_shell.rb)
188
241
 
189
242
  ![Hello Custom Shell](/images/glimmer-hello-custom-shell.png)
190
243
  ![Hello Custom Shell Email1](/images/glimmer-hello-custom-shell-email1.png)
@@ -197,7 +250,7 @@ This sample demonstrates the use of a `sash_form` in Glimmer.
197
250
 
198
251
  Code:
199
252
 
200
- [samples/hello/hello_sash_form.rb](samples/hello/hello_sash_form.rb)
253
+ [samples/hello/hello_sash_form.rb](/samples/hello/hello_sash_form.rb)
201
254
 
202
255
  Hello, Sash Form! Horizontal Orientation
203
256
 
@@ -229,7 +282,7 @@ This sample demonstrates the use of a `styled_text` in Glimmer.
229
282
 
230
283
  Code:
231
284
 
232
- [samples/hello/hello_styled_text.rb](samples/hello/hello_styled_text.rb)
285
+ [samples/hello/hello_styled_text.rb](/samples/hello/hello_styled_text.rb)
233
286
 
234
287
  Hello, Styled Text!
235
288
 
@@ -241,7 +294,7 @@ This sample demonstrates the use of a `expand_bar` and `expand_item` in Glimmer.
241
294
 
242
295
  Code:
243
296
 
244
- [samples/hello/hello_expand_bar.rb](samples/hello/hello_expand_bar.rb)
297
+ [samples/hello/hello_expand_bar.rb](/samples/hello/hello_expand_bar.rb)
245
298
 
246
299
  Hello, Expand Bar! All Expanded
247
300
 
@@ -265,7 +318,7 @@ This sample demonstrates the use of a `radio` (aka `button(:radio)`) in Glimmer.
265
318
 
266
319
  Code:
267
320
 
268
- [samples/hello/hello_radio.rb](samples/hello/hello_radio.rb)
321
+ [samples/hello/hello_radio.rb](/samples/hello/hello_radio.rb)
269
322
 
270
323
  Hello, Radio!
271
324
 
@@ -277,7 +330,7 @@ This sample demonstrates the use of a `radio_group` in Glimmer, which provides t
277
330
 
278
331
  Code:
279
332
 
280
- [samples/hello/hello_radio_group.rb](samples/hello/hello_radio_group.rb)
333
+ [samples/hello/hello_radio_group.rb](/samples/hello/hello_radio_group.rb)
281
334
 
282
335
  Hello, Radio Group!
283
336
 
@@ -289,7 +342,7 @@ This sample demonstrates the use of a `group` in Glimmer (not to be confused wit
289
342
 
290
343
  Code:
291
344
 
292
- [samples/hello/hello_group.rb](samples/hello/hello_group.rb)
345
+ [samples/hello/hello_group.rb](/samples/hello/hello_group.rb)
293
346
 
294
347
  Hello, Group!
295
348
 
@@ -301,7 +354,7 @@ This sample demonstrates the use of a `checkbox` (aka `check` or `button(:check)
301
354
 
302
355
  Code:
303
356
 
304
- [samples/hello/hello_checkbox.rb](samples/hello/hello_checkbox.rb)
357
+ [samples/hello/hello_checkbox.rb](/samples/hello/hello_checkbox.rb)
305
358
 
306
359
  Hello, Checkbox!
307
360
 
@@ -313,7 +366,7 @@ This sample demonstrates the use of a `checkbox_group` (aka `check_group`) in Gl
313
366
 
314
367
  Code:
315
368
 
316
- [samples/hello/hello_checkbox_group.rb](samples/hello/hello_checkbox_group.rb)
369
+ [samples/hello/hello_checkbox_group.rb](/samples/hello/hello_checkbox_group.rb)
317
370
 
318
371
  Hello, Checkbox Group!
319
372
 
@@ -325,7 +378,7 @@ This sample demonstrates the use of a `directory_dialog` in Glimmer.
325
378
 
326
379
  Code:
327
380
 
328
- [samples/hello/hello_directory_dialog.rb](samples/hello/hello_directory_dialog.rb)
381
+ [samples/hello/hello_directory_dialog.rb](/samples/hello/hello_directory_dialog.rb)
329
382
 
330
383
  Hello, Directory Dialog!
331
384
 
@@ -345,7 +398,7 @@ This sample demonstrates the use of a `file_dialog` in Glimmer.
345
398
 
346
399
  Code:
347
400
 
348
- [samples/hello/hello_file_dialog.rb](samples/hello/hello_file_dialog.rb)
401
+ [samples/hello/hello_file_dialog.rb](/samples/hello/hello_file_dialog.rb)
349
402
 
350
403
  Hello, File Dialog!
351
404
 
@@ -365,7 +418,7 @@ This sample demonstrates the use of [date_time](#datetime) widget keywords in Gl
365
418
 
366
419
  Code:
367
420
 
368
- [samples/hello/hello_date_time.rb](samples/hello/hello_date_time.rb)
421
+ [samples/hello/hello_date_time.rb](/samples/hello/hello_date_time.rb)
369
422
 
370
423
  Hello, Date Time!
371
424
 
@@ -377,7 +430,7 @@ This sample demonstrates the use of `spinner` widget in Glimmer
377
430
 
378
431
  Code:
379
432
 
380
- [samples/hello/hello_spinner.rb](samples/hello/hello_spinner.rb)
433
+ [samples/hello/hello_spinner.rb](/samples/hello/hello_spinner.rb)
381
434
 
382
435
  Hello, Spinner!
383
436
 
@@ -389,7 +442,7 @@ This sample demonstrates the use of [table](#table) widget in Glimmer, including
389
442
 
390
443
  Code:
391
444
 
392
- [samples/hello/hello_table.rb](samples/hello/hello_table.rb)
445
+ [samples/hello/hello_table.rb](/samples/hello/hello_table.rb)
393
446
 
394
447
  Hello, Table!
395
448
 
@@ -437,7 +490,7 @@ This sample demonstrates the use of the `button` widget in Glimmer, including da
437
490
 
438
491
  Code:
439
492
 
440
- [samples/hello/hello_button.rb](samples/hello/hello_button.rb)
493
+ [samples/hello/hello_button.rb](/samples/hello/hello_button.rb)
441
494
 
442
495
  Hello, Button!
443
496
 
@@ -453,7 +506,7 @@ This sample demonstrates the use of the `link` widget in Glimmer, including iden
453
506
 
454
507
  Code:
455
508
 
456
- [samples/hello/hello_link.rb](samples/hello/hello_link.rb)
509
+ [samples/hello/hello_link.rb](/samples/hello/hello_link.rb)
457
510
 
458
511
  Hello, Link!
459
512
 
@@ -469,7 +522,7 @@ This sample demonstrates the use of the `dialog` widget in Glimmer, which provid
469
522
 
470
523
  Code:
471
524
 
472
- [samples/hello/hello_dialog.rb](samples/hello/hello_dialog.rb)
525
+ [samples/hello/hello_dialog.rb](/samples/hello/hello_dialog.rb)
473
526
 
474
527
  Hello, Dialog!
475
528
 
@@ -485,7 +538,7 @@ This sample demonstrates the Glimmer Built-In [Code Text Custom Widget](#code-te
485
538
 
486
539
  Code:
487
540
 
488
- [samples/hello/hello_code_text.rb](samples/hello/hello_code_text.rb)
541
+ [samples/hello/hello_code_text.rb](/samples/hello/hello_code_text.rb)
489
542
 
490
543
  Hello, Code Text! Ruby Language / Glimmer Theme / Show Line Numbers (default width of 4)
491
544
 
@@ -505,19 +558,35 @@ This sample demonstrates the use of the `canvas` widget and [Shape DSL](#canvas-
505
558
 
506
559
  Code:
507
560
 
508
- [samples/hello/hello_canvas.rb](samples/hello/hello_canvas.rb)
561
+ [samples/hello/hello_canvas.rb](/samples/hello/hello_canvas.rb)
509
562
 
510
563
  Hello, Canvas!
511
564
 
512
565
  ![Hello Canvas](/images/glimmer-hello-canvas.png)
513
566
 
567
+ Hello, Canvas! with Moved Shapes (via Drag'n'Drop)
568
+
569
+ ![Hello Canvas Moved Shapes](/images/glimmer-hello-canvas-moved-shapes.png)
570
+
571
+ Hello, Canvas! Menu (for background/foreground color changes)
572
+
573
+ ![Hello Canvas Menu](/images/glimmer-hello-canvas-menu.png)
574
+
575
+ Hello, Canvas! Color Dialog
576
+
577
+ ![Hello Canvas Color Dialog](/images/glimmer-hello-canvas-color-dialog.png)
578
+
579
+ Hello, Canvas! Colors Changed
580
+
581
+ ![Hello Canvas Colors Changed](/images/glimmer-hello-canvas-colors-changed.png)
582
+
514
583
  #### Hello, Canvas Animation!
515
584
 
516
585
  This sample demonstrates the use of the `canvas` widget and [Animation DSL](#canvas-animation-dsl) in Glimmer.
517
586
 
518
587
  Code:
519
588
 
520
- [samples/hello/hello_canvas_animation.rb](samples/hello/hello_canvas_animation.rb)
589
+ [samples/hello/hello_canvas_animation.rb](/samples/hello/hello_canvas_animation.rb)
521
590
 
522
591
  Hello, Canvas Animation!
523
592
 
@@ -533,12 +602,83 @@ This sample demonstrates the use of the `transform` keyword as part of the [Tran
533
602
 
534
603
  Code:
535
604
 
536
- [samples/hello/hello_canvas_transform.rb](samples/hello/hello_canvas_transform.rb)
605
+ [samples/hello/hello_canvas_transform.rb](/samples/hello/hello_canvas_transform.rb)
537
606
 
538
607
  Hello, Canvas Transform!
539
608
 
540
609
  ![Hello Canvas Transform](/images/glimmer-hello-canvas-transform.png)
541
610
 
611
+ #### Hello, Cursor!
612
+
613
+ This sample demonstrates the use of the `cursor` property keyword to change the mouse cursor.
614
+
615
+ Code:
616
+
617
+ [samples/hello/hello_cursor.rb](/samples/hello/hello_cursor.rb)
618
+
619
+ Hello, Cursor!
620
+
621
+ ![Hello Cursor](/images/glimmer-hello-cursor.gif)
622
+
623
+ #### Hello, Progress Bar!
624
+
625
+ This sample demonstrates the use of the `progress_bar` widget keyword.
626
+
627
+ It includes an `:indeterminate` progress bar on top, for cases when you could not calculate progress, but still want to inform the user there is an operation happening in the background.
628
+
629
+ Below it, there are a determinate `:horizontal` (default) progress bar and a `:vertical` progress bar.
630
+
631
+ Code:
632
+
633
+ [samples/hello/hello_progress_bar.rb](/samples/hello/hello_progress_bar.rb)
634
+
635
+ Hello, Progress Bar!
636
+
637
+ ![Hello Progress Bar](/images/glimmer-hello-progress-bar.gif)
638
+
639
+ #### Hello, Tree!
640
+
641
+ This sample demonstrates the use of the `tree` widget along with tree data-binding.
642
+
643
+ Code:
644
+
645
+ [samples/hello/hello_tree.rb](/samples/hello/hello_tree.rb)
646
+
647
+ Hello, Tree!
648
+
649
+ ![Hello Tree](/images/glimmer-hello-tree.png)
650
+
651
+ #### Hello, Color Dialog!
652
+
653
+ This sample demonstrates the use of the `color_dialog` keyword.
654
+
655
+ Code:
656
+
657
+ [samples/hello/hello_color_dialog.rb](/samples/hello/hello_color_dialog.rb)
658
+
659
+ Hello, Color Dialog!
660
+
661
+ ![Hello Color Dialog](/images/glimmer-hello-color-dialog.png)
662
+
663
+ ![Hello Color Dialog Choose Color](/images/glimmer-hello-color-dialog-choose-color.png)
664
+
665
+ ![Hello Color Dialog Color Changed](/images/glimmer-hello-color-dialog-color-changed.png)
666
+
667
+ #### Hello, Font Dialog!
668
+
669
+ This sample demonstrates the use of the `font_dialog` keyword.
670
+
671
+ Code:
672
+
673
+ [samples/hello/hello_font_dialog.rb](/samples/hello/hello_font_dialog.rb)
674
+
675
+ Hello, Font Dialog!
676
+
677
+ ![Hello Font Dialog](/images/glimmer-hello-font-dialog.png)
678
+
679
+ ![Hello Font Dialog Choose Font](/images/glimmer-hello-font-dialog-choose-font.png)
680
+
681
+ ![Hello Font Dialog Font Changed](/images/glimmer-hello-font-dialog-font-changed.png)
542
682
 
543
683
  ### Elaborate Samples
544
684
 
@@ -552,7 +692,7 @@ Please note that the code has changed since that article was written (the GUI DS
552
692
 
553
693
  Code:
554
694
 
555
- [samples/elaborate/user_profile.rb](samples/elaborate/user_profile.rb)
695
+ [samples/elaborate/user_profile.rb](/samples/elaborate/user_profile.rb)
556
696
 
557
697
  ![User Profile](/images/glimmer-user-profile.png)
558
698
 
@@ -562,7 +702,7 @@ This sample demonstrates basic data-binding, password and text fields, and field
562
702
 
563
703
  Code:
564
704
 
565
- [samples/elaborate/login.rb](samples/elaborate/login.rb)
705
+ [samples/elaborate/login.rb](/samples/elaborate/login.rb)
566
706
 
567
707
  ![Login](/images/glimmer-login.png)
568
708
  ![Login Filled In](/images/glimmer-login-filled-in.png)
@@ -576,7 +716,7 @@ Code:
576
716
 
577
717
  (Please note that on some Linux instances where the display x-axis is set to double-scale, you need to set the `shell` `minimum_size` to `300, 178` instead of `150, 178`)
578
718
 
579
- [samples/elaborate/tic_tac_toe.rb](samples/elaborate/tic_tac_toe.rb)
719
+ [samples/elaborate/tic_tac_toe.rb](/samples/elaborate/tic_tac_toe.rb)
580
720
 
581
721
  ![Tic Tac Toe](/images/glimmer-tic-tac-toe.png)
582
722
  ![Tic Tac Toe In Progress](/images/glimmer-tic-tac-toe-in-progress.png)
@@ -588,7 +728,7 @@ This sample demonstrates table data-binding, sorting, filtering, GUI layout, MVP
588
728
 
589
729
  Code:
590
730
 
591
- [samples/elaborate/contact_manager.rb](samples/elaborate/contact_manager.rb)
731
+ [samples/elaborate/contact_manager.rb](/samples/elaborate/contact_manager.rb)
592
732
 
593
733
  Contact Manager
594
734
 
@@ -618,7 +758,7 @@ Note that it works optimally on the Mac. It is very new, so it has not been opti
618
758
 
619
759
  Code:
620
760
 
621
- [samples/elaborate/tetris.rb](samples/elaborate/tetris.rb)
761
+ [samples/elaborate/tetris.rb](/samples/elaborate/tetris.rb)
622
762
 
623
763
  ![Tetris Icon](/images/glimmer-tetris-icon.png)
624
764
 
@@ -638,6 +778,32 @@ Code:
638
778
 
639
779
  ![Tetris Help Menu](/images/glimmer-tetris-help-menu.png)
640
780
 
781
+ #### Mandelbrot Fractal
782
+
783
+ This sample demonstrates how to render canvas graphics with multi-threaded processing taking advantage of all CPU cores and doing background processing of images.
784
+
785
+ It renders the famous Mandelbrot Fractal, enabling zooming and panning (go to Help -> Instructions for more details)
786
+
787
+ The Mandelbrot Fractal is known to take a long time to render, but thanks to multi-core processing, the app starts in about 10 seconds with 4 CPU cores (runs faster the more cores you have)
788
+
789
+ Lower the cores in the menu to get more responsive interaction (e.g. zooming/panning). Once you change the cores, the change will not take effect till the next zoom calculation cycle.
790
+
791
+ Code:
792
+
793
+ [samples/elaborate/mandelbrot_fractal.rb](/samples/elaborate/mandelbrot_fractal.rb)
794
+
795
+ ![Mandelbrot Fractal Zoom 1](/images/glimmer-mandelbrot-zoom1.png)
796
+
797
+ ![Mandelbrot Fractal Zoom 3](/images/glimmer-mandelbrot-zoom3.png)
798
+
799
+ ![Mandelbrot Fractal Zoom 5](/images/glimmer-mandelbrot-zoom5.png)
800
+
801
+ ![Mandelbrot Fractal View Menu](/images/glimmer-mandelbrot-menu-view.png)
802
+
803
+ ![Mandelbrot Fractal Cores Menu](/images/glimmer-mandelbrot-menu-cores.png)
804
+
805
+ ![Mandelbrot Fractal Help Menu](/images/glimmer-mandelbrot-menu-help.png)
806
+
641
807
  ### External Samples
642
808
 
643
809
  #### Glimmer Calculator
@@ -648,7 +814,7 @@ Code:
648
814
 
649
815
  #### Gladiator
650
816
 
651
- [<img src='https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-cs-gladiator-logo.svg' height=40 /> Gladiator](https://github.com/AndyObtiva/glimmer-cs-gladiator) (short for Glimmer Editor) is a Glimmer sample project under on-going development.
817
+ [<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.
652
818
  You may check it out to learn how to build a Glimmer Custom Shell gem.
653
819
 
654
820
  [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-gladiator/master/images/glimmer-gladiator.png" />](https://github.com/AndyObtiva/glimmer-cs-gladiator)