|
Since Vispatch is reflective, its rules can modify other parts of the
Vispatch program. One application of this is to create multi-modal
interactive interfaces. Vispatch can implement multi-modal interfaces
because rules can change the location of a dispatch figure and in
doing so change which rules will interpret an event. The program below demonstrates how this can be done. The key is the rule in the scope figure labeled "B". This red rule rewrites two black lines and a dispatch figure. Try clicking on the end points of the lines that end in the scope figure labeled "C". Notice how the dispatch figure that starts at the scope "A" is changed to point to either scope "D" or scope "E". The effect is to change the mode of scope "A" to either rectangle drawing mode or line drawing mode. Try drawing both rectangles and lines in the scope "A" by doing mouse drags in scope "A" and by changing the mode by clicking in scope "C". |
| Note that the line figures and scope figures processed by the rule in scope "B" do not all have to be contained in scope "C". Scope figures determine which rules will interpret an event based on the location of the end point of the event. Once the rule set is determined, the figures processed by the rule can be anywhere provided that they are connected to the event. |