1. GUI Implementation
This page is meant to give a high-level description of how GISMO's user interface is implemented.
System RequirementsTo create windows and other useful widgets, GISMO's interface uses various FLTK classes. Since one of the FLTK widgets GISMO uses is Fl_Gl_Window, GISMO needs OpenGL support; within the CS Department, this requires running GISMO on an SGI machine.
The thumbnail_map_viewer contains the thumbnail map, that is to say, the map of the overall area in which the user is interested. The user may draw with the mouse a box over any subregion; GISMO will open a new window (a terrain_map_viewer) and draw a map of this subregion (the terrain map).
The thumbnail_map_viewer provides a QUIT button for exiting GISMO; when this button is pushed, all windows associated with GISMO are closed.
Thumbnail_map_viewer does not subclass any other class; however, it does contain an instance of the FLTK class Fl_Window, which is displayed at run time.
After the user has drawn a box over the thumbnail map, GISMO draws a detailed map of this subregion. It displays this new map (a "terrain map") in a terrain_map_viewer. The terrain_map_viewer provides additional functionality: it allows the user to redraw the terrain map with all of the z-coordinates of its points exaggerated by an arbitrary constant factor.
Like thumbnail_map_viewer, terrain_map_viewer does not subclass any other class, but instead contains an instance of the FLTK class Fl_Window, which is displayed at run time.
This class is a subclass of Fl_Gl_Window (a FLTK class). It uses OpenGL to draw maps from files of data points taken in geographical surveys. This class also handles mouse events, namely, the event in which a user traces with the mouse a box over the map; GISMO draws a new map using only the points found within the box the user drew.
GlMapWindow is used by both terrain_map_viewer and thumbnail_map_viewer. When displayed in a terrain_map_viewer, we refer to an instance of GlMapWindow as a "terrain map"; likewise, a "thumbnail map" is a GlMapWindow displayed in a thumbnail_map_viewer. These two terms, while referring to the same data class, are often helpful in high-level descriptions of the GISMO interface and will be used from time to time in this manual.
The instance of GlMapWindow which forms the thumbnail map actually performs the necessary tasks of window management for the GISMO system. Since new windows are only created when a user selects a subregion from the thumbnail map, the thumbnail map is in the best position to account for all new instantiations of terrain_map_viewers. It keeps an STL C++ vector of pointers to terrain_map_viewers; when the user wishes to exit GISMO, the thumbnail_map_viewer invokes a method of the thumbnail map which iterates through the vector and hides (i.e., closes) each terrain_map_viewer.