glimmer-cs-gladiator 0.6.4 → 0.8.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +51 -0
- data/LICENSE.txt +1 -1
- data/README.md +71 -15
- data/VERSION +1 -1
- data/bin/gladiator +22 -1
- data/bin/gladiator-setup +80 -0
- data/bin/glimmer-cs-gladiator +22 -0
- data/glimmer-cs-gladiator.gemspec +19 -9
- data/lib/glimmer-cs-gladiator.rb +1 -0
- data/lib/glimmer-cs-gladiator/launch.rb +6 -0
- data/lib/models/glimmer/gladiator/dir.rb +9 -5
- data/lib/models/glimmer/gladiator/file.rb +68 -10
- data/lib/views/glimmer/gladiator.rb +540 -748
- data/lib/views/glimmer/gladiator/file_explorer_tree.rb +244 -0
- data/lib/views/glimmer/gladiator/file_lookup_list.rb +64 -0
- data/lib/views/glimmer/gladiator/gladiator_menu_bar.rb +189 -0
- data/lib/views/glimmer/gladiator/progress_shell.rb +31 -0
- data/lib/views/glimmer/gladiator/text_editor.rb +29 -11
- metadata +33 -7
- data/bin/gladiator_runner.rb +0 -6
@@ -0,0 +1,31 @@
|
|
1
|
+
module Glimmer
|
2
|
+
class Gladiator
|
3
|
+
class ProgressShell
|
4
|
+
include Glimmer::UI::CustomShell
|
5
|
+
|
6
|
+
option :gladiator
|
7
|
+
option :progress_text, default: 'Work In Progress'
|
8
|
+
|
9
|
+
body {
|
10
|
+
shell(gladiator.body_root, :title) {
|
11
|
+
fill_layout(:vertical) {
|
12
|
+
margin_width 15
|
13
|
+
margin_height 15
|
14
|
+
spacing 5
|
15
|
+
}
|
16
|
+
|
17
|
+
text 'Gladiator'
|
18
|
+
|
19
|
+
gladiator_menu_bar(gladiator: gladiator, editing: true)
|
20
|
+
|
21
|
+
label(:center) {
|
22
|
+
text progress_text
|
23
|
+
font height: 20
|
24
|
+
}
|
25
|
+
# @progress_bar = progress_bar(:horizontal, :indeterminate)
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -1,3 +1,24 @@
|
|
1
|
+
# Copyright (c) 2020-2021 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
1
22
|
module Glimmer
|
2
23
|
class Gladiator
|
3
24
|
class TextEditor
|
@@ -7,6 +28,10 @@ module Glimmer
|
|
7
28
|
|
8
29
|
attr_reader :text_proxy
|
9
30
|
|
31
|
+
before_body {
|
32
|
+
@font_name = display.get_font_list(nil, true).map(&:name).include?('Consolas') ? 'Consolas' : 'Courier'
|
33
|
+
}
|
34
|
+
|
10
35
|
after_body {
|
11
36
|
load_content
|
12
37
|
}
|
@@ -14,11 +39,11 @@ module Glimmer
|
|
14
39
|
body {
|
15
40
|
composite {
|
16
41
|
grid_layout(2, false)
|
17
|
-
|
42
|
+
|
18
43
|
@line_numbers_text = styled_text(:multi, :border) {
|
19
44
|
layout_data(:right, :fill, false, true)
|
20
45
|
text ' '*4
|
21
|
-
font name:
|
46
|
+
font name: @font_name, height: OS.mac? ? 15 : 12
|
22
47
|
background color(:widget_background)
|
23
48
|
foreground :dark_blue
|
24
49
|
top_margin 5
|
@@ -37,9 +62,9 @@ module Glimmer
|
|
37
62
|
}
|
38
63
|
}
|
39
64
|
|
40
|
-
@text_proxy =
|
65
|
+
@text_proxy = code_text(language: file.language) {
|
41
66
|
layout_data :fill, :fill, true, true
|
42
|
-
font name:
|
67
|
+
font name: @font_name, height: OS.mac? ? 15 : 12
|
43
68
|
foreground rgb(75, 75, 75)
|
44
69
|
focus true
|
45
70
|
top_margin 5
|
@@ -72,11 +97,6 @@ module Glimmer
|
|
72
97
|
nil
|
73
98
|
end
|
74
99
|
|
75
|
-
def text_widget_keyword
|
76
|
-
is_code_file = file.scratchpad? || file.path.end_with?('.rb')
|
77
|
-
is_code_file ? 'code_text' : 'styled_text'
|
78
|
-
end
|
79
|
-
|
80
100
|
def text_widget
|
81
101
|
@text_proxy.swt_widget
|
82
102
|
end
|
@@ -108,8 +128,6 @@ module Glimmer
|
|
108
128
|
on_verify_key { |key_event|
|
109
129
|
if (Glimmer::SWT::SWTProxy.include?(key_event.stateMask, COMMAND_KEY, :shift) && extract_char(key_event) == 'z') || (key_event.stateMask == swt(COMMAND_KEY) && extract_char(key_event) == 'y')
|
110
130
|
key_event.doit = !Command.redo(file)
|
111
|
-
elsif Glimmer::SWT::SWTProxy.include?(key_event.stateMask, COMMAND_KEY, :shift) && extract_char(key_event) == 'r'
|
112
|
-
project_dir.selected_child.run
|
113
131
|
elsif key_event.stateMask == swt(COMMAND_KEY) && extract_char(key_event) == 'z'
|
114
132
|
key_event.doit = !Command.undo(file)
|
115
133
|
elsif key_event.stateMask == swt(COMMAND_KEY) && extract_char(key_event) == 'a'
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-cs-gladiator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 4.
|
18
|
+
version: 4.18.3.5
|
19
19
|
- - "<"
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 5.0.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 4.
|
29
|
+
version: 4.18.3.5
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 5.0.0.0
|
@@ -86,6 +86,20 @@ dependencies:
|
|
86
86
|
- - '='
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 2.3.9
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - '='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 2.0.5
|
95
|
+
name: warbler
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - '='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 2.0.5
|
89
103
|
- !ruby/object:Gem::Dependency
|
90
104
|
requirement: !ruby/object:Gem::Requirement
|
91
105
|
requirements:
|
@@ -108,7 +122,9 @@ description: Gladiator (short for Glimmer Editor) is a Glimmer sample project un
|
|
108
122
|
use Glimmer one day.
|
109
123
|
email: andy.am@gmail.com
|
110
124
|
executables:
|
125
|
+
- glimmer-cs-gladiator
|
111
126
|
- gladiator
|
127
|
+
- gladiator-setup
|
112
128
|
extensions: []
|
113
129
|
extra_rdoc_files:
|
114
130
|
- LICENSE.txt
|
@@ -119,20 +135,29 @@ files:
|
|
119
135
|
- README.md
|
120
136
|
- VERSION
|
121
137
|
- bin/gladiator
|
122
|
-
- bin/
|
138
|
+
- bin/gladiator-setup
|
139
|
+
- bin/glimmer-cs-gladiator
|
123
140
|
- glimmer-cs-gladiator.gemspec
|
124
141
|
- images/glimmer-cs-gladiator-logo.png
|
125
142
|
- lib/glimmer-cs-gladiator.rb
|
143
|
+
- lib/glimmer-cs-gladiator/launch.rb
|
126
144
|
- lib/models/glimmer/gladiator/command.rb
|
127
145
|
- lib/models/glimmer/gladiator/dir.rb
|
128
146
|
- lib/models/glimmer/gladiator/file.rb
|
129
147
|
- lib/views/glimmer/gladiator.rb
|
148
|
+
- lib/views/glimmer/gladiator/file_explorer_tree.rb
|
149
|
+
- lib/views/glimmer/gladiator/file_lookup_list.rb
|
150
|
+
- lib/views/glimmer/gladiator/gladiator_menu_bar.rb
|
151
|
+
- lib/views/glimmer/gladiator/progress_shell.rb
|
130
152
|
- lib/views/glimmer/gladiator/text_editor.rb
|
131
153
|
homepage: http://github.com/AndyObtiva/glimmer-cs-gladiator
|
132
154
|
licenses:
|
133
155
|
- MIT
|
134
156
|
metadata: {}
|
135
|
-
post_install_message:
|
157
|
+
post_install_message: |2+
|
158
|
+
|
159
|
+
To make the gladiator command available system-wide (especially with RVM), make sure you run this command with jruby in path: gladiator-setup
|
160
|
+
|
136
161
|
rdoc_options: []
|
137
162
|
require_paths:
|
138
163
|
- lib
|
@@ -150,5 +175,6 @@ requirements: []
|
|
150
175
|
rubygems_version: 3.0.6
|
151
176
|
signing_key:
|
152
177
|
specification_version: 4
|
153
|
-
summary: Gladiator (Glimmer Editor) - Glimmer Custom Shell
|
178
|
+
summary: Gladiator (Glimmer Editor) - Glimmer Custom Shell - Text Editor Built in
|
179
|
+
Ruby
|
154
180
|
test_files: []
|