glimmer-dsl-wx 0.0.2 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -0
- data/README.md +176 -3
- data/VERSION +1 -1
- data/bin/girb +1 -1
- data/bin/girb_runner.rb +2 -2
- data/glimmer-dsl-wx.gemspec +0 -0
- data/lib/glimmer/dsl/wx/about_box_expression.rb +34 -0
- data/lib/glimmer/dsl/wx/bind_expression.rb +1 -1
- data/lib/glimmer/dsl/wx/control_expression.rb +14 -14
- data/lib/glimmer/dsl/wx/data_binding_expression.rb +1 -1
- data/lib/glimmer/dsl/wx/dsl.rb +7 -3
- data/lib/glimmer/dsl/wx/listener_expression.rb +21 -21
- data/lib/glimmer/dsl/wx/observe_expression.rb +1 -1
- data/lib/glimmer/dsl/wx/operation_expression.rb +1 -1
- data/lib/glimmer/dsl/wx/property_expression.rb +21 -28
- data/lib/glimmer/dsl/wx/shine_data_binding_expression.rb +1 -1
- data/lib/glimmer/dsl/wx/sizer_args_expression.rb +43 -0
- data/lib/glimmer/dsl/wx/sizer_expression.rb +53 -0
- data/lib/glimmer/wx/control_proxy/frame_proxy.rb +52 -0
- data/lib/glimmer/wx/control_proxy.rb +49 -228
- data/lib/glimmer/wx/data_bindable.rb +2 -2
- data/lib/glimmer/wx/parent.rb +2 -2
- data/lib/glimmer/wx/sizer_proxy.rb +150 -0
- data/lib/glimmer-dsl-wx.rb +1 -1
- data/samples/hello/hello_button.rb +41 -0
- data/samples/hello/hello_button2.rb +44 -0
- data/samples/hello/hello_sizer.rb +69 -0
- data/samples/hello/hello_world.rb +26 -0
- data/samples/hello/hello_world2.rb +28 -0
- data/samples/minimal/nothing.rb +25 -20
- metadata +12 -2
@@ -0,0 +1,44 @@
|
|
1
|
+
# Copyright (c) 2023 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
|
+
|
22
|
+
require 'glimmer-dsl-wx'
|
23
|
+
|
24
|
+
include Glimmer
|
25
|
+
|
26
|
+
frame { |main_frame|
|
27
|
+
title 'Hello, Button!'
|
28
|
+
|
29
|
+
h_box_sizer {
|
30
|
+
button {
|
31
|
+
sizer_args 0, Wx::RIGHT, 10
|
32
|
+
label 'Click To Find Who Built This!'
|
33
|
+
|
34
|
+
on_button do
|
35
|
+
about_box(
|
36
|
+
name: main_frame.title,
|
37
|
+
version: Wx::WXRUBY_VERSION,
|
38
|
+
description: "This is the Hello, Button! sample",
|
39
|
+
developers: ['The Glimmer DSL for WX Development Team']
|
40
|
+
)
|
41
|
+
end
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Copyright (c) 2023 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
|
+
|
22
|
+
require 'glimmer-dsl-wx'
|
23
|
+
|
24
|
+
include Glimmer
|
25
|
+
|
26
|
+
frame { |main_frame|
|
27
|
+
title 'Hello, Sizer!'
|
28
|
+
|
29
|
+
v_box_sizer {
|
30
|
+
button {
|
31
|
+
sizer_args 0, Wx::DOWN, 10
|
32
|
+
label 'Greeting 1'
|
33
|
+
|
34
|
+
on_button do
|
35
|
+
message_dialog(
|
36
|
+
"Hello",
|
37
|
+
"Greeting",
|
38
|
+
Wx::OK | Wx::ICON_INFORMATION
|
39
|
+
).show_modal
|
40
|
+
end
|
41
|
+
}
|
42
|
+
|
43
|
+
button {
|
44
|
+
sizer_args 0, Wx::DOWN, 10
|
45
|
+
label 'Greeting 2'
|
46
|
+
|
47
|
+
on_button do
|
48
|
+
message_dialog(
|
49
|
+
"Howdy",
|
50
|
+
"Greeting",
|
51
|
+
Wx::OK | Wx::ICON_INFORMATION
|
52
|
+
).show_modal
|
53
|
+
end
|
54
|
+
}
|
55
|
+
|
56
|
+
button {
|
57
|
+
sizer_args 0, Wx::DOWN, 10
|
58
|
+
label 'Greeting 3'
|
59
|
+
|
60
|
+
on_button do
|
61
|
+
message_dialog(
|
62
|
+
"Aloha",
|
63
|
+
"Greeting",
|
64
|
+
Wx::OK | Wx::ICON_INFORMATION
|
65
|
+
).show_modal
|
66
|
+
end
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Copyright (c) 2023 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
|
+
|
22
|
+
require 'glimmer-dsl-wx'
|
23
|
+
|
24
|
+
include Glimmer
|
25
|
+
|
26
|
+
frame(title: 'Hello, World!')
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright (c) 2023 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
|
+
|
22
|
+
require 'glimmer-dsl-wx'
|
23
|
+
|
24
|
+
include Glimmer
|
25
|
+
|
26
|
+
frame {
|
27
|
+
title 'Hello, World!'
|
28
|
+
}
|
data/samples/minimal/nothing.rb
CHANGED
@@ -1,24 +1,29 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
#
|
1
|
+
# Copyright (c) 2023 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.
|
8
21
|
|
9
|
-
|
10
|
-
# show it.
|
11
|
-
# Wx::App.run do
|
12
|
-
### self.app_name = 'Nothing'
|
13
|
-
### frame = Wx::Frame.new(nil, title: "Empty wxRuby App")
|
14
|
-
# frame = Wx::Frame.new(nil)
|
15
|
-
# frame.title = "Empty wxRuby App"
|
16
|
-
# frame.show
|
17
|
-
# frame
|
18
|
-
# end
|
19
|
-
|
20
|
-
require './lib/glimmer-dsl-wx'
|
22
|
+
require 'glimmer-dsl-wx'
|
21
23
|
|
22
24
|
include Glimmer
|
23
25
|
|
24
|
-
frame
|
26
|
+
frame {
|
27
|
+
app_name 'Nothing'
|
28
|
+
title 'Empty wxRuby App'
|
29
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-dsl-wx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: glimmer
|
@@ -230,6 +230,7 @@ files:
|
|
230
230
|
- icons/glimmer.png
|
231
231
|
- lib/glimmer-dsl-wx.rb
|
232
232
|
- lib/glimmer-dsl-wx/ext/glimmer.rb
|
233
|
+
- lib/glimmer/dsl/wx/about_box_expression.rb
|
233
234
|
- lib/glimmer/dsl/wx/bind_expression.rb
|
234
235
|
- lib/glimmer/dsl/wx/control_expression.rb
|
235
236
|
- lib/glimmer/dsl/wx/data_binding_expression.rb
|
@@ -239,15 +240,24 @@ files:
|
|
239
240
|
- lib/glimmer/dsl/wx/operation_expression.rb
|
240
241
|
- lib/glimmer/dsl/wx/property_expression.rb
|
241
242
|
- lib/glimmer/dsl/wx/shine_data_binding_expression.rb
|
243
|
+
- lib/glimmer/dsl/wx/sizer_args_expression.rb
|
244
|
+
- lib/glimmer/dsl/wx/sizer_expression.rb
|
242
245
|
- lib/glimmer/proc_tracker.rb
|
243
246
|
- lib/glimmer/wx/control_proxy.rb
|
247
|
+
- lib/glimmer/wx/control_proxy/frame_proxy.rb
|
244
248
|
- lib/glimmer/wx/data_bindable.rb
|
245
249
|
- lib/glimmer/wx/parent.rb
|
250
|
+
- lib/glimmer/wx/sizer_proxy.rb
|
246
251
|
- samples/art/wxruby-128x128.png
|
247
252
|
- samples/art/wxruby-256x256.png
|
248
253
|
- samples/art/wxruby-64x64.png
|
249
254
|
- samples/art/wxruby.ico
|
250
255
|
- samples/art/wxruby.png
|
256
|
+
- samples/hello/hello_button.rb
|
257
|
+
- samples/hello/hello_button2.rb
|
258
|
+
- samples/hello/hello_sizer.rb
|
259
|
+
- samples/hello/hello_world.rb
|
260
|
+
- samples/hello/hello_world2.rb
|
251
261
|
- samples/minimal/mondrian.ico
|
252
262
|
- samples/minimal/mondrian.png
|
253
263
|
- samples/minimal/nothing.rb
|