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_awt_UnoControlButtonModel_idl__ 28#define __com_sun_star_awt_UnoControlButtonModel_idl__ 29 30#ifndef __com_sun_star_awt_FontDescriptor_idl__ 31#include <com/sun/star/awt/FontDescriptor.idl> 32#endif 33#ifndef __com_sun_star_awt_UnoControlModel_idl__ 34#include <com/sun/star/awt/UnoControlModel.idl> 35#endif 36#ifndef __com_sun_star_style_VerticalAlignment_idl__ 37#include <com/sun/star/style/VerticalAlignment.idl> 38#endif 39#ifndef com_sun_star_graphic_XGraphic_idl 40#include <com/sun/star/graphic/XGraphic.idl> 41#endif 42#ifndef __com_sun_star_util_Color_idl__ 43#include <com/sun/star/util/Color.idl> 44#endif 45 46 47//============================================================================= 48 49 module com { module sun { module star { module awt { 50 51//============================================================================= 52 53/** specifies the standard model of an <type>UnoControlButton</type>. 54 */ 55published service UnoControlButtonModel 56{ 57 service com::sun::star::awt::UnoControlModel; 58 59 //------------------------------------------------------------------------- 60 61 /** specifies the horizontal alignment of the text in the control. 62 63 <pre> 64 0: left 65 1: center 66 2: right 67 </pre> 68 */ 69 [optional, property] short Align; 70 71 //------------------------------------------------------------------------- 72 73 /** specifies the background color (RGB) of the control. 74 */ 75 [property] com::sun::star::util::Color BackgroundColor; 76 77 //------------------------------------------------------------------------- 78 79 /** specifies that the button is the default button on the document. 80 */ 81 [property] boolean DefaultButton; 82 83 //------------------------------------------------------------------------- 84 85 /** determines whether the control is enabled or disabled. 86 */ 87 [property] boolean Enabled; 88 89 //------------------------------------------------------------------------- 90 91 /** specifies whether the button control should grab the focus when clicked. 92 93 <p>If set to <TRUE/> (which is the default), the button control automatically grabs the 94 focus when the user clicks onto it with the mouse.<br/> 95 If set to <FALSE/>, the focus is preserved when the user operates the button control with 96 the mouse.</p> 97 98 @since OOo 2.0 99 */ 100 [optional, property] boolean FocusOnClick; 101 102 //------------------------------------------------------------------------- 103 104 /** specifies the font attributes of the text in the control. 105 */ 106 [property] com::sun::star::awt::FontDescriptor FontDescriptor; 107 108 //------------------------------------------------------------------------- 109 110 /** specifies the <type scope="com::sun::star::text">FontEmphasis</type> 111 value of the text in the control. 112 */ 113 [property] short FontEmphasisMark; 114 115 //------------------------------------------------------------------------- 116 117 /** specifies the <type scope="com::sun::star::text">FontRelief</type> 118 value of the text in the control. 119 */ 120 [property] short FontRelief; 121 122 //------------------------------------------------------------------------- 123 124 /** specifies the help text of the control. 125 */ 126 [property] string HelpText; 127 128 //------------------------------------------------------------------------- 129 130 /** specifies the help URL of the control. 131 */ 132 [property] string HelpURL; 133 134 //------------------------------------------------------------------------- 135 136 /** specifies the alignment of the image inside the button as 137 <type>ImageAlign</type> value. 138 */ 139 [property] short ImageAlign; 140 141 //------------------------------------------------------------------------- 142 143 /** specifies the position of the image, if any, relative to the text, if any 144 145 <p>Valid values of this property are specified with <type>ImagePosition</type>.</p> 146 147 <p>If this property is present, it supersedes the <member>ImageAlign</member> property - setting 148 one of both properties sets the other one to the best possible match.</p> 149 */ 150 [optional, property] short ImagePosition; 151 152 //------------------------------------------------------------------------- 153 154 /** specifies an URL to an image to use for the button. 155 @see Graphic 156 */ 157 [property] string ImageURL; 158 159 //------------------------------------------------------------------------- 160 161 /** specifies a graphic to be displayed at the button 162 163 <p>If this property is present, it interacts with the <member>ImageURL</member>in the 164 following way: 165 <ul><li>If <member>ImageURL</member> is set, <member>Graphic</member> will be reset 166 to an object as loaded from the given image URL, or <NULL/> if <member>ImageURL</member> 167 does not point to a valid image file.</li> 168 <li>If <member>Graphic</member> is set, <member>ImageURL</member> will be reset 169 to an empty string.</li> 170 </ul></p> 171 172 @since OOo 2.1 173 */ 174 [optional, property, transient] com::sun::star::graphic::XGraphic Graphic; 175 176 //------------------------------------------------------------------------- 177 178 /** specifies the label of the control. 179 */ 180 [property] string Label; 181 182 //------------------------------------------------------------------------- 183 184 /** specifies that the text may be displayed on more than one line. 185 186 @since OOo 2.0 187 */ 188 [optional, property] boolean MultiLine; 189 190 //------------------------------------------------------------------------- 191 192 /** specifies that the control will be printed with the document. 193 */ 194 [property] boolean Printable; 195 196 //------------------------------------------------------------------------- 197 198 /** specifies the default action of the button as <type>PushButtonType</type> value. 199 */ 200 [property] short PushButtonType; 201 202 //------------------------------------------------------------------------- 203 204 /** specifies whether the control should show repeating behaviour. 205 206 <p>Normally, when you click a button with the mouse, you need to 207 release the mouse button, and press it again. With this property 208 set to <TRUE/>, the button is repeatedly pressed while you hold 209 down the mouse button.</p> 210 211 @since OOo 2.0 212 */ 213 [optional, property] boolean Repeat; 214 215 //------------------------------------------------------------------------- 216 217 /** specifies the mouse repeat delay, in milliseconds. 218 219 <p>When the user presses a mouse in a control area where this triggers 220 an action (such as pressing the button), then usual control implementations 221 allow to repeatedly trigger this action, without the need to release the 222 mouse button and to press it again. The delay between two such triggers 223 is specified with this property.</p> 224 225 @since OOo 2.0 226 */ 227 [optional, property] long RepeatDelay; 228 229 //------------------------------------------------------------------------- 230 231 /** specifies the state of the control. 232 */ 233 [property] short State; 234 235 //------------------------------------------------------------------------- 236 237 /** specifies that the control can be reached with the TAB key. 238 */ 239 [property] boolean Tabstop; 240 241 //------------------------------------------------------------------------- 242 243 /** specifies the text color (RGB) of the control. 244 */ 245 [property] com::sun::star::util::Color TextColor; 246 247 //------------------------------------------------------------------------- 248 249 /** specifies the text line color (RGB) of the control. 250 */ 251 [property] com::sun::star::util::Color TextLineColor; 252 253 //------------------------------------------------------------------------- 254 255 /** specifies whether the button should toggle on a single operation. 256 257 <p>If this property is set to <TRUE/>, a single operation of the button control (pressing space 258 while it is focused, or clicking onto it) toggles it between a <em>pressed</em> and a <em>not 259 pressed</em> state.</p> 260 261 <p>The default for this property is <FALSE/>, which means the button behaves like a usual 262 push button.</p> 263 264 @since OOo 2.0 265 */ 266 [optional, property] boolean Toggle; 267 268 //------------------------------------------------------------------------- 269 270 /** specifies the vertical alignment of the text in the control. 271 272 @since OOo 2.0 273 */ 274 [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign; 275 276}; 277 278//============================================================================= 279 280}; }; }; }; 281 282#endif 283