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
@@ -0,0 +1,10 @@
|
|
1
|
+
### Vedeu.hide_cursor / `:_hide_cursor_`
|
2
|
+
Hide the cursor.
|
3
|
+
|
4
|
+
Vedeu.trigger(:_hide_cursor_, name)
|
5
|
+
Vedeu.trigger(:_hide_cursor_, Vedeu.focus)
|
6
|
+
Vedeu.trigger(:_cursor_hide_, name)
|
7
|
+
Vedeu.trigger(:_cursor_hide_, Vedeu.focus)
|
8
|
+
|
9
|
+
Vedeu.hide_cursor(name)
|
10
|
+
Vedeu.hide_cursor(Vedeu.focus)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
### `:_keypress_`
|
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 `:key` though.
|
4
|
+
|
5
|
+
When the name is given:
|
6
|
+
|
7
|
+
- The given key is passed to the named keymap. If the keymap is
|
8
|
+
registered, and the key has an associated action assigned, then
|
9
|
+
the action will be called/triggered.
|
10
|
+
- If the keymap is not registered, the key will be passed to the
|
11
|
+
global keymap to be actioned, or ignored if the global keymap does
|
12
|
+
not have an action assigned for the key pressed.
|
13
|
+
|
14
|
+
When the name is not given:
|
15
|
+
|
16
|
+
- The given key is passed to the named keymap associated with the
|
17
|
+
interface/view currently in focus. If the key has an associated
|
18
|
+
action assigned, then the action will be called or triggered,
|
19
|
+
otherwise, the key is (as above) passed to the global keymap to be
|
20
|
+
processed.
|
21
|
+
|
22
|
+
It is also to be noted, that a `:key` event will be triggered
|
23
|
+
irrespective of the conditions above, you can bind to this event
|
24
|
+
separately to 'do things'.
|
25
|
+
|
26
|
+
Vedeu.bind(:key) do
|
27
|
+
# ... your code here ...
|
28
|
+
end
|
29
|
+
|
30
|
+
Alternatively, you can access keypresses entered using the following
|
31
|
+
API methods: (See {Vedeu::Input::Store} for more details).
|
32
|
+
|
33
|
+
Vedeu.all_keypresses
|
34
|
+
|
35
|
+
Vedeu.last_keypress
|
36
|
+
|
37
|
+
A list of supported keypresses can be found here:
|
38
|
+
{Vedeu::Input::Capture}.
|
39
|
+
|
40
|
+
Vedeu.trigger(:_keypress_, key, optional_name)
|
@@ -0,0 +1,7 @@
|
|
1
|
+
### `:_mode_switch_`
|
2
|
+
When triggered, Vedeu switches between modes of the terminal. The idea
|
3
|
+
here being that the raw mode is for single keypress actions, whilst
|
4
|
+
fake and cooked modes allow the user to enter more elaborate commands-
|
5
|
+
such as commands with arguments.
|
6
|
+
|
7
|
+
Vedeu.trigger(:_mode_switch_, mode)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
### `:_movement_refresh_`
|
2
|
+
When triggered, triggers additional events which aid the updating of
|
3
|
+
the output. Used when moving an interface/view.
|
4
|
+
|
5
|
+
Vedeu.trigger(:_movement_refresh_, name)
|
6
|
+
|
7
|
+
At this time, triggering this event will:
|
8
|
+
|
9
|
+
- Clear the entire terminal (assuming at least one renderer is the
|
10
|
+
default (Vedeu::Renderer::Terminal)). This action is performed when
|
11
|
+
moving an interface/view so that there are no 'artefacts' left
|
12
|
+
behind.
|
13
|
+
- Refresh the entire terminal (as above). This means all visible
|
14
|
+
interfaces are re-rendered. This action is performed to ensure other
|
15
|
+
views currently visible are rendered in their current position.
|
16
|
+
- Clears the named view. This action removes the named view from the
|
17
|
+
terminal (or output).
|
18
|
+
- Refreshes the named view. This action adds the named view to the
|
19
|
+
terminal (or output); in the new position.
|
@@ -0,0 +1,9 @@
|
|
1
|
+
### `:_refresh_`
|
2
|
+
Refreshes all registered interfaces.
|
3
|
+
|
4
|
+
The interfaces will be refreshed in z-index order, meaning that
|
5
|
+
interfaces with a lower z-index will be drawn first. This means
|
6
|
+
overlapping interfaces will be drawn as specified. Hidden interfaces
|
7
|
+
will be still refreshed in memory but not shown.
|
8
|
+
|
9
|
+
Vedeu.trigger(:_refresh_)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
### Vedeu.show_cursor / `:_show_cursor_`
|
2
|
+
Show the cursor.
|
3
|
+
|
4
|
+
Vedeu.trigger(:_show_cursor_, name)
|
5
|
+
Vedeu.trigger(:_show_cursor_, Vedeu.focus)
|
6
|
+
Vedeu.trigger(:_cursor_show_, name)
|
7
|
+
Vedeu.trigger(:_cursor_show_, Vedeu.focus)
|
8
|
+
|
9
|
+
Vedeu.show_cursor(name)
|
10
|
+
Vedeu.show_cursor(Vedeu.focus)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
### Vedeu.toggle_cursor / `:_toggle_cursor_`
|
2
|
+
Toggle the visibility of the cursor. If hidden, then show. If shown,
|
3
|
+
then hide.
|
4
|
+
|
5
|
+
Vedeu.trigger(:_toggle_cursor_, name)
|
6
|
+
Vedeu.trigger(:_toggle_cursor_, Vedeu.focus)
|
7
|
+
|
8
|
+
Vedeu.toggle_cursor(name)
|
9
|
+
Vedeu.toggle_cursor(Vedeu.focus)
|
data/docs/events/document.md
CHANGED
@@ -4,56 +4,20 @@
|
|
4
4
|
|
5
5
|
Note: 'name' is a Symbol unless mentioned otherwise.
|
6
6
|
|
7
|
-
|
7
|
+
{include:file:docs/events/by_name/editor_execute.md}
|
8
8
|
|
9
|
-
|
9
|
+
{include:file:docs/events/by_name/editor_delete_character.md}
|
10
10
|
|
11
|
-
|
12
|
-
This event attempts to delete the character in the named
|
13
|
-
document at the current virtual cursor position.
|
11
|
+
{include:file:docs/events/by_name/editor_delete_line.md}
|
14
12
|
|
15
|
-
|
13
|
+
{include:file:docs/events/by_name/editor_down.md}
|
16
14
|
|
17
|
-
|
18
|
-
This event attempts to delete the line in the named document
|
19
|
-
at the current virtual cursor position.
|
15
|
+
{include:file:docs/events/by_name/editor_insert_character.md}
|
20
16
|
|
21
|
-
|
17
|
+
{include:file:docs/events/by_name/editor_insert_line.md}
|
22
18
|
|
23
|
-
|
24
|
-
This event attempts to move the virtual cursor down by one
|
25
|
-
line in the named document.
|
19
|
+
{include:file:docs/events/by_name/editor_left.md}
|
26
20
|
|
27
|
-
|
21
|
+
{include:file:docs/events/by_name/editor_right.md}
|
28
22
|
|
29
|
-
|
30
|
-
This event attempts to insert the given character in the named
|
31
|
-
document at the current virtual cursor position.
|
32
|
-
|
33
|
-
Note: 'character' is a string.
|
34
|
-
|
35
|
-
Vedeu.trigger(:_editor_insert_character_, name, character)
|
36
|
-
|
37
|
-
### `:_editor_insert_line_`
|
38
|
-
This event attempts to insert a new line in the named document
|
39
|
-
at the current virtual cursor position.
|
40
|
-
|
41
|
-
Vedeu.trigger(:_editor_insert_line_, name)
|
42
|
-
|
43
|
-
### `:_editor_left_`
|
44
|
-
This event attempts to move the virtual cursor left by one
|
45
|
-
character in the named document.
|
46
|
-
|
47
|
-
Vedeu.trigger(:_editor_left_, name)
|
48
|
-
|
49
|
-
### `:_editor_right_`
|
50
|
-
This event attempts to move the virtual cursor right by one
|
51
|
-
character in the named document.
|
52
|
-
|
53
|
-
Vedeu.trigger(:_editor_right_, name)
|
54
|
-
|
55
|
-
### `:_editor_up_`
|
56
|
-
This event attempts to move the virtual cursor up by one line
|
57
|
-
in the named document.
|
58
|
-
|
59
|
-
Vedeu.trigger(:_editor_up_, name)
|
23
|
+
{include:file:docs/events/by_name/editor_up.md}
|
data/docs/events/drb.md
CHANGED
@@ -2,40 +2,16 @@
|
|
2
2
|
|
3
3
|
## DRB Events
|
4
4
|
|
5
|
-
|
6
|
-
Triggering this event will send input to the running application as
|
7
|
-
long as it has the DRb server running.
|
5
|
+
{include:file:docs/events/by_name/drb_input.md}
|
8
6
|
|
9
|
-
|
7
|
+
{include:file:docs/events/by_name/drb_retrieve_output.md}
|
10
8
|
|
11
|
-
|
9
|
+
{include:file:docs/events/by_name/drb_store_output.md}
|
12
10
|
|
13
|
-
|
14
|
-
See {Vedeu::Buffers::Terminal#output}
|
11
|
+
{include:file:docs/events/by_name/drb_restart.md}
|
15
12
|
|
16
|
-
|
17
|
-
See {Vedeu::Buffers::Terminal#write}
|
13
|
+
{include:file:docs/events/by_name/drb_start.md}
|
18
14
|
|
19
|
-
|
20
|
-
Use the DRb server to request the client application to restart.
|
15
|
+
{include:file:docs/events/by_name/drb_status.md}
|
21
16
|
|
22
|
-
|
23
|
-
Vedeu.drb_restart
|
24
|
-
|
25
|
-
### `:_drb_start_`
|
26
|
-
Use the DRb server to request the client application to start.
|
27
|
-
|
28
|
-
Vedeu.trigger(:_drb_start_)
|
29
|
-
Vedeu.drb_start
|
30
|
-
|
31
|
-
### `:_drb_status_`
|
32
|
-
Use the DRb server to request the status of the client application.
|
33
|
-
|
34
|
-
Vedeu.trigger(:_drb_status_)
|
35
|
-
Vedeu.drb_status
|
36
|
-
|
37
|
-
### `:_drb_stop_`
|
38
|
-
Use the DRb server to request the client application to stop.
|
39
|
-
|
40
|
-
Vedeu.trigger(:_drb_stop_)
|
41
|
-
Vedeu.drb_stop
|
17
|
+
{include:file:docs/events/by_name/drb_stop.md}
|