Check out the new USENIX Web site. next up previous
Next: Integrated Configuration Up: Application Integration Technologies Previous: Desktop Communication Protocol (DCOP)


XMLGUI

The integration of separate applications into a common main window requires merging of menus and toolbars. KDE provides an abstract way to define menu and toolbar actions using XML descriptions of where the actions are placed. These descriptions are loaded and processed at run-time. This allows to change menus and toolbars to be changed without changing code. It also provides a way to manipulate menus and toolbars programatically from outside the code implementing the actions.

This flexibility is a key requirement for embedding actions from different applications in a single framework. It allows to menus to change dynamically and toolbars to reflect the functionality provided by the currently selected component. In addition to that it allows components to inject additional actions which can optionally be available independently of the selected component and it makes it possible for the framework to remove actions which would be redundant inside the integrated application. Examples are configuration options, "new" actions and "about" dialogs, which are all provided by global actions of the container.

The menu and toolbar parts of KParts (see section 4.1) are based on XMLGUI. Figure 3 shows an example of an XML user interface action description.

Figure 3: Example XML description of user interface actions
\begin{figure}\footnotesize
\begin{verbatim}<!DOCTYPE kpartgui >
<kpartgui ver...
...on name=''help_whats_this''/>
</ToolBar>
</kpartgui>\end{verbatim}
\end{figure}

One advantage of the XMLGUI mechanism is that it makes it possible to provide a general configuration mechanism for the actions to the user. There is a standard configuration dialog which enables the user to persistently change which actions are shown as toolbar buttons.

Another advantage is that a it is possible to change menus and toolbars of an application by just changing or providing more specific action descriptions. This can be used by system administrators to lock down applications and make parts of the functionality unavailable to users. This is used by the KIOSK mode described in section 4.4.3.


next up previous
Next: Integrated Configuration Up: Application Integration Technologies Previous: Desktop Communication Protocol (DCOP)
Cornelius Schumacher 2004-04-06