vedeu 0.7.2 → 0.7.3
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.
- checksums.yaml +4 -4
- data/docs/borders.md +1 -5
- data/docs/cursors.md +23 -92
- data/docs/events/application.md +1 -8
- data/docs/events/by_name/cleanup.md +7 -0
- data/docs/events/by_name/clear.md +2 -0
- data/docs/events/by_name/clear_group.md +6 -0
- data/docs/events/by_name/clear_view.md +5 -0
- data/docs/events/by_name/clear_view_content.md +5 -0
- data/docs/events/by_name/command.md +19 -0
- data/docs/events/by_name/cursor_bottom.md +7 -0
- data/docs/events/by_name/cursor_down.md +4 -0
- data/docs/events/by_name/cursor_left.md +6 -0
- data/docs/events/by_name/cursor_origin.md +6 -0
- data/docs/events/by_name/cursor_position.md +10 -0
- data/docs/events/by_name/cursor_reposition.md +4 -0
- data/docs/events/by_name/cursor_right.md +4 -0
- data/docs/events/by_name/cursor_top.md +7 -0
- data/docs/events/by_name/cursor_up.md +6 -0
- data/docs/events/by_name/drb_input.md +7 -0
- data/docs/events/by_name/drb_restart.md +5 -0
- data/docs/events/by_name/drb_retrieve_output.md +2 -0
- data/docs/events/by_name/drb_start.md +5 -0
- data/docs/events/by_name/drb_status.md +5 -0
- data/docs/events/by_name/drb_stop.md +5 -0
- data/docs/events/by_name/drb_store_output.md +2 -0
- data/docs/events/by_name/editor.md +9 -0
- data/docs/events/by_name/editor_delete_character.md +5 -0
- data/docs/events/by_name/editor_delete_line.md +5 -0
- data/docs/events/by_name/editor_down.md +5 -0
- data/docs/events/by_name/editor_execute.md +3 -0
- data/docs/events/by_name/editor_insert_character.md +7 -0
- data/docs/events/by_name/editor_insert_line.md +5 -0
- data/docs/events/by_name/editor_left.md +5 -0
- data/docs/events/by_name/editor_right.md +5 -0
- data/docs/events/by_name/editor_up.md +5 -0
- data/docs/events/by_name/exit.md +6 -0
- data/docs/events/by_name/focus_by_name.md +6 -0
- data/docs/events/by_name/focus_next.md +6 -0
- data/docs/events/by_name/focus_prev.md +6 -0
- data/docs/events/by_name/goto.md +8 -0
- data/docs/events/by_name/hide_cursor.md +10 -0
- data/docs/events/by_name/hide_group.md +5 -0
- data/docs/events/by_name/hide_interface.md +5 -0
- data/docs/events/by_name/initialize.md +6 -0
- data/docs/events/by_name/keypress.md +40 -0
- data/docs/events/by_name/log.md +7 -0
- data/docs/events/by_name/maximise.md +6 -0
- data/docs/events/by_name/menu_bottom.md +4 -0
- data/docs/events/by_name/menu_current.md +4 -0
- data/docs/events/by_name/menu_deselect.md +4 -0
- data/docs/events/by_name/menu_items.md +5 -0
- data/docs/events/by_name/menu_next.md +5 -0
- data/docs/events/by_name/menu_prev.md +5 -0
- data/docs/events/by_name/menu_select.md +4 -0
- data/docs/events/by_name/menu_selected.md +4 -0
- data/docs/events/by_name/menu_top.md +4 -0
- data/docs/events/by_name/menu_view.md +5 -0
- data/docs/events/by_name/mode_switch.md +7 -0
- data/docs/events/by_name/movement_refresh.md +19 -0
- data/docs/events/by_name/refresh.md +9 -0
- data/docs/events/by_name/refresh_border.md +5 -0
- data/docs/events/by_name/refresh_cursor.md +5 -0
- data/docs/events/by_name/refresh_group.md +4 -0
- data/docs/events/by_name/refresh_view.md +4 -0
- data/docs/events/by_name/refresh_view_content.md +4 -0
- data/docs/events/by_name/resize.md +5 -0
- data/docs/events/by_name/show_cursor.md +10 -0
- data/docs/events/by_name/show_group.md +5 -0
- data/docs/events/by_name/show_interface.md +5 -0
- data/docs/events/by_name/toggle_cursor.md +9 -0
- data/docs/events/by_name/toggle_group.md +5 -0
- data/docs/events/by_name/toggle_interface.md +5 -0
- data/docs/events/by_name/unmaximise.md +6 -0
- data/docs/events/document.md +9 -45
- data/docs/events/drb.md +7 -31
- data/docs/events/focus.md +3 -18
- data/docs/events/menu.md +10 -44
- data/docs/events/refresh.md +6 -25
- data/docs/events/system.md +8 -101
- data/docs/events/view.md +4 -36
- data/docs/events/visibility.md +10 -48
- data/lib/vedeu/borders/border.rb +117 -37
- data/lib/vedeu/borders/refresh.rb +29 -113
- data/lib/vedeu/borders/repository.rb +0 -5
- data/lib/vedeu/buffers/buffer.rb +13 -17
- data/lib/vedeu/buffers/refresh.rb +4 -4
- data/lib/vedeu/cursors/refresh.rb +2 -7
- data/lib/vedeu/groups/clear.rb +3 -1
- data/lib/vedeu/groups/refresh.rb +2 -2
- data/lib/vedeu/interfaces/clear.rb +2 -2
- data/lib/vedeu/output/refresh.rb +2 -2
- data/lib/vedeu/repositories/model.rb +2 -6
- data/lib/vedeu/repositories/repository.rb +17 -6
- data/lib/vedeu/runtime/flags.rb +2 -0
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/borders/border_test.rb +128 -12
- data/test/lib/vedeu/cursors/dsl_test.rb +13 -0
- metadata +72 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73d956c3dee89d057e89b5e730ca5ef5a974c229
|
4
|
+
data.tar.gz: 769594b1a84d5f2194fa71ba56faf86c5744ea71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7660a8daf5f90ad644122576bdffd1ff984d4b13166d253feabb510bf6c799ec92607ecd0eaf1407234606d308901129aa75c6f93e28b749f94729602698f4c8
|
7
|
+
data.tar.gz: 322f163dda6a068a21f84f2ec53563dc69236e5f223ca3f4c73eca803c82919db630a188485233e2bb2abc18b4d822a08676057512c9c21cbceb860fa5eb0d52
|
data/docs/borders.md
CHANGED
@@ -27,11 +27,7 @@ The interfaces of Vedeu can each have their own border.
|
|
27
27
|
Note: 'name' is a Symbol unless mentioned otherwise, and can be
|
28
28
|
substituted for `Vedeu.focus` to use the interface currently in focus.
|
29
29
|
|
30
|
-
|
31
|
-
This event refreshes the border of the named view, unless the view
|
32
|
-
does not have a border, or the border is not enabled.
|
33
|
-
|
34
|
-
Vedeu.trigger(:_refresh_border_, name)
|
30
|
+
{include:file:docs/events/by_name/refresh_border.md}
|
35
31
|
|
36
32
|
### `:_set_border_title_`
|
37
33
|
This event changes the title of the border of the named view to the
|
data/docs/cursors.md
CHANGED
@@ -38,28 +38,26 @@ can be specified when defining the interface.
|
|
38
38
|
Each example within each interface definition is equivalent.
|
39
39
|
|
40
40
|
#### Showing the cursor
|
41
|
+
The following `cursor` statements are equivalent:
|
41
42
|
|
42
|
-
Vedeu.interface :my_interface do
|
43
|
+
# Vedeu.interface :my_interface do
|
43
44
|
cursor true
|
44
|
-
|
45
|
-
# or...
|
46
|
-
|
47
45
|
cursor!
|
46
|
+
show_cursor!
|
48
47
|
|
49
48
|
# ...
|
50
|
-
end
|
49
|
+
# end
|
51
50
|
|
52
51
|
#### Hiding the cursor
|
52
|
+
The following `cursor` statements are equivalent:
|
53
53
|
|
54
|
-
Vedeu.interface :my_interface do
|
54
|
+
# Vedeu.interface :my_interface do
|
55
55
|
cursor false
|
56
|
-
|
57
|
-
# or...
|
58
|
-
|
59
56
|
no_cursor!
|
57
|
+
hide_cirsor!
|
60
58
|
|
61
59
|
# ...
|
62
|
-
end
|
60
|
+
# end
|
63
61
|
|
64
62
|
### View Cursors
|
65
63
|
The view cursor is the same as the interface cursor with the same
|
@@ -85,30 +83,17 @@ view is rendered, overriding the initial or current state.
|
|
85
83
|
end
|
86
84
|
|
87
85
|
|
88
|
-
## Cursor
|
89
|
-
|
90
|
-
### `:_cursor_origin_`
|
91
|
-
This event moves the cursor to the interface origin; the top left
|
92
|
-
corner of the named interface.
|
93
|
-
|
94
|
-
Vedeu.trigger(:_cursor_origin_, name)
|
95
|
-
Vedeu.trigger(:_cursor_reset_, name)
|
86
|
+
## Cursor Events
|
96
87
|
|
97
|
-
|
98
|
-
To ascertain the position of a cursor in a named interface, use the
|
99
|
-
following event (substituting 'name' for the interface name):
|
88
|
+
{include:file:docs/events/by_name/refresh_cursor.md}
|
100
89
|
|
101
|
-
|
102
|
-
|
103
|
-
If you want to know where the cursor is without knowing the interface
|
104
|
-
name, you can check which interface is in focus:
|
90
|
+
## Cursor Positioning Events
|
105
91
|
|
106
|
-
|
92
|
+
{include:file:docs/events/by_name/cursor_origin.md}
|
107
93
|
|
108
|
-
|
109
|
-
Moves the cursor to a relative position inside the interface.
|
94
|
+
{include:file:docs/events/by_name/cursor_position.md}
|
110
95
|
|
111
|
-
|
96
|
+
{include:file:docs/events/by_name/cursor_reposition.md}
|
112
97
|
|
113
98
|
## Cursor Movement Events
|
114
99
|
|
@@ -116,45 +101,17 @@ Adjusts the position of the named cursor or view in the direction
|
|
116
101
|
specified. If 'name' is unknown, using 'Vedeu.focus' will use the
|
117
102
|
interface currently in focus.
|
118
103
|
|
119
|
-
|
120
|
-
Moves the cursor one character left, unless the left-most position
|
121
|
-
for the view or terminal is reached.
|
122
|
-
|
123
|
-
Vedeu.trigger(:_cursor_left_, name)
|
124
|
-
Vedeu.trigger(:_cursor_left_, Vedeu.focus)
|
104
|
+
{include:file:docs/events/by_name/cursor_left.md}
|
125
105
|
|
126
|
-
|
106
|
+
{include:file:docs/events/by_name/cursor_down.md}
|
127
107
|
|
128
|
-
|
129
|
-
Vedeu.trigger(:_cursor_down_, Vedeu.focus)
|
108
|
+
{include:file:docs/events/by_name/cursor_up.md}
|
130
109
|
|
131
|
-
|
132
|
-
Moves the cursor one line up, unless the top-most position for the
|
133
|
-
view or terminal is reached.
|
110
|
+
{include:file:docs/events/by_name/cursor_right.md}
|
134
111
|
|
135
|
-
|
136
|
-
Vedeu.trigger(:_cursor_up_, Vedeu.focus)
|
112
|
+
{include:file:docs/events/by_name/cursor_top.md}
|
137
113
|
|
138
|
-
|
139
|
-
|
140
|
-
Vedeu.trigger(:_cursor_right_, name)
|
141
|
-
Vedeu.trigger(:_cursor_right_, Vedeu.focus)
|
142
|
-
|
143
|
-
### `:_cursor_top_`
|
144
|
-
Moves the cursor to the top-most position for the view or terminal.
|
145
|
-
If the view contains content, then this event will effectively scroll
|
146
|
-
to the first line of the content.
|
147
|
-
|
148
|
-
Vedeu.trigger(:_cursor_top_, name)
|
149
|
-
Vedeu.trigger(:_cursor_top_, Vedeu.focus)
|
150
|
-
|
151
|
-
### `:_cursor_bottom_`
|
152
|
-
Moves the cursor to the bottom-most position for the view or terminal.
|
153
|
-
If the view contains content, then this event will effectively scroll
|
154
|
-
to the last line of the content.
|
155
|
-
|
156
|
-
Vedeu.trigger(:_cursor_bottom_, name)
|
157
|
-
Vedeu.trigger(:_cursor_bottom_, Vedeu.focus)
|
114
|
+
{include:file:docs/events/by_name/cursor_bottom.md}
|
158
115
|
|
159
116
|
## Cursor Visibility API & Events
|
160
117
|
|
@@ -163,34 +120,8 @@ can be called at any time and affect the cursor of the named
|
|
163
120
|
interface, or when a name is not given, the interface currently in
|
164
121
|
focus.
|
165
122
|
|
166
|
-
|
167
|
-
Hide the cursor.
|
168
|
-
|
169
|
-
Vedeu.trigger(:_hide_cursor_, name)
|
170
|
-
Vedeu.trigger(:_hide_cursor_, Vedeu.focus)
|
171
|
-
Vedeu.trigger(:_cursor_hide_, name)
|
172
|
-
Vedeu.trigger(:_cursor_hide_, Vedeu.focus)
|
173
|
-
|
174
|
-
Vedeu.hide_cursor(name)
|
175
|
-
Vedeu.hide_cursor(Vedeu.focus)
|
176
|
-
|
177
|
-
### Vedeu.show_cursor / `:_show_cursor_`
|
178
|
-
Show the cursor.
|
179
|
-
|
180
|
-
Vedeu.trigger(:_show_cursor_, name)
|
181
|
-
Vedeu.trigger(:_show_cursor_, Vedeu.focus)
|
182
|
-
Vedeu.trigger(:_cursor_show_, name)
|
183
|
-
Vedeu.trigger(:_cursor_show_, Vedeu.focus)
|
184
|
-
|
185
|
-
Vedeu.show_cursor(name)
|
186
|
-
Vedeu.show_cursor(Vedeu.focus)
|
187
|
-
|
188
|
-
### Vedeu.toggle_cursor / `:_toggle_cursor_`
|
189
|
-
Toggle the visibility of the cursor. If hidden, then show. If shown,
|
190
|
-
then hide.
|
123
|
+
{include:file:docs/events/by_name/hide_cursor.md}
|
191
124
|
|
192
|
-
|
193
|
-
Vedeu.trigger(:_toggle_cursor_, Vedeu.focus)
|
125
|
+
{include:file:docs/events/by_name/show_cursor.md}
|
194
126
|
|
195
|
-
|
196
|
-
Vedeu.toggle_cursor(Vedeu.focus)
|
127
|
+
{include:file:docs/events/by_name/toggle_cursor.md}
|
data/docs/events/application.md
CHANGED
@@ -2,11 +2,4 @@
|
|
2
2
|
|
3
3
|
## Application Events
|
4
4
|
|
5
|
-
|
6
|
-
Call a client application controller's action with parameters.
|
7
|
-
|
8
|
-
Vedeu.trigger(:_goto_,
|
9
|
-
:your_controller,
|
10
|
-
:some_action,
|
11
|
-
{ id: 7 })
|
12
|
-
Vedeu.goto(:your_controller, :some_action, { id: 7 })
|
5
|
+
{include:file:docs/events/by_name/goto.md}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
### `:_command_`
|
2
|
+
This event is used by Vedeu internally, though you can bind to it if
|
3
|
+
you wish. It is preferred for you to bind to `:command` though.
|
4
|
+
|
5
|
+
Will cause the triggering of the `:command` event; which you should
|
6
|
+
define to 'do things'.
|
7
|
+
|
8
|
+
Vedeu.trigger(:_command_, command)
|
9
|
+
|
10
|
+
Vedeu.bind(:command) do
|
11
|
+
# ... your code here ...
|
12
|
+
end
|
13
|
+
|
14
|
+
Alternatively, you can access commands entered using the following
|
15
|
+
API methods: (See {Vedeu::Input::Store} for more details).
|
16
|
+
|
17
|
+
Vedeu.all_commands
|
18
|
+
|
19
|
+
Vedeu.last_command
|
@@ -0,0 +1,7 @@
|
|
1
|
+
### `:_cursor_bottom_`
|
2
|
+
Moves the cursor to the bottom-most position for the view or terminal.
|
3
|
+
If the view contains content, then this event will effectively scroll
|
4
|
+
to the last line of the content.
|
5
|
+
|
6
|
+
Vedeu.trigger(:_cursor_bottom_, name)
|
7
|
+
Vedeu.trigger(:_cursor_bottom_, Vedeu.focus)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
### `:_cursor_position_`
|
2
|
+
To ascertain the position of a cursor in a named interface, use the
|
3
|
+
following event (substituting 'name' for the interface name):
|
4
|
+
|
5
|
+
Vedeu.trigger(:_cursor_position_, name)
|
6
|
+
|
7
|
+
If you want to know where the cursor is without knowing the interface
|
8
|
+
name, you can check which interface is in focus:
|
9
|
+
|
10
|
+
Vedeu.trigger(:_cursor_position_, Vedeu.focus)
|
@@ -0,0 +1,7 @@
|
|
1
|
+
### `:_cursor_top_`
|
2
|
+
Moves the cursor to the top-most position for the view or terminal.
|
3
|
+
If the view contains content, then this event will effectively scroll
|
4
|
+
to the first line of the content.
|
5
|
+
|
6
|
+
Vedeu.trigger(:_cursor_top_, name)
|
7
|
+
Vedeu.trigger(:_cursor_top_, Vedeu.focus)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
### `:_editor_`
|
2
|
+
This event is called by {Vedeu::Input::Capture#read}. When
|
3
|
+
invoked, the key will be passed to the editor for currently
|
4
|
+
focussed view.
|
5
|
+
|
6
|
+
Note: 'key' is a String for alphanumeric keys and special keys are
|
7
|
+
represented by Symbols.
|
8
|
+
|
9
|
+
Vedeu.trigger(:_editor_, key)
|