Framework/Article/Tool Panels Internals

From Apache OpenOffice Wiki
< Framework
Revision as of 01:43, 23 May 2012 by Ldb (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

As an user, when you want to contribute a tool panel UI element, you can refer here. If you are a developer, want to know more technical details, this article maybe can help you. The article will focus on the implement of Tool Panel in Tool Panels Internals

Illustration which and how the Toolpanel related objects interact.

Below graphic uses an example extension to show the relationship of Toolpanel related classes.

object relationship for Toolpanel related classes

TaskPaneDockingWindow class implements the docking window which contains the ModuleToolpanel.

ModuleToolpanel class implements a child window of Docking Window which contains the ToolPanelDeck. A ToolPanelDeck is a container for toolpanels. Detail description also can be found here.

A Toolpanel is a window with any combination of controls. A ToolPanel can be contributed by an extension. Detail description can be found here.

The CustomToolPanel wrappered a ToolPanel in it. When CustomToolPanel initialized, it will create a XUIElementFactory.

And use XUIElementFactory->createUIElements to create corresponding ToolPanel according to the resource URL. In ToolPanel implement class, the PaneUI in the example, it needs to implements the XtoolPanel interface and create the child UI controls based on the parentWindow parameters.

Tool Panel source code location

The mainly source code implement for tool panel located at svtools\inc\svtools\toolpanel, svtools\source\toolpanel and sfx2\source\dialog\taskpane*

Tool Panels classes diagrams

Here are some important classes diagrams for tool panels implement.

ToolPanel ToolPanelDeck


Personal tools