1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_form_component_CommandButton_idl__
20 #define __com_sun_star_form_component_CommandButton_idl__
22 #include
<com
/sun
/star
/form
/FormControlModel.idl
>
23 #include
<com
/sun
/star
/awt
/UnoControlButtonModel.idl
>
24 #include
<com
/sun
/star
/form
/XImageProducerSupplier.idl
>
25 #include
<com
/sun
/star
/form
/XApproveActionBroadcaster.idl
>
26 #include
<com
/sun
/star
/form
/FormButtonType.idl
>
27 #include
<com
/sun
/star
/form
/XReset.idl
>
31 module com
{ module sun
{ module star
{ module form
{ module component
{
34 /** specifies the control model for a clickable button which is part of a form
39 published service CommandButton
41 service com
::sun
::star
::awt
::UnoControlButtonModel
;
43 service com
::sun
::star
::form
::FormControlModel
;
45 /** supplies the image producer when the button is to display an image.
47 <p>If the com::sun::star::awt::UnoControlButtonModel::ImageURL points to the location of an
48 image to be displayed on the button, this interface can be used to retrieve an image
49 producer, which itself will supply the image.</p>
51 <p>Usually, a control belonging to the model will use this interface to obtain the
52 image to be painted</p>
54 interface com
::sun
::star
::form
::XImageProducerSupplier
;
57 /** describes the action to be executed by the button when pressed.
59 [property
] com
::sun
::star
::form
::FormButtonType ButtonType
;
61 /** describes the frame, where to open the document specified by the TargetURL.
63 <p>This property is evaluated if the button is of type URL.</p>
65 <p>As always, there is a number of target names which have a special meaning, and force
66 a special com::sun::star::frame::Frame to be used.</p>
68 [property
] string TargetFrame
;
70 /** specifies the URL, which should be opened if the button was clicked.
72 <p>This property is evaluated if the button is of type URL.</p>
74 @see com::sun::star::form::FormButtonType
76 [property
] string TargetURL
;
78 /** specifies the default toggle state for the button, used when it is reset.
80 <p>This property is meaningful only when com::sun::star::awt::UnoControlButtonModel::Toggle
81 is `TRUE`. In this case, the <code>DefaultState</code> controls to which <code>State</code> the button will
84 <p>For a given implementation of the interface, if this (optional) property is present, then also the optional
85 interface com::sun::star::form::XReset must be present.</p>
87 [optional, property
] boolean DefaultState
;
89 /** allows resetting the button
91 <p>This property is meaningful only when com::sun::star::awt::UnoControlButtonModel::Toggle
92 is `TRUE`. In this case, the <code>DefaultState</code> controls to which <code>State</code> the button will
93 be reset, when com::sun::star::form::XReset::reset() is invoked.</p>
95 <p>For a given implementation of the interface, if this (optional) interface is present, then also the optional
96 property #DefaultState must be present.</p>
98 [optional] interface ::com
::sun
::star
::form
::XReset
;
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */