Difference between revisions of "Sidebar"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Added glossary and outline of the implementation work)
(Added section about existing implementation.)
Line 64: Line 64:
 
** Display of one or more content panels inside each content group.
 
** Display of one or more content panels inside each content group.
 
** Display of scroll bars when sidebar becomes too small for displaying all active content panels.
 
** Display of scroll bars when sidebar becomes too small for displaying all active content panels.
 +
 +
 +
==Existing implementation==
 +
 +
===In main/sd/===
 +
[[Drawing Framework]] is used for the Impress taskpane, all Impress views and the slide show.  A tree of URLs (called a configuration) defines the different layers of containers (windows) and views (taskpane panels).  SD views only modify a configuration, update and synchronization of the associated view shells is left to the ConfigurationController.
 +
 +
Contextual changes of tool bars are handled in SD in a single place by the ToolBarManager.  It receives notifications about context changes by registering as listener at the EventMultiplexer.
 +
 +
Example:
 +
When an Impress shape enters text edit mode then sd::View sends an
 +
event to the EventMultiplexer.  That forwards the event to the
 +
ToolBarManager.
 +
The ToolBarManager checks its set of rules, finds the one that
 +
activates the text edit tool bar and replaces the current context bar
 +
with the text edit bar.
 +
 +
 +
===In main/svtools/ and main/sfx2/===
 +
 +
The unfinished implementation of an office wide toolpane with Symphony like functionality can be found in svtools/source/toolpanel/ and sfx2/source/dialog/taskpane/.  See [[Framework/Article/Tool Panels Internals]] for details.
 +
 +
A schematic of the UI can be found [[File:Toolpaneldeck.png|here]].
 +
 +
 +
===Existing API (main/offapi/)===
 +
 +
XUIElement and XToolPanel from com::sun::star::ui provide an API abstraction of the toolpanel.

Revision as of 16:44, 29 November 2012

The sidebar (working title) is a new feature likely to be in the 4.0 release. It combines ideas and code from both the Symphony sidebar and the OpenOffice Impress task pane.

Status

We are in the early planning stage.

Resources

Glossary

We are still working on this.

Here is a draft:

Sidebar
Name of the feature and name of the control including all its components (icon bar, content panels).
Also known as task pane(l) or tool pane(l)
Icon bar
Similar to a vertical tool bar. Clicking on icons/buttons switches between content panels.
content panel
Displayed int the main window of the sidebar. Examples are the task panels of the Impress task pane or the property views of the Symphony sidebar.

Outline of the implementation work

The UX part of the work is described on another page. The following focuses on the implementation which consists of two parts, API changes/enhancements and the actual implemenation.

The sidebar implementation has to address several individual issues:

API for implementing content panels

  • Use for both internal content panels (part of AOO SVN repository)
and external content panels (provided by extension from the extension repository).

API for internal handling of the sidebar

  • Activation of content panes
  • Detection of visible/active content panels
  • Receiver of context switch notifications
  • Factory for registering content panels and associations between contexts and content panels.

API for aiding in implementing content panels

Optional but important for sidebar adoption by developers.

  • Simple layout manager
  • Notification of important events
like switching to/from high contrast mode
  • Skeletons for content panels and factory registration

Implementation of context switch handling

  • Receiver of context switch notifications as controller that updates the set of active content panels accodring to the new context.
  • Factory and container for providers of content panels
  • Extend Writer, Calc, Impress with context switch notifications.
    • This may follow toolbar switches.
    • Maybe toolbar switching can generate the notifications?

Framework for implementing content panels

  • Base/helper classes for content panels, factories, registration, layouting.

Content panels

  • Reuse code from AOO Impress and Symphony
  • Implementation of the actual side bar
    • Icon bar as special case of tab bar.
    • Display of one or more content groups
    • Display of one or more content panels inside each content group.
    • Display of scroll bars when sidebar becomes too small for displaying all active content panels.


Existing implementation

In main/sd/

Drawing Framework is used for the Impress taskpane, all Impress views and the slide show. A tree of URLs (called a configuration) defines the different layers of containers (windows) and views (taskpane panels). SD views only modify a configuration, update and synchronization of the associated view shells is left to the ConfigurationController.

Contextual changes of tool bars are handled in SD in a single place by the ToolBarManager. It receives notifications about context changes by registering as listener at the EventMultiplexer.

Example: When an Impress shape enters text edit mode then sd::View sends an event to the EventMultiplexer. That forwards the event to the ToolBarManager. The ToolBarManager checks its set of rules, finds the one that activates the text edit tool bar and replaces the current context bar with the text edit bar.


In main/svtools/ and main/sfx2/

The unfinished implementation of an office wide toolpane with Symphony like functionality can be found in svtools/source/toolpanel/ and sfx2/source/dialog/taskpane/. See Framework/Article/Tool Panels Internals for details.

A schematic of the UI can be found here.


Existing API (main/offapi/)

XUIElement and XToolPanel from com::sun::star::ui provide an API abstraction of the toolpanel.

Personal tools