31.05.2013 Views

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 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5 Implementation<br />

IMPLEMENTATION<br />

The prototype that was developed in the course of this work is <strong>based</strong> on a product<br />

by <strong>think</strong>-<strong>cell</strong> Software. The <strong>think</strong>-<strong>cell</strong> product is an add-in to Microsoft PowerPoint<br />

that uses a variety of techniques to interact with PowerPoint (Fig. 36). The Micro-<br />

soft Office Object Model and the Active Document Interface, which are designed<br />

for add-ins like the <strong>think</strong>-<strong>cell</strong> product, allow only limited access to the PowerPoint<br />

engine. Therefore, in the <strong>think</strong>-<strong>cell</strong> implementation, these techniques are supple-<br />

mented by Window Subclassing for message interception. Moreover, <strong>think</strong>-<strong>cell</strong> uses<br />

DirectX to create custom on-screen UI widgets.<br />

My implementation does not make immediate use of any of the techniques men-<br />

tioned. The classes that I implemented merely interact with the high-level C++<br />

programming interface of the <strong>think</strong>-<strong>cell</strong> product and are compiled as part of that<br />

product.<br />

User Interface<br />

<strong>think</strong>-<strong>cell</strong> Add-In<br />

PowerPoint<br />

Excel<br />

Win 32 API<br />

DirectX<br />

Object Model Active Document Interface Active Document Interface Office Object Model SubclassingOffice Window<br />

Figure 36: The <strong>think</strong>-<strong>cell</strong> architecture uses a variety of techniques to interact with<br />

PowerPoint.<br />

5.1 Program Architecture<br />

To get an understanding of the program architecture in general and the user inter-<br />

face code in particular, in this section a number of structural diagrams are discussed<br />

in turn. I begin with an overview of the major entities and relations, followed by<br />

a close-up look at a hierarchy of UI-related subclasses and finally I examine some<br />

interaction scenarios involving a couple of classes.<br />

5.1.1 Overview: Entity-Relation<br />

Figure 37 provides an overview of the most important inter-class relationships of the<br />

C++ code. The CPPTFrame class relates to a runtime instance of PowerPoint. It<br />

contains presentations and document windows. PowerPoint is an MDI 11 application<br />

and each instance of CPPTDocWnd relates to a runtime document window. Both<br />

classes intercept Windows messages, most prominently repaint requests and user<br />

input like mouse movements and key presses. They process and forward those<br />

messages at application or window level, respectively.<br />

11 Multiple Document Interface (MDI): A single running application instance can open and edit<br />

multiple independent documents at a time.<br />

69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!