ReactRawTextShadowNode

ReactShadowNode class for pure raw text node (aka textContent in terms of DOM). Raw text node can only have simple string value without any attributes, properties or state.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var text: String?

Functions

Link copied to clipboard
open override fun addChildAt(child: ReactShadowNodeImpl, i: Int)
Link copied to clipboard
override fun addNativeChildAt(child: ReactShadowNodeImpl, nativeIndex: Int)

Adds a child that the native view hierarchy will have at this index in the native view corresponding to this node.

Link copied to clipboard
open override fun calculateLayout()
open override fun calculateLayout(width: Float, height: Float)
Link copied to clipboard
open override fun dirty()
Link copied to clipboard
open override fun dispatchUpdates(absoluteX: Float, absoluteY: Float, uiViewOperationQueue: UIViewOperationQueue, @Nullable nativeViewHierarchyOptimizer: NativeViewHierarchyOptimizer?)
Link copied to clipboard
open override fun dispatchUpdatesWillChangeLayout(absoluteX: Float, absoluteY: Float): Boolean
Link copied to clipboard
open override fun dispose()
Link copied to clipboard
Link copied to clipboard
override fun getChildCount(): Int
Link copied to clipboard
open override fun getFlex(): Float
Link copied to clipboard
open override fun getHeightMeasureSpec(): Int
Link copied to clipboard
open override fun getHierarchyInfo(): String
Link copied to clipboard
Link copied to clipboard
override fun getLayoutHeight(): Float
Link copied to clipboard
Link copied to clipboard
override fun getLayoutWidth(): Float
Link copied to clipboard
override fun getLayoutX(): Float
Link copied to clipboard
override fun getLayoutY(): Float
Link copied to clipboard
override fun getNativeChildCount(): Int
Link copied to clipboard
open override fun getNativeKind(): NativeKind
Link copied to clipboard

Returns the offset within the native children owned by all layout-only nodes in the subtree rooted at this node for the given child. Put another way, this returns the number of native nodes (nodes not optimized out of the native tree) that are a) to the left (visited before by a DFS) of the given child in the subtree rooted at this node and b) do not have a native parent in this subtree (which means that the given child will be a sibling of theirs in the final native hierarchy since they'll get attached to the same native parent).

Link copied to clipboard
Link copied to clipboard
override fun getPadding(spacingType: Int): Float
Link copied to clipboard
Link copied to clipboard
override fun getReactTag(): Int
Link copied to clipboard
override fun getRootTag(): Int
Link copied to clipboard
open override fun getScreenHeight(): Int
Link copied to clipboard
open override fun getScreenWidth(): Int
Link copied to clipboard
open override fun getScreenX(): Int
Link copied to clipboard
open override fun getScreenY(): Int
Link copied to clipboard
override fun getStyleHeight(): YogaValue
Link copied to clipboard
override fun getStylePadding(spacingType: Int): YogaValue
Link copied to clipboard
override fun getStyleWidth(): YogaValue
Link copied to clipboard

Get the ThemedReactContext associated with this ReactShadowNode. This will never change during the lifetime of a ReactShadowNode instance, but different instances can have different contexts; don't cache any calculations based on theme values globally.

Link copied to clipboard
override fun getTotalNativeChildren(): Int
Link copied to clipboard
override fun getViewClass(): String
Link copied to clipboard
open override fun getWidthMeasureSpec(): Int
Link copied to clipboard
override fun hasNewLayout(): Boolean
Link copied to clipboard
override fun hasUnseenUpdates(): Boolean
Link copied to clipboard
override fun hasUpdates(): Boolean
Link copied to clipboard
open override fun hoistNativeChildren(): Boolean

When constructing the native tree, nodes that return true will be treated as leaves. Instead of adding this view's native children as subviews of it, they will be added as subviews of an ancestor. In other words, this view wants to support native children but it cannot host them itself (e.g. it isn't a ViewGroup).

Link copied to clipboard
override fun indexOf(child: ReactShadowNodeImpl): Int
Link copied to clipboard
override fun indexOfNativeChild(nativeChild: ReactShadowNodeImpl): Int
Link copied to clipboard
open override fun isDescendantOf(ancestorNode: ReactShadowNodeImpl): Boolean
Link copied to clipboard
override fun isDirty(): Boolean
Link copied to clipboard
override fun isLayoutOnly(): Boolean
Link copied to clipboard
open override fun isMeasureDefined(): Boolean
Link copied to clipboard
open override fun isVirtual(): Boolean

Nodes that return true will be treated as "virtual" nodes. That is, nodes that are not mapped into native views or Yoga nodes (e.g. nested text node). By default this method returns false.

Link copied to clipboard
open override fun isVirtualAnchor(): Boolean

Nodes that return true will be treated as a root view for the virtual nodes tree. It means that all of its descendants will be "virtual" nodes. Good example is InputText view that may have children Text nodes but this whole hierarchy will be mapped to a single android EditText view.

Link copied to clipboard
open override fun isYogaLeafNode(): Boolean

Nodes that return true will not manage (and and remove) child Yoga nodes. For example ReactTextInputShadowNode or ReactTextShadowNode have child nodes, which do not want Yoga to lay out, so in the eyes of Yoga it is a leaf node. Override this method in subclass to enforce this requirement.

Link copied to clipboard
override fun markLayoutSeen()
Link copied to clipboard
open override fun markUpdated()
Link copied to clipboard
override fun markUpdateSeen()
Link copied to clipboard
open override fun onAfterUpdateTransaction()
Link copied to clipboard
open override fun onBeforeLayout(nativeViewHierarchyOptimizer: NativeViewHierarchyOptimizer)

This method will be called by UIManagerModule once per batch, before calculating layout. Will be only called for nodes that are marked as updated with markUpdated or require layouting (marked with dirty).

Link copied to clipboard
open override fun onCollectExtraUpdates(uiViewOperationQueue: UIViewOperationQueue)

Called after layout step at the end of the UI batch from UIManagerModule. May be used to enqueue additional ui operations for the native view. Will only be called on nodes marked as updated either with dirty or markUpdated.

Link copied to clipboard
Link copied to clipboard
open override fun removeAndDisposeAllChildren()
Link copied to clipboard
open override fun removeChildAt(i: Int): ReactShadowNodeImpl
Link copied to clipboard
Link copied to clipboard
open override fun setAlignContent(alignContent: YogaAlign)
Link copied to clipboard
open override fun setAlignItems(alignItems: YogaAlign)
Link copied to clipboard
open override fun setAlignSelf(alignSelf: YogaAlign)
Link copied to clipboard
open override fun setBaselineFunction(baselineFunction: YogaBaselineFunction)
Link copied to clipboard
open override fun setBorder(spacingType: Int, borderWidth: Float)
Link copied to clipboard
open override fun setColumnGap(columnGap: Float)
Link copied to clipboard
open override fun setColumnGapPercent(percent: Float)
Link copied to clipboard
open override fun setDefaultPadding(spacingType: Int, padding: Float)
Link copied to clipboard
open override fun setDisplay(display: YogaDisplay)
Link copied to clipboard
open override fun setFlex(flex: Float)
Link copied to clipboard
open override fun setFlexBasis(flexBasis: Float)
Link copied to clipboard
open override fun setFlexBasisAuto()
Link copied to clipboard
open override fun setFlexBasisPercent(percent: Float)
Link copied to clipboard
open override fun setFlexDirection(flexDirection: YogaFlexDirection)
Link copied to clipboard
open override fun setFlexGrow(flexGrow: Float)
Link copied to clipboard
open override fun setFlexShrink(flexShrink: Float)
Link copied to clipboard
open override fun setFlexWrap(wrap: YogaWrap)
Link copied to clipboard
open override fun setGap(gap: Float)
Link copied to clipboard
open override fun setGapPercent(percent: Float)
Link copied to clipboard
override fun setIsLayoutOnly(isLayoutOnly: Boolean)

Sets whether this node only contributes to the layout of its children without doing any drawing or functionality itself.

Link copied to clipboard
open override fun setJustifyContent(justifyContent: YogaJustify)
Link copied to clipboard
open override fun setLayoutDirection(direction: YogaDirection)
Link copied to clipboard
override fun setLayoutParent(@Nullable layoutParent: ReactShadowNodeImpl?)
Link copied to clipboard
open override fun setLocalData(data: Any)
Link copied to clipboard
open override fun setMargin(spacingType: Int, margin: Float)
Link copied to clipboard
open override fun setMarginAuto(spacingType: Int)
Link copied to clipboard
open override fun setMarginPercent(spacingType: Int, percent: Float)
Link copied to clipboard
open override fun setMeasureFunction(measureFunction: YogaMeasureFunction)
Link copied to clipboard
open override fun setMeasureSpecs(widthMeasureSpec: Int, heightMeasureSpec: Int)
Link copied to clipboard
open override fun setOverflow(overflow: YogaOverflow)
Link copied to clipboard
open override fun setPadding(spacingType: Int, padding: Float)
Link copied to clipboard
open override fun setPaddingPercent(spacingType: Int, percent: Float)
Link copied to clipboard
open override fun setPosition(spacingType: Int, position: Float)
Link copied to clipboard
open override fun setPositionPercent(spacingType: Int, percent: Float)
Link copied to clipboard
open override fun setPositionType(positionType: YogaPositionType)
Link copied to clipboard
open override fun setReactTag(reactTag: Int)
Link copied to clipboard
override fun setRootTag(rootTag: Int)
Link copied to clipboard
open override fun setRowGap(rowGap: Float)
Link copied to clipboard
open override fun setRowGapPercent(percent: Float)
Link copied to clipboard
open override fun setShouldNotifyOnLayout(shouldNotifyOnLayout: Boolean)
Link copied to clipboard
open override fun setStyleAspectRatio(aspectRatio: Float)
Link copied to clipboard
open override fun setStyleHeight(heightPx: Float)
Link copied to clipboard
open override fun setStyleHeightAuto()
Link copied to clipboard
open override fun setStyleHeightPercent(percent: Float)
Link copied to clipboard
open override fun setStyleMaxHeight(widthPx: Float)
Link copied to clipboard
open override fun setStyleMaxHeightPercent(percent: Float)
Link copied to clipboard
open override fun setStyleMaxWidth(widthPx: Float)
Link copied to clipboard
open override fun setStyleMaxWidthPercent(percent: Float)
Link copied to clipboard
open override fun setStyleMinHeight(widthPx: Float)
Link copied to clipboard
open override fun setStyleMinHeightPercent(percent: Float)
Link copied to clipboard
open override fun setStyleMinWidth(widthPx: Float)
Link copied to clipboard
open override fun setStyleMinWidthPercent(percent: Float)
Link copied to clipboard
open override fun setStyleWidth(widthPx: Float)
Link copied to clipboard
open override fun setStyleWidthAuto()
Link copied to clipboard
open override fun setStyleWidthPercent(percent: Float)
Link copied to clipboard
open override fun setThemedContext(themedContext: ThemedReactContext)
Link copied to clipboard
override fun setViewClassName(viewClassName: String)
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard