update dev300-m58
[ooovba.git] / offapi / com / sun / star / awt / UnoControlButtonModel.idl
blobfcb85e4985ad552ff12ac6819a5bed960ff3ddad
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: UnoControlButtonModel.idl,v $
10 * $Revision: 1.15 $
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_awt_UnoControlButtonModel_idl__
31 #define __com_sun_star_awt_UnoControlButtonModel_idl__
33 #ifndef __com_sun_star_awt_FontDescriptor_idl__
34 #include <com/sun/star/awt/FontDescriptor.idl>
35 #endif
36 #ifndef __com_sun_star_awt_UnoControlModel_idl__
37 #include <com/sun/star/awt/UnoControlModel.idl>
38 #endif
39 #ifndef __com_sun_star_style_VerticalAlignment_idl__
40 #include <com/sun/star/style/VerticalAlignment.idl>
41 #endif
42 #ifndef com_sun_star_graphic_XGraphic_idl
43 #include <com/sun/star/graphic/XGraphic.idl>
44 #endif
45 #ifndef __com_sun_star_util_Color_idl__
46 #include <com/sun/star/util/Color.idl>
47 #endif
50 //=============================================================================
52 module com { module sun { module star { module awt {
54 //=============================================================================
56 /** specifies the standard model of an <type>UnoControlButton</type>.
58 published service UnoControlButtonModel
60 service com::sun::star::awt::UnoControlModel;
62 //-------------------------------------------------------------------------
64 /** specifies the horizontal alignment of the text in the control.
66 <pre>
67 0: left
68 1: center
69 2: right
70 </pre>
72 [optional, property] short Align;
74 //-------------------------------------------------------------------------
76 /** specifies the background color (RGB) of the control.
78 [property] com::sun::star::util::Color BackgroundColor;
80 //-------------------------------------------------------------------------
82 /** specifies that the button is the default button on the document.
84 [property] boolean DefaultButton;
86 //-------------------------------------------------------------------------
88 /** determines whether the control is enabled or disabled.
90 [property] boolean Enabled;
92 //-------------------------------------------------------------------------
94 /** specifies whether the button control should grab the focus when clicked.
96 <p>If set to <TRUE/> (which is the default), the button control automatically grabs the
97 focus when the user clicks onto it with the mouse.<br/>
98 If set to <FALSE/>, the focus is preserved when the user operates the button control with
99 the mouse.</p>
101 @since OOo 2.0.0
103 [optional, property] boolean FocusOnClick;
105 //-------------------------------------------------------------------------
107 /** specifies the font attributes of the text in the control.
109 [property] com::sun::star::awt::FontDescriptor FontDescriptor;
111 //-------------------------------------------------------------------------
113 /** specifies the <type scope="com::sun::star::text">FontEmphasis</type>
114 value of the text in the control.
116 [property] short FontEmphasisMark;
118 //-------------------------------------------------------------------------
120 /** specifies the <type scope="com::sun::star::text">FontRelief</type>
121 value of the text in the control.
123 [property] short FontRelief;
125 //-------------------------------------------------------------------------
127 /** specifies the help text of the control.
129 [property] string HelpText;
131 //-------------------------------------------------------------------------
133 /** specifies the help URL of the control.
135 [property] string HelpURL;
137 //-------------------------------------------------------------------------
139 /** specifies the alignment of the image inside the button as
140 <type>ImageAlign</type> value.
142 [property] short ImageAlign;
144 //-------------------------------------------------------------------------
146 /** specifies the position of the image, if any, relative to the text, if any
148 <p>Valid values of this property are specified with <type>ImagePosition</type>.</p>
150 <p>If this property is present, it supersedes the <member>ImageAlign</member> property - setting
151 one of both properties sets the other one to the best possible match.</p>
153 [optional, property] short ImagePosition;
155 //-------------------------------------------------------------------------
157 /** specifies an URL to an image to use for the button.
158 @see Graphic
160 [property] string ImageURL;
162 //-------------------------------------------------------------------------
164 /** specifies a graphic to be displayed at the button
166 <p>If this property is present, it interacts with the <member>ImageURL</member>in the
167 following way:
168 <ul><li>If <member>ImageURL</member> is set, <member>Graphic</member> will be reset
169 to an object as loaded from the given image URL, or <NULL/> if <member>ImageURL</member>
170 does not point to a valid image file.</li>
171 <li>If <member>Graphic</member> is set, <member>ImageURL</member> will be reset
172 to an empty string.</li>
173 </ul></p>
175 @since OOo 2.1
177 [optional, property, transient] com::sun::star::graphic::XGraphic Graphic;
179 //-------------------------------------------------------------------------
181 /** specifies the label of the control.
183 [property] string Label;
185 //-------------------------------------------------------------------------
187 /** specifies that the text may be displayed on more than one line.
189 @since OOo 2.0.0
191 [optional, property] boolean MultiLine;
193 //-------------------------------------------------------------------------
195 /** specifies that the control will be printed with the document.
197 [property] boolean Printable;
199 //-------------------------------------------------------------------------
201 /** specifies the default action of the button as <type>PushButtonType</type> value.
203 [property] short PushButtonType;
205 //-------------------------------------------------------------------------
207 /** specifies whether the control should show repeating behaviour.
209 <p>Normally, when you click a button with the mouse, you need to
210 release the mouse button, and press it again. With this property
211 set to <TRUE/>, the button is repeatedly pressed while you hold
212 down the mouse button.</p>
214 @since OOo 2.0.0
216 [optional, property] boolean Repeat;
218 //-------------------------------------------------------------------------
220 /** specifies the mouse repeat delay, in milliseconds.
222 <p>When the user presses a mouse in a control area where this triggers
223 an action (such as pressing the button), then usual control implementations
224 allow to repeatedly trigger this action, without the need to release the
225 mouse button and to press it again. The delay between two such triggers
226 is specified with this property.</p>
228 @since OOo 2.0.0
230 [optional, property] long RepeatDelay;
232 //-------------------------------------------------------------------------
234 /** specifies the state of the control.
236 [property] short State;
238 //-------------------------------------------------------------------------
240 /** specifies that the control can be reached with the TAB key.
242 [property] boolean Tabstop;
244 //-------------------------------------------------------------------------
246 /** specifies the text color (RGB) of the control.
248 [property] com::sun::star::util::Color TextColor;
250 //-------------------------------------------------------------------------
252 /** specifies the text line color (RGB) of the control.
254 [property] com::sun::star::util::Color TextLineColor;
256 //-------------------------------------------------------------------------
258 /** specifies whether the button should toggle on a single operation.
260 <p>If this property is set to <TRUE/>, a single operation of the button control (pressing space
261 while it is focused, or clicking onto it) toggles it between a <em>pressed</em> and a <em>not
262 pressed</em> state.</p>
264 <p>The default for this property is <FALSE/>, which means the button behaves like a usual
265 push button.</p>
267 @since OOo 2.0.0
269 [optional, property] boolean Toggle;
271 //-------------------------------------------------------------------------
273 /** specifies the vertical alignment of the text in the control.
275 @since OOo 2.0.0
277 [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
281 //=============================================================================
283 }; }; }; };
285 #endif