Dynamic space management for user interfaces
- ISBN: 1581132123
- DOI: 10.1145/354401.354790
Abstract
We present a general approach to the dynamic representation of 2D space that is well suited for user-interface layout. We partition space into two distinct categories: full and empty. The user can explicitly specify a set of possibly overlapping upright rectangles that represent the objects of interest. These full-space rectangles are processed by the system to create a representation of the remaining empty space. This representation makes it easy for users to develop customized spatial allocation strategies that avoid overlapping the full-space rectangles. We describe the representation; provide efficient incremental algorithms for adding and deleting full-space rectangles, and for querying the empty-space representation; and show several allocation strategies that the representation makes possible. We present two testbed applications that incorporate an implementation of the algorithm; one shows the utility of our representation for window management tasks; the other applies it to the layout of components in a 3D user interface, based on the upright 2D bounding boxes of their projections.
Author-supplied keywords
Dynamic space management for user interfaces
(ACM Symp. on User Interface Software and Technology, San Diego, CA, November 5-8,2000, 238-248)
Dynamic Space Management for User Interfaces
Blaine A. Bell Steven K. Feiner
Columbia University
Department of Computer Science
500 West 120
th
St., 450 CS Building, New York, NY 10027
+1 212 939-7000
E-mail: {bab22,feiner}@cs.columbia.edu
ABSTRACT
We present a general approach to the dynamic
representation of 2D space that is well suited for user-
interface layout. We partition space into two distinct
categories: full and empty. The user can explicitly specify
a set of possibly overlapping upright rectangles that
represent the objects of interest. These full-space
rectangles are processed by the system to create a
representation of the remaining empty space. This
representation makes it easy for users to develop
customized spatial allocation strategies that avoid
overlapping the full-space rectangles. We describe the
representation; provide efficient incremental algorithms for
adding and deleting full-space rectangles, and for querying
the empty-space representation; and show several
allocation strategies that the representation makes possible.
We present two testbed applications that incorporate an
implementation of the algorithm; one shows the utility of
our representation for window management tasks; the other
applies it to the layout of components in a 3D user
interface, based on the upright 2D bounding boxes of their
projections.
KEYWORDS: Spatial data structures, user interface design,
geometric modeling, display layout, space allocation,
window management, overlap avoidance.
1. INTRODUCTION
Graphics systems commonly provide a representation of
the space occupied by the elements of a scene. These
representations are often hierarchical, and are typified by
the window trees of 2D window systems [14], and the
bounding volume hierarchies of 3D graphics packages and
renderers [4, 10]. A variety of operations, such as
rendering, clipping, and collision detection, depend on
these representations for efficiency.
There are many situations in which we would like to
allocate space for an object, while avoiding intersecting
other objects that have already been allocated. For example,
we may wish to place a window in a window system such
that it meets criteria for position, size, or aspect ratio, yet
does not overlap existing windows. When we turn to the
space representations typically used in interactive graphics,
we find that it is easy to determine whether a conflict has
occurred, either by a linear comparison with a list of
allocated objects, or by more efficient approaches provided
by a hierarchy of bounds or an interval tree [13]. However,
these representations do not make it easy to determine how
to modify a desired placement or select a new one to avoid
the conflict, or even whether it is possible to position an
object anywhere in the scene without overlap. The result is
a plethora of applications that adopt a simplistic approach
to allocating space. These are typified by window managers
that position newly created windows at arbitrary positions,
or that apply simple tiling or cascading strategies on
demand, but which do not maintain them as users move and
resize objects. Consequently, users often need to modify
object geometry by hand. This can be especially tedious
when large numbers of objects or multiple applications are
involved.
To address these problems, we have developed an efficient
approach for representing, building, and querying empty
space—the dual of the full space occupied by objects of
interest to the user.
2. APPROACH
For simplicity and efficiency, we support floating-point
axis-aligned rectangles in a rectangular workspace. The
user can incrementally add or delete full-space rectangles.
These full-space rectangles may represent the exact
dimensions of objects (e.g., the rectangular windows of a
2D GUI) or approximations (e.g., the upright extents of the
2D projections of 3D objects). At any time, the user can
query the empty-space representation, which is
automatically maintained by the system. The empty-space
representation consists of largest empty-space rectangles,
each of whose height and width is as large as it can be
without overlapping any full-space rectangle. That is, each
of the largest empty-space rectangles is bounded on the left,
right, top, and bottom by an edge of a full-space rectangle
or an edge of the workspace. For example, Figure 1 shows
the four possible largest empty-space rectangles
surrounding a single full-space rectangle. Note that the
largest empty-space rectangles do not partition the empty
space, but can overlap, as in Figure 1(b).
This representation is well suited for determining the
placement of upright rectangular objects. Any rectangle that
can be placed within the empty space will be completely
enclosed by at least one of the largest empty-space
rectangles. Finding a largest empty-space rectangle that
satisfies simple geometric constraints on position, width,
height, or aspect ratio, requires only simple comparisons
with the desired full-space rectangle to be added. For this
approach to be successful, the empty-space representation
must be computed automatically, offering interactive
performance to applications that need it.
In the remainder of this paper, we first describe previous
related work in Section 3. Next, in Section 4, we present
efficient incremental algorithms for maintaining the empty-
space representation as the user adds and deletes full-space
rectangles, and for querying the empty-space
representation. Then, we describe our implementation and
present timings for operations in Section 5. In Section 6, we
provide examples from two prototype applications that
make use of our implementation: a simple window manager
testbed and a knowledge-based 3D presentation designer.
Finally, we present our conclusions and plans for future
work in Section 7.
3. PREVIOUS WORK
A number of spatial representation schemes have been
developed that explicitly represent empty space. For
example, quadtrees and octrees [13] provide 2D and 3D
discrete approximations of full and empty space using a
hierarchy of axis-aligned cells. Corner stitching [11], the
exact space representation for axis-aligned rectangles used
in the MAGIC VLSI layout system [12], supports efficient
queries of full and empty spaces adjacent to a given full or
empty space. However, the basic structure of the corner-
stitching algorithm tiles the plane with full-space and
empty-space rectangles, without supporting overlapping
rectangles. Overlapping full-space rectangles have been
addressed in corner stitching by using multiple overlapping
layers (each individually corner-stitched), or by
decomposing overlapped rectangles into a set of non-
overlapping rectangles before adding them. All these
representations partition the empty space into non-
overlapping pieces. Thus, they do not make it easy for the
user to find empty space that can accommodate a desired
rectangle that is larger than any of these individual
partitions.
Bernard and Jacquenet [3] use the same empty-space
representation that we do, presenting an incremental
algorithm for adding full-space rectangles. However, they
do not support overlapping full-space rectangles or deletion
of full-space rectangles. Both of these capabilities are
important for general interactive applications, such as those
of Section 6.
Several tiled window managers have used empty-space
representations to allocate space when non-overlapping
windows are created, moved, or resized. Many tiled
window managers are restricted to hierarchical layouts
(e.g., [15, 8]) in which windows (i.e., full-space rectangles)
are allocated in a strict hierarchy by recursively partitioning
the workspace horizontally or vertically at each
subdivision. Thus, no full-space or empty-space rectangle
can straddle partitions. Although it is straightforward to
query the empty-space representation in a hierarchical
system, this is possible only because of the restricted
geometry that prohibits combining empty-space rectangles.
In contrast, the Siemens RTL/RTL and constraint-based
RTL/CRTL tiled window managers [5] support
nonhierarchical layouts, relying on corner stitching.
However, adjacent empty-space partitions in corner
stitching must be combined in both dimensions to
determine whether they can accommodate a window of a
specified width or height.
4. ALGORITHMS FOR DYNAMIC SPACE MANAGEMENT
Our space manager provides efficient algorithms for
incrementally adding and deleting full-space rectangles,
and for querying the empty-space representation that it
automatically maintains.
4.1 Adding a Full-Space Rectangle
Our algorithm for incrementally adding a full-space
rectangle is similar to that of [3] with an important
difference needed to support overlapping rectangles. Given
an existing list of full-space rectangles with an empty-space
representation, when a full-space rectangle F is added, the
set of largest empty-space rectangles needs to be modified.
Only those largest empty-space rectangles that intersect F
will be affected, since they are the only rectangles whose
bounds can change because of the addition.
Figure 1: (a) Adding a black full-space rectangle F to an
empty scene, represented by a light gray single largest
empty-space rectangle O, (b) creates four new light gray
largest empty-space rectangles.
F
O
(a)
(b)
Sign up today - FREE
Mendeley saves you time finding and organizing research. Learn more
- All your research in one place
- Add and import papers easily
- Access it anywhere, anytime


