think-cell technical report TC2003/01 A GUI-based Interaction ...
think-cell technical report TC2003/01 A GUI-based Interaction ...
think-cell technical report TC2003/01 A GUI-based Interaction ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
5.1 Program Architecture IMPLEMENTATION<br />
The interface to PowerPoint is complemented by the CPPTShape class. There<br />
is an instance of this class for each shape – rectangle, arrow, text box and the like –<br />
in a PowerPoint document. The methods of this class provide ways to add, modify<br />
and displace PowerPoint shapes.<br />
While each document window contains precisely one presentation, the same<br />
presentation may be opened in multiple document windows simultaneously. Hence,<br />
presentations are represented independently from document windows by the class<br />
CPresentation. Presentation objects contain static or user specified information<br />
about a PowerPoint document. Each presentation consists of a number of slides,<br />
which in our data model are represented by instances of CSmartGrid. The smart<br />
grid is the link between a presentation and its smart elements. Because a document<br />
window can edit one slide at a time, each instance of CPPTDocWnd needs only<br />
a single reference to the smart grid that is currently visible.<br />
A priori, each slide has a smart grid and a container, which is an instance<br />
of CContainerSE. The container spans the entire slide and holds gridlines to<br />
represent the positions and spatial relations of its contained smart elements. The<br />
container itself is invisible to the user and indifferent against user action.<br />
Gridlines, being represented by CGridLine objects, are partitioned by their<br />
orientation – vertical and horizontal – and held by one of two CGridLineGroup<br />
objects per container. Each group of gridlines always contains at least two gridlines,<br />
which indicate the lower and upper bounds of their container in the respective<br />
dimension.<br />
Smart elements – i. e., instances of CSmartElement – are placed relative to a<br />
slide’s container, their location being determined by the gridlines they are bound to.<br />
Each smart element represents a self-contained composition of arbitrary complexity<br />
that is placed and sized in its entirety. Each smart element is made up of one<br />
or more features, which in the case of a chart correspond to columns and labels<br />
and are represented by the class CFeature. Features usually have user specified<br />
options, but cannot be moved or resized independently from their smart element.<br />
A feature, in turn, usually consists of one or more PowerPoint shapes. However,<br />
certain features serve only mediating purposes in the user interface and do not have<br />
a corresponding PowerPoint shape.<br />
In fact, the objects which I call features are essential for the user interface. On<br />
request, a feature generates a number of instances of CUIObject – handles or<br />
menu items, for example – that provide means for the user to modify the feature<br />
(cf. Sect. 5.1.3). All UI objects of all currently visible features are registered with<br />
the document window and receive messages therefrom. The visual representation<br />
of a UI object involves mapping texture coordinates to screen coordinates and is<br />
implemented in the class CVisualElement.<br />
This same pattern applies to the user interface representation for gridlines. To be<br />
visible and user-modifiable, CGridLine objects generate instances of CUIGridLine<br />
and CGridLineHotDragHandle. Indeed, these latter classes are subclasses of<br />
CUIObject (cf. Fig. 38(a)) and as such also own visual elements and are message-<br />
71