vedeu 0.4.56 → 0.4.57
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/borders_app.rb +22 -24
- data/examples/colours_app.rb +4 -6
- data/examples/configuration_app.rb +5 -7
- data/examples/drb_app.rb +1 -1
- data/examples/focus_app.rb +1 -1
- data/examples/geometry_app.rb +8 -10
- data/examples/hello_world.rb +4 -6
- data/examples/material_colours_app.rb +19 -9
- data/examples/material_colours_app_20150721.svg +2285 -0
- data/examples/panel_app.rb +6 -8
- data/examples/typed_commands/typed_commands_app.rb +15 -17
- data/examples/view_templates_app/view_templates_app.rb +1 -1
- data/lib/vedeu/all.rb +82 -10
- data/lib/vedeu/api.rb +34 -14
- data/lib/vedeu/application.rb +0 -1
- data/lib/vedeu/application/application_controller.rb +0 -1
- data/lib/vedeu/application/application_helper.rb +0 -1
- data/lib/vedeu/application/application_view.rb +0 -1
- data/lib/vedeu/application/controller.rb +0 -1
- data/lib/vedeu/application/helper.rb +0 -1
- data/lib/vedeu/application/view.rb +0 -1
- data/lib/vedeu/bindings/all.rb +0 -1
- data/lib/vedeu/bindings/visibility.rb +2 -19
- data/lib/vedeu/buffers/buffer.rb +0 -1
- data/lib/vedeu/buffers/display_buffer.rb +0 -1
- data/lib/vedeu/cli/generator/application.rb +0 -1
- data/lib/vedeu/cli/generator/helpers.rb +0 -1
- data/lib/vedeu/cli/generator/view.rb +0 -1
- data/lib/vedeu/colours/background.rb +0 -1
- data/lib/vedeu/colours/colour.rb +0 -1
- data/lib/vedeu/colours/colour_translator.rb +0 -1
- data/lib/vedeu/colours/foreground.rb +0 -1
- data/lib/vedeu/common.rb +0 -1
- data/lib/vedeu/configuration/configuration.rb +0 -1
- data/lib/vedeu/cursor/cursor.rb +0 -1
- data/lib/vedeu/cursor/move.rb +0 -1
- data/lib/vedeu/cursor/refresh_cursor.rb +0 -1
- data/lib/vedeu/cursor/reposition.rb +0 -1
- data/lib/vedeu/distributed/client.rb +2 -0
- data/lib/vedeu/distributed/server.rb +2 -0
- data/lib/vedeu/distributed/uri.rb +2 -1
- data/lib/vedeu/exceptions.rb +0 -7
- data/lib/vedeu/geometry/area.rb +0 -1
- data/lib/vedeu/geometry/coordinate.rb +0 -1
- data/lib/vedeu/geometry/dimension.rb +14 -1
- data/lib/vedeu/geometry/geometry.rb +0 -1
- data/lib/vedeu/geometry/index_position.rb +0 -1
- data/lib/vedeu/geometry/position.rb +0 -1
- data/lib/vedeu/geometry/position_index.rb +0 -1
- data/lib/vedeu/geometry/position_validator.rb +0 -1
- data/lib/vedeu/input/input.rb +0 -1
- data/lib/vedeu/input/key.rb +0 -1
- data/lib/vedeu/input/keymap.rb +0 -1
- data/lib/vedeu/input/mapper.rb +0 -1
- data/lib/vedeu/log.rb +0 -1
- data/lib/vedeu/main_loop.rb +0 -1
- data/lib/vedeu/models/cell.rb +0 -1
- data/lib/vedeu/models/char.rb +0 -1
- data/lib/vedeu/models/composition.rb +0 -1
- data/lib/vedeu/models/escape.rb +0 -1
- data/lib/vedeu/models/focus.rb +0 -1
- data/lib/vedeu/models/group.rb +37 -15
- data/lib/vedeu/models/interface.rb +1 -2
- data/lib/vedeu/models/line.rb +0 -1
- data/lib/vedeu/models/menu.rb +0 -1
- data/lib/vedeu/models/stream.rb +0 -1
- data/lib/vedeu/models/toggleable.rb +21 -11
- data/lib/vedeu/null/all.rb +0 -1
- data/lib/vedeu/null/border.rb +0 -1
- data/lib/vedeu/null/buffer.rb +0 -1
- data/lib/vedeu/null/generic.rb +0 -1
- data/lib/vedeu/null/geometry.rb +0 -1
- data/lib/vedeu/null/interface.rb +0 -1
- data/lib/vedeu/output/border.rb +0 -1
- data/lib/vedeu/output/clear/named_group.rb +3 -2
- data/lib/vedeu/output/clear/named_interface.rb +2 -1
- data/lib/vedeu/output/compressor.rb +0 -1
- data/lib/vedeu/output/html_char.rb +0 -1
- data/lib/vedeu/output/output.rb +0 -1
- data/lib/vedeu/output/presentation.rb +0 -1
- data/lib/vedeu/output/refresh_group.rb +0 -1
- data/lib/vedeu/output/render_border.rb +0 -1
- data/lib/vedeu/output/renderers/all.rb +0 -1
- data/lib/vedeu/output/renderers/escape_sequence.rb +0 -1
- data/lib/vedeu/output/renderers/file.rb +0 -1
- data/lib/vedeu/output/renderers/html.rb +0 -1
- data/lib/vedeu/output/renderers/json.rb +0 -1
- data/lib/vedeu/output/renderers/null.rb +0 -1
- data/lib/vedeu/output/renderers/renderer_options.rb +0 -1
- data/lib/vedeu/output/renderers/terminal.rb +0 -1
- data/lib/vedeu/output/renderers/text.rb +0 -1
- data/lib/vedeu/output/style.rb +0 -1
- data/lib/vedeu/output/text.rb +0 -1
- data/lib/vedeu/output/viewport.rb +0 -1
- data/lib/vedeu/output/virtual_terminal.rb +0 -1
- data/lib/vedeu/output/wordwrap.rb +0 -1
- data/lib/vedeu/repositories/collection.rb +0 -7
- data/lib/vedeu/repositories/model.rb +0 -1
- data/lib/vedeu/repositories/registerable.rb +0 -1
- data/lib/vedeu/repositories/repository.rb +0 -1
- data/lib/vedeu/repositories/store.rb +0 -1
- data/lib/vedeu/templating/directive.rb +1 -1
- data/lib/vedeu/templating/helpers.rb +1 -1
- data/lib/vedeu/templating/preprocessor.rb +1 -1
- data/lib/vedeu/templating/template.rb +1 -1
- data/lib/vedeu/traps.rb +0 -1
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/application/controller_test.rb +8 -1
- data/test/lib/vedeu/buffers/buffer_test.rb +5 -0
- data/test/lib/vedeu/cursor/reposition_test.rb +5 -5
- data/test/lib/vedeu/models/group_test.rb +4 -3
- data/test/lib/vedeu/models/interface_test.rb +15 -1
- data/test/lib/vedeu/null/interface_test.rb +7 -21
- data/test/lib/vedeu/output/esc_test.rb +105 -109
- metadata +3 -15
- data/lib/vedeu/application/all.rb +0 -6
- data/lib/vedeu/buffers/all.rb +0 -3
- data/lib/vedeu/cli/all.rb +0 -1
- data/lib/vedeu/colours/all.rb +0 -7
- data/lib/vedeu/configuration/all.rb +0 -3
- data/lib/vedeu/cursor/all.rb +0 -7
- data/lib/vedeu/distributed/all.rb +0 -15
- data/lib/vedeu/events/all.rb +0 -5
- data/lib/vedeu/geometry/all.rb +0 -14
- data/lib/vedeu/models/all.rb +0 -16
- data/lib/vedeu/output/all.rb +0 -21
- data/lib/vedeu/output/clear/all.rb +0 -13
- data/lib/vedeu/templating/all.rb +0 -13
data/lib/vedeu/buffers/buffer.rb
CHANGED
data/lib/vedeu/colours/colour.rb
CHANGED
data/lib/vedeu/common.rb
CHANGED
data/lib/vedeu/cursor/cursor.rb
CHANGED
data/lib/vedeu/cursor/move.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
module Vedeu
|
2
2
|
|
3
|
+
# Provides a mechanism to control a running client application via DRb.
|
4
|
+
#
|
3
5
|
module Distributed
|
4
6
|
|
5
7
|
# Value class which provides the host and port for the DRb server and
|
6
8
|
# client.
|
7
9
|
#
|
8
|
-
# @api private
|
9
10
|
class Uri
|
10
11
|
|
11
12
|
# @!attribute [r] host
|
data/lib/vedeu/exceptions.rb
CHANGED
@@ -2,7 +2,6 @@ module Vedeu
|
|
2
2
|
|
3
3
|
# Raised with Vedeu attempts to access a named model that does not exist.
|
4
4
|
#
|
5
|
-
# @api private
|
6
5
|
class ModelNotFound < StandardError
|
7
6
|
|
8
7
|
end # ModeSwitch
|
@@ -10,7 +9,6 @@ module Vedeu
|
|
10
9
|
# Raised when Vedeu attempts to parse a {Vedeu.view} or {Vedeu.interface} and
|
11
10
|
# encounters a problem.
|
12
11
|
#
|
13
|
-
# @api private
|
14
12
|
class InvalidSyntax < StandardError
|
15
13
|
|
16
14
|
end # InvalidSyntax
|
@@ -18,7 +16,6 @@ module Vedeu
|
|
18
16
|
# Raised when a name is not provided for a model when attempting to store it
|
19
17
|
# in a repository.
|
20
18
|
#
|
21
|
-
# @api private
|
22
19
|
class MissingRequired < StandardError
|
23
20
|
|
24
21
|
end # MissingRequired
|
@@ -28,7 +25,6 @@ module Vedeu
|
|
28
25
|
#
|
29
26
|
# @see Vedeu::Application
|
30
27
|
#
|
31
|
-
# @api private
|
32
28
|
class ModeSwitch < StandardError
|
33
29
|
|
34
30
|
end # ModeSwitch
|
@@ -38,7 +34,6 @@ module Vedeu
|
|
38
34
|
#
|
39
35
|
# @see Vedeu::ColourTranslator
|
40
36
|
#
|
41
|
-
# @api private
|
42
37
|
class NotImplemented < StandardError
|
43
38
|
|
44
39
|
end # NotImplemented
|
@@ -48,7 +43,6 @@ module Vedeu
|
|
48
43
|
#
|
49
44
|
# @see Vedeu::Grid
|
50
45
|
#
|
51
|
-
# @api private
|
52
46
|
class OutOfRange < StandardError
|
53
47
|
|
54
48
|
end # OutOfRange
|
@@ -57,7 +51,6 @@ module Vedeu
|
|
57
51
|
#
|
58
52
|
# @see Vedeu::MainLoop
|
59
53
|
#
|
60
|
-
# @api private
|
61
54
|
class VedeuInterrupt < StandardError
|
62
55
|
|
63
56
|
end # VedeuInterrupt
|
data/lib/vedeu/geometry/area.rb
CHANGED
@@ -2,7 +2,6 @@ module Vedeu
|
|
2
2
|
|
3
3
|
# A Dimension is either the height or width of an entity.
|
4
4
|
#
|
5
|
-
# @api private
|
6
5
|
class Dimension
|
7
6
|
|
8
7
|
# @param (see #initialize)
|
@@ -26,16 +25,22 @@ module Vedeu
|
|
26
25
|
@attributes.each { |key, value| instance_variable_set("@#{key}", value) }
|
27
26
|
end
|
28
27
|
|
28
|
+
# Fetch the starting coordinate.
|
29
|
+
#
|
29
30
|
# @return [Fixnum]
|
30
31
|
def d1
|
31
32
|
dimension.first < 1 ? 1 : dimension.first
|
32
33
|
end
|
33
34
|
|
35
|
+
# Fetch the ending coordinate.
|
36
|
+
#
|
34
37
|
# @return [Fixnum]
|
35
38
|
def d2
|
36
39
|
dimension.last
|
37
40
|
end
|
38
41
|
|
42
|
+
# Fetch the coordinates.
|
43
|
+
#
|
39
44
|
# @return [Array<Fixnum>]
|
40
45
|
def pair
|
41
46
|
dimension
|
@@ -104,21 +109,29 @@ module Vedeu
|
|
104
109
|
end
|
105
110
|
end
|
106
111
|
|
112
|
+
# Ascertains the centred starting coordinate.
|
113
|
+
#
|
107
114
|
# @return [Fixnum]
|
108
115
|
def centred_d
|
109
116
|
(default / 2) - (length / 2)
|
110
117
|
end
|
111
118
|
|
119
|
+
# Ascertains the centred ending coordinate.
|
120
|
+
#
|
112
121
|
# @return [Fixnum]
|
113
122
|
def centred_dn
|
114
123
|
(default / 2) + (length / 2)
|
115
124
|
end
|
116
125
|
|
126
|
+
# Fetch the starting coordinate, or use 1 if not set.
|
127
|
+
#
|
117
128
|
# @return [Fixnum]
|
118
129
|
def _d
|
119
130
|
d || 1
|
120
131
|
end
|
121
132
|
|
133
|
+
# Fetch the ending coordinate.
|
134
|
+
#
|
122
135
|
# @return [Fixnum]
|
123
136
|
def _dn
|
124
137
|
if dn
|
data/lib/vedeu/input/input.rb
CHANGED
data/lib/vedeu/input/key.rb
CHANGED
data/lib/vedeu/input/keymap.rb
CHANGED
data/lib/vedeu/input/mapper.rb
CHANGED
data/lib/vedeu/log.rb
CHANGED
data/lib/vedeu/main_loop.rb
CHANGED
data/lib/vedeu/models/cell.rb
CHANGED
data/lib/vedeu/models/char.rb
CHANGED
data/lib/vedeu/models/escape.rb
CHANGED