LibreOffice: XInfobarProvider Interface Reference

LibreOffice LibreOffice 7.1 SDK API Reference

Public Member Functions | List of all members
XInfobarProvider Interface Reference

Allows to add Infobars to a frame. More...

`import"XInfobarProvider.idl";`

Inheritance diagram for XInfobarProvider:

## Public Member Functions
void | appendInfobar ([in] string id, [in] string primaryMessage, [in] string secondaryMessage, [in] long infobarType, [in] sequence< com::sun::star::beans::StringPair > actionButtons, [in] boolean showCloseButton) raises (com::sun::star::lang::IllegalArgumentException)
| Creates and displays a new Infobar. More...
void | updateInfobar ([in] string id, [in] string primaryMessage, [in] string secondaryMessage, [in] long infobarType) raises (com::sun::star::container::NoSuchElementException)
| Updates an existing Infobar. More...
void | removeInfobar ([in] string id) raises (com::sun::star::container::NoSuchElementException)
| Removes an existing Infobar. More...
boolean | hasInfobar ([in] string id)
| Check if Infobar exists. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

Allows to add Infobars to a frame.

This interface can be obtained via com::sun::star::frame::XController.

Since
  LibreOffice 6.4

## Member Function Documentation

## ◆ appendInfobar()

void appendInfobar | ( | [in] string | id,
|  | [in] string | primaryMessage,
|  | [in] string | secondaryMessage,
|  | [in] long | infobarType,
|  | [in] sequence< com::sun::star::beans::StringPair > | actionButtons,
|  | [in] boolean | showCloseButton
| ) |  |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

Creates and displays a new Infobar.

Parameters

  id | The ID by which this Infobar is recognized. You can remove the Infobar afterwards using this ID.
  primaryMessage | The (short) primary message. Will appear at the start of the infobar in bold letters. May be empty.
  secondaryMessage | The (longer) secondary message. Will appear in normal letters after the primaryMessage
  infobarType | The type of the Infobar. See com::sun::star::frame::InfobarType for possible values.
  actionButtons | A sequence of action buttons. The buttons will be added from Right to Left at the right side of the info bar. Each button is represented by a com::sun::star::beans::StringPair. StringPair::First represents the button label, while StringPair::Second represents the button URL which will be called on button click. The URL can be any URL, either external (http://libreoffice.org), or internal (.uno:Save), or from your extension (service:your.example.Extension?anyAction).
  showCloseButton | Whether the Close (x) button is shown at the end of the Infobar. Set to false, when you don't want the user to close the Infobar.

Exceptions

  com::sun::star::lang::IllegalArgumentException | If an Infobar with the same ID already exists, or infobarType contains an invalid value.

## ◆ hasInfobar()

boolean hasInfobar | ( | [in] string | id | ) |

Check if Infobar exists.

Parameters

  id | The ID which was used when creating this Infobar.

Since
  LibreOffice 7.0

## ◆ removeInfobar()

void removeInfobar | ( | [in] string | id | ) |
raises | ( | com::sun::star::container::NoSuchElementException
| ) |  |

Removes an existing Infobar.

Parameters

  id | The ID which was used when creating this Infobar.

Exceptions

  com::sun::star::container::NoSuchElementException | If no such Infobar exists (it might have been closed by the user already)

## ◆ updateInfobar()

void updateInfobar | ( | [in] string | id,
|  | [in] string | primaryMessage,
|  | [in] string | secondaryMessage,
|  | [in] long | infobarType
| ) |  |
raises | ( | com::sun::star::container::NoSuchElementException
| ) |  |

Updates an existing Infobar.

Use if you want to update only small parts of the Infobar.

See also
  appendInfobar for parameter documentation.

Exceptions

  com::sun::star::container::NoSuchElementException | If no such Infobar exists (it might have been closed by the user already)
  com::sun::star::lang::IllegalArgumentException | If infobarType contains an invalid value.

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

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