1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ 2/* 3 * This file is part of the LibreOffice project. 4 * 5 * This Source Code Form is subject to the terms of the Mozilla Public 6 * License, v. 2.0. If a copy of the MPL was not distributed with this 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 */ 9 10#ifndef __com_sun_star_frame_XInfobarProvider_idl__ 11#define __com_sun_star_frame_XInfobarProvider_idl__ 12 13#include <com/sun/star/beans/StringPair.idl> 14#include <com/sun/star/frame/InfobarType.idl> 15#include <com/sun/star/uno/XInterface.idl> 16 17module com { module sun { module star { module frame { 18 19/** Allows to add Infobars to a frame. 20 21 This interface can be obtained via com::sun::star::frame::XController. 22 23 @since LibreOffice 6.4 24 */ 25interface XInfobarProvider: uno::XInterface 26{ 27 /** Creates and displays a new Infobar. 28 29 @param id 30 The ID by which this Infobar is recognized. 31 You can remove the Infobar afterwards using this ID. 32 33 @param primaryMessage 34 The (short) primary message. 35 Will appear at the start of the infobar in bold letters. 36 May be empty. 37 38 @param secondaryMessage 39 The (longer) secondary message. 40 Will appear in normal letters after the primaryMessage 41 42 @param infobarType 43 The type of the Infobar. 44 See com::sun::star::frame::InfobarType for possible values. 45 46 @param actionButtons 47 A sequence of action buttons. 48 The buttons will be added from Right to Left at the right side of the info bar. 49 Each button is represented by a com::sun::star::beans::StringPair. 50 StringPair::First represents the button label, while 51 StringPair::Second represents the button URL which will be called on button click. 52 The URL can be any URL, either external (http://libreoffice.org), or internal (.uno:Save), 53 or from your extension (service:your.example.Extension?anyAction). 54 55 @param showCloseButton 56 Whether the Close (x) button is shown at the end of the Infobar. 57 Set to false, when you don't want the user to close the Infobar. 58 59 @throws com::sun::star::lang::IllegalArgumentException 60 If an Infobar with the same ID already exists, or infobarType contains an invalid value. 61 */ 62 void appendInfobar( 63 [in] string id, 64 [in] string primaryMessage, 65 [in] string secondaryMessage, 66 [in] long infobarType, 67 [in] sequence<com::sun::star::beans::StringPair> actionButtons, 68 [in] boolean showCloseButton) 69 raises(com::sun::star::lang::IllegalArgumentException); 70 71 /** Updates an existing Infobar. 72 Use if you want to update only small parts of the Infobar. 73 74 @see appendInfobar for parameter documentation. 75 76 @throws com::sun::star::container::NoSuchElementException 77 If no such Infobar exists (it might have been closed by the user already) 78 @throws com::sun::star::lang::IllegalArgumentException 79 If infobarType contains an invalid value. 80 */ 81 void updateInfobar( 82 [in] string id, 83 [in] string primaryMessage, 84 [in] string secondaryMessage, 85 [in] long infobarType) 86 raises(com::sun::star::container::NoSuchElementException); 87 88 /** Removes an existing Infobar. 89 90 @param id 91 The ID which was used when creating this Infobar. 92 93 @throws com::sun::star::container::NoSuchElementException 94 If no such Infobar exists (it might have been closed by the user already) 95 */ 96 void removeInfobar([in] string id) raises(com::sun::star::container::NoSuchElementException); 97}; 98 99 100}; }; }; }; 101 102#endif 103 104/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */