Permalink
Browse files

seventh tutorial snapshot save

  • Loading branch information...
1 parent 0124e71 commit 9e930f0628eb4d0d46b3ea25937359e6afea0947 megaannum committed Aug 24, 2012
@@ -100,11 +100,11 @@ in general, how an active Form would launch a sub-Form:
\ 'action': subformAction})
Here, when the 'subformbutton' is selected (with a mouse 'Select' Event or
-a keyboard &ltCR>/&ltSpace>), the 'LaunchSubFormFunc' is called
+a keyboard <CR>/<Space>), the 'LaunchSubFormFunc' is called
and a new sub-Form is run. When the sub-Form stops running, exits its 'run()'
method, control is returned to the 'LaunchSubFormFunc' function, which in
this case, simply exits and control is returned to the Form/Viewer that
-originally passed the 'Select' Event (or keyboard &ltCR>/&ltSpace>) to the Button.
+originally passed the 'Select' Event (or keyboard <CR>/<Space>) to the Button.
The Event/Action model is pretty simple to follow.
@@ -56,15 +56,15 @@ is ignored by the Form. There are some user character/mouse inputs
that the Form its self responses to.
One such character, in particular, is very relevant for this Form and that
-is the &ltEsc> character. To stop this Form from running, since it has
-no explicit 'close' or 'submit' Button, is to press the &ltEsc> key.
+is the <Esc> character. To stop this Form from running, since it has
+no explicit 'close' or 'submit' Button, is to press the <Esc> key.
-The &ltCntl-H> keyboard entry is also handled by the Form. It the way of
+The <Cntl-H> keyboard entry is also handled by the Form. It the way of
invoking context-sensitive-help from the keyboard. Any 'purpose' information
associated with the Form will be displayed in an information dialog.
-Additionally, the Form responds to a &ltRightMouse> click. Like the keyboard
-&ltCntl-H>, this will display Form context-sensitive-help. If
+Additionally, the Form responds to a <RightMouse> click. Like the keyboard
+<Cntl-H>, this will display Form context-sensitive-help. If
the mouse click was over an interactive Glyph, a Glyph that can have
focus, then, both Glyph usage Help is displayed and any purpose Help
associated with the Glyph is also displayed.
@@ -6,7 +6,7 @@ These are called "character" events. A Viewer examine all such
character events and map some of them into the second type of event
supported by Forms, a Dictionary object or object event that must
have a 'type' key whose value is one of a set of allowed names. As an
-example, a &ltLeftMouse> Number returned by 'getchar()' is converted
+example, a <LeftMouse> Number returned by 'getchar()' is converted
into a Dictionary event object of type 'NewFocus' where the Dictionary
also has entries for the line and column (v:mouse_line and
v:mouse_column). Some object events are generated by the Forms
@@ -21,7 +21,7 @@ events are generated by the keyboard and mouse. Events are
read by the Viewer with current focus, mapped by that Viewer
and then forwarded to the Viewer's child Glyph that has focus.
If a Viewer has no child Glyphs that accept focus, then all events
-are ignored (except the &ltEsc> character which will pop the user out
+are ignored (except the <Esc> character which will pop the user out
of the current Viewer/Form).
If a Glyph consumes an input event, it might require redrawing (such
@@ -30,7 +30,7 @@ itself with a viewer-redraw-list and when control is returned to the
Viewer, the Glyph is redrawn.
Sometimes a Glyph will consume an event and an action will be
-triggered. For example, a left mouse click or keyboard &ltCR> entry
+triggered. For example, a left mouse click or keyboard <CR> entry
on a button will cause the action associated with that button to
execute.
@@ -108,7 +108,7 @@ determine if a Glyph has been rendered at least once.
A Form Glyph is a Viewer Glyph; the Form 'run()' method calls the Viewer 'run()'
method. The Viewer 'run()' method returns one of the following Event types:
-* Exit: Character &ltEsc> maps to 'Exit' and Form returns empty Dictionary.
+* Exit: Character <Esc> maps to 'Exit' and Form returns empty Dictionary.
* ReSize: The size of the form has changed, the window text is recaptured and the Viewer 'run()' method is called again.
* Command: A command to execute on the command-line, and an empty Dictionary is
returned.
@@ -166,7 +166,7 @@ These are called "character" events. A Viewer examine all such
character events and map some of them into the second type of event
supported by Forms, a Dictionary object or object event that must
have a 'type' key whose value is one of a set of allowed names. As an
-example, a &ltLeftMouse> Number returned by 'getchar()' is converted
+example, a <LeftMouse> Number returned by 'getchar()' is converted
into a Dictionary event object of type 'NewFocus' where the Dictionary
also has entries for the line and column (v:mouse_line and
v:mouse_column). Some object events are generated by the Forms
@@ -181,7 +181,7 @@ events are generated by the keyboard and mouse. Events are
read by the Viewer with current focus, mapped by that Viewer
and then forwarded to the Viewer's child Glyph that has focus.
If a Viewer has no child Glyphs that accept focus, then all events
-are ignored (except the &ltEsc> character which will pop the user out
+are ignored (except the <Esc> character which will pop the user out
of the current Viewer/Form).
If a Glyph consumes an input event, it might require redrawing (such
@@ -190,7 +190,7 @@ itself with a viewer-redraw-list and when control is returned to the
Viewer, the Glyph is redrawn.
Sometimes a Glyph will consume an event and an action will be
-triggered. For example, a left mouse click or keyboard &ltCR> entry
+triggered. For example, a left mouse click or keyboard <CR> entry
on a button will cause the action associated with that button to
execute.
@@ -244,7 +244,7 @@ This method will return a Dictionary of Glyph tag/values if the Form
had a Submit button that was invoked. The Form might instead, simply
execute a Vim command and the 'run()' method returns nothing
(actually, it will return 0). If the Form had a Cancel or Close
-button that was pushed or the user typed &ltEsc>, then, again, nothing
+button that was pushed or the user typed <Esc>, then, again, nothing
is returned.
### Size, Drawing and Allocation
@@ -286,15 +286,15 @@ automatically generated tag-name will certainly be different each
time the Form is run. So, it behoves the developer to pick their own
meaningful tag-names for Glyphs that will return "application" data.
-Finally, a user can always enter &ltEsc> to stop running a Form.
+Finally, a user can always enter <Esc> to stop running a Form.
Remember, a Form is a Viewer. If focus is in the Form's Viewer and
-not a child Viewer of the Form, then entering &ltEsc> is the same as
+not a child Viewer of the Form, then entering <Esc> is the same as
pressing Close/Cancel button. Most of the time this will be the
case; a Form will only have one Viewer - itself. But if a Form has
-one or more child Viewers, then entering &ltEsc> when focus is in a
+one or more child Viewers, then entering <Esc> when focus is in a
child Viewer will simply pop the user out to the next higher
enclosing Viewer. If the Form has 4 nested Viewers and focus is in
-the bottom most Viewer, it will take entering &ltEsc> four times to
+the bottom most Viewer, it will take entering <Esc> four times to
exist the Form.
### Delete
@@ -3,7 +3,7 @@
In this example, a Form will created that has a couple of interactive
Glyphs (editor, group of toggle buttons and group of radio buttons)
which can generate data for the user. Then if 'Cancel'
-is selected (or &ltEsc> is pressed) no results will be returned. But,
+is selected (or <Esc> is pressed) no results will be returned. But,
if 'Submit' is selected, a Dictionary holding the Glyph tag names
as keys and the associated values will be echo to the command line.
@@ -20,7 +20,7 @@ A Glyph can be be interactive (have focus) or non-interactive.
An interactive Glyph
response to keyboard and/or mouse events while a non-interactive Glyph
does not. Well, thats mostly true. All Glyph's respond to a right mouse click,
-&ltRightMouse>, and displays context sensitive information in a popup.
+<RightMouse>, and displays context sensitive information in a popup.
For more detail see [Glyph Overview](https://github.com/megaannum/forms/blob/master/tutorial/forms/GlyphOverview.md)
@@ -91,7 +91,7 @@ For more detail see [Boxes](https://github.com/megaannum/forms/blob/master/tutor
## Action
Associated with many interactive Glyphs are Actions. When you click a button,
-its Action executes. When you enter &ltCR> on a line editor, its Action executes.
+its Action executes. When you enter <CR> on a line editor, its Action executes.
When a slider is moved, its Action executes. All interactive Glyphs with
Actions execute the Action provided by the developer or executes its
default Action, the NoOp-Action that does nothing.
@@ -118,8 +118,8 @@ For more detail see [Command](https://github.com/megaannum/forms/blob/master/tut
## Button
A Button is an interactive Glyph. A Button can have an Action Object associated
-with it or a command String. When it is selected (&ltCR>, &ltSpace>
-or &ltRightMouse>), if the Button has an Action, that Action executes.
+with it or a command String. When it is selected (<CR>, <Space>
+or <RightMouse>), if the Button has an Action, that Action executes.
If the Button has a command, the Button creates an Event of type "Command"
with an additional entry of key "command" and value the Button's command
String and places the Command Event at the front of the input queue.
@@ -9,7 +9,7 @@ first Glyph in that list is the Glyph that currently has focus.
Also, the Viewer is pushed onto the Forms' Viewer Stack. Some events
are handled differently if the Viewer is the only Viewer in the
-Stack or not. Also, when a &ltLeftMouse> click occurs outside of the
+Stack or not. Also, when a <LeftMouse> click occurs outside of the
current Viewer, but still within the boundaries of the Form, then
Viewers are popped off the Viewer Stack until a Viewer is found
that contains the line/column position of the mouse click and it
@@ -39,7 +39,7 @@ The following is a list of the Event types:
* Exit
- Action: exit current viewer, if top viewer, no results data
- Also used as top-of-stack return value for Viewer
- - The character &ltEsc> is mapped to Exit
+ - The character <Esc> is mapped to Exit
* Cancel
- Action: exit form, no results data
- Also used as top-of-stack return value for Viewer
@@ -49,33 +49,33 @@ The following is a list of the Event types:
- Action: generate context help Form with application specific help/info
and developer tools
- Data: optional Point [line, column]
- - The character &ltRightMouse> is mapped to Context
+ - The character <RightMouse> is mapped to Context
* Drag
- Action: none
- - The character &ltLeftDrag> is mapped to Drag
+ - The character <LeftDrag> is mapped to Drag
* Release
- Action: none
- - The character &ltLeftRelease> is mapped to Release
+ - The character <LeftRelease> is mapped to Release
* NewFocus
- Action: find new focus based upon mouse coordinates
- - The character &ltLeftMouse> is mapped to NewFocus
+ - The character <LeftMouse> is mapped to NewFocus
- Also, if a Viewer is the target of a Select Event, it is mapped
to NewFocus
* NextFocus
- Action: go to next focus
- - The characters &ltTab>, &ltC-n> and &ltDown> is mapped to NextFocus
- - The mouse &ltScrollWheelDown> event is mapped to NextFocus
+ - The characters <Tab>, <C-n> and <Down> is mapped to NextFocus
+ - The mouse <ScrollWheelDown> event is mapped to NextFocus
* PrevFocus
- Action: go to previous focus
- - The characters &ltS-Tab>, &ltC-p> and &ltUp> is mapped to PrevFocus
+ - The characters <S-Tab>, <C-p> and <Up> is mapped to PrevFocus
(Note: could not test S-Tab on my system.)
- - The mouse &ltScrollWheelUp> event is mapped to PrevFocus
+ - The mouse <ScrollWheelUp> event is mapped to PrevFocus
* FirstFocus
- Action: go to first focus glyph
- - The character &ltHome> is mapped to FirstFocus
+ - The character <Home> is mapped to FirstFocus
* LastFocus
- Action: go to last focus glyph
- - The character &ltEnd> is mapped to LastFocus
+ - The character <End> is mapped to LastFocus
* ReDraw
- Action: redraw Form in window
* ReDrawAll
@@ -92,7 +92,7 @@ The following is a list of the Event types:
* SelectDouble
- Action: a left mouse double click occured
- Data: Point [line, column]
- - The mouse &lt2-LeftMouse> event is mapped to SelectDouble
+ - The mouse <2-LeftMouse> event is mapped to SelectDouble
* Sleep
- Action: Viewer Event handling sleeps for given time.
- Data: time: Number (e.g., 10) or String (Number+'m' e.g., 200m)
@@ -128,5 +128,5 @@ and the 'run()' method returns.
It is possible to have a Viewer none of whose descendant Glyphs can
accept focus. In that case, its is a display-only Viewer and the
-only thing a user can do is enter &ltEsc> to exit the Viewer or
-enter &ltCtrl-H> which will provide context-sensitive-help.
+only thing a user can do is enter <Esc> to exit the Viewer or
+enter <Ctrl-H> which will provide context-sensitive-help.

0 comments on commit 9e930f0

Please sign in to comment.