xref: /trunk/main/offapi/com/sun/star/form/component/ImageButton.idl (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_form_component_ImageButton_idl__
28#define __com_sun_star_form_component_ImageButton_idl__
29
30#ifndef __com_sun_star_awt_UnoControlImageControlModel_idl__
31#include <com/sun/star/awt/UnoControlImageControlModel.idl>
32#endif
33
34#ifndef __com_sun_star_form_FormControlModel_idl__
35#include <com/sun/star/form/FormControlModel.idl>
36#endif
37
38#ifndef __com_sun_star_form_XApproveActionBroadcaster_idl__
39#include <com/sun/star/form/XApproveActionBroadcaster.idl>
40#endif
41
42#ifndef __com_sun_star_form_XImageProducerSupplier_idl__
43#include <com/sun/star/form/XImageProducerSupplier.idl>
44#endif
45
46#ifndef __com_sun_star_form_FormButtonType_idl__
47#include <com/sun/star/form/FormButtonType.idl>
48#endif
49
50
51//=============================================================================
52
53 module com {  module sun {  module star {  module form {  module component {
54
55//=============================================================================
56
57/** This service specifies the control model for a clickable button which
58    is represented by an image.
59
60    <p>The image to be displayed is determined by <member scope="com::sun::star::awt">UnoControlImageControlModel::ImageURL</member>
61    property specifies the URL of an image to be displayed.</p>
62
63    @see CommandButton
64*/
65published service ImageButton
66{
67    service com::sun::star::awt::UnoControlImageControlModel;
68
69    service com::sun::star::form::FormControlModel;
70
71
72    /** supplies the caller with an <type scope="com::sun::star::awt">XImageProducer</type>.
73
74        <p>Other components can register as <type scope="com::sun::star::awt">XImageConsumer</type>
75        at this producer. Then they will be notified of any change in the image to be displayed.</p>
76
77        <p>Whenever the <member scope="com::sun::star::awt">UnoControlImageControlModel::ImageURL</member>
78        property is changed, the model loads the specified image, and sets it as image source
79        at its <type scope="com::sun::star::awt">XImageProducer</type>. Then, all
80        <type scope="com::sun::star::awt">XImageConsumer</type>s are notified and supplied with
81        the binary data of the image.<br/>
82        Usually, controls acting for an <type>ImageButton</type> model are consumers, and use the
83        data stream to display the image</p>
84     */
85    interface com::sun::star::form::XImageProducerSupplier;
86
87    //-------------------------------------------------------------------------
88    /** describes the action to be executed by the button when pressed.
89     */
90    [property] com::sun::star::form::FormButtonType ButtonType;
91
92    //-------------------------------------------------------------------------
93    /** describes the frame, where to open the document specified by the TargetURL.
94
95        <p>This property is evaluated if the button is of type URL.</p>
96
97        <p>As always, there is a number of target names which have a special meaning, and force
98        a special <type scope="com::sun::star::frame">Frame</type> to be used.</p>
99     */
100    [property] string TargetFrame;
101
102    //-------------------------------------------------------------------------
103    /** specifies the URL, which should be opened if the button was clicked.
104
105        <p>This property is evaluated if the button is of type URL.</p>
106
107        @see com::sun::star::form::FormButtonType
108     */
109    [property] string TargetURL;
110};
111
112//=============================================================================
113
114}; }; }; }; };
115
116#endif
117