2019-10-15 10:30:08 -07:00
|
|
|
/*
|
2021-12-30 15:08:43 -08:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2016-08-04 08:19:59 -07:00
|
|
|
*
|
2019-10-15 10:30:08 -07:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-08-04 08:19:59 -07:00
|
|
|
*/
|
2019-10-15 10:30:08 -07:00
|
|
|
|
2016-12-05 02:56:20 -08:00
|
|
|
package com.facebook.yoga;
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2018-02-08 04:51:12 -08:00
|
|
|
import javax.annotation.Nullable;
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2021-03-26 10:04:04 -07:00
|
|
|
public abstract class YogaNode implements YogaProps {
|
2021-02-16 10:17:36 -08:00
|
|
|
|
|
|
|
/** The interface the {@link #getData()} object can optionally implement. */
|
|
|
|
public interface Inputs {
|
|
|
|
|
|
|
|
/** Requests the data object to disable mutations of its inputs. */
|
2021-03-30 05:41:22 -07:00
|
|
|
void freeze(final YogaNode node, final @Nullable YogaNode parent);
|
2021-02-16 10:17:36 -08:00
|
|
|
}
|
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void reset();
|
2018-11-14 02:49:27 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract int getChildCount();
|
2018-11-14 02:49:27 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaNode getChildAt(int i);
|
2018-11-14 02:49:27 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void addChildAt(YogaNode child, int i);
|
2018-11-14 02:49:27 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setIsReferenceBaseline(boolean isReferenceBaseline);
|
2018-04-01 18:27:08 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract boolean isReferenceBaseline();
|
2018-04-01 18:27:08 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaNode removeChildAt(int i);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2018-04-01 18:27:06 -07:00
|
|
|
/**
|
2021-02-16 10:17:36 -08:00
|
|
|
* @returns the {@link YogaNode} that owns this {@link YogaNode}. The owner is used to identify
|
|
|
|
* the YogaTree that a {@link YogaNode} belongs to. This method will return the parent of the
|
|
|
|
* {@link YogaNode} when the {@link YogaNode} only belongs to one YogaTree or null when the
|
|
|
|
* {@link YogaNode} is shared between two or more YogaTrees.
|
2018-04-01 18:27:06 -07:00
|
|
|
*/
|
2018-01-22 02:48:53 -08:00
|
|
|
@Nullable
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaNode getOwner();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2018-04-18 04:29:45 -07:00
|
|
|
/** @deprecated Use #getOwner() instead. This will be removed in the next version. */
|
|
|
|
@Deprecated
|
|
|
|
@Nullable
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaNode getParent();
|
2018-04-18 04:29:45 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract int indexOf(YogaNode child);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void calculateLayout(float width, float height);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract boolean hasNewLayout();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void dirty();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract boolean isDirty();
|
2018-02-08 04:51:12 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void copyStyle(YogaNode srcNode);
|
2018-02-08 04:51:12 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void markLayoutSeen();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaDirection getStyleDirection();
|
2016-11-17 09:10:47 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setDirection(YogaDirection direction);
|
2017-03-29 16:39:24 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaFlexDirection getFlexDirection();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setFlexDirection(YogaFlexDirection flexDirection);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaJustify getJustifyContent();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setJustifyContent(YogaJustify justifyContent);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaAlign getAlignItems();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setAlignItems(YogaAlign alignItems);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaAlign getAlignSelf();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setAlignSelf(YogaAlign alignSelf);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaAlign getAlignContent();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setAlignContent(YogaAlign alignContent);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaPositionType getPositionType();
|
2016-08-12 04:17:36 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setPositionType(YogaPositionType positionType);
|
2016-08-12 04:17:36 -07:00
|
|
|
|
2019-02-28 12:42:24 -08:00
|
|
|
public abstract YogaWrap getWrap();
|
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setWrap(YogaWrap flexWrap);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaOverflow getOverflow();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setOverflow(YogaOverflow overflow);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaDisplay getDisplay();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setDisplay(YogaDisplay display);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-28 12:42:24 -08:00
|
|
|
public abstract float getFlex();
|
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setFlex(float flex);
|
2017-02-06 09:31:22 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getFlexGrow();
|
2017-02-06 09:31:22 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setFlexGrow(float flexGrow);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getFlexShrink();
|
2016-08-23 04:36:55 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setFlexShrink(float flexShrink);
|
2016-08-23 04:36:55 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaValue getFlexBasis();
|
2016-08-23 04:36:55 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setFlexBasis(float flexBasis);
|
2016-08-23 04:36:55 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setFlexBasisPercent(float percent);
|
2016-08-23 04:36:55 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setFlexBasisAuto();
|
2016-08-23 04:36:55 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaValue getMargin(YogaEdge edge);
|
Add feature to use percentage as value unit
Summary:
Adds the feature to use percentage as a value unit.
You can use the function ```YGPx(float)``` and ```YGPercent(float)``` for convenience.
I did some benchmarks:
```
Without Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.146683 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.490101 ms
Huge nested layout: median: 23.000000 ms, stddev: 0.928291 ms
Stack with flex: median: 0.000000 ms, stddev: 0.170587 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.143384 ms
Nested flex: median: 0.000000 ms, stddev: 0.477791 ms
Huge nested layout: median: 22.000000 ms, stddev: 2.129779 ms
With Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.132951 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.489570 ms
Huge nested layout: median: 21.000000 ms, stddev: 1.390476 ms
Closes https://github.com/facebook/yoga/pull/258
Reviewed By: dshahidehpour
Differential Revision: D4361945
Pulled By: emilsjolander
fbshipit-source-id: a8f5bc63ad352eb9410d792729e56664468cd76a
2017-01-02 05:20:37 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMargin(YogaEdge edge, float margin);
|
2017-02-14 14:26:09 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMarginPercent(YogaEdge edge, float percent);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMarginAuto(YogaEdge edge);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaValue getPadding(YogaEdge edge);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setPadding(YogaEdge edge, float padding);
|
Add feature to use percentage as value unit
Summary:
Adds the feature to use percentage as a value unit.
You can use the function ```YGPx(float)``` and ```YGPercent(float)``` for convenience.
I did some benchmarks:
```
Without Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.146683 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.490101 ms
Huge nested layout: median: 23.000000 ms, stddev: 0.928291 ms
Stack with flex: median: 0.000000 ms, stddev: 0.170587 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.143384 ms
Nested flex: median: 0.000000 ms, stddev: 0.477791 ms
Huge nested layout: median: 22.000000 ms, stddev: 2.129779 ms
With Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.132951 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.489570 ms
Huge nested layout: median: 21.000000 ms, stddev: 1.390476 ms
Closes https://github.com/facebook/yoga/pull/258
Reviewed By: dshahidehpour
Differential Revision: D4361945
Pulled By: emilsjolander
fbshipit-source-id: a8f5bc63ad352eb9410d792729e56664468cd76a
2017-01-02 05:20:37 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setPaddingPercent(YogaEdge edge, float percent);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getBorder(YogaEdge edge);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setBorder(YogaEdge edge, float border);
|
Add feature to use percentage as value unit
Summary:
Adds the feature to use percentage as a value unit.
You can use the function ```YGPx(float)``` and ```YGPercent(float)``` for convenience.
I did some benchmarks:
```
Without Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.146683 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.490101 ms
Huge nested layout: median: 23.000000 ms, stddev: 0.928291 ms
Stack with flex: median: 0.000000 ms, stddev: 0.170587 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.143384 ms
Nested flex: median: 0.000000 ms, stddev: 0.477791 ms
Huge nested layout: median: 22.000000 ms, stddev: 2.129779 ms
With Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.132951 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.489570 ms
Huge nested layout: median: 21.000000 ms, stddev: 1.390476 ms
Closes https://github.com/facebook/yoga/pull/258
Reviewed By: dshahidehpour
Differential Revision: D4361945
Pulled By: emilsjolander
fbshipit-source-id: a8f5bc63ad352eb9410d792729e56664468cd76a
2017-01-02 05:20:37 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaValue getPosition(YogaEdge edge);
|
2017-02-14 14:26:09 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setPosition(YogaEdge edge, float position);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setPositionPercent(YogaEdge edge, float percent);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaValue getWidth();
|
Add feature to use percentage as value unit
Summary:
Adds the feature to use percentage as a value unit.
You can use the function ```YGPx(float)``` and ```YGPercent(float)``` for convenience.
I did some benchmarks:
```
Without Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.146683 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.490101 ms
Huge nested layout: median: 23.000000 ms, stddev: 0.928291 ms
Stack with flex: median: 0.000000 ms, stddev: 0.170587 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.143384 ms
Nested flex: median: 0.000000 ms, stddev: 0.477791 ms
Huge nested layout: median: 22.000000 ms, stddev: 2.129779 ms
With Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.132951 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.489570 ms
Huge nested layout: median: 21.000000 ms, stddev: 1.390476 ms
Closes https://github.com/facebook/yoga/pull/258
Reviewed By: dshahidehpour
Differential Revision: D4361945
Pulled By: emilsjolander
fbshipit-source-id: a8f5bc63ad352eb9410d792729e56664468cd76a
2017-01-02 05:20:37 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setWidth(float width);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setWidthPercent(float percent);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setWidthAuto();
|
Add feature to use percentage as value unit
Summary:
Adds the feature to use percentage as a value unit.
You can use the function ```YGPx(float)``` and ```YGPercent(float)``` for convenience.
I did some benchmarks:
```
Without Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.146683 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.490101 ms
Huge nested layout: median: 23.000000 ms, stddev: 0.928291 ms
Stack with flex: median: 0.000000 ms, stddev: 0.170587 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.143384 ms
Nested flex: median: 0.000000 ms, stddev: 0.477791 ms
Huge nested layout: median: 22.000000 ms, stddev: 2.129779 ms
With Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.132951 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.489570 ms
Huge nested layout: median: 21.000000 ms, stddev: 1.390476 ms
Closes https://github.com/facebook/yoga/pull/258
Reviewed By: dshahidehpour
Differential Revision: D4361945
Pulled By: emilsjolander
fbshipit-source-id: a8f5bc63ad352eb9410d792729e56664468cd76a
2017-01-02 05:20:37 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaValue getHeight();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setHeight(float height);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setHeightPercent(float percent);
|
Add feature to use percentage as value unit
Summary:
Adds the feature to use percentage as a value unit.
You can use the function ```YGPx(float)``` and ```YGPercent(float)``` for convenience.
I did some benchmarks:
```
Without Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.146683 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.490101 ms
Huge nested layout: median: 23.000000 ms, stddev: 0.928291 ms
Stack with flex: median: 0.000000 ms, stddev: 0.170587 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.143384 ms
Nested flex: median: 0.000000 ms, stddev: 0.477791 ms
Huge nested layout: median: 22.000000 ms, stddev: 2.129779 ms
With Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.132951 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.489570 ms
Huge nested layout: median: 21.000000 ms, stddev: 1.390476 ms
Closes https://github.com/facebook/yoga/pull/258
Reviewed By: dshahidehpour
Differential Revision: D4361945
Pulled By: emilsjolander
fbshipit-source-id: a8f5bc63ad352eb9410d792729e56664468cd76a
2017-01-02 05:20:37 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setHeightAuto();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaValue getMinWidth();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMinWidth(float minWidth);
|
Add feature to use percentage as value unit
Summary:
Adds the feature to use percentage as a value unit.
You can use the function ```YGPx(float)``` and ```YGPercent(float)``` for convenience.
I did some benchmarks:
```
Without Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.146683 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.490101 ms
Huge nested layout: median: 23.000000 ms, stddev: 0.928291 ms
Stack with flex: median: 0.000000 ms, stddev: 0.170587 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.143384 ms
Nested flex: median: 0.000000 ms, stddev: 0.477791 ms
Huge nested layout: median: 22.000000 ms, stddev: 2.129779 ms
With Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.132951 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.489570 ms
Huge nested layout: median: 21.000000 ms, stddev: 1.390476 ms
Closes https://github.com/facebook/yoga/pull/258
Reviewed By: dshahidehpour
Differential Revision: D4361945
Pulled By: emilsjolander
fbshipit-source-id: a8f5bc63ad352eb9410d792729e56664468cd76a
2017-01-02 05:20:37 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMinWidthPercent(float percent);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaValue getMinHeight();
|
Add feature to use percentage as value unit
Summary:
Adds the feature to use percentage as a value unit.
You can use the function ```YGPx(float)``` and ```YGPercent(float)``` for convenience.
I did some benchmarks:
```
Without Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.146683 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.490101 ms
Huge nested layout: median: 23.000000 ms, stddev: 0.928291 ms
Stack with flex: median: 0.000000 ms, stddev: 0.170587 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.143384 ms
Nested flex: median: 0.000000 ms, stddev: 0.477791 ms
Huge nested layout: median: 22.000000 ms, stddev: 2.129779 ms
With Percentage Feature - Release x86:
Stack with flex: median: 0.000000 ms, stddev: 0.132951 ms
Align stretch in undefined axis: median: 0.000000 ms, stddev: 0.136525 ms
Nested flex: median: 0.000000 ms, stddev: 0.489570 ms
Huge nested layout: median: 21.000000 ms, stddev: 1.390476 ms
Closes https://github.com/facebook/yoga/pull/258
Reviewed By: dshahidehpour
Differential Revision: D4361945
Pulled By: emilsjolander
fbshipit-source-id: a8f5bc63ad352eb9410d792729e56664468cd76a
2017-01-02 05:20:37 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMinHeight(float minHeight);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMinHeightPercent(float percent);
|
2016-11-21 10:12:26 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaValue getMaxWidth();
|
2016-11-21 10:12:26 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMaxWidth(float maxWidth);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMaxWidthPercent(float percent);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaValue getMaxHeight();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMaxHeight(float maxheight);
|
2016-10-27 10:52:12 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMaxHeightPercent(float percent);
|
2018-03-14 08:37:55 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getAspectRatio();
|
2017-01-15 15:16:10 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setAspectRatio(float aspectRatio);
|
2017-01-05 12:48:10 -08:00
|
|
|
|
2022-10-13 08:18:49 -07:00
|
|
|
public abstract float getGap(YogaGutter gutter);
|
|
|
|
|
|
|
|
public abstract void setGap(YogaGutter gutter, float gapLength);
|
|
|
|
|
2024-04-15 16:44:16 -07:00
|
|
|
public abstract void setGapPercent(YogaGutter gutter, float gapLength);
|
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getLayoutX();
|
2017-02-11 06:19:52 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getLayoutY();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getLayoutWidth();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getLayoutHeight();
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getLayoutMargin(YogaEdge edge);
|
2017-01-10 07:03:56 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getLayoutPadding(YogaEdge edge);
|
2017-01-10 07:03:56 -08:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract float getLayoutBorder(YogaEdge edge);
|
2016-08-04 08:19:59 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract YogaDirection getLayoutDirection();
|
2016-08-04 08:20:07 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setMeasureFunction(YogaMeasureFunction measureFunction);
|
2017-04-27 16:19:17 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setBaselineFunction(YogaBaselineFunction baselineFunction);
|
2017-04-27 16:19:17 -07:00
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract boolean isMeasureDefined();
|
2018-04-01 18:27:04 -07:00
|
|
|
|
2019-04-01 06:11:50 -07:00
|
|
|
public abstract boolean isBaselineDefined();
|
|
|
|
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract void setData(Object data);
|
2019-02-18 03:03:29 -08:00
|
|
|
|
2019-03-25 06:33:12 -07:00
|
|
|
@Nullable
|
2019-02-19 11:15:11 -08:00
|
|
|
public abstract Object getData();
|
2019-02-18 03:03:29 -08:00
|
|
|
|
2019-04-03 10:41:23 -07:00
|
|
|
public abstract YogaNode cloneWithoutChildren();
|
2020-01-30 03:41:45 -08:00
|
|
|
|
|
|
|
public abstract YogaNode cloneWithChildren();
|
2024-01-08 20:28:49 -08:00
|
|
|
|
|
|
|
public abstract void setAlwaysFormsContainingBlock(boolean alwaysFormsContainingBlock);
|
2016-08-04 08:19:59 -07:00
|
|
|
}
|