1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/*** if arkts 1.2 */ 22import { PointLightStyle, Optional, CommonMethod } from './common'; 23import { VerticalAlign, FlexAlign } from './enums'; 24import { SpaceType } from './column'; 25/*** endif */ 26 27 28/** 29 * Define options used to construct a row. 30 * 31 * @interface RowOptions 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @crossplatform 34 * @form 35 * @atomicservice 36 * @since arkts {'1.1':'18','1.2':'20'} 37 * @arkts 1.1&1.2 38 */ 39declare interface RowOptions { 40 /** 41 * Row spacing. 42 * 43 * @type { ?(string | number) } 44 * @syscap SystemCapability.ArkUI.ArkUI.Full 45 * @since 7 46 */ 47 /** 48 * Row spacing. 49 * 50 * @type { ?(string | number) } 51 * @syscap SystemCapability.ArkUI.ArkUI.Full 52 * @form 53 * @since 9 54 */ 55 /** 56 * Row spacing. 57 * 58 * @type { ?(string | number) } 59 * @syscap SystemCapability.ArkUI.ArkUI.Full 60 * @crossplatform 61 * @form 62 * @since 10 63 */ 64 /** 65 * Row spacing. 66 * 67 * @type { ?(string | number) } 68 * @syscap SystemCapability.ArkUI.ArkUI.Full 69 * @crossplatform 70 * @form 71 * @atomicservice 72 * @since 11 73 */ 74 /** 75 * Row spacing. 76 * 77 * Anonymous Object Rectification 78 * @type { ?(string | number) } 79 * @syscap SystemCapability.ArkUI.ArkUI.Full 80 * @crossplatform 81 * @form 82 * @atomicservice 83 * @since arkts {'1.1':'18','1.2':'20'} 84 * @arkts 1.1&1.2 85 */ 86 space?: string | number; 87} 88 89/** 90 * Define options used to construct a row. 91 * 92 * @interface RowOptionsV2 93 * @syscap SystemCapability.ArkUI.ArkUI.Full 94 * @crossplatform 95 * @form 96 * @atomicservice 97 * @since arkts {'1.1':'18','1.2':'20'} 98 * @arkts 1.1&1.2 99 */ 100interface RowOptionsV2 { 101 /** 102 * Vertical layout element spacing. 103 * 104 * @type { ?SpaceType } 105 * @syscap SystemCapability.ArkUI.ArkUI.Full 106 * @crossplatform 107 * @form 108 * @atomicservice 109 * @since arkts {'1.1':'18','1.2':'20'} 110 * @arkts 1.1&1.2 111 */ 112 space?: SpaceType; 113} 114 115/** 116 * The components are laid out horizontally 117 * 118 * @interface RowInterface 119 * @syscap SystemCapability.ArkUI.ArkUI.Full 120 * @since 7 121 */ 122/** 123 * The components are laid out horizontally 124 * 125 * @interface RowInterface 126 * @syscap SystemCapability.ArkUI.ArkUI.Full 127 * @form 128 * @since 9 129 */ 130/** 131 * The components are laid out horizontally 132 * 133 * @interface RowInterface 134 * @syscap SystemCapability.ArkUI.ArkUI.Full 135 * @crossplatform 136 * @form 137 * @since 10 138 */ 139/** 140 * The components are laid out horizontally 141 * 142 * @interface RowInterface 143 * @syscap SystemCapability.ArkUI.ArkUI.Full 144 * @crossplatform 145 * @form 146 * @atomicservice 147 * @since arkts {'1.1':'11','1.2':'20'} 148 * @arkts 1.1&1.2 149 */ 150interface RowInterface { 151 /** 152 * Called when the layout is set in the horizontal direction. 153 * 154 * @param { object } value 155 * @returns { RowAttribute } 156 * @syscap SystemCapability.ArkUI.ArkUI.Full 157 * @since 7 158 */ 159 /** 160 * Called when the layout is set in the horizontal direction. 161 * 162 * @param { object } value 163 * @returns { RowAttribute } 164 * @syscap SystemCapability.ArkUI.ArkUI.Full 165 * @form 166 * @since 9 167 */ 168 /** 169 * Called when the layout is set in the horizontal direction. 170 * 171 * @param { object } value 172 * @returns { RowAttribute } 173 * @syscap SystemCapability.ArkUI.ArkUI.Full 174 * @crossplatform 175 * @form 176 * @since 10 177 */ 178 /** 179 * Called when the layout is set in the horizontal direction. 180 * 181 * @param { object } value 182 * @returns { RowAttribute } 183 * @syscap SystemCapability.ArkUI.ArkUI.Full 184 * @crossplatform 185 * @form 186 * @atomicservice 187 * @since 11 188 */ 189 /** 190 * Called when the layout is set in the horizontal direction. 191 * 192 * Anonymous Object Rectification 193 * @param { ?RowOptions } [options] - row options 194 * @returns { RowAttribute } 195 * @syscap SystemCapability.ArkUI.ArkUI.Full 196 * @crossplatform 197 * @form 198 * @atomicservice 199 * @since arkts {'1.1':'18','1.2':'20'} 200 * @arkts 1.1&1.2 201 */ 202 (options?: RowOptions): RowAttribute; 203 /** 204 * Called when the layout is set in the horizontal direction. 205 * 206 * Anonymous Object Rectification 207 * @param { ?(RowOptions | RowOptionsV2) } [options] - row options 208 * @returns { RowAttribute } 209 * @syscap SystemCapability.ArkUI.ArkUI.Full 210 * @crossplatform 211 * @form 212 * @atomicservice 213 * @since arkts {'1.1':'18','1.2':'20'} 214 * @arkts 1.1&1.2 215 */ 216 (options?: RowOptions | RowOptionsV2): RowAttribute; 217} 218 219/** 220 * Defines the row attribute functions. 221 * 222 * @extends CommonMethod<RowAttribute> 223 * @syscap SystemCapability.ArkUI.ArkUI.Full 224 * @since 7 225 */ 226/** 227 * Defines the row attribute functions. 228 * 229 * @extends CommonMethod<RowAttribute> 230 * @syscap SystemCapability.ArkUI.ArkUI.Full 231 * @form 232 * @since 9 233 */ 234/** 235 * Defines the row attribute functions. 236 * 237 * @extends CommonMethod<RowAttribute> 238 * @syscap SystemCapability.ArkUI.ArkUI.Full 239 * @crossplatform 240 * @form 241 * @since 10 242 */ 243/** 244 * Defines the row attribute functions. 245 * 246 * @extends CommonMethod<RowAttribute> 247 * @syscap SystemCapability.ArkUI.ArkUI.Full 248 * @crossplatform 249 * @form 250 * @atomicservice 251 * @since arkts {'1.1':'11','1.2':'20'} 252 * @arkts 1.1&1.2 253 */ 254declare class RowAttribute extends CommonMethod<RowAttribute> { 255 /** 256 * Called when the vertical alignment is set. 257 * 258 * @param { VerticalAlign } value 259 * @returns { RowAttribute } 260 * @syscap SystemCapability.ArkUI.ArkUI.Full 261 * @since 7 262 */ 263 /** 264 * Called when the vertical alignment is set. 265 * 266 * @param { VerticalAlign } value 267 * @returns { RowAttribute } 268 * @syscap SystemCapability.ArkUI.ArkUI.Full 269 * @form 270 * @since 9 271 */ 272 /** 273 * Called when the vertical alignment is set. 274 * 275 * @param { VerticalAlign } value 276 * @returns { RowAttribute } 277 * @syscap SystemCapability.ArkUI.ArkUI.Full 278 * @crossplatform 279 * @form 280 * @since 10 281 */ 282 /** 283 * Called when the vertical alignment is set. 284 * 285 * @param { VerticalAlign } value 286 * @returns { RowAttribute } 287 * @syscap SystemCapability.ArkUI.ArkUI.Full 288 * @crossplatform 289 * @form 290 * @atomicservice 291 * @since arkts {'1.1':'11','1.2':'20'} 292 * @arkts 1.1&1.2 293 */ 294 alignItems(value: VerticalAlign): RowAttribute; 295 296 /** 297 * Called when the horizontal alignment is set. 298 * 299 * @param { FlexAlign } value 300 * @returns { RowAttribute } 301 * @syscap SystemCapability.ArkUI.ArkUI.Full 302 * @since 8 303 */ 304 /** 305 * Called when the horizontal alignment is set. 306 * 307 * @param { FlexAlign } value 308 * @returns { RowAttribute } 309 * @syscap SystemCapability.ArkUI.ArkUI.Full 310 * @form 311 * @since 9 312 */ 313 /** 314 * Called when the horizontal alignment is set. 315 * 316 * @param { FlexAlign } value 317 * @returns { RowAttribute } 318 * @syscap SystemCapability.ArkUI.ArkUI.Full 319 * @crossplatform 320 * @form 321 * @since 10 322 */ 323 /** 324 * Called when the horizontal alignment is set. 325 * 326 * @param { FlexAlign } value 327 * @returns { RowAttribute } 328 * @syscap SystemCapability.ArkUI.ArkUI.Full 329 * @crossplatform 330 * @form 331 * @atomicservice 332 * @since arkts {'1.1':'11','1.2':'20'} 333 * @arkts 1.1&1.2 334 */ 335 justifyContent(value: FlexAlign): RowAttribute; 336 /** 337 * Defines the PointLight 338 * 339 * @param { PointLightStyle } value - The point light style. 340 * @returns { RowAttribute } The attribute of the row. 341 * @syscap SystemCapability.ArkUI.ArkUI.Full 342 * @systemapi 343 * @since arkts {'1.1':'11','1.2':'20'} 344 * @arkts 1.1&1.2 345 */ 346 pointLight(value: PointLightStyle): RowAttribute; 347 /** 348 * Called when the Main-Axis's direction is set reversed or not 349 * 350 * @param { Optional<boolean> } isReversed - If the main axis is reversed. 351 * @returns { RowAttribute } The attribute of the row. 352 * @syscap SystemCapability.ArkUI.ArkUI.Full 353 * @crossplatform 354 * @form 355 * @atomicservice 356 * @since arkts {'1.1':'12','1.2':'20'} 357 * @arkts 1.1&1.2 358 */ 359 reverse(isReversed: Optional<boolean>): RowAttribute; 360} 361 362/** 363 * Defines Row Component. 364 * 365 * @syscap SystemCapability.ArkUI.ArkUI.Full 366 * @since 7 367 */ 368/** 369 * Defines Row Component. 370 * 371 * @syscap SystemCapability.ArkUI.ArkUI.Full 372 * @form 373 * @since 9 374 */ 375/** 376 * Defines Row Component. 377 * 378 * @syscap SystemCapability.ArkUI.ArkUI.Full 379 * @crossplatform 380 * @form 381 * @since 10 382 */ 383/** 384 * Defines Row Component. 385 * 386 * @syscap SystemCapability.ArkUI.ArkUI.Full 387 * @crossplatform 388 * @form 389 * @atomicservice 390 * @since 11 391 */ 392declare const Row: RowInterface; 393 394/** 395 * Defines Row Component instance. 396 * 397 * @syscap SystemCapability.ArkUI.ArkUI.Full 398 * @since 7 399 */ 400/** 401 * Defines Row Component instance. 402 * 403 * @syscap SystemCapability.ArkUI.ArkUI.Full 404 * @form 405 * @since 9 406 */ 407/** 408 * Defines Row Component instance. 409 * 410 * @syscap SystemCapability.ArkUI.ArkUI.Full 411 * @crossplatform 412 * @form 413 * @since 10 414 */ 415/** 416 * Defines Row Component instance. 417 * 418 * @syscap SystemCapability.ArkUI.ArkUI.Full 419 * @crossplatform 420 * @form 421 * @atomicservice 422 * @since 11 423 */ 424declare const RowInstance: RowAttribute; 425