1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_form_component_ImageButton_idl__
24#define __com_sun_star_form_component_ImageButton_idl__
25
26#ifndef __com_sun_star_awt_UnoControlImageControlModel_idl__
27#include <com/sun/star/awt/UnoControlImageControlModel.idl>
28#endif
29
30#ifndef __com_sun_star_form_FormControlModel_idl__
31#include <com/sun/star/form/FormControlModel.idl>
32#endif
33
34#ifndef __com_sun_star_form_XApproveActionBroadcaster_idl__
35#include <com/sun/star/form/XApproveActionBroadcaster.idl>
36#endif
37
38#ifndef __com_sun_star_form_XImageProducerSupplier_idl__
39#include <com/sun/star/form/XImageProducerSupplier.idl>
40#endif
41
42#ifndef __com_sun_star_form_FormButtonType_idl__
43#include <com/sun/star/form/FormButtonType.idl>
44#endif
45
46
47//=============================================================================
48
49 module com {  module sun {  module star {  module form {  module component {
50
51//=============================================================================
52
53/** This service specifies the control model for a clickable button which
54	is represented by an image.
55
56 	<p>The image to be displayed is determined by <member scope="com::sun::star::awt">UnoControlImageControlModel::ImageURL</member>
57	property specifies the URL of an image to be displayed.</p>
58
59	@see CommandButton
60*/
61published service ImageButton
62{
63	service com::sun::star::awt::UnoControlImageControlModel;
64
65	service com::sun::star::form::FormControlModel;
66
67
68	/** supplies the caller with an <type scope="com::sun::star::awt">XImageProducer</type>.
69
70		<p>Other components can register as <type scope="com::sun::star::awt">XImageConsumer</type>
71		at this producer. Then they will be notified of any change in the image to be displayed.</p>
72
73		<p>Whenever the <member scope="com::sun::star::awt">UnoControlImageControlModel::ImageURL</member>
74		property is changed, the model loads the specified image, and sets it as image source
75		at its <type scope="com::sun::star::awt">XImageProducer</type>. Then, all
76		<type scope="com::sun::star::awt">XImageConsumer</type>s are notified and supplied with
77		the binary data of the image.<br/>
78		Usually, controls acting for an <type>ImageButton</type> model are consumers, and use the
79		data stream to display the image</p>
80	 */
81	interface com::sun::star::form::XImageProducerSupplier;
82
83	//-------------------------------------------------------------------------
84	/** describes the action to be executed by the button when pressed.
85	 */
86	[property] com::sun::star::form::FormButtonType ButtonType;
87
88	//-------------------------------------------------------------------------
89	/** describes the frame, where to open the document specified by the TargetURL.
90
91		<p>This property is evaluated if the button is of type URL.</p>
92
93		<p>As always, there is a number of target names which have a special meaning, and force
94		a special <type scope="com::sun::star::frame">Frame</type> to be used.</p>
95	 */
96	[property] string TargetFrame;
97
98	//-------------------------------------------------------------------------
99	/** specifies the URL, which should be opened if the button was clicked.
100
101		<p>This property is evaluated if the button is of type URL.</p>
102
103		@see com::sun::star::form::FormButtonType
104	 */
105	[property] string TargetURL;
106};
107
108//=============================================================================
109
110}; }; }; }; };
111
112#endif
113