vedeu 0.4.32 → 0.4.33

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.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/bin/vedeu +3 -0
  3. data/docs/dsl.md +36 -2
  4. data/examples/borders_app.rb +5 -0
  5. data/examples/colours_app.rb +5 -0
  6. data/examples/configuration_app.rb +5 -0
  7. data/examples/drb_app.rb +4 -0
  8. data/examples/focus_app.rb +5 -0
  9. data/examples/geometry_app.rb +4 -0
  10. data/examples/hello_world.rb +5 -0
  11. data/examples/material_colours_app.rb +15 -8
  12. data/examples/panel_app.rb +5 -0
  13. data/examples/typed_commands/typed_commands_app.rb +4 -4
  14. data/examples/view_templates_app/view_templates_app.rb +4 -4
  15. data/lib/vedeu/application.rb +2 -0
  16. data/lib/vedeu/bindings.rb +1 -0
  17. data/lib/vedeu/buffers/buffer.rb +2 -0
  18. data/lib/vedeu/buffers/display_buffer.rb +1 -0
  19. data/lib/vedeu/configuration/api.rb +2 -0
  20. data/lib/vedeu/configuration/cli.rb +2 -0
  21. data/lib/vedeu/configuration/configuration.rb +1 -0
  22. data/lib/vedeu/cursor/cursor.rb +2 -0
  23. data/lib/vedeu/cursor/move.rb +2 -0
  24. data/lib/vedeu/cursor/refresh_cursor.rb +2 -0
  25. data/lib/vedeu/debug.rb +1 -0
  26. data/lib/vedeu/distributed/uri.rb +2 -0
  27. data/lib/vedeu/dsl/all.rb +1 -0
  28. data/lib/vedeu/dsl/border.rb +3 -0
  29. data/lib/vedeu/dsl/composition.rb +1 -0
  30. data/lib/vedeu/dsl/geometry.rb +1 -0
  31. data/lib/vedeu/dsl/group.rb +2 -0
  32. data/lib/vedeu/dsl/interface.rb +22 -1
  33. data/lib/vedeu/dsl/presentation.rb +0 -1
  34. data/lib/vedeu/dsl/text.rb +1 -0
  35. data/lib/vedeu/dsl/use.rb +3 -1
  36. data/lib/vedeu/events/event.rb +2 -0
  37. data/lib/vedeu/events/trigger.rb +2 -0
  38. data/lib/vedeu/geometry/area.rb +2 -0
  39. data/lib/vedeu/geometry/coordinate.rb +2 -0
  40. data/lib/vedeu/geometry/dimension.rb +2 -0
  41. data/lib/vedeu/geometry/geometry.rb +1 -0
  42. data/lib/vedeu/geometry/grid.rb +2 -0
  43. data/lib/vedeu/geometry/index_position.rb +2 -0
  44. data/lib/vedeu/geometry/position.rb +2 -0
  45. data/lib/vedeu/geometry/position_index.rb +2 -0
  46. data/lib/vedeu/geometry/position_validator.rb +2 -0
  47. data/lib/vedeu/input/input.rb +2 -0
  48. data/lib/vedeu/input/key.rb +2 -0
  49. data/lib/vedeu/input/keymap.rb +2 -0
  50. data/lib/vedeu/input/mapper.rb +2 -0
  51. data/lib/vedeu/main_loop.rb +1 -0
  52. data/lib/vedeu/models/cell.rb +2 -0
  53. data/lib/vedeu/models/char.rb +2 -0
  54. data/lib/vedeu/models/composition.rb +2 -0
  55. data/lib/vedeu/models/escape_char.rb +2 -0
  56. data/lib/vedeu/models/focus.rb +1 -0
  57. data/lib/vedeu/models/group.rb +2 -0
  58. data/lib/vedeu/models/interface.rb +2 -0
  59. data/lib/vedeu/models/line.rb +2 -0
  60. data/lib/vedeu/models/menu.rb +2 -0
  61. data/lib/vedeu/models/panel.rb +2 -0
  62. data/lib/vedeu/models/stream.rb +2 -0
  63. data/lib/vedeu/null/all.rb +2 -0
  64. data/lib/vedeu/null/border.rb +2 -0
  65. data/lib/vedeu/null/buffer.rb +2 -0
  66. data/lib/vedeu/null/generic.rb +2 -0
  67. data/lib/vedeu/null/geometry.rb +2 -0
  68. data/lib/vedeu/null/interface.rb +2 -0
  69. data/lib/vedeu/output/background.rb +2 -0
  70. data/lib/vedeu/output/border.rb +2 -0
  71. data/lib/vedeu/output/clear.rb +2 -0
  72. data/lib/vedeu/output/colour.rb +1 -0
  73. data/lib/vedeu/output/compressor.rb +2 -0
  74. data/lib/vedeu/output/esc.rb +1 -0
  75. data/lib/vedeu/output/foreground.rb +2 -0
  76. data/lib/vedeu/output/html_char.rb +2 -0
  77. data/lib/vedeu/output/output.rb +2 -0
  78. data/lib/vedeu/output/presentation.rb +1 -0
  79. data/lib/vedeu/output/refresh.rb +1 -0
  80. data/lib/vedeu/output/renderers/all.rb +3 -0
  81. data/lib/vedeu/output/renderers/escape_sequence.rb +2 -0
  82. data/lib/vedeu/output/renderers/file.rb +2 -0
  83. data/lib/vedeu/output/renderers/html.rb +2 -0
  84. data/lib/vedeu/output/renderers/json.rb +2 -0
  85. data/lib/vedeu/output/renderers/null.rb +2 -0
  86. data/lib/vedeu/output/renderers/terminal.rb +2 -0
  87. data/lib/vedeu/output/renderers/text.rb +2 -0
  88. data/lib/vedeu/output/style.rb +1 -0
  89. data/lib/vedeu/output/text.rb +2 -0
  90. data/lib/vedeu/output/translator.rb +2 -0
  91. data/lib/vedeu/output/viewport.rb +2 -0
  92. data/lib/vedeu/output/virtual_terminal.rb +2 -0
  93. data/lib/vedeu/output/wordwrap.rb +2 -0
  94. data/lib/vedeu/repositories/collection.rb +2 -0
  95. data/lib/vedeu/repositories/collections/all.rb +12 -0
  96. data/lib/vedeu/repositories/model.rb +2 -0
  97. data/lib/vedeu/repositories/registerable.rb +2 -0
  98. data/lib/vedeu/repositories/repositories/background_colours.rb +2 -0
  99. data/lib/vedeu/repositories/repositories/borders.rb +2 -0
  100. data/lib/vedeu/repositories/repositories/buffers.rb +2 -0
  101. data/lib/vedeu/repositories/repositories/colours.rb +2 -0
  102. data/lib/vedeu/repositories/repositories/cursors.rb +2 -0
  103. data/lib/vedeu/repositories/repositories/events_repository.rb +2 -0
  104. data/lib/vedeu/repositories/repositories/foreground_colours.rb +2 -0
  105. data/lib/vedeu/repositories/repositories/geometries.rb +2 -0
  106. data/lib/vedeu/repositories/repositories/groups.rb +2 -0
  107. data/lib/vedeu/repositories/repositories/interfaces_repository.rb +2 -0
  108. data/lib/vedeu/repositories/repositories/keymaps.rb +2 -0
  109. data/lib/vedeu/repositories/repositories/menus.rb +2 -0
  110. data/lib/vedeu/repositories/repository.rb +3 -3
  111. data/lib/vedeu/storage/associative_store.rb +2 -0
  112. data/lib/vedeu/storage/conveyor_store.rb +2 -0
  113. data/lib/vedeu/storage/fifo_store.rb +2 -0
  114. data/lib/vedeu/storage/store.rb +1 -0
  115. data/lib/vedeu/support/common.rb +1 -0
  116. data/lib/vedeu/support/log.rb +3 -0
  117. data/lib/vedeu/support/options.rb +2 -0
  118. data/lib/vedeu/support/template.rb +2 -0
  119. data/lib/vedeu/support/terminal.rb +1 -0
  120. data/lib/vedeu/support/timer.rb +2 -1
  121. data/lib/vedeu/support/visibility.rb +2 -0
  122. data/lib/vedeu/templating/directive.rb +3 -0
  123. data/lib/vedeu/templating/helpers.rb +2 -0
  124. data/lib/vedeu/templating/preprocessor.rb +4 -0
  125. data/lib/vedeu/traps.rb +1 -0
  126. data/lib/vedeu/version.rb +2 -1
  127. data/test/lib/vedeu/dsl/border_test.rb +19 -0
  128. data/test/lib/vedeu/dsl/geometry_test.rb +19 -0
  129. data/test/lib/vedeu/dsl/interface_test.rb +19 -0
  130. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2db54587f464686863ae7a86653c4e690522f778
4
- data.tar.gz: 8d0f17548d624a09022312fd9704632090a73b4a
3
+ metadata.gz: b62c5ba6eef01e883bf71b71a52223214dcffa48
4
+ data.tar.gz: 6217942929014ce27de055b78a2e533a56bb638d
5
5
  SHA512:
6
- metadata.gz: 5a817ae692b688d3a6f67b70c3f88a2fc2775c2b754fa227e5e7b0610705c4c52a266a631fe4efc169b9c26867141cbf48a1ca2e73acbe3d1a047b451dfa75f2
7
- data.tar.gz: 5a2423e352bc179911a180df68addaf8b194786dff67ebece988897e4756d5386c71fb8dc97281b47c92665058daeee8d5476ee7445a8e59ed28fa5d1108d23f
6
+ metadata.gz: 8b40fb9d5ee9ffc2660ebd062a12f2eb64903330b5f80f50daf4133c9adec364caa31cb31140981ac9a0de585d065d472208e33cb85363c235ef2720ac4101b2
7
+ data.tar.gz: e6cdfbc8f776b1ad7f5f611dadf8cc7bce21f8ec0375650f7995dc9e1070922e755e7e6143230f6bb1a2ca426c23595ba4046513ccc4ac710d22331eb9e736ef
data/bin/vedeu CHANGED
@@ -3,6 +3,9 @@
3
3
  lib_dir = File.dirname(__FILE__) + '/../lib'
4
4
  $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
5
5
 
6
+ require 'vedeu/version'
7
+
8
+ puts "Vedeu (#{Vedeu::VERSION})"
6
9
  puts ''
7
10
  puts 'Vedeu is a Ruby gem. This executable serves for a future in which ' \
8
11
  'Vedeu can generate a starting point for your terminal-based GUI ' \
data/docs/dsl.md CHANGED
@@ -13,8 +13,42 @@ Borders are defined by name for each of the client application's interfaces or
13
13
 
14
14
  ### Geometry
15
15
 
16
- Geometry is defined by name and allows the configuration of the position and
17
- size of an interface.
16
+ Geometry allows the configuration of the position and size of an interface.
17
+
18
+ Here is an example of declarations for a `geometry` block:
19
+
20
+ ```ruby
21
+ interface 'main' do
22
+ geometry do
23
+ height 5 # Sets the height of the view to 5
24
+ width 20 # Sets the width of the view to 20
25
+ x 3 # Start drawing 3 spaces from left
26
+ y 10 # Start drawing 10 spaces from top
27
+ xn 30 # Stop drawing 30 spaces from the left
28
+ yn 20 # Stop drawing 20 spaces from top
29
+ end
30
+ end
31
+ ```
32
+
33
+ If a declaration is omitted for `height` or `width` the full remaining space
34
+ available in the terminal will be used. `x` and `y` both default to 0.
35
+
36
+ You can also make a geometry declaration dependent on another view:
37
+
38
+ ```ruby
39
+ interface 'other_panel' do
40
+ # other code ...
41
+ end
42
+
43
+ interface 'main' do
44
+ geometry do
45
+ height 10
46
+ y { use('other_panel').south }
47
+ end
48
+ end
49
+ ```
50
+
51
+ This view will begin just below "other\_panel".
18
52
 
19
53
  ### Groups
20
54
 
@@ -6,6 +6,11 @@ $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
6
6
  require 'vedeu'
7
7
 
8
8
  # An example application to demonstrate borders.
9
+ #
10
+ # If you have cloned this repository from GitHub, you can run this example:
11
+ #
12
+ # ./examples/borders_app.rb
13
+ #
9
14
  class VedeuBordersApp
10
15
 
11
16
  include Vedeu
@@ -6,6 +6,11 @@ $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
6
6
  require 'vedeu'
7
7
 
8
8
  # An example application to demonstrate colours.
9
+ #
10
+ # If you have cloned this repository from GitHub, you can run this example:
11
+ #
12
+ # ./examples/colours_app.rb
13
+ #
9
14
  class VedeuColoursApp
10
15
 
11
16
  include Vedeu
@@ -7,6 +7,10 @@ require 'vedeu'
7
7
 
8
8
  # This example application shows how configuration works.
9
9
  #
10
+ # If you have cloned this repository from GitHub, you can run this example:
11
+ #
12
+ # ./examples/configuration_app.rb
13
+ #
10
14
  # First, we use the configuration API to switch debugging on, and set the
11
15
  # logging to go to a file in the /tmp directory.
12
16
  #
@@ -15,6 +19,7 @@ require 'vedeu'
15
19
  # overridden by command line arguments.
16
20
  #
17
21
  # Use 'space' to refresh, 'q' to exit.
22
+ #
18
23
  class VedeuConfigurationApp
19
24
 
20
25
  include Vedeu
data/examples/drb_app.rb CHANGED
@@ -6,6 +6,10 @@ $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
6
6
  require 'vedeu'
7
7
 
8
8
  # An example application to demonstrate the DRb server.
9
+ # If you have cloned this repository from GitHub, you can run this example:
10
+ #
11
+ # ./examples/drb_app.rb
12
+ #
9
13
  class VedeuTestApplication
10
14
 
11
15
  # Be aware that running an application with debugging enabled will affect
@@ -7,6 +7,11 @@ require 'vedeu'
7
7
 
8
8
  # This example application shows how interface focus works.
9
9
  #
10
+ # If you have cloned this repository from GitHub, you can run this example:
11
+ #
12
+ # ./examples/focus_app.rb
13
+ #
14
+ #
10
15
  # First, we set up the interfaces, noting that 'copper' should have focus when
11
16
  # the application starts. Also note that 'status' should not show a cursor.
12
17
  #
@@ -6,6 +6,10 @@ $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
6
6
  require 'vedeu'
7
7
 
8
8
  # An example application to demonstrate geometry.
9
+ # If you have cloned this repository from GitHub, you can run this example:
10
+ #
11
+ # ./examples/geometry_app.rb
12
+ #
9
13
  class VedeuGeometryApp
10
14
 
11
15
  include Vedeu
@@ -9,6 +9,11 @@ trap('INT') { exit! }
9
9
  require 'vedeu'
10
10
 
11
11
  # An example application to demonstrate 'Hello World'.
12
+ #
13
+ # If you have cloned this repository from GitHub, you can run this example:
14
+ #
15
+ # ./examples/hello_world.rb
16
+ #
12
17
  class HelloWorldApp
13
18
 
14
19
  include Vedeu
@@ -7,6 +7,11 @@ require 'vedeu'
7
7
 
8
8
  # An example application to demonstrate colours, cursor and interface movement,
9
9
  # maximising/unmaximising of interfaces and toggling of cursors and interfaces.
10
+ #
11
+ # If you have cloned this repository from GitHub, you can run this example:
12
+ #
13
+ # ./examples/material_colours_app.rb
14
+ #
10
15
  class VedeuMaterialColoursApp
11
16
 
12
17
  include Vedeu
@@ -35,20 +40,22 @@ class VedeuMaterialColoursApp
35
40
  zindex 2
36
41
  end
37
42
 
43
+ # This interface uses the 'parens' style for the DSL, which sometimes helps
44
+ # Ruby to understand the values you provide.
38
45
  interface 'other_interface' do
39
46
  border 'other_interface' do
40
- colour foreground: '#ffffff', background: :default
41
- title 'Wow!'
47
+ colour(foreground: '#ffffff', background: :default)
48
+ title('Wow!')
42
49
  end
43
- colour foreground: '#ffffff', background: :default
50
+ colour(foreground: '#ffffff', background: :default)
44
51
  cursor!
45
52
  geometry 'other_interface' do
46
- x 27
47
- xn 47
48
- y 3
49
- yn 13
53
+ x(27)
54
+ xn(47)
55
+ y(3)
56
+ yn(13)
50
57
  end
51
- zindex 1
58
+ zindex(1)
52
59
  end
53
60
 
54
61
  keymap('_global_') do
@@ -7,6 +7,11 @@ require 'vedeu'
7
7
 
8
8
  # An example application to demonstrate colours, cursor and interface movement,
9
9
  # maximising/unmaximising of interfaces and toggling of cursors and interfaces.
10
+ #
11
+ # If you have cloned this repository from GitHub, you can run this example:
12
+ #
13
+ # ./examples/panel_app.rb
14
+ #
10
15
  class VedeuPanelApp
11
16
 
12
17
  include Vedeu
@@ -63,15 +63,15 @@ class VedeuTypedCommands
63
63
  geometry('status') do
64
64
  height 1
65
65
  width 40
66
- x Vedeu.use('output').left
67
- y Vedeu.use('output').south(0)
66
+ x use('output').left
67
+ y use('output').south(0)
68
68
  end
69
69
 
70
70
  geometry 'command' do
71
71
  height 3
72
72
  width 40
73
- x Vedeu.use('status').left
74
- y Vedeu.use('status').south(0)
73
+ x use('status').left
74
+ y use('status').south(0)
75
75
  end
76
76
 
77
77
  focus_by_name 'command'
@@ -58,15 +58,15 @@ class VedeuViewTemplateApp
58
58
  geometry 'default' do
59
59
  height 6
60
60
  width 25
61
- x Vedeu.use('prune').left
62
- y Vedeu.use('prune').north(7)
61
+ x use('prune').left
62
+ y use('prune').north(7)
63
63
  end
64
64
 
65
65
  geometry 'wrap' do
66
66
  height 6
67
67
  width 25
68
- x Vedeu.use('prune').left
69
- y Vedeu.use('prune').south(1)
68
+ x use('prune').left
69
+ y use('prune').south(1)
70
70
  end
71
71
 
72
72
  renders do
@@ -1,6 +1,8 @@
1
1
  module Vedeu
2
2
 
3
3
  # Orchestrates the running of the main application loop.
4
+ #
5
+ # @api private
4
6
  class Application
5
7
 
6
8
  # @param (see #initialize)
@@ -10,6 +10,7 @@ module Vedeu
10
10
  #
11
11
  # :nocov:
12
12
  #
13
+ # @api public
13
14
  module Bindings
14
15
 
15
16
  Vedeu.bind(:_drb_input_) do |data, type|
@@ -10,6 +10,8 @@ module Vedeu
10
10
  # if available, otherwise from the current 'Front' buffer. When new content
11
11
  # is copied to the 'Front' buffer, the current 'Front' buffer is also copied
12
12
  # to the 'Previous' buffer.
13
+ #
14
+ # @api private
13
15
  class Buffer
14
16
 
15
17
  include Vedeu::Model
@@ -3,6 +3,7 @@ module Vedeu
3
3
  # This module is included in Vedeu::Interface to provide means to store client
4
4
  # application views created with {Vedeu.renders} or {Vedeu.views}.
5
5
  #
6
+ # @api private
6
7
  module DisplayBuffer
7
8
 
8
9
  include Vedeu::Common
@@ -4,6 +4,8 @@ module Vedeu
4
4
 
5
5
  # The Configuration::API class parses client application configuration into
6
6
  # options used by Vedeu to affect certain behaviours.
7
+ #
8
+ # @api public
7
9
  class API
8
10
 
9
11
  include Vedeu::Common
@@ -4,6 +4,8 @@ module Vedeu
4
4
 
5
5
  # The Configuration::CLI class parses command-line arguments using
6
6
  # OptionParser into options used by Vedeu to affect certain behaviours.
7
+ #
8
+ # @api public
7
9
  class CLI
8
10
 
9
11
  # @param (see #initialize)
@@ -27,6 +27,7 @@ module Vedeu
27
27
  # application settings (via the configuration API), or any command-line
28
28
  # arguments provided.
29
29
  #
30
+ # @api private
30
31
  class Configuration
31
32
 
32
33
  include Singleton
@@ -2,6 +2,8 @@ module Vedeu
2
2
 
3
3
  # Each interface has its own Cursor which maintains the position and
4
4
  # visibility of the cursor within that interface.
5
+ #
6
+ # @api private
5
7
  class Cursor
6
8
 
7
9
  include Vedeu::Model
@@ -38,6 +38,8 @@ module Vedeu
38
38
  # The view will not exceed the boundary of the visible terminal.
39
39
  # The view will move freely within the bounds of the interface,
40
40
  # irrespective of content.
41
+ #
42
+ # @api private
41
43
  class Move
42
44
 
43
45
  extend Forwardable
@@ -2,6 +2,8 @@ module Vedeu
2
2
 
3
3
  # Handle the refreshing (redrawing) of a cursor, without redrawing the whole
4
4
  # interface; unless the cursor's offset has caused the view to change.
5
+ #
6
+ # @api private
5
7
  class RefreshCursor
6
8
 
7
9
  extend Forwardable
data/lib/vedeu/debug.rb CHANGED
@@ -4,6 +4,7 @@ module Vedeu
4
4
  # Helps to debug a running application by providing a stack trace of its
5
5
  # execution upon exiting.
6
6
  #
7
+ # @api public
7
8
  # @param filename [String]
8
9
  # @return [void]
9
10
  # @yieldreturn [void] The section of the application to debug.
@@ -4,6 +4,8 @@ module Vedeu
4
4
 
5
5
  # Value class which provides the host and port for the DRb server and
6
6
  # client.
7
+ #
8
+ # @api private
7
9
  class Uri
8
10
 
9
11
  # @!attribute [r] host
data/lib/vedeu/dsl/all.rb CHANGED
@@ -18,6 +18,7 @@ module Vedeu
18
18
 
19
19
  # Provides a mechanism to help configure and use Vedeu.
20
20
  #
21
+ # @api public
21
22
  module DSL
22
23
 
23
24
  private
@@ -23,10 +23,13 @@ module Vedeu
23
23
  # # ...or standalone; referencing the target interface or view.
24
24
  # Vedeu.border 'some_interface' do
25
25
  # # ...
26
+ #
27
+ # @api public
26
28
  class Border
27
29
 
28
30
  include Vedeu::DSL
29
31
  include Vedeu::DSL::Presentation
32
+ include Vedeu::DSL::Use
30
33
 
31
34
  # Specify the border of an interface or view with a simple DSL.
32
35
  #
@@ -36,6 +36,7 @@ module Vedeu
36
36
  # - Colours are defined in CSS-style values, i.e. `#ff0000` would be red.
37
37
  # - Styles are named. See the table below for supported styles.
38
38
  #
39
+ # @api public
39
40
  class Composition
40
41
 
41
42
  include Vedeu::DSL
@@ -21,6 +21,7 @@ module Vedeu
21
21
  # yn +--------------+ # south: yn + 1
22
22
  # south
23
23
  #
24
+ # @api public
24
25
  class Geometry
25
26
 
26
27
  include Vedeu::DSL
@@ -3,6 +3,8 @@ module Vedeu
3
3
  module DSL
4
4
 
5
5
  # DSL for adding interfaces to a group.
6
+ #
7
+ # @api public
6
8
  class Group
7
9
 
8
10
  include Vedeu::DSL
@@ -3,6 +3,8 @@ module Vedeu
3
3
  module DSL
4
4
 
5
5
  # DSL for creating interfaces.
6
+ #
7
+ # @api public
6
8
  class Interface
7
9
 
8
10
  include Vedeu::Common
@@ -23,12 +25,20 @@ module Vedeu
23
25
 
24
26
  # Allows the setting of a border for the interface.
25
27
  #
28
+ # @example
29
+ # interface 'my_interface' do
30
+ # border do
31
+ # # ... see Vedeu::DSL::Border for DSL methods for borders.
32
+ # end
33
+ # end
34
+ #
26
35
  # @param name [String] The name of the interface; this is already provided
27
36
  # when we define the interface or view, setting it here is just
28
37
  # mirroring functionality of {Vedeu::DSL::Border.border}.
29
38
  # @param block [Proc]
30
39
  # @raise [InvalidSyntax] The required block was not given.
31
40
  # @return [Vedeu::Border]
41
+ # @see Vedeu::DSL::Border
32
42
  def border(name = nil, &block)
33
43
  fail InvalidSyntax, 'block not given' unless block_given?
34
44
 
@@ -114,7 +124,9 @@ module Vedeu
114
124
  # @example
115
125
  # interface 'my_interface' do
116
126
  # geometry do
117
- # # ...
127
+ # # ... see Vedeu::DSL::Geometry for DSL methods for geometries.
128
+ # end
129
+ # end
118
130
  #
119
131
  # @param name [String] The name of the interface; this is already provided
120
132
  # when we define the interface or view, setting it here is just
@@ -219,6 +231,15 @@ module Vedeu
219
231
  visible(false)
220
232
  end
221
233
 
234
+ # Use a value from another model.
235
+ #
236
+ # @param name [String] The name of the interface model you wish to use a
237
+ # value from.
238
+ # @return [Vedeu::Interface]
239
+ def use(name)
240
+ model.repository.by_name(name)
241
+ end
242
+
222
243
  # Set the visibility of the interface.
223
244
  #
224
245
  # @param value [Boolean] Any value other than nil or false will evaluate