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_CommandButton_idl__ 28#define __com_sun_star_form_component_CommandButton_idl__ 29 30#include <com/sun/star/form/FormControlModel.idl> 31#include <com/sun/star/awt/UnoControlButtonModel.idl> 32#include <com/sun/star/form/XImageProducerSupplier.idl> 33#include <com/sun/star/form/XApproveActionBroadcaster.idl> 34#include <com/sun/star/form/FormButtonType.idl> 35#include <com/sun/star/form/XReset.idl> 36 37 38//============================================================================= 39 40 module com { module sun { module star { module form { module component { 41 42//============================================================================= 43 44/** specifies the control model for a clickable button which is part of a form 45 component hierarchy. 46 47 @see ImageButton 48 */ 49published service CommandButton 50{ 51 service com::sun::star::awt::UnoControlButtonModel; 52 53 service com::sun::star::form::FormControlModel; 54 55 /** supplies the image producer when the button is to display an image. 56 57 <p>If the <member scope="com::sun::star::awt">UnoControlButtonModel::ImageURL</member> points to the location of an 58 image to be displayed on the button, this interface can be used to retrieve an image 59 producer, which itself will supply the image.</p> 60 61 <p>Usually, a control belonging to the model will use this interface to obtain the 62 image to be painted</p> 63 */ 64 interface com::sun::star::form::XImageProducerSupplier; 65 66 //------------------------------------------------------------------------- 67 68 /** describes the action to be executed by the button when pressed. 69 */ 70 [property] com::sun::star::form::FormButtonType ButtonType; 71 72 /** describes the frame, where to open the document specified by the TargetURL. 73 74 <p>This property is evaluated if the button is of type URL.</p> 75 76 <p>As always, there is a number of target names which have a special meaning, and force 77 a special <type scope="com::sun::star::frame">Frame</type> to be used.</p> 78 */ 79 [property] string TargetFrame; 80 81 /** specifies the URL, which should be opened if the button was clicked. 82 83 <p>This property is evaluated if the button is of type URL.</p> 84 85 @see com::sun::star::form::FormButtonType 86 */ 87 [property] string TargetURL; 88 89 /** specifies the default toggle state for the button, used when it is reset. 90 91 <p>This property is meaningful only when <member scope="com::sun::star::awt">UnoControlButtonModel::Toggle</member> 92 is <TRUE/>. In this case, the <code>DefaultState</code> controls to which <code>State</code> the button will 93 be reset.</p> 94 95 <p>For a given implementation of the interface, if this (optional) property is present, then also the optional 96 interface <type scope="com::sun::star::form">XReset</type> must be present.</p> 97 */ 98 [optional, property] boolean DefaultState; 99 100 /** allows resetting the button 101 102 <p>This property is meaningful only when <member scope="com::sun::star::awt">UnoControlButtonModel::Toggle</member> 103 is <TRUE/>. In this case, the <code>DefaultState</code> controls to which <code>State</code> the button will 104 be reset, when <member scope="com::sun::star::form">XReset::reset</member> is invoked.</p> 105 106 <p>For a given implementation of the interface, if this (optional) interface is present, then also the optional 107 property <member>DefaultState</member> must be present.</p> 108 */ 109 [optional] interface ::com::sun::star::form::XReset; 110}; 111 112//============================================================================= 113 114}; }; }; }; }; 115 116#endif 117