vedeu 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vedeu/all.rb +1 -1
- data/lib/vedeu/application/controller.rb +2 -2
- data/lib/vedeu/bindings.rb +1 -1
- data/lib/vedeu/bindings/application.rb +2 -2
- data/lib/vedeu/bindings/drb.rb +8 -8
- data/lib/vedeu/bindings/menus.rb +11 -11
- data/lib/vedeu/bindings/movement.rb +12 -12
- data/lib/vedeu/bindings/system.rb +18 -18
- data/lib/vedeu/bindings/visibility.rb +9 -9
- data/lib/vedeu/colours/colour.rb +1 -1
- data/lib/vedeu/common.rb +1 -1
- data/lib/vedeu/dsl/composition.rb +8 -3
- data/lib/vedeu/dsl/interface.rb +41 -17
- data/lib/vedeu/log/debug.rb +5 -1
- data/lib/vedeu/log/log.rb +1 -0
- data/lib/vedeu/models/interface.rb +3 -2
- data/lib/vedeu/plugins.rb +1 -1
- data/lib/vedeu/runtime/bootstrap.rb +0 -3
- data/lib/vedeu/runtime/launcher.rb +3 -2
- data/lib/vedeu/runtime/router.rb +49 -47
- data/lib/vedeu/{traps.rb → runtime/traps.rb} +0 -0
- data/lib/vedeu/templating/decoder.rb +4 -2
- data/lib/vedeu/templating/encoder.rb +4 -2
- data/lib/vedeu/templating/view_template.rb +35 -2
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/application/application_view_test.rb +1 -1
- data/test/lib/vedeu/application/controller_test.rb +4 -0
- data/test/lib/vedeu/bindings_test.rb +2 -0
- data/test/lib/vedeu/borders/border_test.rb +28 -40
- data/test/lib/vedeu/borders/borders_test.rb +0 -2
- data/test/lib/vedeu/borders/render_border_test.rb +11 -13
- data/test/lib/vedeu/buffers/buffer_test.rb +12 -5
- data/test/lib/vedeu/buffers/display_buffer_test.rb +2 -2
- data/test/lib/vedeu/cli/generator/application_test.rb +9 -9
- data/test/lib/vedeu/cli/generator/view_test.rb +10 -7
- data/test/lib/vedeu/cli/main_test.rb +4 -4
- data/test/lib/vedeu/colours/colour_translator_test.rb +2 -4
- data/test/lib/vedeu/common_test.rb +8 -0
- data/test/lib/vedeu/configuration/configuration_test.rb +4 -4
- data/test/lib/vedeu/cursor/cursors_test.rb +4 -4
- data/test/lib/vedeu/cursor/move_test.rb +11 -8
- data/test/lib/vedeu/cursor/refresh_cursor_test.rb +12 -12
- data/test/lib/vedeu/cursor/reposition_test.rb +7 -11
- data/test/lib/vedeu/distributed/client_test.rb +4 -4
- data/test/lib/vedeu/distributed/server_test.rb +4 -5
- data/test/lib/vedeu/dsl/border_test.rb +2 -2
- data/test/lib/vedeu/dsl/composition_test.rb +5 -4
- data/test/lib/vedeu/dsl/geometry_test.rb +6 -4
- data/test/lib/vedeu/dsl/interface_test.rb +9 -27
- data/test/lib/vedeu/dsl/use_test.rb +2 -2
- data/test/lib/vedeu/events/trigger_test.rb +2 -2
- data/test/lib/vedeu/geometry/coordinate_test.rb +9 -9
- data/test/lib/vedeu/geometry/geometry_test.rb +8 -2
- data/test/lib/vedeu/geometry/position_validator_test.rb +11 -14
- data/test/lib/vedeu/input/input_test.rb +5 -5
- data/test/lib/vedeu/input/keymap_test.rb +2 -2
- data/test/lib/vedeu/log/timer_test.rb +2 -2
- data/test/lib/vedeu/models/focus_test.rb +20 -25
- data/test/lib/vedeu/models/interface_test.rb +2 -2
- data/test/lib/vedeu/models/interfaces_test.rb +7 -5
- data/test/lib/vedeu/models/line_test.rb +0 -5
- data/test/lib/vedeu/models/menu_test.rb +0 -2
- data/test/lib/vedeu/null/geometry_test.rb +1 -4
- data/test/lib/vedeu/output/clear/named_interface_test.rb +2 -2
- data/test/lib/vedeu/output/esc_test.rb +7 -4
- data/test/lib/vedeu/output/output_test.rb +3 -6
- data/test/lib/vedeu/output/refresh_test.rb +2 -2
- data/test/lib/vedeu/output/renderers/file_test.rb +1 -3
- data/test/lib/vedeu/output/renderers/html_test.rb +1 -3
- data/test/lib/vedeu/output/renderers/json_test.rb +1 -3
- data/test/lib/vedeu/output/renderers_test.rb +2 -2
- data/test/lib/vedeu/output/viewport_test.rb +70 -71
- data/test/lib/vedeu/repositories/model_test.rb +0 -19
- data/test/lib/vedeu/repositories/repository_test.rb +8 -8
- data/test/lib/vedeu/runtime/application_test.rb +2 -2
- data/test/lib/vedeu/runtime/launcher_test.rb +7 -7
- data/test/lib/vedeu/runtime/router_test.rb +33 -33
- data/test/lib/vedeu/{traps_test.rb → runtime/traps_test.rb} +2 -2
- data/test/lib/vedeu/templating/decoder_test.rb +1 -0
- data/test/lib/vedeu/templating/encoder_test.rb +1 -0
- data/test/lib/vedeu/templating/template_test.rb +8 -1
- data/test/lib/vedeu/templating/view_template_test.rb +108 -22
- data/test/lib/vedeu/terminal_mode_test.rb +2 -2
- data/test/lib/vedeu/terminal_test.rb +6 -6
- data/test/support/helpers/model_test_class.rb +19 -0
- metadata +5 -17
- data/test/support/templates/background.erb +0 -1
- data/test/support/templates/colour.erb +0 -1
- data/test/support/templates/foreground.erb +0 -1
- data/test/support/templates/multiple.erb +0 -2
- data/test/support/templates/plain.erb +0 -1
- data/test/support/templates/style.erb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6d179b45a82d00d57376efe3683b168f9184554
|
4
|
+
data.tar.gz: 6ba43f5ff413f4165fda160cd425e410e62b57f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d7d5f0548a15c0df95506edbde7600242c6c16e9963028eb0dda37160f73d96fc066e20f293093a06d428100d88b055e59cef0788856fc2c23d27dc5e3e99e8
|
7
|
+
data.tar.gz: 4e8d42728d9dfb365402aac29cb6fb737f7af73c9fb4310c03ffbf0d7c778f7a39ebe6f73877d434abd74fc9b3152ad854198b2791d285d63f09ac8027d88c9d
|
data/lib/vedeu/all.rb
CHANGED
@@ -25,7 +25,7 @@ module Vedeu
|
|
25
25
|
# end
|
26
26
|
#
|
27
27
|
# @param controller_name [Symbol] The name of the controller.
|
28
|
-
# @return [
|
28
|
+
# @return [Hash<Symbol => Hash<Symbol => String, Array<Symbol>>>]
|
29
29
|
def controller(controller_name = nil)
|
30
30
|
@controller_name = controller_name
|
31
31
|
|
@@ -55,7 +55,7 @@ module Vedeu
|
|
55
55
|
#
|
56
56
|
# @param action_names [Array<Symbol>, Symbol] A collection of action names
|
57
57
|
# or the name of the action.
|
58
|
-
# @return [
|
58
|
+
# @return [Array<Symbol>]
|
59
59
|
def action(*action_names)
|
60
60
|
action_names.each do |action_name|
|
61
61
|
Vedeu::Router.add_action(@controller_name, action_name)
|
data/lib/vedeu/bindings.rb
CHANGED
@@ -12,7 +12,7 @@ module Vedeu
|
|
12
12
|
# Setup events relating to client applications. This method is called by
|
13
13
|
# Vedeu.
|
14
14
|
#
|
15
|
-
# @return [
|
15
|
+
# @return [TrueClass]
|
16
16
|
def setup!
|
17
17
|
goto!
|
18
18
|
end
|
@@ -25,7 +25,7 @@ module Vedeu
|
|
25
25
|
# Vedeu.trigger(:_goto_, :your_controller, :some_action, { id: 7 })
|
26
26
|
# Vedeu.goto(:your_controller, :some_action, { id: 7 })
|
27
27
|
#
|
28
|
-
# @return [
|
28
|
+
# @return [TrueClass]
|
29
29
|
def goto!
|
30
30
|
Vedeu.bind(:_goto_) do |controller, action, **args|
|
31
31
|
Vedeu::Router.goto(controller, action, **args)
|
data/lib/vedeu/bindings/drb.rb
CHANGED
@@ -11,7 +11,7 @@ module Vedeu
|
|
11
11
|
|
12
12
|
# Setup events relating to the DRb server. This method is called by Vedeu.
|
13
13
|
#
|
14
|
-
# @return [
|
14
|
+
# @return [TrueClass]
|
15
15
|
def setup!
|
16
16
|
drb_input!
|
17
17
|
drb_retrieve_output!
|
@@ -30,7 +30,7 @@ module Vedeu
|
|
30
30
|
# @example
|
31
31
|
# Vedeu.trigger(:_drb_input_, data, type)
|
32
32
|
#
|
33
|
-
# @return [
|
33
|
+
# @return [TrueClass]
|
34
34
|
def drb_input!
|
35
35
|
Vedeu.bind(:_drb_input_) do |data, type|
|
36
36
|
Vedeu.log(type: :drb, message: "Sending input (#{type})")
|
@@ -47,7 +47,7 @@ module Vedeu
|
|
47
47
|
#
|
48
48
|
# @todo This event queries Vedeu. Events should only be commands.
|
49
49
|
#
|
50
|
-
# @return [
|
50
|
+
# @return [TrueClass]
|
51
51
|
def drb_retrieve_output!
|
52
52
|
Vedeu.bind(:_drb_retrieve_output_) { Vedeu::VirtualBuffer.retrieve }
|
53
53
|
end
|
@@ -58,7 +58,7 @@ module Vedeu
|
|
58
58
|
# @example
|
59
59
|
# Vedeu.trigger(:_drb_store_output_, data)
|
60
60
|
#
|
61
|
-
# @return [
|
61
|
+
# @return [TrueClass]
|
62
62
|
def drb_store_output!
|
63
63
|
Vedeu.bind(:_drb_store_output_) do |data|
|
64
64
|
Vedeu::VirtualBuffer.store(Vedeu::Terminal.virtual.output(data))
|
@@ -71,7 +71,7 @@ module Vedeu
|
|
71
71
|
# Vedeu.trigger(:_drb_restart_)
|
72
72
|
# Vedeu.drb_restart
|
73
73
|
#
|
74
|
-
# @return [
|
74
|
+
# @return [TrueClass]
|
75
75
|
def drb_restart!
|
76
76
|
Vedeu.bind(:_drb_restart_) { Vedeu::Distributed::Server.restart }
|
77
77
|
end
|
@@ -82,7 +82,7 @@ module Vedeu
|
|
82
82
|
# Vedeu.trigger(:_drb_start_)
|
83
83
|
# Vedeu.drb_start
|
84
84
|
#
|
85
|
-
# @return [
|
85
|
+
# @return [TrueClass]
|
86
86
|
def drb_start!
|
87
87
|
Vedeu.bind(:_drb_start_) { Vedeu::Distributed::Server.start }
|
88
88
|
end
|
@@ -93,7 +93,7 @@ module Vedeu
|
|
93
93
|
# Vedeu.trigger(:_drb_status_)
|
94
94
|
# Vedeu.drb_status
|
95
95
|
#
|
96
|
-
# @return [
|
96
|
+
# @return [TrueClass]
|
97
97
|
def drb_status!
|
98
98
|
Vedeu.bind(:_drb_status_) { Vedeu::Distributed::Server.status }
|
99
99
|
end
|
@@ -104,7 +104,7 @@ module Vedeu
|
|
104
104
|
# Vedeu.trigger(:_drb_stop_)
|
105
105
|
# Vedeu.drb_stop
|
106
106
|
#
|
107
|
-
# @return [
|
107
|
+
# @return [TrueClass]
|
108
108
|
def drb_stop!
|
109
109
|
Vedeu.bind(:_drb_stop_) { Vedeu::Distributed::Server.stop }
|
110
110
|
end
|
data/lib/vedeu/bindings/menus.rb
CHANGED
@@ -12,7 +12,7 @@ module Vedeu
|
|
12
12
|
|
13
13
|
# Setup events relating to menus. This method is called by Vedeu.
|
14
14
|
#
|
15
|
-
# @return [
|
15
|
+
# @return [TrueClass]
|
16
16
|
def setup!
|
17
17
|
menu_bottom!
|
18
18
|
menu_current!
|
@@ -33,7 +33,7 @@ module Vedeu
|
|
33
33
|
# @example
|
34
34
|
# Vedeu.trigger(:_menu_bottom_, name)
|
35
35
|
#
|
36
|
-
# @return [
|
36
|
+
# @return [TrueClass]
|
37
37
|
def menu_bottom!
|
38
38
|
Vedeu.bind(:_menu_bottom_) do |name|
|
39
39
|
Vedeu.menus.by_name(name).bottom_item
|
@@ -45,7 +45,7 @@ module Vedeu
|
|
45
45
|
# @example
|
46
46
|
# Vedeu.trigger(:_menu_current_, name)
|
47
47
|
#
|
48
|
-
# @return [
|
48
|
+
# @return [TrueClass]
|
49
49
|
def menu_current!
|
50
50
|
Vedeu.bind(:_menu_current_) do |name|
|
51
51
|
Vedeu.menus.by_name(name).current_item
|
@@ -57,7 +57,7 @@ module Vedeu
|
|
57
57
|
# @example
|
58
58
|
# Vedeu.trigger(:_menu_deselect_, name)
|
59
59
|
#
|
60
|
-
# @return [
|
60
|
+
# @return [TrueClass]
|
61
61
|
def menu_deselect!
|
62
62
|
Vedeu.bind(:_menu_deselect_) do |name|
|
63
63
|
Vedeu.menus.by_name(name).deselect_item
|
@@ -70,7 +70,7 @@ module Vedeu
|
|
70
70
|
# @example
|
71
71
|
# Vedeu.trigger(:_menu_items_, name)
|
72
72
|
#
|
73
|
-
# @return [
|
73
|
+
# @return [TrueClass]
|
74
74
|
def menu_items!
|
75
75
|
Vedeu.bind(:_menu_items_) { |name| Vedeu.menus.by_name(name).items }
|
76
76
|
end
|
@@ -81,7 +81,7 @@ module Vedeu
|
|
81
81
|
# @example
|
82
82
|
# Vedeu.trigger(:_menu_next_, name)
|
83
83
|
#
|
84
|
-
# @return [
|
84
|
+
# @return [TrueClass]
|
85
85
|
def menu_next!
|
86
86
|
Vedeu.bind(:_menu_next_) { |name| Vedeu.menus.by_name(name).next_item }
|
87
87
|
end
|
@@ -92,7 +92,7 @@ module Vedeu
|
|
92
92
|
# @example
|
93
93
|
# Vedeu.trigger(:_menu_prev_, name)
|
94
94
|
#
|
95
|
-
# @return [
|
95
|
+
# @return [TrueClass]
|
96
96
|
def menu_prev!
|
97
97
|
Vedeu.bind(:_menu_prev_) { |name| Vedeu.menus.by_name(name).prev_item }
|
98
98
|
end
|
@@ -102,7 +102,7 @@ module Vedeu
|
|
102
102
|
# @example
|
103
103
|
# Vedeu.trigger(:_menu_selected_, name)
|
104
104
|
#
|
105
|
-
# @return [
|
105
|
+
# @return [TrueClass]
|
106
106
|
def menu_selected!
|
107
107
|
Vedeu.bind(:_menu_selected_) do |name|
|
108
108
|
Vedeu.menus.by_name(name).selected_item
|
@@ -114,7 +114,7 @@ module Vedeu
|
|
114
114
|
# @example
|
115
115
|
# Vedeu.trigger(:_menu_select_, name)
|
116
116
|
#
|
117
|
-
# @return [
|
117
|
+
# @return [TrueClass]
|
118
118
|
def menu_select!
|
119
119
|
Vedeu.bind(:_menu_select_) do |name|
|
120
120
|
Vedeu.menus.by_name(name).select_item
|
@@ -126,7 +126,7 @@ module Vedeu
|
|
126
126
|
# @example
|
127
127
|
# Vedeu.trigger(:_menu_top_, name)
|
128
128
|
#
|
129
|
-
# @return [
|
129
|
+
# @return [TrueClass]
|
130
130
|
def menu_top!
|
131
131
|
Vedeu.bind(:_menu_top_) { |name| Vedeu.menus.by_name(name).top_item }
|
132
132
|
end
|
@@ -137,7 +137,7 @@ module Vedeu
|
|
137
137
|
# @example
|
138
138
|
# Vedeu.trigger(:_menu_view_, name)
|
139
139
|
#
|
140
|
-
# @return [
|
140
|
+
# @return [TrueClass]
|
141
141
|
def menu_view!
|
142
142
|
Vedeu.bind(:_menu_view_) { |name| Vedeu.menus.by_name(name).view }
|
143
143
|
end
|
@@ -11,7 +11,7 @@ module Vedeu
|
|
11
11
|
|
12
12
|
# Setup events relating to movement. This method is called by Vedeu.
|
13
13
|
#
|
14
|
-
# @return [
|
14
|
+
# @return [TrueClass]
|
15
15
|
def setup!
|
16
16
|
cursor_down!
|
17
17
|
cursor_left!
|
@@ -33,7 +33,7 @@ module Vedeu
|
|
33
33
|
# @example
|
34
34
|
# Vedeu.trigger(:_cursor_down_, name)
|
35
35
|
#
|
36
|
-
# @return [
|
36
|
+
# @return [TrueClass]
|
37
37
|
# @see Vedeu::Move
|
38
38
|
def cursor_down!
|
39
39
|
Vedeu.bind(:_cursor_down_) do |name|
|
@@ -46,7 +46,7 @@ module Vedeu
|
|
46
46
|
# @example
|
47
47
|
# Vedeu.trigger(:_cursor_left_, name)
|
48
48
|
#
|
49
|
-
# @return [
|
49
|
+
# @return [TrueClass]
|
50
50
|
# @see Vedeu::Move
|
51
51
|
def cursor_left!
|
52
52
|
Vedeu.bind(:_cursor_left_) do |name|
|
@@ -61,7 +61,7 @@ module Vedeu
|
|
61
61
|
# Vedeu.trigger(:_cursor_origin_, name)
|
62
62
|
# Vedeu.trigger(:_cursor_reset_, name)
|
63
63
|
#
|
64
|
-
# @return [
|
64
|
+
# @return [TrueClass]
|
65
65
|
# @see Vedeu::Move
|
66
66
|
def cursor_origin!
|
67
67
|
Vedeu.bind(:_cursor_origin_) do |name|
|
@@ -79,7 +79,7 @@ module Vedeu
|
|
79
79
|
#
|
80
80
|
# @todo This event queries Vedeu. Events should only be commands.
|
81
81
|
#
|
82
|
-
# @return [
|
82
|
+
# @return [TrueClass]
|
83
83
|
# @see Vedeu::Move
|
84
84
|
def cursor_position!
|
85
85
|
Vedeu.bind(:_cursor_position_) do |name|
|
@@ -92,7 +92,7 @@ module Vedeu
|
|
92
92
|
# @example
|
93
93
|
# Vedeu.trigger(:_cursor_reposition_, name, y, x)
|
94
94
|
#
|
95
|
-
# @return [
|
95
|
+
# @return [TrueClass]
|
96
96
|
# @see Vedeu::Move
|
97
97
|
def cursor_reposition!
|
98
98
|
Vedeu.bind(:_cursor_reposition_) do |name, y, x|
|
@@ -105,7 +105,7 @@ module Vedeu
|
|
105
105
|
# @example
|
106
106
|
# Vedeu.trigger(:_cursor_right_, name)
|
107
107
|
#
|
108
|
-
# @return [
|
108
|
+
# @return [TrueClass]
|
109
109
|
# @see Vedeu::Move
|
110
110
|
def cursor_right!
|
111
111
|
Vedeu.bind(:_cursor_right_) do |name|
|
@@ -118,7 +118,7 @@ module Vedeu
|
|
118
118
|
# @example
|
119
119
|
# Vedeu.trigger(:_cursor_up, name)
|
120
120
|
#
|
121
|
-
# @return [
|
121
|
+
# @return [TrueClass]
|
122
122
|
# @see Vedeu::Move
|
123
123
|
def cursor_up!
|
124
124
|
Vedeu.bind(:_cursor_up_) do |name|
|
@@ -131,7 +131,7 @@ module Vedeu
|
|
131
131
|
# @example
|
132
132
|
# Vedeu.trigger(:_geometry_down_, name)
|
133
133
|
#
|
134
|
-
# @return [
|
134
|
+
# @return [TrueClass]
|
135
135
|
# @see Vedeu::Move
|
136
136
|
def geometry_down!
|
137
137
|
Vedeu.bind(:_geometry_down_) do |name|
|
@@ -144,7 +144,7 @@ module Vedeu
|
|
144
144
|
# @example
|
145
145
|
# Vedeu.trigger(:_geometry_left_, name)
|
146
146
|
#
|
147
|
-
# @return [
|
147
|
+
# @return [TrueClass]
|
148
148
|
# @see Vedeu::Move
|
149
149
|
def geometry_left!
|
150
150
|
Vedeu.bind(:_geometry_left_) do |name|
|
@@ -157,7 +157,7 @@ module Vedeu
|
|
157
157
|
# @example
|
158
158
|
# Vedeu.trigger(:_geometry_right_, name)
|
159
159
|
#
|
160
|
-
# @return [
|
160
|
+
# @return [TrueClass]
|
161
161
|
# @see Vedeu::Move
|
162
162
|
def geometry_right!
|
163
163
|
Vedeu.bind(:_geometry_right_) do |name|
|
@@ -170,7 +170,7 @@ module Vedeu
|
|
170
170
|
# @example
|
171
171
|
# Vedeu.trigger(:_geometry_up_, name)
|
172
172
|
#
|
173
|
-
# @return [
|
173
|
+
# @return [TrueClass]
|
174
174
|
# @see Vedeu::Move
|
175
175
|
def geometry_up!
|
176
176
|
Vedeu.bind(:_geometry_up_) do |name|
|
@@ -17,7 +17,7 @@ module Vedeu
|
|
17
17
|
|
18
18
|
# Setup events relating to running Vedeu. This method is called by Vedeu.
|
19
19
|
#
|
20
|
-
# @return [
|
20
|
+
# @return [TrueClass]
|
21
21
|
def setup!
|
22
22
|
cleanup!
|
23
23
|
clear!
|
@@ -48,7 +48,7 @@ module Vedeu
|
|
48
48
|
# @example
|
49
49
|
# Vedeu.trigger(:_exit_)
|
50
50
|
#
|
51
|
-
# @return [
|
51
|
+
# @return [TrueClass]
|
52
52
|
def cleanup!
|
53
53
|
Vedeu.bind(:_cleanup_) do
|
54
54
|
Vedeu.trigger(:_drb_stop_)
|
@@ -63,7 +63,7 @@ module Vedeu
|
|
63
63
|
# Vedeu.trigger(:_clear_)
|
64
64
|
# Vedeu.clear_by_name(name)
|
65
65
|
#
|
66
|
-
# @return [
|
66
|
+
# @return [TrueClass]
|
67
67
|
def clear!
|
68
68
|
Vedeu.bind(:_clear_) do |name|
|
69
69
|
if name
|
@@ -82,7 +82,7 @@ module Vedeu
|
|
82
82
|
# @example
|
83
83
|
# Vedeu.trigger(:_command_, command)
|
84
84
|
#
|
85
|
-
# @return [
|
85
|
+
# @return [TrueClass]
|
86
86
|
def command!
|
87
87
|
Vedeu.bind(:_command_) { |command| Vedeu.trigger(:command, command) }
|
88
88
|
end
|
@@ -94,7 +94,7 @@ module Vedeu
|
|
94
94
|
# Vedeu.trigger(:_exit_)
|
95
95
|
# Vedeu.exit
|
96
96
|
#
|
97
|
-
# @return [
|
97
|
+
# @return [TrueClass]
|
98
98
|
def exit!
|
99
99
|
Vedeu.bind(:_exit_) { Vedeu::Application.stop }
|
100
100
|
end
|
@@ -105,7 +105,7 @@ module Vedeu
|
|
105
105
|
# @example
|
106
106
|
# Vedeu.trigger(:_focus_by_name_, name)
|
107
107
|
#
|
108
|
-
# @return [
|
108
|
+
# @return [TrueClass]
|
109
109
|
def focus_by_name!
|
110
110
|
Vedeu.bind(:_focus_by_name_) { |name| Vedeu.focus_by_name(name) }
|
111
111
|
end
|
@@ -116,7 +116,7 @@ module Vedeu
|
|
116
116
|
# @example
|
117
117
|
# Vedeu.trigger(:_focus_next_)
|
118
118
|
#
|
119
|
-
# @return [
|
119
|
+
# @return [TrueClass]
|
120
120
|
def focus_next!
|
121
121
|
Vedeu.bind(:_focus_next_) { Vedeu.focus_next }
|
122
122
|
end
|
@@ -127,7 +127,7 @@ module Vedeu
|
|
127
127
|
# @example
|
128
128
|
# Vedeu.trigger(:_focus_prev_)
|
129
129
|
#
|
130
|
-
# @return [
|
130
|
+
# @return [TrueClass]
|
131
131
|
def focus_prev!
|
132
132
|
Vedeu.bind(:_focus_prev_) { Vedeu.focus_previous }
|
133
133
|
end
|
@@ -138,7 +138,7 @@ module Vedeu
|
|
138
138
|
# When Vedeu triggers this event, the :_refresh_ event is also triggered
|
139
139
|
# automatically.
|
140
140
|
#
|
141
|
-
# @return [
|
141
|
+
# @return [TrueClass]
|
142
142
|
def initialize!
|
143
143
|
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
144
144
|
end
|
@@ -153,7 +153,7 @@ module Vedeu
|
|
153
153
|
# @example
|
154
154
|
# Vedeu.trigger(:_keypress_, key)
|
155
155
|
#
|
156
|
-
# @return [
|
156
|
+
# @return [TrueClass]
|
157
157
|
def keypress!
|
158
158
|
Vedeu.bind(:_keypress_) { |key| Vedeu.keypress(key) }
|
159
159
|
end
|
@@ -164,7 +164,7 @@ module Vedeu
|
|
164
164
|
# @example
|
165
165
|
# Vedeu.trigger(:_log_, message)
|
166
166
|
#
|
167
|
-
# @return [
|
167
|
+
# @return [TrueClass]
|
168
168
|
def log!
|
169
169
|
Vedeu.bind(:_log_) { |msg| Vedeu.log(type: :debug, message: msg) }
|
170
170
|
end
|
@@ -174,7 +174,7 @@ module Vedeu
|
|
174
174
|
# @example
|
175
175
|
# Vedeu.trigger(:_maximise_, name)
|
176
176
|
#
|
177
|
-
# @return [
|
177
|
+
# @return [TrueClass]
|
178
178
|
# @see Vedeu::Geometry#maximise
|
179
179
|
def maximise!
|
180
180
|
Vedeu.bind(:_maximise_) do |name|
|
@@ -191,7 +191,7 @@ module Vedeu
|
|
191
191
|
# @example
|
192
192
|
# Vedeu.trigger(:_mode_switch_)
|
193
193
|
#
|
194
|
-
# @return [
|
194
|
+
# @return [TrueClass]
|
195
195
|
def mode_switch!
|
196
196
|
Vedeu.bind(:_mode_switch_) { fail Vedeu::ModeSwitch }
|
197
197
|
end
|
@@ -206,7 +206,7 @@ module Vedeu
|
|
206
206
|
# Vedeu.trigger(:_refresh_)
|
207
207
|
# Vedeu.trigger(:_refresh_, name)
|
208
208
|
#
|
209
|
-
# @return [
|
209
|
+
# @return [TrueClass]
|
210
210
|
def refresh!
|
211
211
|
Vedeu.bind(:_refresh_) do |name|
|
212
212
|
name ? Vedeu::Refresh.by_name(name) : Vedeu::Refresh.all
|
@@ -219,7 +219,7 @@ module Vedeu
|
|
219
219
|
# @example
|
220
220
|
# Vedeu.trigger(:_refresh_cursor_, name)
|
221
221
|
#
|
222
|
-
# @return [
|
222
|
+
# @return [TrueClass]
|
223
223
|
def refresh_cursor!
|
224
224
|
Vedeu.bind(:_refresh_cursor_) do |name|
|
225
225
|
Vedeu::RefreshCursor.render(name)
|
@@ -231,7 +231,7 @@ module Vedeu
|
|
231
231
|
# @example
|
232
232
|
# Vedeu.trigger(:_refresh_group_, name)
|
233
233
|
#
|
234
|
-
# @return [
|
234
|
+
# @return [TrueClass]
|
235
235
|
def refresh_group!
|
236
236
|
Vedeu.bind(:_refresh_group_) { |name| Vedeu::Refresh.by_group(name) }
|
237
237
|
end
|
@@ -242,7 +242,7 @@ module Vedeu
|
|
242
242
|
# @example
|
243
243
|
# Vedeu.trigger(:_resize_)
|
244
244
|
#
|
245
|
-
# @return [
|
245
|
+
# @return [TrueClass]
|
246
246
|
def resize!
|
247
247
|
Vedeu.bind(:_resize_, delay: 0.25) { Vedeu.resize }
|
248
248
|
end
|
@@ -252,7 +252,7 @@ module Vedeu
|
|
252
252
|
# @example
|
253
253
|
# Vedeu.trigger(:_unmaximise_, name)
|
254
254
|
#
|
255
|
-
# @return [
|
255
|
+
# @return [TrueClass]
|
256
256
|
# @see Vedeu::Geometry#unmaximise
|
257
257
|
def unmaximise!
|
258
258
|
Vedeu.bind(:_unmaximise_) do |name|
|