vedeu 0.6.43 → 0.6.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/dsl_colours.rb +78 -0
- data/lib/vedeu/output/presentation/colour.rb +2 -2
- data/lib/vedeu/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4dc70c4f76f9925516a551048473859ddd3dff7
|
4
|
+
data.tar.gz: a3edcec22cc3421ce2c725ea96340587e669f03b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08a1c9d7c3a83c44012dd04271e717cf35ddafddde398ef1ea1131eeb6a22045e2fdd34ba1fd7dc32b057477a60214ce1db1ad68eaf3d9f090308dab7236e8a8
|
7
|
+
data.tar.gz: 5fcbbb89449438c488f1206e98a93c7cba96b945de16f2bddc259c5608225c745d7f9f2ce8ac54f57748e630bf53733dc46bf49b22ca796ed3d337dea2b16cb4
|
@@ -0,0 +1,78 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'vedeu'
|
5
|
+
|
6
|
+
class ColoursApp
|
7
|
+
|
8
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
9
|
+
|
10
|
+
Vedeu.configure do
|
11
|
+
debug!
|
12
|
+
log '/tmp/colours.log'
|
13
|
+
renderers Vedeu::Renderers::File.new(filename: '/tmp/colours.out')
|
14
|
+
end
|
15
|
+
|
16
|
+
Vedeu.interface :interface_colours_view do
|
17
|
+
colour background: '#550000', foreground: '#aaaa00'
|
18
|
+
|
19
|
+
border do
|
20
|
+
background '#673ab7'
|
21
|
+
foreground '#ff9800'
|
22
|
+
title 'Interface Colours'
|
23
|
+
end
|
24
|
+
geometry do
|
25
|
+
align(:top, :left, 50, 20)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
Vedeu.keymap '_global_' do
|
30
|
+
key('q') { Vedeu.exit }
|
31
|
+
end
|
32
|
+
|
33
|
+
Vedeu.render do
|
34
|
+
view(:interface_colours_view) do
|
35
|
+
# line "test" - does not work, (wrong number of args for lines dsl/view.rb:240)
|
36
|
+
|
37
|
+
lines do
|
38
|
+
line "A line using interface colours."
|
39
|
+
line ""
|
40
|
+
line do
|
41
|
+
stream do
|
42
|
+
text "Stream { "
|
43
|
+
text "background", background: '#001177'
|
44
|
+
text " }"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
line do
|
48
|
+
stream do
|
49
|
+
text "Stream { "
|
50
|
+
text "foreground", foreground: '#aa00ff'
|
51
|
+
text " }"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
line do
|
55
|
+
stream do
|
56
|
+
text "Stream { "
|
57
|
+
text "background", background: '#117700'
|
58
|
+
text " }"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
line do
|
62
|
+
stream do
|
63
|
+
text "Stream { "
|
64
|
+
text "foreground", foreground: '#00aaff'
|
65
|
+
text " }"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.start(argv = ARGV)
|
73
|
+
Vedeu::Launcher.execute!(argv)
|
74
|
+
end
|
75
|
+
|
76
|
+
end # ColoursApp
|
77
|
+
|
78
|
+
ColoursApp.start
|
@@ -53,7 +53,7 @@ module Vedeu
|
|
53
53
|
#
|
54
54
|
# @return [Vedeu::Colours::Colour]
|
55
55
|
def colour=(value)
|
56
|
-
@colour = Vedeu::Colours::Colour.coerce(value)
|
56
|
+
@colour = attributes[:colour] = Vedeu::Colours::Colour.coerce(value)
|
57
57
|
end
|
58
58
|
|
59
59
|
# When the foreground colour for the model exists, return it,
|
@@ -79,7 +79,7 @@ module Vedeu
|
|
79
79
|
#
|
80
80
|
# @return [Vedeu::Colours::Foreground]
|
81
81
|
def foreground=(value)
|
82
|
-
@colour = Vedeu::Colours::Colour.coerce(
|
82
|
+
@colour = attributes[:colour] = Vedeu::Colours::Colour.coerce(
|
83
83
|
background: colour.background,
|
84
84
|
foreground: Vedeu::Colours::Foreground.coerce(value))
|
85
85
|
end
|
data/lib/vedeu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vedeu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.44
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Laking
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -312,6 +312,7 @@ files:
|
|
312
312
|
- docs/view.md
|
313
313
|
- examples/284_slow_rendering.rb
|
314
314
|
- examples/dsl_alignment.rb
|
315
|
+
- examples/dsl_colours.rb
|
315
316
|
- examples/dsl_demo_groups.rb
|
316
317
|
- examples/dsl_editor.rb
|
317
318
|
- examples/dsl_hello_worlds.rb
|