|
Fall Quarter 1995 Document Author: Project Sponsor: |
Cyberguide Team: Ben Buie (Team Leader) |
Introduction
This document is a reference for the current Cyberguide. It documents
the most frequently accessed views, variables, and functions. This
document covers the most recent build as indicated in the File Layout
Document.
An Array of frames. Each frame in MapLocationArr represents a location on the Map.
Each frame has the following slots: a) MapLocation - A unique Map Location ID.
MapLocation is assigned arbitrarily. b-e) Left, Top, Right, Bottom - Bounds values for the
location.
This is an array of bitmaps that contain pictures of people.
Tour Guide is the main application view which holds all of the other views, clipper1 (map),
viewDemos, viewDemosShort, About Screen, and other various global variables and
functions. The slots of interest are:
A boolean variable that tells wether or not the positioning system is turned on or not. True
if it is on and nil for off.
A look-up table of beacons hanging from the GVU ceiling and their coresponding locations
on the GVU map.
Function which figures how much the user has moved and calls the appropriate routines to
move the user on the map.
Keeps track of what the last demo that the user clicked on so that the ViewDemosShort can
figure out which demo information to show when selected.
The x coordinate in pixel units of where the user is currently on the map. This value is
used to calculate which direction the user moves.
The y coordinate in pixel units of where the user is currently on the map. Same use as
CurrentX.
A link to the data frame in project data.
Slot that stores the UnionSoup for the demos.
Function that returns an array of strings containing the names of all the demos in
DemoSoup.
Function that returns an array containing the value of the People slot in DemoSoup for the
given demo
Function that returns the values of the name slots of PeopleSoup for the given indexes
Function that returns the values of the DemoName slots DemoSoup that match the given
category id.
Function that returns the value of the AboutText slot for the given person.
Function that returns the value of the FullDescription slot for the given demo name.
Function that returns a demo id corresponding to the passed in name.
Function that returns the value of the MugShot slot for the given person
Function that returns the value of the name slot in DemoSoup for the given MapLocation
A look-up table for demo locations. Each terminal in the GVU lab has a location in the
table. Each entry is a frame containing the four corners of the location in pixel coordinates.
Slot that stores the UnionSoup for peopleŐs information.
Experimental solid icon for the demobuttons. The idea here is that if you use a solid icon
then you wont have to worry about scaling it if you are able to do clipping.
Star icon for the demo buttons on the map.
Title of the application that shows up at the top of the Cyberguide screen.
Shut off the positioning system so that it does not interfere with other newton applications.
This does the final actions just before Cyberguide is opened. This script opens up the
about screen and initializes the soup slots, PeopleSoup and DemoSoup.
Within TourGuide, there are also several independent GUI elements. The
following are
buttons and static elements that are direct children of TourGuide.
A text button that opens linked demos when clicked (when buttonclickscript is called).
AutoTrack is a picture button. Clicking it (calling buttonClickScript) will center the map
view around the persons location (myposition).
A picturebutton that shows clipper1 and hides zoomedview when clicked (when
buttonclickscript is called). This shows a zoomed out view of the map. The icon and text
slots can be changed for usability purposes.
A picturebutton that shows zoomedview and hides clipper1 when clicked (when
buttonclickscript is called). This shows a normal view of the map. The icon and text slots
can be changed for usability purposes.
The Map Screen shows the user a map of the GVU lab, with a small icon representing the
users position located somewhere on the map. As the user moves about the GVU lab, the
userŐs icon is adjusted on the map view to correspond with the userŐs locations. The user
can also move the map by dragging it with the pen. To find his/her position again, the user
can click the person icon.
The main components of the map are the clipper1 view which clips the map, viewwithpict1
(the physcial map and the demo pop-up boxes), the hand that appears whenever you drag
the map, and myposition (the user icon that shows where the user is in the GVU lab).
This view is used to clip the map view (ViewWithPict1). Here are the slots of interest:
Function which figures out the maximum X,Y value that one can do a setorigin(). This is
used whenever one scales the map.
ScrollMe(integer, integer) - This function moves the map horizontally by the first parameter
and vertically by the second. ScrollMe takes care of things like making sure the user can't
move the map off the screen.
This function is used whenever the user clicks on the map. One assumes that the user is
about to drag the map so the positioning system is turned off and the hand is shown.
Used when you do a Clipper1:setorigin() to scroll the map around withing the clipper1
Used when you do a Clipper1:setorigin() to scroll the map around withing the clipper1
This is the last thing you do before opening the Clipper1 (Map) view. Hide the
demonamepopup box and figure out the max values that you can scroll the map.
This is the physical map of the GVU lab.
????
This function creates the buttons which are the demo locations on the map. This function is
called inside the viewSetupchildrenscript.
This function increases the resolution of the map.
This function reduces the resolution of the map
The map bit-map of the GVU lab is stored in the icon slot
A copy of the original size of the map object. These bounds are used to avoid deviating
from the actual proportions of the map after multiple scalings.
The MapPict is converted into a newton Shape so that we can use the built-in Newton
scaling functions. The newton can only scale a pictureObject and not a picture.
An integer value for the current scale factor. One can adjust the scale factor by clicking on
either the Zoomin or Zoomout buttons. The scalefactor is used to scale the map.
Whenever you manually draw a shape object to the screen, you have to do it inside this
script. This function draws the map shape.
A boolean variable that is set true whenever the demobuttons have been made inside the
viewSetupChildrenScript
This function is similar to the udatedrawingscript but this one is done whenever the screen
is drawn.
Use this function to call fMakeChildren which creates the demo buttons.
Calculate the bounds of the map based on the current size of the MapShape. This allows
any size map (less than 1000x1000 pixels) to be used without making any manual
modifications of the viewbounds.
Create the map shape object using theMapPict.
A statictext label that is moved around the screen and changed according to the current
demo. Here are the
slots of interest:
A picture of a small hand, shown when the user moves the map. Here are the slots of
interest:
MyPosition is a picturebutton representing the user's current position. Here are the slots of
interest:
These are 8 copies of the arrow icon that is displayed on the user icon. These 8 arrows
allow the user icon to appear to rotate depending on what direction he is moving. There is
an arrow pointing in 8 directions.
Function used to scale the userŐs location on the map when the user zooms-in on the map.
Funtion used to scale the userŐs location on the map when the user zooms-out on the map
This function is used to move the user icon on the map. There is some fancy code in here
that can make the nearest demo to the user to pop up but it is commented out right now
since it runs real slow. Move me takes a deltax and deltay (pixel coordinates) telling it in
what direction to move.
The information screens in Cyberguide allow the user access to printed information about
each individual
demonstration, what demos are available, what categories of demos are being shown, and
what
demonstrations are related together based on category. The user can use either a short
version or long version of the information screens. The long version allows access to all of
the demos whereas the short version only lets the user see the one demo that he selected
from the map.
There are several key GUI objects which are
important to the long form information screen; the category picker, demonstration picker,
demonstration abstract text box, people scrolling list box, biography text box, the people
picture box, and the text, people, and go-there buttons. The two pickers are used to select
the category of demos to choose from and the demo picker is used to select which demo to
display information about. The text and people button is used to either show the
demonstration abstract or information about the people involved in the currently selected
demo. When a user taps the go-there button then information screen disappears and the
map view is shown so that the user sees the position of the demo that he had selected in the
information screens.
This is the container template for all of the other templates in the Demos.t
This is the first picker at the top of the information screens. One can select either to view all
demos in the demos picker or only ones of a certain category.
- Whenever a category in the picker is
selected then the lablelActionScript
is executed. The labelActionScript checks to see what category has been selected, updates
the labelCommands in the PickerDemos so that only the demos of the new category can be
chosen, sets the text in the Onliner paragraph to display the first demo in of the selected
category, updates the PeopleScroller so that the correct people are listed and the information
of the first person is displayed.
This protoPicker is the list of demos which can be selected based on which category has
been selected in the ListTypePicker. Whenever a category is selected then only the demos
that are related to the category can be selected. Once someone chooses a demo from the
picker the both the people the people scroller and the text in the oneliner box are
automatically updated.
- when a demo is picked then text slot of
the Onliner template is set to the
DemoDescription string from the record of the demo in the demosoup. A list of all of the
people associated with the project is created and passed to the peopleScroller in the
PeopleBrowser. The AboutText and correct picture are updated to show the information
about the first person in the list of people associated with the selected demo.
This is the container template for the paragraph view that shows the Demo Description
string. This template is used in order to allow scrolling within the Onliner template.
The abstract information about the chosen demo is displayed in the Oneliner
paragraphView. The reason that both the clView OnelinerContainer and the Onliner views
are necessary are to permit scrolling within the paragraphView.
The PeopleBrowser is a container view for the people information screen. Whenever the
people button is tapped then this view is shown.
The PeopleScroller shows a list of all the people associated with the selected demo. By
tapping on one of the entries in the scroller, the user is able to change the AboutText and
picture in order to give information about the selected person.
The clPictureView is the template which shows the pict resource of the currently selected
person.
This view is used so that the AboutText paragraph view can be scrolled.
The information about the person is displayed in the AboutText view. This view works
much the same way as the Oneliner paragraph view.
Tapping on the People button causes the OnlinerContainer to be hidden and the
PeopleBrowser to be shown, if it not already visible.
Tapping on the Go-There button causes the ViewDemos view to be hidden which allows
the map to be visible. Also, the map is clipped so that the location of the currently selected
demo is centered on the map.
Tapping on the People button causes the OnlinerContainer to be hidden and the
PeopleBrowser to be shown, if it not already visible.
Whenever the user selects a demo from the map and jumps to the information systeme in
oreder to gain more information, then the short version of the information browser appears.
In this short version, the user can only see information about one demo.
This class is very similar to viewDemos. The only major differences is that there are now
label pickers to select neither category or demo name, and viewdemosshort uses the global
variable named currentdemoname in Tour guide to initialize all of the text and graphic slots
when the short version is called.
The endpoint we do the IR transfers with. It defines the Input Script among and the type of
IR port, etc.
Sets up the endpoint and turns on positioning
Called by the InputScript; updates the position on the Map
Turns off the IR properly
TourGuide
Map
Information
PositioningSystem
Introduction
Global Data Structures (Project Data)
TourGuide
Map (ViewWithClipper1)
Information
PositioningSystem
Cyberguide
Project Notebook
Last Modified 11/30/95 -- Ben Buie
a>