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