LibreOffice: ToolbarController Service Reference

LibreOffice LibreOffice 7.4 SDK API Reference

Loading...
Searching...
No Matches
Exported Interfaces | List of all members
ToolbarController Service Reference

is an abstract service for a component which offers a more complex user interface to users within a toolbar. More...

Inheritance diagram for ToolbarController:

## Exported Interfaces
interface | com::sun::star::frame::XStatusListener
| with this interface a component can receive events if a feature has changed.
interface | com::sun::star::lang::XInitialization
| used to initialize a component with required arguments.
interface | com::sun::star::util::XUpdatable
| used to notify an implementation that it needs to add its listener or remove and add them again.
interface | com::sun::star::frame::XToolbarController
| used to notify changed features and requests for additional user interface items.
interface | ::com::sun::star::frame::XSubToolbarController
| used to notify and retrieve information that are specific for sub-toolbar controllers.

## Additional Inherited Members
Public Member Functions inherited from XStatusListener
void | statusChanged ([in] FeatureStateEvent State)
| is called when the status of the feature changes.
Public Member Functions inherited from XEventListener
void | disposing ([in] com::sun::star::lang::EventObject Source)
| gets called when the broadcaster is about to be disposed.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.
Public Member Functions inherited from XInitialization
void | initialize ([in] sequence< any > aArguments) raises ( com::sun::star::uno::Exception )
| initializes the object.
Public Member Functions inherited from XUpdatable
void | update ()
| refreshes the data of the object from the connected data source.
Public Member Functions inherited from XToolbarController
void | execute ([in] short KeyModifier)
| provides a function to execute the command which is bound to the toolbar controller.
void | click ()
| notifies a component that a single click has been made on the toolbar item.
void | doubleClick ()
| notifies a component that a double click has been made on the toolbar item.
com::sun::star::awt::XWindow | createPopupWindow ()
| requests to create a pop-up window for additional functions.
com::sun::star::awt::XWindow | createItemWindow ([in] com::sun::star::awt::XWindow Parent)
| requests to create an item window which can be added to the toolbar.
Protected Member Functions inherited from XSubToolbarController
boolean | opensSubToolbar ()
| if the controller features a sub-toolbar.
string | getSubToolbarName ()
| provides the resource URL of the sub-toolbar this controller opens.
void | functionSelected ([in] string aCommand)
| gets called to notify a controller that a sub-toolbar function has been selected.
void | updateImage ()
| gets called to notify a controller that it should set an image which represents the current selected function.

## Detailed Description

is an abstract service for a component which offers a more complex user interface to users within a toolbar.

A generic toolbar function is represented as a button which has a state (enabled,disabled and selected, not selected). A toolbar controller can be added to a toolbar and provide information or functions within a more sophisticated user interface.
A typical example for toolbar controller is the font chooser within the toolbar. It provides all available fonts in a dropdown box and shows the current chosen font.

See also
  com::sun::star::frame::XDispatchProvider

Since
  OOo 2.0

## Exported Interfaces

## ◆ ::com::sun::star::frame::XSubToolbarController

interface ::com::sun::star::frame::XSubToolbarController
| optional

used to notify and retrieve information that are specific for sub-toolbar controllers.

Used by implementations that want to provide the toolbar button/sub- toolbar function feature. A controller supporting this interface exchanges the function of its own toolbar button, that opened the sub-toolbar, with the one that has been selected on the sub-toolbar.

## ◆ com::sun::star::frame::XStatusListener

interface com::sun::star::frame::XStatusListener

with this interface a component can receive events if a feature has changed.

The toolbar controller implementation should register itself as a listener when its com::sun::star::util::XUpdatable interface has been called.

## ◆ com::sun::star::frame::XToolbarController

interface com::sun::star::frame::XToolbarController

used to notify changed features and requests for additional user interface items.

Mostly used by a toolbar implementation to forward information to and request services from a toolbar controller component. This interface must be usable after com::sun::star::lang::XInitialization::initialize() has been called. The behavior of the interface is undefined if the controller component hasn't been initialized.

## ◆ com::sun::star::lang::XInitialization

interface com::sun::star::lang::XInitialization

used to initialize a component with required arguments.

A toolbar controller needs at least three additional arguments provided as com::sun::star::beans::PropertyValue:

- Frame
  a com::sun::star::frame::XFrame instance to which the toolbar controller belongs.
- CommandURL
  a string which specifies the command a toolbar controller is bound.
- ServiceManager
  a com::sun::star::lang::XMultiServiceFactory instance which can be used to create additional UNO services.

## ◆ com::sun::star::util::XUpdatable

interface com::sun::star::util::XUpdatable

used to notify an implementation that it needs to add its listener or remove and add them again.

A toolbar controller instance is ready for use after this call has been made the first time. The toolbar implementation guarantees that the controller's item window has been added to the toolbar and its reference is held by it.

The documentation for this service was generated from the following file:

- com/sun/star/frame/ToolbarController.idl