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