vedeu 0.6.20 → 0.6.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/README.md +4 -0
  4. data/Rakefile +13 -0
  5. data/bin/vedeu_drb_server +6 -6
  6. data/docs/api.md +14 -0
  7. data/docs/dsl.md +12 -12
  8. data/docs/events/document.md +4 -2
  9. data/docs/events/drb.md +4 -0
  10. data/docs/events/focus.md +2 -0
  11. data/docs/events/menu.md +2 -0
  12. data/docs/events/movement.md +7 -5
  13. data/docs/events/refresh.md +2 -0
  14. data/docs/events/system.md +5 -0
  15. data/docs/events/view.md +2 -0
  16. data/docs/events/visibility.md +2 -0
  17. data/lib/vedeu.rb +0 -23
  18. data/lib/vedeu/all.rb +2 -4
  19. data/lib/vedeu/application/application_view.rb +1 -1
  20. data/lib/vedeu/borders/all.rb +3 -3
  21. data/lib/vedeu/borders/border.rb +2 -2
  22. data/lib/vedeu/borders/dsl.rb +21 -27
  23. data/lib/vedeu/borders/null.rb +2 -15
  24. data/lib/vedeu/borders/render.rb +1 -1
  25. data/lib/vedeu/borders/repository.rb +9 -0
  26. data/lib/vedeu/buffers/buffer.rb +2 -2
  27. data/lib/vedeu/buffers/null.rb +1 -31
  28. data/lib/vedeu/buffers/refresh.rb +8 -8
  29. data/lib/vedeu/buffers/repository.rb +9 -0
  30. data/lib/vedeu/colours/backgrounds.rb +9 -0
  31. data/lib/vedeu/colours/colour.rb +1 -1
  32. data/lib/vedeu/colours/foregrounds.rb +9 -0
  33. data/lib/vedeu/common.rb +22 -13
  34. data/lib/vedeu/configuration/configuration.rb +6 -0
  35. data/lib/vedeu/cursors/cursor.rb +13 -8
  36. data/lib/vedeu/cursors/refresh.rb +2 -2
  37. data/lib/vedeu/cursors/repository.rb +18 -1
  38. data/lib/vedeu/distributed/server.rb +23 -0
  39. data/lib/vedeu/distributed/templates/default_borders.vedeu +1 -1
  40. data/lib/vedeu/distributed/templates/default_geometries.vedeu +1 -1
  41. data/lib/vedeu/distributed/templates/default_interfaces.vedeu +1 -1
  42. data/lib/vedeu/distributed/templates/default_keymaps.vedeu +1 -1
  43. data/lib/vedeu/distributed/templates/default_menus.vedeu +1 -1
  44. data/lib/vedeu/distributed/templates/default_views.vedeu +1 -1
  45. data/lib/vedeu/dsl/composition.rb +7 -17
  46. data/lib/vedeu/dsl/dsl.rb +12 -0
  47. data/lib/vedeu/dsl/interface.rb +32 -33
  48. data/lib/vedeu/dsl/keymap.rb +13 -19
  49. data/lib/vedeu/dsl/line.rb +3 -13
  50. data/lib/vedeu/dsl/shared.rb +5 -5
  51. data/lib/vedeu/dsl/stream.rb +0 -10
  52. data/lib/vedeu/dsl/use.rb +6 -6
  53. data/lib/vedeu/dsl/view.rb +17 -19
  54. data/lib/vedeu/editor/cursor.rb +32 -10
  55. data/lib/vedeu/editor/document.rb +33 -35
  56. data/lib/vedeu/editor/editor.rb +3 -4
  57. data/lib/vedeu/editor/insert.rb +1 -1
  58. data/lib/vedeu/editor/line.rb +1 -8
  59. data/lib/vedeu/editor/lines.rb +1 -1
  60. data/lib/vedeu/editor/repository.rb +9 -0
  61. data/lib/vedeu/esc/esc.rb +2 -1
  62. data/lib/vedeu/events/aliases.rb +8 -1
  63. data/lib/vedeu/events/event.rb +8 -0
  64. data/lib/vedeu/events/repository.rb +9 -0
  65. data/lib/vedeu/events/trigger.rb +9 -5
  66. data/lib/vedeu/geometry/coordinate.rb +2 -2
  67. data/lib/vedeu/geometry/dsl.rb +32 -38
  68. data/lib/vedeu/geometry/generic_coordinate.rb +1 -1
  69. data/lib/vedeu/geometry/geometry.rb +3 -3
  70. data/lib/vedeu/geometry/null.rb +2 -24
  71. data/lib/vedeu/geometry/repository.rb +9 -0
  72. data/lib/vedeu/groups/clear.rb +7 -3
  73. data/lib/vedeu/groups/dsl.rb +29 -35
  74. data/lib/vedeu/groups/group.rb +28 -4
  75. data/lib/vedeu/groups/refresh.rb +3 -2
  76. data/lib/vedeu/groups/repository.rb +9 -0
  77. data/lib/vedeu/input/capture.rb +1 -1
  78. data/lib/vedeu/input/keymap.rb +2 -1
  79. data/lib/vedeu/input/keymaps.rb +9 -0
  80. data/lib/vedeu/input/mapper.rb +4 -0
  81. data/lib/vedeu/input/translator.rb +1 -1
  82. data/lib/vedeu/logging/debug.rb +13 -0
  83. data/lib/vedeu/logging/log.rb +8 -0
  84. data/lib/vedeu/logging/timer.rb +13 -0
  85. data/lib/vedeu/menus/dsl.rb +8 -18
  86. data/lib/vedeu/menus/menu.rb +8 -4
  87. data/lib/vedeu/menus/null.rb +1 -1
  88. data/lib/vedeu/menus/repository.rb +9 -0
  89. data/lib/vedeu/models/cell.rb +5 -0
  90. data/lib/vedeu/models/escape.rb +5 -0
  91. data/lib/vedeu/models/focus.rb +20 -5
  92. data/lib/vedeu/models/interface.rb +10 -1
  93. data/lib/vedeu/models/interfaces.rb +9 -0
  94. data/lib/vedeu/models/toggleable.rb +19 -4
  95. data/lib/vedeu/models/views/char.rb +6 -1
  96. data/lib/vedeu/models/views/html_char.rb +1 -4
  97. data/lib/vedeu/models/views/line.rb +1 -1
  98. data/lib/vedeu/models/views/view.rb +1 -1
  99. data/lib/vedeu/null/generic.rb +14 -2
  100. data/lib/vedeu/null/interface.rb +1 -1
  101. data/lib/vedeu/null/view.rb +1 -1
  102. data/lib/vedeu/output/clear/interface.rb +5 -1
  103. data/lib/vedeu/output/compressor.rb +8 -4
  104. data/lib/vedeu/output/direct.rb +4 -4
  105. data/lib/vedeu/output/presentation/all.rb +15 -0
  106. data/lib/vedeu/output/presentation/presentation.rb +0 -7
  107. data/lib/vedeu/output/refresh/refresh.rb +1 -3
  108. data/lib/vedeu/output/renderers/all.rb +10 -0
  109. data/lib/vedeu/output/renderers/terminal.rb +1 -3
  110. data/lib/vedeu/repositories/collection.rb +3 -3
  111. data/lib/vedeu/repositories/model.rb +1 -1
  112. data/lib/vedeu/repositories/repository.rb +8 -8
  113. data/lib/vedeu/repositories/store.rb +3 -2
  114. data/lib/vedeu/runtime/application.rb +4 -0
  115. data/lib/vedeu/runtime/bootstrap.rb +1 -1
  116. data/lib/vedeu/runtime/flags.rb +7 -0
  117. data/lib/vedeu/runtime/main_loop.rb +2 -0
  118. data/lib/vedeu/runtime/router.rb +4 -0
  119. data/lib/vedeu/templating/decoder.rb +1 -1
  120. data/lib/vedeu/templating/encoder.rb +1 -1
  121. data/lib/vedeu/templating/helpers.rb +2 -0
  122. data/lib/vedeu/templating/template.rb +1 -1
  123. data/lib/vedeu/terminal/buffer.rb +7 -0
  124. data/lib/vedeu/terminal/terminal.rb +8 -0
  125. data/lib/vedeu/version.rb +1 -1
  126. data/test/lib/vedeu/borders/dsl_test.rb +0 -6
  127. data/test/lib/vedeu/borders/null_test.rb +0 -12
  128. data/test/lib/vedeu/buffers/null_test.rb +0 -37
  129. data/test/lib/vedeu/common_test.rb +33 -0
  130. data/test/lib/vedeu/cursors/cursor_test.rb +1 -1
  131. data/test/lib/vedeu/dsl/composition_test.rb +0 -6
  132. data/test/lib/vedeu/dsl/dsl_test.rb +1 -0
  133. data/test/lib/vedeu/dsl/interface_test.rb +0 -6
  134. data/test/lib/vedeu/dsl/keymap_test.rb +0 -5
  135. data/test/lib/vedeu/dsl/line_test.rb +0 -7
  136. data/test/lib/vedeu/dsl/stream_test.rb +0 -7
  137. data/test/lib/vedeu/editor/cursor_test.rb +23 -8
  138. data/test/lib/vedeu/editor/document_test.rb +27 -23
  139. data/test/lib/vedeu/editor/line_test.rb +0 -30
  140. data/test/lib/vedeu/geometry/dsl_test.rb +0 -5
  141. data/test/lib/vedeu/geometry/null_test.rb +0 -30
  142. data/test/lib/vedeu/groups/dsl_test.rb +0 -6
  143. data/test/lib/vedeu/groups/group_test.rb +15 -7
  144. data/test/lib/vedeu/menus/dsl_test.rb +0 -5
  145. data/test/lib/vedeu/models/cell_test.rb +4 -0
  146. data/test/lib/vedeu/models/escape_test.rb +4 -0
  147. data/test/lib/vedeu/models/views/char_test.rb +4 -0
  148. data/test/lib/vedeu/null/generic_test.rb +13 -0
  149. data/test/lib/vedeu/terminal/buffer_test.rb +3 -2
  150. data/test/lib/vedeu_test.rb +81 -3
  151. data/test/support/examples/borders_app.rb +1 -3
  152. data/test/support/examples/drb_app.rb +1 -3
  153. data/test/support/examples/editor_app.rb +2 -4
  154. data/test/support/examples/focus_app.rb +1 -3
  155. data/test/support/examples/hello_world.rb +1 -6
  156. data/test/support/examples/material_colours_app.rb +1 -3
  157. data/test/support/examples/view_templates_app/view_templates_app.rb +1 -3
  158. data/test/support/helpers/model_test_class.rb +1 -5
  159. data/test/support/who.rb +29 -0
  160. data/test/test_helper.rb +0 -1
  161. metadata +5 -17
  162. data/lib/vedeu/api/all.rb +0 -15
  163. data/lib/vedeu/api/external.rb +0 -194
  164. data/lib/vedeu/api/internal.rb +0 -177
  165. data/test/lib/vedeu/api/external_test.rb +0 -74
  166. data/test/lib/vedeu/api/internal_test.rb +0 -33
  167. data/test/support/examples/typed_commands/command.erb +0 -1
  168. data/test/support/examples/typed_commands/output.erb +0 -1
  169. data/test/support/examples/typed_commands/status.erb +0 -1
  170. data/test/support/examples/typed_commands/typed_commands_app.rb +0 -94
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fbbcdaa8be4572e7426e84959d56e5932e90bba
4
- data.tar.gz: 039d7499ad442e6eb675920ef27abb4d8560d9a3
3
+ metadata.gz: b2bc250678c9728597c333d93e87cc728cbb4767
4
+ data.tar.gz: 5be52acf963d8b8db5fdc19a478293b836c7edb8
5
5
  SHA512:
6
- metadata.gz: 8711ec3ecd769c9924fcd0f9da09d18289a32ff86f03b44cc539c2909f54355563f1817e242d106a9e2deb7c5921dc1aea17e138ab444bdb2c86407a74162c80
7
- data.tar.gz: e724e09e2aead30c2502c31d5aefd80b9481e9c493250991eb463f6b48940e14fce71a64d7fc4617a747ce5b2f345063c49989af8a1796270ef4a586e2fbec8f
6
+ metadata.gz: b0210cec1fa8d31b42f9dcb8deb71697e09b2925120274524bcb185da446481dede13465795ef86ebb1b6b5d44d228d36667ac11733ba87d7a6702c9e87b14e8
7
+ data.tar.gz: 6e9b739f5ee331a20e1df15c4e97880313f9491067edc82d487c553757eafd134bc14861c9ecf5a384ed314d79253e62b3ec07dcb2db16e0dcbabb2235a62ed3
data/.yardopts CHANGED
@@ -1,6 +1,6 @@
1
1
  --private
2
2
  --protected
3
- --embed-mixin ClassMethods
3
+ --embed-mixins
4
4
  -
5
5
  docs/api.md
6
6
  docs/configuration.md
data/README.md CHANGED
@@ -74,6 +74,10 @@ Any branch on the repository that is not `master` is probably experimental; do
74
74
  into `master` before a release, and branches prefixed with `spike/` are me
75
75
  playing with ideas.
76
76
 
77
+ I may have left some TODO items lying around, which you can find with:
78
+
79
+ yard list --query '@todo'
80
+
77
81
  ### General contribution help
78
82
 
79
83
  1. Fork it ([https://github.com/gavinlaking/vedeu/fork](https://github.com/gavinlaking/vedeu/fork))
data/Rakefile CHANGED
@@ -16,11 +16,24 @@ YARD::Rake::YardocTask.new(:yard) do |task|
16
16
  'lib/**/*.rb',
17
17
  '-',
18
18
  'docs/api.md',
19
+ 'docs/configuration.md',
19
20
  'docs/dsl.md',
20
21
  'docs/events.md',
21
22
  'docs/getting_started.md',
22
23
  'docs/object_graph.md',
24
+ 'docs/events/application.md',
25
+ 'docs/events/document.md',
26
+ 'docs/events/drb.md',
27
+ 'docs/events/focus.md',
28
+ 'docs/events/menu.md',
29
+ 'docs/events/movement.md',
30
+ 'docs/events/refresh.md',
31
+ 'docs/events/system.md',
32
+ 'docs/events/view.md',
33
+ 'docs/events/visibility.md',
23
34
  ]
35
+ task.options = ['--highlight']
36
+ task.stats_options = ['--list-undoc']
24
37
  end
25
38
 
26
39
  RuboCop::RakeTask.new(:rubocop) do |task|
data/bin/vedeu_drb_server CHANGED
@@ -42,7 +42,7 @@ class VedeuTestApplication
42
42
 
43
43
  Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
44
44
 
45
- Vedeu.border 'test_interface' do
45
+ Vedeu.border :test_interface do
46
46
  # Define colour and style of border
47
47
  colour foreground: '#ffff00', background: '#0000ff'
48
48
  style 'normal'
@@ -62,7 +62,7 @@ class VedeuTestApplication
62
62
  vertical '|'
63
63
  end
64
64
 
65
- Vedeu.geometry 'test_interface' do
65
+ Vedeu.geometry :test_interface do
66
66
  # centred!
67
67
  height 6
68
68
  width 26
@@ -70,24 +70,24 @@ class VedeuTestApplication
70
70
  y 4
71
71
  end
72
72
 
73
- Vedeu.interface 'test_interface' do
73
+ Vedeu.interface :test_interface do
74
74
  colour foreground: '#ff0000', background: '#000000'
75
75
  cursor!
76
76
  end
77
77
 
78
- Vedeu.keymap 'test_interface' do
78
+ Vedeu.keymap :test_interface do
79
79
  key(:up, 'k') { Vedeu.trigger(:_cursor_up_) }
80
80
  key(:right, 'l') { Vedeu.trigger(:_cursor_right_) }
81
81
  key(:down, 'j') { Vedeu.trigger(:_cursor_down_) }
82
82
  key(:left, 'h') { Vedeu.trigger(:_cursor_left_) }
83
83
  end
84
84
 
85
- Vedeu.menu 'test_interface' do
85
+ Vedeu.menu :test_interface do
86
86
  # ...
87
87
  end
88
88
 
89
89
  Vedeu.renders do
90
- view 'test_interface' do
90
+ view :test_interface do
91
91
  lines do
92
92
  line 'a1b1c1d1e1f1g1h1i1j1k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z1'
93
93
  line 'a2b2c2d2e2f2g2h2i2j2k2l2m2n2o2p2q2r2s2t2u2v2w2x2y2z2'
data/docs/api.md CHANGED
@@ -14,6 +14,20 @@ applications. Below is a list of all the API methods:
14
14
  # ...
15
15
  end
16
16
 
17
+ Most of Vedeu's core functionality comes from its API methods, these
18
+ methods are used in a variety of ways, sometimes in combination:
19
+
20
+ # with parameters
21
+ Vedeu.method_name(*params)
22
+
23
+ # with a block
24
+ Vedeu.method_name(*params) do
25
+ # ...
26
+ end
27
+
28
+ # with other methods
29
+ Vedeu.method_name.other_method
30
+
17
31
  ## Configuration
18
32
 
19
33
  See {file:docs/configuration.md}
data/docs/dsl.md CHANGED
@@ -7,10 +7,10 @@ your application whilst using Vedeu.
7
7
 
8
8
  ## Interfaces
9
9
 
10
- An Interface is a basic element in the GUI. It usually but does not
11
- necessarily correspond to a region of the terminal screen (for
12
- example, an Interface might not be displayed at certain points in an
13
- application life cycle).
10
+ An Interface is a basic element in the GUI. You can think of it as a
11
+ container for a portion of the terminal screen. Interfaces can be set
12
+ to be show or hidden, and combined into groups to form the different
13
+ 'screens' of your application.
14
14
 
15
15
  Much of the behavior of an Interface comes from child objects that
16
16
  are defined under the Interface. These objects are described in more
@@ -19,13 +19,13 @@ detail in their respective sections below.
19
19
  Here is an example of declarations for an `interface` block:
20
20
 
21
21
  ```ruby
22
- interface 'main' do
22
+ interface :main do
23
23
  visible true # whether to show the interface
24
24
  focus! # focus this interface
25
25
  cursor true # Show the cursor when this section is focused
26
26
  colour foreground: '#ffffff', # set interface foreground
27
27
  background: '#000033' # and background colors
28
- group 'general' # set interface group
28
+ group :general # set interface group
29
29
 
30
30
  geometry do
31
31
  # size and position details
@@ -36,12 +36,12 @@ interface 'main' do
36
36
  keymap do
37
37
  # keymap that is in effect when this interface is focused
38
38
  end
39
- views do
40
- # details about how to render the interface
41
- end
42
39
  end
43
40
  ```
44
41
 
42
+ The content for an interface is handled by a 'view'. More details on
43
+ these can be found here: {file:docs/dsl.md#Views Views}
44
+
45
45
  ### Declaring interface sub-objects
46
46
 
47
47
  Every object in the DSL besides interface itself is defined for a
@@ -53,7 +53,7 @@ That is, these are equivalent ways to declare a Geometry for an
53
53
  existing interface
54
54
 
55
55
  ```ruby
56
- interface 'main' do
56
+ interface :main do
57
57
  geometry do
58
58
  # some geometry
59
59
  end
@@ -65,11 +65,11 @@ end
65
65
  or you can say
66
66
 
67
67
  ```ruby
68
- interface 'main' do
68
+ interface :main do
69
69
  # some other declarations
70
70
  end
71
71
 
72
- geometry 'main' do
72
+ geometry :main do
73
73
  # some geometry
74
74
  end
75
75
  ```
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Document Events
4
4
 
5
+ Note: 'name' is a Symbol unless mentioned otherwise.
6
+
5
7
  ### :_editor_execute_
6
8
 
7
9
  Vedeu.trigger(:_editor_execute_, name)
@@ -28,6 +30,8 @@ line in the named document.
28
30
  This event attempts to insert the given character in the named
29
31
  document at the current virtual cursor position.
30
32
 
33
+ Note: 'character' is a string.
34
+
31
35
  Vedeu.trigger(:_editor_insert_character_, name, character)
32
36
 
33
37
  ### :_editor_insert_line_
@@ -42,14 +46,12 @@ character in the named document.
42
46
 
43
47
  Vedeu.trigger(:_editor_left_, name)
44
48
 
45
-
46
49
  ### :_editor_right_
47
50
  This event attempts to move the virtual cursor right by one
48
51
  character in the named document.
49
52
 
50
53
  Vedeu.trigger(:_editor_right_, name)
51
54
 
52
-
53
55
  ### :_editor_up_
54
56
  This event attempts to move the virtual cursor up by one line
55
57
  in the named document.
data/docs/events/drb.md CHANGED
@@ -6,6 +6,8 @@
6
6
  Triggering this event will send input to the running application as
7
7
  long as it has the DRb server running.
8
8
 
9
+ Note: See {Vedeu::Distributed::Server#input} for parameter details.
10
+
9
11
  Vedeu.trigger(:_drb_input_, data, type)
10
12
 
11
13
  ### :_drb_retrieve_output_
@@ -16,6 +18,8 @@ long as it has the DRb server running.
16
18
  Triggering this event with 'data' will push data into the running
17
19
  application's virtual buffer.
18
20
 
21
+ Note: See {Vedeu::Terminal::Buffer#write} for parameter details.
22
+
19
23
  Vedeu.trigger(:_drb_store_output_, data)
20
24
 
21
25
  ### :_drb_restart_
data/docs/events/focus.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Focus Events
4
4
 
5
+ Note: 'name' is a Symbol unless mentioned otherwise.
6
+
5
7
  ### :_focus_by_name_
6
8
  When triggered with an interface name will focus that interface and
7
9
  restore the cursor position and visibility.
data/docs/events/menu.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Menu Events
4
4
 
5
+ Note: 'name' is a Symbol unless mentioned otherwise.
6
+
5
7
  ### :_menu_bottom_
6
8
  Makes the last menu item the current menu item.
7
9
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Movement Events
4
4
 
5
+ Note: 'name' is a Symbol unless mentioned otherwise.
6
+
5
7
  ### :_cursor_origin_
6
8
  This event moves the cursor to the interface origin; the top left
7
9
  corner of the named interface.
@@ -25,7 +27,7 @@ Adjusts the position of the cursor or view.
25
27
  When a name is not given, the cursor in the interface which is
26
28
  currently in focus should move in the direction specified.
27
29
 
28
- Vedeu.trigger(:_cursor_left_, 'my_interface')
30
+ Vedeu.trigger(:_cursor_left_, name)
29
31
  Vedeu.trigger(:_cursor_left_)
30
32
  Vedeu.trigger(:_cursor_right_)
31
33
  Vedeu.trigger(:_cursor_up_)
@@ -49,9 +51,9 @@ See {file:docs/events.md#\_cursor__up_down_left_right_}
49
51
 
50
52
  Please note that the name of the view is required for these events.
51
53
 
52
- Vedeu.trigger(:_view_down_, 'my_interface')
53
- Vedeu.trigger(:_view_left_, 'my_interface')
54
- Vedeu.trigger(:_view_right_, 'my_interface')
55
- Vedeu.trigger(:_view_up_, 'my_interface')
54
+ Vedeu.trigger(:_view_down_, name)
55
+ Vedeu.trigger(:_view_left_, name)
56
+ Vedeu.trigger(:_view_right_, name)
57
+ Vedeu.trigger(:_view_up_, name)
56
58
 
57
59
  Each of the :_view_* events has an alias, :_geometry_* if you prefer.
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Refresh Events
4
4
 
5
+ Note: 'name' is a Symbol unless mentioned otherwise.
6
+
5
7
  ### :_refresh_
6
8
  Refreshes all registered interfaces.
7
9
 
@@ -21,6 +21,9 @@ This event is called by {Vedeu::Input::Capture#read}. When
21
21
  invoked, the key will be passed to the editor for currently
22
22
  focussed view.
23
23
 
24
+ Note: 'key' is a String for alphanumeric keys and special keys are
25
+ represented by Symbols.
26
+
24
27
  Vedeu.trigger(:_editor_, key)
25
28
 
26
29
  ### :_exit_
@@ -51,6 +54,8 @@ can be found here: {Vedeu::Input::Capture}.
51
54
  When triggered with a message will cause Vedeu to log the message if
52
55
  logging is enabled in the configuration.
53
56
 
57
+ Note: 'message' is a String.
58
+
54
59
  Vedeu.trigger(:_log_, message)
55
60
 
56
61
  ### :_mode_switch_
data/docs/events/view.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## View Events
4
4
 
5
+ Note: 'name' is a Symbol unless mentioned otherwise.
6
+
5
7
  ### :_maximise_
6
8
  Maximising an interface.
7
9
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Visibility Events
4
4
 
5
+ Note: 'name' is a Symbol unless mentioned otherwise.
6
+
5
7
  ### :_clear_
6
8
  Clears the whole terminal space.
7
9
 
data/lib/vedeu.rb CHANGED
@@ -15,8 +15,6 @@ require 'zlib'
15
15
 
16
16
  require 'thor'
17
17
 
18
- require 'vedeu/logging/log'
19
-
20
18
  # Vedeu is a GUI framework for terminal/console applications written
21
19
  # in Ruby.
22
20
  #
@@ -25,8 +23,6 @@ module Vedeu
25
23
  extend Forwardable
26
24
  extend self
27
25
 
28
- def_delegators Vedeu::Logging::Log, :log
29
-
30
26
  # Return the name of currently focussed interface.
31
27
  #
32
28
  # @return [Vedeu::Models::Focus]
@@ -34,25 +30,6 @@ module Vedeu
34
30
  @focusable ||= Vedeu::Models::Focus
35
31
  end
36
32
 
37
- # :nocov:
38
- # When Vedeu is included within one of your classes, you should have
39
- # all API methods at your disposal.
40
- #
41
- # @example
42
- # class YourClassHere
43
- # include Vedeu
44
- #
45
- # # ...
46
- # end
47
- #
48
- # @param receiver [void]
49
- # @return [void]
50
- def included(receiver)
51
- receiver.send(:include, Vedeu::API::External)
52
- receiver.extend(Vedeu::API::External)
53
- end
54
- # :nocov:
55
-
56
33
  end # Vedeu
57
34
 
58
35
  require 'vedeu/all'
data/lib/vedeu/all.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'vedeu/logging/all'
1
2
  require 'vedeu/version'
2
3
  require 'vedeu/options'
3
4
 
@@ -14,16 +15,14 @@ require 'vedeu/repositories/all'
14
15
 
15
16
  require 'vedeu/models/toggleable'
16
17
 
17
- require 'vedeu/output/presentation/presentation'
18
18
  require 'vedeu/output/direct'
19
-
20
19
  require 'vedeu/output/clear/all'
21
-
22
20
  require 'vedeu/output/compressor'
23
21
  require 'vedeu/output/text'
24
22
  require 'vedeu/output/output'
25
23
  require 'vedeu/output/viewport'
26
24
  require 'vedeu/output/wordwrap'
25
+ require 'vedeu/output/presentation/all'
27
26
  require 'vedeu/output/refresh/refresh'
28
27
  require 'vedeu/output/renderers/all'
29
28
 
@@ -46,6 +45,5 @@ require 'vedeu/input/all'
46
45
  require 'vedeu/menus/all'
47
46
  require 'vedeu/templating/all'
48
47
 
49
- require 'vedeu/api/all'
50
48
  require 'vedeu/bindings/all'
51
49
  require 'vedeu/plugins/all'
@@ -10,7 +10,7 @@ module Vedeu
10
10
 
11
11
  # Renders the view.
12
12
  #
13
- # @param params [Hash]
13
+ # @param (see #initialize)
14
14
  # @return [void]
15
15
  def self.render(**params)
16
16
  new(params).render
@@ -8,20 +8,20 @@ module Vedeu
8
8
  #
9
9
  # @example
10
10
  # # Borders can be defined when defining your interface...
11
- # Vedeu.interface 'my_interface' do
11
+ # Vedeu.interface :my_interface do
12
12
  # border do
13
13
  # # ...
14
14
  # end
15
15
  #
16
16
  # # ...or as part of a view definition...
17
17
  # Vedeu.renders do
18
- # view 'border_demo' do
18
+ # view :border_demo do
19
19
  # border do
20
20
  # # ...
21
21
  # end
22
22
  #
23
23
  # # ...or standalone; referencing the target interface or view.
24
- # Vedeu.border 'some_interface' do
24
+ # Vedeu.border :some_interface do
25
25
  # # ...
26
26
  # end
27
27
  #