A Spatial File Browser

Implementation Project for CSC 2537: Hypermedia (Prof. m. c. schraefel)

Michael MCGuffin

April 23, 2001


spatialBrowser is a file browser offering a dual view of files: a traditional tree list view, with expandable/collapsible nodes, and a 2D spatial view, where files can be freely arranged. The 2D spatial view shows the contents of the currently selected folder, and can be panned and zoomed with the mouse. The spatial layout of files within each folder is persistent across sessions. For some of the rationale behind the design, and references to relevant literature, go here [1].

You can download the source code [2] (about 9k, or 1200 lines of code). The software was developed on Redhat 7, but should be easy to port to other GNU/Linux platforms, or even to Windows with a little more effort. Required libraries are Qt [4] (for most of the UI), STL (for templated lists), OpenGL (for the spatial view), and GLUT [5] (for the scaled fonts in the spatial view). I used Qt 2.2, however an older version may suffice. Mesa [6] can of course be used in lieu of OpenGL.

To unpackage the source, compile and run, try

   gzip -d spatialBrowser-0.1.tar.gz
   tar -xf spatialBrowser-0.1.tar
   cd spatialBrowser-0.1
   ln -s Makefile.linux Makefile
   make
   ./spatialBrowser [directory]

The argument to the executable is optional. If none is provided, the browser will start up with the current directory loaded by default.

In the spatial view, use the left-mouse-button (LMB) to move files, middle-mouse-button (MMB) to pan, and the LMB+MMB together to zoom. Folders are drawn in cyan, and regular files are drawn in white.

Note that if you arrange any of the files in the 2D spatial view of the browser, a hidden ._ (dot underscore) file will be saved containing the layout. One ._ file will be saved in each directory that is given a spatial layout by the user. Directories that initially contain no ._ file are given a default layout by the browser, and the layout is only saved if the user modifies it.


spatialBrowser was implemented during March and April of 2001 as part of CSC 2537, a computer science graduate course on hypermedia given at the University of Toronto. In the interest of rapidly generating a first prototype, the source code for v0.1 was based on a Qt example program called dirview which demonstrates how to use Qt list views. (As such, the source code for v0.1 is rather messy and should probably be rewritten from scratch.)

Things left to do:

Possible future enhancements:

In current traditional systems, the only way for users to organize electronic documents is to group them into explicitly named subfolders, and/or arrange them on a virtual desktop of limited size. The principle goals in the above suggestions are to provide the user with means for rapid and visual browsing of folders, files, and their contents, and to ease the organization of information (ephemeral or otherwise) by enabling the use of large, spatial layouts that can be as informal or as explicitly hierarchical as the user wishes.


This document is available online at

    http://www.dgp.utoronto.ca/~mjmcguff/csc2537/project/

The links in the online document are lost when printed, and are hence repeated here:

[1]  http://www.dgp.utoronto.ca/~mjmcguff/csc2537/proposal/

[2]  http://www.dgp.utoronto.ca/~mjmcguff/csc2537/project/spatialBrowser-0.1.tar.gz

[3]  http://www.dgp.utoronto.ca/~mjmcguff/csc2537/project/spatialBrowser

[4]  http://www.trolltech.com/products/qt.html

[5]  http://reality.sgi.com/mjk/#glut

[6]  http://mesa3d.sourceforge.net


Michael McGuffin, April 23, 2001