1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: CommandButton.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_form_component_CommandButton_idl__
31 #define __com_sun_star_form_component_CommandButton_idl__
33 #include
<com
/sun
/star
/form
/FormControlModel.idl
>
34 #include
<com
/sun
/star
/awt
/UnoControlButtonModel.idl
>
35 #include
<com
/sun
/star
/form
/XImageProducerSupplier.idl
>
36 #include
<com
/sun
/star
/form
/XApproveActionBroadcaster.idl
>
37 #include
<com
/sun
/star
/form
/FormButtonType.idl
>
38 #include
<com
/sun
/star
/form
/XReset.idl
>
41 //=============================================================================
43 module com
{ module sun
{ module star
{ module form
{ module component
{
45 //=============================================================================
47 /** specifies the control model for a clickable button which is part of a form
52 published service CommandButton
54 service com
::sun
::star
::awt
::UnoControlButtonModel
;
56 service com
::sun
::star
::form
::FormControlModel
;
58 /** supplies the image producer when the button is to display an image.
60 <p>If the <member scope="com::sun::star::awt">UnoControlButtonModel::ImageURL</member> points to the location of an
61 image to be displayed on the button, this interface can be used to retrieve an image
62 producer, which itself will supply the image.</p>
64 <p>Usually, a control belonging to the model will use this interface to obtain the
65 image to be painted</p>
67 interface com
::sun
::star
::form
::XImageProducerSupplier
;
69 //-------------------------------------------------------------------------
71 /** describes the action to be executed by the button when pressed.
73 [property
] com
::sun
::star
::form
::FormButtonType ButtonType
;
75 /** describes the frame, where to open the document specified by the TargetURL.
77 <p>This property is evaluated if the button is of type URL.</p>
79 <p>As always, there is a number of target names which have a special meaning, and force
80 a special <type scope="com::sun::star::frame">Frame</type> to be used.</p>
82 [property
] string TargetFrame
;
84 /** specifies the URL, which should be opened if the button was clicked.
86 <p>This property is evaluated if the button is of type URL.</p>
88 @see com::sun::star::form::FormButtonType
90 [property
] string TargetURL
;
92 /** specifies the default toggle state for the button, used when it is reset.
94 <p>This property is meaningful only when <member scope="com::sun::star::awt">UnoControlButtonModel::Toggle</member>
95 is <TRUE/>. In this case, the <code>DefaultState</code> controls to which <code>State</code> the button will
98 <p>For a given implementation of the interface, if this (optional) property is present, then also the optional
99 interface <type scope="com::sun::star::form">XReset</type> must be present.</p>
101 [optional, property
] boolean DefaultState
;
103 /** allows resetting the button
105 <p>This property is meaningful only when <member scope="com::sun::star::awt">UnoControlButtonModel::Toggle</member>
106 is <TRUE/>. In this case, the <code>DefaultState</code> controls to which <code>State</code> the button will
107 be reset, when <member scope="com::sun::star::form">XReset::reset</member> is invoked.</p>
109 <p>For a given implementation of the interface, if this (optional) interface is present, then also the optional
110 property <member>DefaultState</member> must be present.</p>
112 [optional] interface ::com
::sun
::star
::form
::XReset
;
115 //=============================================================================