glimmer-dsl-swt 4.17.8.0 → 4.17.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +47 -5
- data/VERSION +1 -1
- data/glimmer-dsl-swt.gemspec +2 -2
- data/lib/glimmer/dsl/swt/directory_dialog_expression.rb +1 -1
- data/lib/glimmer/dsl/swt/file_dialog_expression.rb +1 -1
- data/lib/glimmer/dsl/swt/shell_expression.rb +1 -1
- data/lib/glimmer/dsl/swt/widget_expression.rb +1 -1
- data/lib/glimmer/swt/custom/code_text.rb +14 -13
- data/lib/glimmer/swt/directory_dialog_proxy.rb +1 -1
- data/lib/glimmer/swt/file_dialog_proxy.rb +1 -1
- data/lib/glimmer/swt/menu_proxy.rb +1 -1
- data/lib/glimmer/swt/shell_proxy.rb +1 -1
- data/lib/glimmer/swt/widget_proxy.rb +1 -1
- data/lib/glimmer/ui/custom_shell.rb +1 -1
- data/samples/hello/hello_directory_dialog.rb +1 -1
- data/samples/hello/hello_file_dialog.rb +1 -1
- data/samples/hello/hello_world.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfdd8588cde714f33759f86c2141471c31271fa89e2cf859faabd160117f4b0a
|
4
|
+
data.tar.gz: 20bd807fc37fa19ef0c2fd37d8c1f84af6119258084a5167fbb6758cd3d69a39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c74a0ef3615ee39a387505afe13e5fddecb49ff1ec9fc46384ddd19323f58116f30239efe66a0ec49774aa1d7a8b880173609169dd3052b62798d34c5015657b
|
7
|
+
data.tar.gz: 138dd0a89bf23c998a590c10f81ff2f463ebefe307361bfcade21b6681d40c8869e495fde66cc72e66d6ed0051c5dccf61eacc76c7853d6f4d737dea7c9044ee
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.17.8.1
|
4
|
+
|
5
|
+
- Fixed an issue in Windows with code_text
|
6
|
+
|
3
7
|
### 4.17.8.0
|
4
8
|
|
5
9
|
- Officially Support SWT FileDialog with the `file_dialog` keyword (was unofficially supported before via standard SWT)
|
@@ -366,4 +370,4 @@
|
|
366
370
|
|
367
371
|
## 0.1.0
|
368
372
|
|
369
|
-
- Extracted Glimmer DSL for SWT (glimmer-dsl-swt gem) from Glimmer
|
373
|
+
- Extracted Glimmer DSL for SWT (glimmer-dsl-swt gem) from Glimmer
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.17.8.
|
1
|
+
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.17.8.1
|
2
2
|
## JRuby Desktop Development GUI Library
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
|
4
4
|
[![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
|
@@ -351,6 +351,8 @@ Glimmer App:
|
|
351
351
|
- [Hello, Radio Group!](#hello-radio-group)
|
352
352
|
- [Hello, Checkbox!](#hello-checkbox)
|
353
353
|
- [Hello, Checkbox Group!](#hello-checkbox-group)
|
354
|
+
- [Hello, Directory Dialog!](#hello-directory-dialog)
|
355
|
+
- [Hello, File Dialog!](#hello-file-dialog)
|
354
356
|
- [Elaborate Samples](#elaborate-samples)
|
355
357
|
- [User Profile](#user-profile)
|
356
358
|
- [Login](#login)
|
@@ -444,7 +446,7 @@ jgem install glimmer-dsl-swt
|
|
444
446
|
|
445
447
|
Or this command if you want a specific version:
|
446
448
|
```
|
447
|
-
jgem install glimmer-dsl-swt -v 4.17.8.
|
449
|
+
jgem install glimmer-dsl-swt -v 4.17.8.1
|
448
450
|
```
|
449
451
|
|
450
452
|
`jgem` is JRuby's version of `gem` command.
|
@@ -520,7 +522,7 @@ bin/glimmer samples
|
|
520
522
|
Below are the full usage instructions that come up when running `glimmer` without args.
|
521
523
|
|
522
524
|
```
|
523
|
-
Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v4.17.8.
|
525
|
+
Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v4.17.8.1
|
524
526
|
|
525
527
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
526
528
|
|
@@ -997,7 +999,7 @@ Output:
|
|
997
999
|
|
998
1000
|
Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
|
999
1001
|
Opal glimmer-dsl-opal 0.4.0 AndyMaleh Glimmer DSL for Opal
|
1000
|
-
Swt glimmer-dsl-swt 4.17.8.
|
1002
|
+
Swt glimmer-dsl-swt 4.17.8.1 AndyMaleh Glimmer DSL for SWT
|
1001
1003
|
Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
|
1002
1004
|
Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
|
1003
1005
|
```
|
@@ -3746,6 +3748,46 @@ Hello, Checkbox Group!
|
|
3746
3748
|
|
3747
3749
|
![Hello Checkbox Group](images/glimmer-hello-checkbox-group.png)
|
3748
3750
|
|
3751
|
+
#### Hello, Directory Dialog!
|
3752
|
+
|
3753
|
+
This sample demonstrates the use of a `directory_dialog` in Glimmer.
|
3754
|
+
|
3755
|
+
Code:
|
3756
|
+
|
3757
|
+
[samples/hello/hello_directory_dialog.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_directory_dialog.rb)
|
3758
|
+
|
3759
|
+
Hello, Directory Dialog!
|
3760
|
+
|
3761
|
+
![Hello Directory Dialog](images/glimmer-hello-directory-dialog.png)
|
3762
|
+
|
3763
|
+
Hello, Directory Dialog! Browse...
|
3764
|
+
|
3765
|
+
![Hello Directory Dialog](images/glimmer-hello-directory-dialog-browse.png)
|
3766
|
+
|
3767
|
+
Hello, Directory Dialog! Selected Directory
|
3768
|
+
|
3769
|
+
![Hello Directory Dialog](images/glimmer-hello-directory-dialog-selected-directory.png)
|
3770
|
+
|
3771
|
+
#### Hello, File Dialog!
|
3772
|
+
|
3773
|
+
This sample demonstrates the use of a `file_dialog` in Glimmer.
|
3774
|
+
|
3775
|
+
Code:
|
3776
|
+
|
3777
|
+
[samples/hello/hello_file_dialog.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_file_dialog.rb)
|
3778
|
+
|
3779
|
+
Hello, File Dialog!
|
3780
|
+
|
3781
|
+
![Hello File Dialog](images/glimmer-hello-file-dialog.png)
|
3782
|
+
|
3783
|
+
Hello, File Dialog! Browse...
|
3784
|
+
|
3785
|
+
![Hello File Dialog](images/glimmer-hello-file-dialog-browse.png)
|
3786
|
+
|
3787
|
+
Hello, File Dialog! Selected File
|
3788
|
+
|
3789
|
+
![Hello File Dialog](images/glimmer-hello-file-dialog-selected-file.png)
|
3790
|
+
|
3749
3791
|
### Elaborate Samples
|
3750
3792
|
|
3751
3793
|
For more elaborate samples, check the following:
|
@@ -4139,4 +4181,4 @@ Copyright (c) 2007-2020 - Andy Maleh.
|
|
4139
4181
|
|
4140
4182
|
--
|
4141
4183
|
|
4142
|
-
[<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 />](https://github.com/AndyObtiva/glimmer) Built for [Glimmer](https://github.com/AndyObtiva/glimmer) (Ruby Desktop Development GUI Library).
|
4184
|
+
[<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 />](https://github.com/AndyObtiva/glimmer) Built for [Glimmer](https://github.com/AndyObtiva/glimmer) (Ruby Desktop Development GUI Library).
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.17.8.
|
1
|
+
4.17.8.1
|
data/glimmer-dsl-swt.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: glimmer-dsl-swt 4.17.8.
|
5
|
+
# stub: glimmer-dsl-swt 4.17.8.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glimmer-dsl-swt".freeze
|
9
|
-
s.version = "4.17.8.
|
9
|
+
s.version = "4.17.8.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
@@ -8,20 +8,20 @@ module Glimmer
|
|
8
8
|
include Glimmer::UI::CustomWidget
|
9
9
|
|
10
10
|
SYNTAX_COLOR_MAP = {
|
11
|
-
Builtin: [215,58,73],
|
12
|
-
Class: [3,47,98],
|
13
|
-
Constant: [0,92,197],
|
11
|
+
Builtin: [215,58,73],
|
12
|
+
Class: [3,47,98],
|
13
|
+
Constant: [0,92,197],
|
14
14
|
Double: [0,92,197],
|
15
15
|
Escape: [:red],
|
16
|
-
Function: [:blue],
|
17
|
-
Instance: [227,98,9],
|
18
|
-
Integer: [:blue],
|
16
|
+
Function: [:blue],
|
17
|
+
Instance: [227,98,9],
|
18
|
+
Integer: [:blue],
|
19
19
|
Interpol: [:blue],
|
20
|
-
Keyword: [:blue],
|
20
|
+
Keyword: [:blue],
|
21
21
|
Name: [111,66,193], #purple
|
22
|
-
Operator: [:red],
|
22
|
+
Operator: [:red],
|
23
23
|
Pseudo: [:dark_red],
|
24
|
-
Punctuation: [:blue],
|
24
|
+
Punctuation: [:blue],
|
25
25
|
Single: [106,115,125], # Also, Comments
|
26
26
|
Symbol: [:dark_green],
|
27
27
|
Text: [75, 75, 75],
|
@@ -38,7 +38,7 @@ module Glimmer
|
|
38
38
|
swt_widget&.text
|
39
39
|
end
|
40
40
|
|
41
|
-
def syntax_highlighting
|
41
|
+
def syntax_highlighting
|
42
42
|
return [] if text.to_s.strip.empty?
|
43
43
|
return @syntax_highlighting if already_syntax_highlighted?
|
44
44
|
@last_text = text
|
@@ -58,8 +58,8 @@ module Glimmer
|
|
58
58
|
line_hashes << lex_hashes.shift while lex_hashes.any? && lex_hashes.first[:token_index].between?(line_index, line_index + line.size)
|
59
59
|
hash.merge(line_index => line_hashes).tap do
|
60
60
|
line_index += line.size + 1
|
61
|
-
end
|
62
|
-
end
|
61
|
+
end
|
62
|
+
end
|
63
63
|
end
|
64
64
|
|
65
65
|
def already_syntax_highlighted?
|
@@ -80,6 +80,7 @@ module Glimmer
|
|
80
80
|
bottom_margin 5
|
81
81
|
|
82
82
|
on_line_get_style { |line_style_event|
|
83
|
+
@styles ||= {}
|
83
84
|
@styles = {} unless already_syntax_highlighted?
|
84
85
|
if @styles[line_style_event.lineOffset].nil?
|
85
86
|
styles = []
|
@@ -93,7 +94,7 @@ module Glimmer
|
|
93
94
|
@styles[line_style_event.lineOffset] = styles.to_java(StyleRange)
|
94
95
|
end
|
95
96
|
line_style_event.styles = @styles[line_style_event.lineOffset] unless @styles[line_style_event.lineOffset].empty?
|
96
|
-
}
|
97
|
+
}
|
97
98
|
}
|
98
99
|
}
|
99
100
|
end
|