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