Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / frame / XToolbarController.idl
blobc8f7578ab59ab876f292794c26221f727207aa67
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_frame_XToolbarController_idl__
20 #define __com_sun_star_frame_XToolbarController_idl__
22 #include <com/sun/star/awt/XWindow.idl>
23 #include <com/sun/star/awt/KeyModifier.idl>
26 module com { module sun { module star { module frame {
28 /** is an abstract service for a component which offers a more complex user interface
29 to users within a toolbar.
31 <p>
32 A generic toolbar function is represented as a button which has a state
33 (enabled,disabled and selected, not selected). A toolbar controller can be added to a
34 toolbar and provide information or functions with a more sophisticated user interface.<br/>
35 A typical example for toolbar controller is a font chooser on a toolbar. It provides
36 all available fonts in a dropdown box and shows the current chosen font.
37 <p>
39 @see com::sun::star::frame::XDispatchProvider
41 @since OOo 2.0
43 interface XToolbarController : com::sun::star::uno::XInterface
45 /** provides a function to execute the command which is bound to the toolbar controller.
47 @param KeyModifier
48 a combination of com::sun::star::awt::KeyModifier value that represent
49 the current state of the modifier keys.
51 <p>
52 This function is usually called by a toolbar implementation when a user clicked on a toolbar button
53 or pressed enter on the keyboard when the item has the input focus.
54 </p>
56 void execute( [in] short KeyModifier );
58 /** notifies a component that a single click has been made on the toolbar item.
60 void click();
62 /** notifies a component that a double click has been made on the toolbar item.
64 void doubleClick();
66 /** requests to create a pop-up window for additional functions.
68 @return
69 a com::sun::star::awt::XWindow which provides additional functions
70 to the user. The reference must be empty if component does not want to provide a separate
71 window.
73 com::sun::star::awt::XWindow createPopupWindow();
75 /** requests to create an item window which can be added to the toolbar.
77 @param Parent
78 a com::sun::star::awt::XWindow which must be used as a parent
79 for the requested item window.
81 @return
82 a com::sun::star::awt::XWindow which can be added to a toolbar.
83 The reference must be empty if a component does not want to provide an item window.
85 com::sun::star::awt::XWindow createItemWindow( [in] com::sun::star::awt::XWindow Parent );
88 }; }; }; };
90 #endif
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */