Propositional Production Systems - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Propositional Production Systems

Description:

Write the field values that represent discovering what an icon means by displaying its tag. ... E.g., the following field checks the mouse location for a scroll bar. ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 31
Provided by: vuu8
Category:

less

Transcript and Presenter's Notes

Title: Propositional Production Systems


1
Propositional Production Systems
2
State Space
  • State space The set of actions possible in a
    user interface, defined by a set of fields. In
    most cases the state space is partitioned into a
    set of controller state spaces, one controller
    per widget.
  • Field Set of mutually exclusive conditions (or
    values). Each field is assigned one of its
    values. The collection of values gives the state
    of the system.

3
Example Fields
  • Two fields of a controller of a widget with their
    values listed in may be
  • Color Black, White, Red
  • Size Small, Medium, Large

4
Input Events
  • Widget controllers react to events performed by
    the user. These inputs are described by the
    Input field and additional fields to specify
    button states.
  • The values of the Input field are events and are
    distinguished by a leading bullet h.

5
Input Events (2)
  • Input hMouseDown (one of the mouse buttons is
    pressed),
  • hMouseUp (one of the mouse buttons is
    released),
  • hMouseMove (mouse position is
    changed),
  • hMouseEnter (mouse position enters a
    subwindow),
  • hMouseExit (mouse position enters a
    subwindow),
  • hKeypress (from keyboard)

6
Input Events (3)
  • Button state fields
  • ShiftKey Shift, NoShift
  • ControlKey Cntl, NoCntl
  • LeftButton LeftDown, LeftUp
  • MiddleButton MiddleDown, MiddleUp
  • RightButton RightDown, RightUp
  • and possibly others

7
Exercises (1)
  1. Why do we not use the simpler condition names of
    down and up for all the buttons?
  2. Write the field values that represent discovering
    what an icon means by displaying its tag.
  3. Write the field values that represent clicking on
    an OK button.

8
Exercises (2)
  1. Write the field values that represent dragging a
    folder on the desktop to the Recycle Bin.
  2. What key fields are missing from the Input event
    definition?
  3. Give the field values that represent choosing the
    File menu with the keystroke shortcut.

9
Actions
  • Widget controllers may have actions that they can
    perform. For example, a button controller for a
    Search button should, when pressed, invoke the
    search process.
  • There may be more than one Action field if
    several actions can be carried out
    simultaneously.
  • The values of an Action field are distinguished
    by a leading exclamation point ! .

10
Actions (2)
  • Examples
  • FileAction !PrintFile, !DeleteFile,
  • !CopyFile . Shows that one must choose only
    one of the three actions to perform.
  • Action !Import

11
Outside Events
  • Frequently two widget controllers will want to
    communicate with one another.
  • The values of a field describing an outside event
    are distinguished by a leading greater than sign
    gt showing information coming to a controller or
    by a trailing greater than sign gt showing
    information being sent to another controller.

12
Outside Events (2)
  • Examples
  • EnDis gtEnable, gtDisable
  • Shows that the widget controller accepts an
    outside message to enable or disable itself.

13
Outside Events (3)
  • Example A scroll bar needs to report its state
    to its parent window.
  • TellParent Scrollgt, StepUpgt, StepDowngt,
    PageUpgt, PageDowngt

14
Productions
  • Productions are rules that show how the field
    values of the controller state space change.
  • Productions are written in the form
  • V1, V2,, Vp ? W1, W2,, Wq
  • where Vi is the initial value (or condition) of
    a field and Wj is the resulting value of a field.
    Because all field values are required to have
    unique names, the field names do not appear in
    the productions.

15
Productions (2)
  • Example
  • hMouseUp, Shift ? !DoMultipleSelect,
    InSelectMode
  • says if the Input field has value hMouseUp and
    the ShiftKey field has value Shift, then set the
    Action field to !DoMultipleSelect (thus
    performing the action) and set another field to
    InSelectMode

16
Simple Button
  • A simple button is a window area that will invoke
    an action whenever hMouseUp occurs in the area.
  • The controller state space for a simple button is
    defined by two fields
  • Action !Import
  • Input hMouseDown, hMouseUp, hMouseMove
    ,hMouseEnter, hMouseExit, hKeypress
  • and one production
  • hMouseUp ? !Import

17
Button Fields
  • Input
  • LeftButton LeftUp, LeftDown
  • VisualState Inactive, Active, Disabled
  • Action !Extract
  • DamageAction !DamageAll
  • OutsideAction gtEnable, gtDisable

18
Example
  • Location Input LeftButton
  • A MouseMove LeftUp
  • B MouseEnter LeftUp
  • C MouseDown LeftDown
  • D MouseMove LeftDown
  • E MouseUp LeftUp
  • F MouseMove LeftUp
  • G MouseExit LeftUp
  • H MouseMove LeftUp

19
Button Rules (Productions)
  • 1. hMouseDown, LeftDown, Inactive ? Active,
    !DamageAll
  • 2. hMouseUp, LeftUp, Active ? Inactive, !Extract,
    !DamageAll
  • 3. gtDisable ? Disabled, !DamageAll
  • 4. gtEnable, LeftDown ? Active, !DamageAll
  • 5. gtEnable, LeftUp ? Inactive, !DamageAll

20
Button Rules (2)
  • 6. hMouseExit, Active ? Inactive, !DamageAll
  • 7. hMouseEnter, LeftDown, Inactive ? Active,
    !DamageAll

21
Button Exercises
  1. Write the rules that describe the behavior of the
    Minimize button when it is pointed to.
  2. Write the rules that describe the behavior of a
    button whose view does not change when it is
    pointed to.
  3. Write the rules that describe the behavior of the
    Folders button in Windows Explorer when it is
    pointed to and the left mouse button is pressed.

22
Button Exercises (2)
  1. Write the rules that describe the behavior of the
    Folders button in Windows Explorer when the
    cursor is moved off the button while the left
    mouse button is pressed.
  2. Write the rules that describe the behavior of the
    Folders button in Windows Explorer when it is
    pointed to and clicked.

23
Query Fields
  • A query field describes information the widget
    controller needs from the View. Each field
    represents one type of information, with one of
    several values. E.g., the following field checks
    the mouse location for a scroll bar.
  • Mouse Location ?InSlider, ?InPageUp,
  • ?InPageDown, ?InStepUp, ?InStepDown

24
Query Fields Exercises
  • Write a query field to work with a dialog box
    with drop down menu.
  • Write a query field to work with a pane
    separator.

25
Text Box Fields
  • SelectionQuery ?SelectedPoint, ?SelectedRange
  • SelectionAction !SetSelectStart, !SetSelectEnd,
    !OrderSelection
  • State Inactive, Dragging
  • KeyQuery ?DeleteKey, ?LeftArrow, ?RightArrow,
    ?NormalKey
  • EditAction !DeleteSelectedRange,
    !DeletePreviousChar, !InsertChar,
    !DecrementSelection, !IncrementSelection

26
Text Box Productions
  1. -MouseDown, LeftDown, Inactive ? !GrabMouseFocus,
    !SetSelectStart, Dragging
  2. -MouseMove, Dragging ? !SetSelectEnd
  3. -MouseUp, LeftUp, Dragging ? !ReleaseMouseFocus,
    !SetSelectEnd, !OrderSelection, Inactive
  4. -MouseDown, LeftDown, Inactive ? !GrabKeyFocus
  5. -KeyPress, ?DeleteKey, ?SelectedRange ?
    !DeleteSelectedRange

27
Text Box Productions
  • 6. -KeyPress, ?DeleteKey, ?SelectedPoint ?
    !DeletePreviousChar
  • 7. -KeyPress, ?LeftArrow ? !DecrementSelection
  • 8. -KeyPress, ?RightArrow ? !IncrementSelection
  • 9. -KeyPress, ?NormalKey, ?SelectedRange ?
    !DeletedSelectedRange, !InsertChar
  • 10. -KeyPress, ?NormalKey, ?SelectedPoint ?
    !InsertChar

28
Text Box Exercises (1)
  1. Verify the productions (or change them as
    necessary) for the Named text box in the Find All
    Files window.
  2. Verify the productions (or change them as
    necessary) for the text box that opens renaming a
    file in Windows Explorer.
  3. Verify the productions (or change them as
    necessary) for the Location text box in Netscape.

29
Text Box Exercises (2)
  • 4. For Raskins design principles that describe
    interactions with text boxes, construct
    productions that codify these interactions.
  • 5. For the course design principles that describe
    interactions with text boxes, construct
    productions that codify these interactions.

30
Text Box Exercises (3)
  • 6. Construct productions to describe the action
    that fills in a text box with a default character
    and leaves the character selected when one tabs
    to the next box.
  • 7. Construct productions to describe the action
    that deselects a text string when either the
    right arrow or left arrow key is pressed.
Write a Comment
User Comments (0)
About PowerShow.com