class EE::UI::UINode

Overview

#include <uinode.hpp>

class UINode: public EE::Scene::Node {
public:
    // typedefs

    typedef std::function<void(const Event*)> EventCallback;

    // construction

    virtual ~UINode();

    // methods

    static UINode* New();
    virtual void worldToNodeTranslation(Vector2f& position) const;
    virtual void nodeToWorldTranslation(Vector2f& position) const;
    virtual void worldToNode(Vector2i& pos) const;
    virtual void nodeToWorld(Vector2i& pos) const;
    virtual void worldToNode(Vector2f& pos) const;
    virtual void nodeToWorld(Vector2f& pos) const;
    virtual Uint32 getType() const;
    virtual bool isType(const Uint32& type) const;
    virtual void setPosition(const Vector2f& Pos);
    virtual Node* setPosition(const Float& x, const Float& y);
    UINode* setPixelsPosition(const Vector2f& position);
    UINode* setPixelsPosition(const Float& x, const Float& y);
    virtual const Vector2f& getPosition() const;
    const Vector2f& getPixelsPosition() const;
    virtual Node* setSize(const Sizef& size);
    virtual Node* setSize(const Float& Width, const Float& Height);
    UINode* setPixelsSize(const Sizef& size);
    UINode* setPixelsSize(const Float& x, const Float& y);
    virtual const Sizef& getSize() const;
    Rect getRect() const;
    Rectf getRectBox() const;
    virtual void draw();
    Uint32 getHorizontalAlign() const;
    UINode* setHorizontalAlign(Uint32 halign);
    Uint32 getVerticalAlign() const;
    UINode* setVerticalAlign(Uint32 valign);
    UINode* setGravity(Uint32 hvalign);
    UINodeDrawable* setBackgroundFillEnabled(bool enabled);
    UINode* setBackgroundDrawable(Drawable* drawable, bool ownIt = false, int index = 0);
    UINode* setBackgroundDrawable(const std::string& drawable, int index);
    UINode* setBackgroundColor(const Color& color);
    UINode* setBackgroundTint(const Color& color, int index);
    UINode* setBackgroundPositionX(const std::string& positionX, int index = 0);
    UINode* setBackgroundPositionY(const std::string& positionY, int index = 0);
    UINode* setBackgroundRepeat(const std::string& repeatRule, int index = 0);
    UINode* setBackgroundSize(const std::string& size, int index = 0);
    Color getBackgroundColor() const;
    Color getBackgroundTint(int index = 0) const;
    UINode* setBorderRadius(const unsigned int& corners);
    UINode* setTopLeftRadius(const std::string& radius);
    UINode* setTopRightRadius(const std::string& radius);
    UINode* setBottomLeftRadius(const std::string& radius);
    UINode* setBottomRightRadius(const std::string& radius);
    Uint32 getBorderRadius() const;
    UINodeDrawable* setForegroundFillEnabled(bool enabled);
    UINode* setForegroundDrawable(Drawable* drawable, bool ownIt = false, int index = 0);
    UINode* setForegroundDrawable(const std::string& drawable, int index = 0);
    Color getForegroundColor() const;
    Color getForegroundTint(int index) const;
    UINode* setForegroundColor(const Color& color);
    UINode* setForegroundTint(const Color& color, int index);
    UINode* setForegroundPositionX(const std::string& positionX, int index = 0);
    UINode* setForegroundPositionY(const std::string& positionY, int index = 0);
    UINode* setForegroundRepeat(const std::string& repeatRule, int index = 0);
    UINode* setForegroundSize(const std::string& size, int index = 0);
    UINode* setForegroundRadius(const unsigned int& corners);
    Uint32 getForegroundRadius() const;
    UIBorderDrawable* setBorderEnabled(bool enabled) const;
    UINode* setBorderColor(const Color& color);
    Color getBorderColor();
    UINode* setBorderWidth(const unsigned int& width);
    Float getBorderWidth() const;
    const Uint32& getFlags() const;
    virtual UINode* setFlags(const Uint32& flags);
    virtual UINode* unsetFlags(const Uint32& flags);
    virtual UINode* resetFlags(Uint32 newFlags = 0);
    UINodeDrawable* getBackground() const;
    bool hasBackground() const;
    UINodeDrawable* getForeground() const;
    bool hasForeground() const;
    UIBorderDrawable* getBorder() const;
    void setThemeByName(const std::string& Theme);
    virtual void setTheme(UITheme* Theme);
    virtual UINode* setThemeSkin(UITheme* Theme, const std::string& skinName);
    virtual UINode* setThemeSkin(const std::string& skinName);
    void setThemeToChildren(UITheme* Theme);
    UISkin* getSkin() const;
    virtual UINode* setSkin(const UISkin& Skin);
    UINode* setSkin(UISkin* skin);
    UINode* setSkinColor(const Color& color);
    const Color& getSkinColor() const;
    void removeSkin();
    virtual void pushState(const Uint32& State, bool emitEvent = true);
    virtual void popState(const Uint32& State, bool emitEvent = true);
    Sizef getSkinSize(const Uint32& state = UIState::StateFlagNormal) const;
    void applyDefaultTheme();
    Node* getWindowContainer() const;
    bool isTabFocusable() const;
    bool isDragging() const;
    void setDragging(bool dragging, bool emitDropEvent = true);
    void startDragging(const Vector2f& position);
    bool ownsChildPosition() const;
    const Vector2f& getDragPoint() const;
    void setDragPoint(const Vector2f& Point);
    bool isDragEnabled() const;
    void setDragEnabled(const bool& enable);
    void setDragButton(const Uint32& Button);
    const Uint32& getDragButton() const;
    virtual Node* setFocus(NodeFocusReason reason = NodeFocusReason::Unknown);
    Float getPropertyRelativeTargetContainerLength(const CSS::PropertyRelativeTarget& relativeTarget, const Float& defaultValue = 0, const Uint32& propertyIndex = 0) const;
    virtual Float convertLength(const CSS::StyleSheetLength& length, const Float& containerLength) const;
    Float convertLengthAsDp(const CSS::StyleSheetLength& length, const Float& containerLength) const;
    Float lengthFromValue(const std::string& value, const CSS::PropertyRelativeTarget& relativeTarget, const Float& defaultValue = 0, const Uint32& propertyIndex = 0) const;
    Float lengthFromValue(const CSS::StyleSheetProperty& property, const Float& defaultValue = 0);
    Float lengthFromValueAsDp(const std::string& value, const CSS::PropertyRelativeTarget& relativeTarget, const Float& defaultValue = 0, const Uint32& propertyIndex = 0) const;
    Float lengthFromValueAsDp(const CSS::StyleSheetProperty& property, const Float& defaultValue = 0) const;
    UISceneNode* getUISceneNode() const;
    Input* getInput() const;
    void setMinWidth(const Float& width);
    void setMinHeight(const Float& height);
    void setMinSize(const Sizef& size);
    const Sizef& getCurMinSize() const;
    Rectf getLocalDpBounds() const;
    virtual void nodeDraw();
    void clearForeground();
    void clearBackground();
    const ClipType& getClipType() const;
    UINode* setClipType(const ClipType& clipType);
    bool hasBorder() const;
    virtual const Rectf& getPixelsPadding() const;
    const std::string& getMinWidthEq() const;
    void setMinSizeEq(const std::string& minWidthEq, const std::string& minHeightEq);
    void setMinWidthEq(const std::string& minWidthEq);
    const std::string& getMinHeightEq() const;
    void setMinHeightEq(const std::string& minHeightEq);
    const std::string& getMaxWidthEq() const;
    void setMaxSizeEq(const std::string& maxWidthEq, const std::string& maxHeightEq);
    void setMaxWidthEq(const std::string& maxWidthEq);
    const std::string& getMaxHeightEq() const;
    void setMaxHeightEq(const std::string& maxHeightEq);
    Sizef getMinSize() const;
    Sizef getMaxSize() const;
    Sizef getMinSizePx() const;
    Sizef getMaxSizePx() const;
    Sizef fitMinMaxSizeDp(const Sizef& size) const;
    Sizef fitMinMaxSizePx(const Sizef& size) const;
    virtual bool isScrollable() const;
};

Inherited Members

public:
    // typedefs

    typedef std::function<void(const Event*)> EventCallback;

    // methods

    virtual void setPosition(const Vector2f& position);
    virtual void setRotation(float angle);
    virtual void setScale(float factorX, float factorY);
    virtual void setScale(const Vector2f& factors);
    virtual void setScaleOrigin(float x, float y);
    virtual void setScaleOrigin(const Vector2f& origin);
    virtual void setRotationOrigin(float x, float y);
    virtual void setRotationOrigin(const Vector2f& origin);
    virtual const Vector2f& getRotationOrigin() const;
    virtual const Vector2f& getPosition() const;
    virtual const float& getRotation() const;
    virtual const Vector2f& getScale() const;
    virtual const Vector2f& getScaleOrigin() const;
    void move(float offsetX, float offsetY);
    void move(const Vector2f& offset);
    void rotate(float angle);
    void scale(float factorX, float factorY);
    void scale(const Vector2f& factor);
    const Transform& getTransform() const;
    const Transform& getInverseTransform() const;
    static Node* New();
    virtual void worldToNodeTranslation(Vector2f& position) const;
    virtual void nodeToWorldTranslation(Vector2f& position) const;
    virtual void worldToNode(Vector2i& pos) const;
    virtual void nodeToWorld(Vector2i& pos) const;
    virtual void worldToNode(Vector2f& pos) const;
    virtual void nodeToWorld(Vector2f& pos) const;
    virtual Uint32 getType() const;
    virtual bool isType(const Uint32& type) const;
    void messagePost(const NodeMessage* Msg);
    virtual void setPosition(const Vector2f& Pos);
    virtual Node* setPosition(const Float& x, const Float& y);
    virtual Node* setSize(const Sizef& size);
    Node* setSize(const Float& Width, const Float& Height);
    virtual const Sizef& getSize() const;
    const Sizef& getPixelsSize() const;
    Node* setVisible(const bool& visible, bool emitEventNotification = true);
    Node* setChildrenVisibility(bool visible, bool emitEventNotification = true);
    bool isVisible() const;
    bool hasVisibility() const;
    Node* setEnabled(const bool& enabled);
    bool isEnabled() const;
    bool isDisabled() const;
    Node* getParent() const;
    Node* setParent(Node* parent);
    virtual void close();
    virtual void draw();
    virtual void update(const Time& time);
    virtual void scheduledUpdate(const Time& time);
    Node* getNextNode() const;
    Node* getPrevNode() const;
    Node* getNextNodeLoop() const;
    Node* setData(const UintPtr& data);
    const UintPtr& getData() const;
    Node* setBlendMode(const BlendMode& blend);
    const BlendMode& getBlendMode() const;
    Node* toFront();
    Node* toBack();
    void toPosition(const Uint32& position);
    const Uint32& getNodeFlags() const;
    void setNodeFlags(const Uint32& flags);
    bool isSceneNode() const;
    bool isUISceneNode() const;
    bool isUINode() const;
    bool isWidget() const;
    bool isWindow() const;
    bool isLayout() const;
    bool isClipped() const;
    bool isRotated() const;
    bool isScaled() const;
    bool isFrameBuffer() const;
    bool isMouseOver() const;
    bool isMouseOverMeOrChildren() const;
    bool isMeOrParentTreeVisible() const;
    bool isMeOrParentTreeRotated() const;
    bool isMeOrParentTreeScaled() const;
    bool isMeOrParentTreeScaledOrRotated() const;
    bool isMeOrParentTreeScaledOrRotatedOrFrameBuffer() const;
    Uint32 addEventListener(const Uint32& eventType, const EventCallback& callback);
    Uint32 on(const Uint32& eventType, const EventCallback& callback);
    Uint32 onClick(const std::function<void(const MouseEvent*)>& callback, const MouseButton& button = MouseButton::EE_BUTTON_LEFT);
    Uint32 onDoubleClick(const std::function<void(const MouseEvent*)>& callback, const MouseButton& button = MouseButton::EE_BUTTON_LEFT);
    void removeEventsOfType(const Uint32& eventType);
    void removeEventListener(const Uint32& callbackId);
    void removeEventListener(const std::vector<Uint32>& callbacksIds);
    void clearEventListener();
    Node* getFirstChild() const;
    Node* getLastChild() const;
    const Polygon2f& getWorldPolygon();
    const Rectf& getWorldBounds();
    bool isParentOf(const Node* node) const;
    void sendEvent(const Event* Event);
    void sendMouseEvent(const Uint32& Event, const Vector2i& position, const Uint32& flags);
    void sendCommonEvent(const Uint32& Event);
    void sendTextEvent(const Uint32& event, const std::string& text);
    void closeAllChildren();
    const std::string& getId() const;
    virtual Node* setId(const std::string& id);
    const String::HashType& getIdHash() const;
    Node* find(const std::string& id) const;
    Node* hasChild(const std::string& id) const;

    template <typename T>
    T* find(const std::string& id) const;

    template <typename T>
    T* bind(const std::string& id, T*& node);

    template <typename T>
    T* asType();

    template <typename T>
    const T* asConstType() const;

    Node* findByType(const Uint32& type) const;

    template <typename T>
    T* findByType(const Uint32& type) const;

    template <typename T>
    T* bindByType(const Uint32& type, T*& node);

    std::vector<Node*> findAllByType(const Uint32& type) const;

    template <typename T>
    std::vector<T*> findAllByType(const Uint32& type) const;

    bool inNodeTree(Node* node) const;
    bool isReverseDraw() const;
    void setReverseDraw(bool reverseDraw);
    void invalidateDraw();
    virtual void setRotation(float angle);
    void setRotation(const Float& angle, const OriginPoint& center);
    const OriginPoint& getRotationOriginPoint() const;
    void setRotationOriginPoint(const OriginPoint& center);
    void setRotationOriginPointPixels(const OriginPoint& center);
    void setRotationOriginPointX(const std::string& xEq);
    void setRotationOriginPointY(const std::string& yEq);
    Vector2f getRotationCenter() const;
    void setScale(const Float& scale);
    virtual void setScale(const Vector2f& scale);
    void setScale(const Vector2f& scale, const OriginPoint& center);
    void setScale(const Float& scale, const OriginPoint& center);
    const OriginPoint& getScaleOriginPoint() const;
    void setScaleOriginPoint(const OriginPoint& center);
    void setScaleOriginPointPixels(const OriginPoint& center);
    void setScaleOriginPointX(const std::string& xEq);
    void setScaleOriginPointY(const std::string& yEq);
    Vector2f getScaleCenter() const;
    virtual void setScale(float factorX, float factorY);
    virtual void setScaleOrigin(float x, float y);
    virtual void setRotationOrigin(float x, float y);
    const Float& getAlpha() const;
    virtual void setAlpha(const Float& alpha);
    virtual void setChildrenAlpha(const Float& alpha);
    ActionManager* getActionManager() const;
    Node* runAction(Action* action);
    bool removeAction(Action* action);
    bool removeActions(const std::vector<Action*>& actions);
    bool removeActionsByTag(const Action::UniqueID& tag);
    std::vector<Action*> getActions();
    std::vector<Action*> getActionsByTag(const Action::UniqueID& tag);
    void clearActions();
    Transform getLocalTransform() const;
    Transform getGlobalTransform() const;
    Transform getNodeToWorldTransform() const;
    Transform getWorldToNodeTransform() const;
    Vector2f convertToNodeSpace(const Vector2f& worldPoint) const;
    Vector2f convertToWorldSpace(const Vector2f& nodePoint) const;
    Rectf getLocalBounds() const;
    bool hasFocus() const;
    bool hasFocusWithin() const;
    virtual Node* setFocus(NodeFocusReason reason = NodeFocusReason::Unknown);
    Node* getFirstWidget() const;
    Node* getParentWidget() const;
    void enableReportSizeChangeToChildren();
    void disableReportSizeChangeToChildren();
    bool reportSizeChangeToChildren() const;
    Node* centerHorizontal();
    Node* centerVertical();
    Node* center();
    Node* clipEnable();
    Node* clipDisable();
    void writeNodeFlag(const Uint32& Flag, const Uint32& Val);
    SceneNode* getSceneNode() const;
    EventDispatcher* getEventDispatcher() const;
    virtual bool isDrawInvalidator() const;
    bool invalidated() const;
    virtual void invalidate(Node* invalidator);
    Uint32 getChildCount() const;
    Uint32 getChildOfTypeCount(const Uint32& type) const;
    Node* getChildAt(Uint32 index) const;
    Uint32 getNodeIndex() const;
    Uint32 getNodeOfTypeIndex() const;
    void runOnMainThread(Actions::Runnable::RunnableFunc runnable, const Time& delay = Seconds(0), const Action::UniqueID& uniqueIdentifier = 0);
    bool ensureMainThread(Actions::Runnable::RunnableFunc runnable, const Action::UniqueID& uniqueIdentifier = 0);
    void setTimeout(Actions::Runnable::RunnableFunc runnable, const Time& delay = Seconds(0), const Action::UniqueID& uniqueIdentifier = 0);
    void setInterval(Actions::Runnable::RunnableFunc runnable, const Time& interval, const Action::UniqueID& uniqueIdentifier = 0);
    void debounce(Actions::Runnable::RunnableFunc runnable, const Time& delay, const Action::UniqueID& uniqueIdentifier);
    bool isChild(Node* child) const;
    bool inParentTreeOf(Node* child) const;
    bool inParentTreeOfType(Uint32 type) const;
    Node* getParentOfType(Uint32 type) const;
    void setLoadingState(bool loading);
    bool isLoadingState() const;
    virtual void onIdChange();
    bool isClosing() const;
    bool isClosingChildren() const;
    virtual Node* overFind(const Vector2f& Point);
    void detach();
    void forEachNode(std::function<void(Node*)> func);
    void forEachChild(std::function<void(Node*)> func);
    virtual void nodeDraw();
    Uint32 forceKeyDown(const KeyEvent& event);
    Uint32 foceKeyUp(const KeyEvent& event);
    Uint32 forceTextInput(const TextInputEvent& Event);
    const Vector2f& getScreenPos() const;
    Rectf getScreenRect() const;
    bool hasEventsOfType(const Uint32& eventType) const;

Detailed Documentation

Methods

static UINode* New()

Creates a new UINode instance.

This is the factory method for creating UINode instances.

Returns:

Pointer to the newly created UINode instance.

virtual void worldToNodeTranslation(Vector2f& position) const

Transforms a world position to node-local position.

Converts a world coordinate position to this node’s local coordinate space. The position is modified in place.

Parameters:

position

Reference to the position to transform.

virtual void nodeToWorldTranslation(Vector2f& position) const

Transforms a node-local position to world position.

Converts a node-local coordinate position to world coordinate space. The position is modified in place.

Parameters:

position

Reference to the position to transform.

virtual void worldToNode(Vector2i& pos) const

Converts world integer coordinates to node-local coordinates.

Converts world coordinate integer position to this node’s local coordinate space. The position is modified in place.

Parameters:

pos

Reference to the integer position to transform.

virtual void nodeToWorld(Vector2i& pos) const

Converts node-local integer coordinates to world coordinates.

Converts node-local coordinate integer position to world coordinate space. The position is modified in place.

Parameters:

pos

Reference to the integer position to transform.

virtual void worldToNode(Vector2f& pos) const

Converts world floating-point coordinates to node-local coordinates.

Converts world coordinate floating-point position to this node’s local coordinate space. The position is modified in place.

Parameters:

pos

Reference to the floating-point position to transform.

virtual void nodeToWorld(Vector2f& pos) const

Converts node-local floating-point coordinates to world coordinates.

Converts node-local coordinate floating-point position to world coordinate space. The position is modified in place.

Parameters:

pos

Reference to the floating-point position to transform.

virtual Uint32 getType() const

Gets the node type identifier.

Returns a unique type identifier for this node class.

Returns:

The node type as a Uint32.

virtual bool isType(const Uint32& type) const

Checks if the node is of a specific type.

Determines whether this node is of the specified type or derived from it.

Parameters:

type

The type identifier to check.

Returns:

True if the node is of the specified type, false otherwise.

virtual void setPosition(const Vector2f& Pos)

Sets the node position in density-independent pixels (dp).

Sets the position of the node using density-independent pixels (dp) for resolution-independent layout. The position is relative to the parent.

Parameters:

Pos

The new position in dp.

virtual Node* setPosition(const Float& x, const Float& y)

Sets the node position in density-independent pixels (dp).

Sets the position of the node using individual coordinates in dp.

Parameters:

x

The X coordinate in dp.

y

The Y coordinate in dp.

Returns:

Pointer to this node for method chaining.

UINode* setPixelsPosition(const Vector2f& position)

Sets the node position in actual screen pixels.

Sets the position of the node using raw screen pixels. This bypasses density scaling and should be used when exact pixel control is needed.

Parameters:

position

The new position in pixels.

Returns:

Pointer to this node for method chaining.

UINode* setPixelsPosition(const Float& x, const Float& y)

Sets the node position in actual screen pixels.

Sets the position of the node using individual pixel coordinates.

Parameters:

x

The X coordinate in pixels.

y

The Y coordinate in pixels.

Returns:

Pointer to this node for method chaining.

virtual const Vector2f& getPosition() const

Gets the node position in density-independent pixels (dp).

Returns the current position of the node in dp.

Returns:

The position as a Vector2f in dp.

const Vector2f& getPixelsPosition() const

Gets the node position in actual screen pixels.

Returns the current position of the node in raw screen pixels.

Returns:

The position as a Vector2f in pixels.

virtual Node* setSize(const Sizef& size)

Sets the node size in density-independent pixels (dp).

Sets the size of the node using dp units. The size will be constrained by minimum size requirements.

Parameters:

size

The new size in dp.

Returns:

Pointer to this node for method chaining.

virtual Node* setSize(const Float& Width, const Float& Height)

Sets the node size in density-independent pixels (dp).

Sets the size of the node using individual dimensions in dp.

Parameters:

Width

The width in dp.

Height

The height in dp.

Returns:

Pointer to this node for method chaining.

UINode* setPixelsSize(const Sizef& size)

Sets the node size in actual screen pixels.

Sets the size of the node using raw pixel units. The size will be constrained by minimum size requirements.

Parameters:

size

The new size in pixels.

Returns:

Pointer to this node for method chaining.

UINode* setPixelsSize(const Float& x, const Float& y)

Sets the node size in actual screen pixels.

Sets the size of the node using individual pixel dimensions.

Parameters:

x

The width in pixels.

y

The height in pixels.

Returns:

Pointer to this node for method chaining.

virtual const Sizef& getSize() const

Gets the node size in density-independent pixels (dp).

Returns the current size of the node in dp.

Returns:

The size as a Sizef in dp.

Rect getRect() const

Gets the node rectangle in integer coordinates.

Returns the node’s bounds as an integer rectangle based on the dp position and size.

Returns:

The rectangle representing the node’s bounds.

Rectf getRectBox() const

Gets the node bounding box in floating-point coordinates.

Returns the node’s bounds as a floating-point rectangle in pixel coordinates.

Returns:

The bounding box as a Rectf.

virtual void draw()

Draws the node.

Virtual method that can be overridden to implement custom drawing behavior. The default implementation does nothing. This is called during the render cycle.

Uint32 getHorizontalAlign() const

Gets the horizontal alignment flags.

Returns the current horizontal alignment setting for text/content within the node.

Returns:

The horizontal alignment as a Uint32 bitmask.

UINode* setHorizontalAlign(Uint32 halign)

Sets the horizontal alignment.

Sets how content should be aligned horizontally within the node.

Parameters:

halign

The horizontal alignment flags.

Returns:

Pointer to this node for method chaining.

Uint32 getVerticalAlign() const

Gets the vertical alignment flags.

Returns the current vertical alignment setting for text/content within the node.

Returns:

The vertical alignment as a Uint32 bitmask.

UINode* setVerticalAlign(Uint32 valign)

Sets the vertical alignment.

Sets how content should be aligned vertically within the node.

Parameters:

valign

The vertical alignment flags.

Returns:

Pointer to this node for method chaining.

UINode* setGravity(Uint32 hvalign)

Sets both horizontal and vertical alignment.

Convenience method to set the gravity (combined horizontal and vertical alignment).

Parameters:

hvalign

The combined horizontal and vertical alignment flags.

Returns:

Pointer to this node for method chaining.

UINodeDrawable* setBackgroundFillEnabled(bool enabled)

Enables or disables background fill and returns the background drawable.

If enabled, creates or returns the background drawable. If disabled, the background fill is disabled.

Parameters:

enabled

True to enable background fill, false to disable.

Returns:

Pointer to the UINodeDrawable for the background.

UINode* setBackgroundDrawable(Drawable* drawable, bool ownIt = false, int index = 0)

Sets a background drawable from a Drawable object.

Enables background fill and sets the specified drawable at the given index.

Parameters:

drawable

Pointer to the Drawable to use.

ownIt

If true, the node takes ownership of the drawable.

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setBackgroundDrawable(const std::string& drawable, int index)

Sets a background drawable from a skin name.

Enables background fill and sets a drawable using the specified skin name.

Parameters:

drawable

The skin name for the drawable.

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setBackgroundColor(const Color& color)

Sets the background color.

Sets a solid color for the background. This will enable background fill if not already enabled.

Parameters:

color

The background color.

Returns:

Pointer to this node for method chaining.

UINode* setBackgroundTint(const Color& color, int index)

Sets the background tint for a specific layer.

Applies a color tint to the background drawable at the specified layer index.

Parameters:

color

The tint color.

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setBackgroundPositionX(const std::string& positionX, int index = 0)

Sets the background position X CSS property.

Controls the horizontal positioning of the background drawable at the given layer.

Parameters:

positionX

The CSS position value (e.g., “left”, “center”, “right”, or length).

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setBackgroundPositionY(const std::string& positionY, int index = 0)

Sets the background position Y CSS property.

Controls the vertical positioning of the background drawable at the given layer.

Parameters:

positionY

The CSS position value (e.g., “top”, “center”, “bottom”, or length).

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setBackgroundRepeat(const std::string& repeatRule, int index = 0)

Sets the background repeat CSS property.

Controls how the background drawable repeats at the specified layer.

Parameters:

repeatRule

The repeat rule (e.g., “repeat”, “no-repeat”, “repeat-x”, “repeat-y”).

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setBackgroundSize(const std::string& size, int index = 0)

Sets the background size CSS property.

Controls the size of the background drawable at the specified layer.

Parameters:

size

The size value (e.g., “auto”, “cover”, “contain”, or length).

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

Color getBackgroundColor() const

Gets the background color.

Returns the current background color. If no background is set, returns transparent.

Returns:

The background color.

Color getBackgroundTint(int index = 0) const

Gets the background tint color for a specific layer.

Returns the tint color applied to the background drawable at the specified layer.

Parameters:

index

The layer index (0-based).

Returns:

The background tint color at the specified layer.

UINode* setBorderRadius(const unsigned int& corners)

Sets the border radius for all corners.

Enables the border and sets the radius for all corners. This affects both the border and background fill.

Parameters:

corners

The border radius in pixels.

Returns:

Pointer to this node for method chaining.

UINode* setTopLeftRadius(const std::string& radius)

Sets the top-left border radius.

Sets the radius for the top-left corner using a CSS-style value.

Parameters:

radius

The radius value as a string (e.g., “5px”, “50%”).

Returns:

Pointer to this node for method chaining.

UINode* setTopRightRadius(const std::string& radius)

Sets the top-right border radius.

Sets the radius for the top-right corner using a CSS-style value.

Parameters:

radius

The radius value as a string (e.g., “5px”, “50%”).

Returns:

Pointer to this node for method chaining.

UINode* setBottomLeftRadius(const std::string& radius)

Sets the bottom-left border radius.

Sets the radius for the bottom-left corner using a CSS-style value.

Parameters:

radius

The radius value as a string (e.g., “5px”, “50%”).

Returns:

Pointer to this node for method chaining.

UINode* setBottomRightRadius(const std::string& radius)

Sets the bottom-right border radius.

Sets the radius for the bottom-right corner using a CSS-style value.

Parameters:

radius

The radius value as a string (e.g., “5px”, “50%”).

Returns:

Pointer to this node for method chaining.

Uint32 getBorderRadius() const

Gets the current border radius.

Returns the border radius value in pixels. Returns 0 if no border is enabled.

Returns:

The border radius in pixels.

UINodeDrawable* setForegroundFillEnabled(bool enabled)

Enables or disables foreground fill and returns the foreground drawable.

If enabled, creates or returns the foreground drawable. If disabled, the foreground fill is disabled.

Parameters:

enabled

True to enable foreground fill, false to disable.

Returns:

Pointer to the UINodeDrawable for the foreground.

UINode* setForegroundDrawable(Drawable* drawable, bool ownIt = false, int index = 0)

Sets a foreground drawable from a Drawable object.

Enables foreground fill and sets the specified drawable at the given index.

Parameters:

drawable

Pointer to the Drawable to use.

ownIt

If true, the node takes ownership of the drawable.

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setForegroundDrawable(const std::string& drawable, int index = 0)

Sets a foreground drawable from a skin name.

Enables foreground fill and sets a drawable using the specified skin name.

Parameters:

drawable

The skin name for the drawable.

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

Color getForegroundColor() const

Gets the foreground color.

Returns the current foreground color. If no foreground is set, returns transparent.

Returns:

The foreground color.

Color getForegroundTint(int index) const

Gets the foreground tint color for a specific layer.

Returns the tint color applied to the foreground drawable at the specified layer.

Parameters:

index

The layer index (0-based).

Returns:

The foreground tint color at the specified layer.

UINode* setForegroundColor(const Color& color)

Sets the foreground color.

Sets a solid color for the foreground. This will enable foreground fill if not already enabled.

Parameters:

color

The foreground color.

Returns:

Pointer to this node for method chaining.

UINode* setForegroundTint(const Color& color, int index)

Sets the foreground tint for a specific layer.

Applies a color tint to the foreground drawable at the specified layer.

Parameters:

color

The tint color.

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setForegroundPositionX(const std::string& positionX, int index = 0)

Sets the foreground position X CSS property.

Controls the horizontal positioning of the foreground drawable at the given layer.

Parameters:

positionX

The CSS position value.

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setForegroundPositionY(const std::string& positionY, int index = 0)

Sets the foreground position Y CSS property.

Controls the vertical positioning of the foreground drawable at the given layer.

Parameters:

positionY

The CSS position value.

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setForegroundRepeat(const std::string& repeatRule, int index = 0)

Sets the foreground repeat CSS property.

Controls how the foreground drawable repeats at the specified layer.

Parameters:

repeatRule

The repeat rule.

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setForegroundSize(const std::string& size, int index = 0)

Sets the foreground size CSS property.

Controls the size of the foreground drawable at the specified layer.

Parameters:

size

The size value.

index

The layer index (0-based).

Returns:

Pointer to this node for method chaining.

UINode* setForegroundRadius(const unsigned int& corners)

Sets the foreground border radius for all corners.

Sets the radius for the foreground content’s corners.

Parameters:

corners

The border radius in pixels.

Returns:

Pointer to this node for method chaining.

Uint32 getForegroundRadius() const

Gets the current foreground border radius.

Returns the foreground border radius in pixels. Returns 0 if no foreground is enabled.

Returns:

The foreground border radius in pixels.

UIBorderDrawable* setBorderEnabled(bool enabled) const

Enables or disables the border and returns the border drawable.

If enabled, creates or returns the border drawable. If disabled, the border is hidden.

Parameters:

enabled

True to enable the border, false to disable.

Returns:

Pointer to the UIBorderDrawable for the border.

UINode* setBorderColor(const Color& color)

Sets the border color.

Sets the color of the border. This will enable the border if not already enabled.

Parameters:

color

The border color.

Returns:

Pointer to this node for method chaining.

Color getBorderColor()

Gets the border color.

Returns the current border color. The border drawable will be created if it doesn’t exist.

Returns:

The border color.

UINode* setBorderWidth(const unsigned int& width)

Sets the border width.

Sets the thickness of the border in pixels. This will enable the border if not already enabled.

Parameters:

width

The border width in pixels.

Returns:

Pointer to this node for method chaining.

Float getBorderWidth() const

Gets the border width.

Returns the current border width in pixels. Defaults to 1.0 if no border is set.

Returns:

The border width as a Float.

const Uint32& getFlags() const

Gets the current node flags.

Returns the bitmask of flags that control various node behaviors and states.

Returns:

The flags as a Uint32 bitmask.

virtual UINode* setFlags(const Uint32& flags)

Sets multiple flags on the node.

Adds the specified flags to the node’s current flag set. This can enable various behaviors like fill modes, drag support, alignment, etc.

Parameters:

flags

Bitwise combination of flags to set.

Returns:

Pointer to this node for method chaining.

virtual UINode* unsetFlags(const Uint32& flags)

Unsets multiple flags on the node.

Removes the specified flags from the node’s current flag set.

Parameters:

flags

Bitwise combination of flags to unset.

Returns:

Pointer to this node for method chaining.

virtual UINode* resetFlags(Uint32 newFlags = 0)

Resets all flags to a specific value.

Clears all current flags and optionally sets new flags.

Parameters:

newFlags

The new flags bitmask (default is 0 to clear all).

Returns:

Pointer to this node for method chaining.

UINodeDrawable* getBackground() const

Gets the background drawable.

Returns the background drawable object, creating it if it doesn’t exist.

Returns:

Pointer to the UINodeDrawable for the background.

bool hasBackground() const

Checks if the node has a background drawable.

Returns:

True if a background drawable exists, false otherwise.

UINodeDrawable* getForeground() const

Gets the foreground drawable.

Returns the foreground drawable object, creating it if it doesn’t exist.

Returns:

Pointer to the UINodeDrawable for the foreground.

bool hasForeground() const

Checks if the node has a foreground drawable.

Returns:

True if a foreground drawable exists, false otherwise.

UIBorderDrawable* getBorder() const

Gets the border drawable.

Returns the border drawable object, creating it if it doesn’t exist.

Returns:

Pointer to the UIBorderDrawable for the border.

void setThemeByName(const std::string& Theme)

Sets the theme by name.

Applies a theme to this node by looking up the theme by its name from the UIThemeManager. The theme will control the visual appearance.

Parameters:

Theme

The name of the theme to apply.

virtual void setTheme(UITheme* Theme)

Sets the theme for this node.

Applies the specified UITheme to this node, affecting its visual appearance through skins and styles.

Parameters:

Theme

Pointer to the UITheme to apply.

virtual UINode* setThemeSkin(UITheme* Theme, const std::string& skinName)

Sets the theme skin with an explicit theme.

Applies a specific skin from the specified theme to this node.

Parameters:

Theme

Pointer to the UITheme to use.

skinName

Name of the skin to apply from the theme.

Returns:

Pointer to this node for method chaining.

virtual UINode* setThemeSkin(const std::string& skinName)

Sets the theme skin using the default theme.

Applies a specific skin from the default theme to this node.

Parameters:

skinName

Name of the skin to apply.

Returns:

Pointer to this node for method chaining.

void setThemeToChildren(UITheme* Theme)

Sets the theme for all children recursively.

Applies the specified theme to this node and all its descendants.

Parameters:

Theme

Pointer to the UITheme to apply to children.

UISkin* getSkin() const

Gets the current skin.

Returns the UISkin object currently applied to this node, or nullptr if none.

Returns:

Pointer to the UISkin or nullptr.

virtual UINode* setSkin(const UISkin& Skin)

Sets the skin from a UISkin reference.

Applies the specified skin to this node. The skin is copied.

Parameters:

Skin

Reference to the UISkin to apply.

Returns:

Pointer to this node for method chaining.

UINode* setSkin(UISkin* skin)

Sets the skin from a UISkin pointer.

Applies the specified skin to this node without copying.

Parameters:

skin

Pointer to the UISkin to apply.

Returns:

Pointer to this node for method chaining.

UINode* setSkinColor(const Color& color)

Sets the skin color tint.

Applies a color tint to the skin/sprite. This multiplies with the skin’s colors.

Parameters:

color

The tint color to apply.

Returns:

Pointer to this node for method chaining.

const Color& getSkinColor() const

Gets the current skin color tint.

Returns the color tint currently applied to the skin.

Returns:

The skin color as a const Color reference.

void removeSkin()

Removes the current skin.

Deletes and removes the skin from this node, reverting to no custom skin.

virtual void pushState(const Uint32& State, bool emitEvent = true)

Pushes a state onto the state stack.

Adds a new state (like hover, pressed, focused) to the node. States can be combined and affect the skin rendering. If emitEvent is true, a state change event will be triggered.

Parameters:

State

The state to push (use UIState::StateFlag* values).

emitEvent

Whether to emit a state change event (default: true).

virtual void popState(const Uint32& State, bool emitEvent = true)

Pops a state from the state stack.

Removes a state from the node. This can revert visual changes from that state. If emitEvent is true, a state change event will be triggered.

Parameters:

State

The state to pop.

emitEvent

Whether to emit a state change event (default: true).

Sizef getSkinSize(const Uint32& state = UIState::StateFlagNormal) const

Gets the current skin size for a specific state.

Returns the size of the current skin at the specified state. Useful for determining the preferred size of a skinned node.

Parameters:

state

The state flag (default: UIState::StateFlagNormal).

Returns:

The skin size as a Sizef.

void applyDefaultTheme()

Applies the default theme to this node.

Requests the UIThemeManager to apply the default theme to this node, setting up default skins and styles.

Node* getWindowContainer() const

Gets the window container node.

Finds and returns the container node of the window that contains this node, or the root if not in a window.

Returns:

Pointer to the window container node or the scene node.

bool isTabFocusable() const

Checks if this node is tab focusable.

Determines whether this node can receive focus via Tab key navigation.

Returns:

True if the node is tab focusable, false otherwise.

bool isDragging() const

Checks if the node is currently being dragged.

Returns:

True if the node is in a drag operation, false otherwise.

void setDragging(bool dragging, bool emitDropEvent = true)

Sets or clears the dragging state.

Changes whether the node is considered to be dragging. If emitDropEvent is true and ending the drag, a drop event will be sent to the node under the cursor.

Parameters:

dragging

True to start dragging, false to stop.

emitDropEvent

Whether to emit a drop event when stopping (default: true).

void startDragging(const Vector2f& position)

Starts a drag operation from a specific position.

Begins dragging this node, recording the starting position for drag calculations.

Parameters:

position

The starting position of the drag in dp.

bool ownsChildPosition() const

Checks if this node owns its children’s positions.

Determines whether this node is responsible for positioning its children (as opposed to children positioning themselves).

Returns:

True if children positions are owned, false otherwise.

const Vector2f& getDragPoint() const

Gets the current drag point.

Returns the point where dragging started or the current drag position.

Returns:

The drag point as a Vector2f in dp.

void setDragPoint(const Vector2f& Point)

Sets the drag point.

Sets the reference point used during dragging operations.

Parameters:

Point

The new drag point in dp.

bool isDragEnabled() const

Checks if dragging is enabled for this node.

Determines whether this node can be dragged by the user.

Returns:

True if dragging is enabled, false otherwise.

void setDragEnabled(const bool& enable)

Enables or disables dragging.

Controls whether this node can be dragged by the user.

Parameters:

enable

True to enable dragging, false to disable.

void setDragButton(const Uint32& Button)

Sets which mouse button initiates dragging.

Specifies which mouse button (left, right, middle) should be used to initiate dragging on this node.

Parameters:

Button

The mouse button mask (EE_BUTTON_* constants).

const Uint32& getDragButton() const

Gets the mouse button that initiates dragging.

Returns which mouse button is configured to start dragging.

Returns:

The mouse button mask.

virtual Node* setFocus(NodeFocusReason reason = NodeFocusReason::Unknown)

Requests focus for this node.

Attempts to give this node input focus. The focus change may be denied depending on node state and focus policies.

Parameters:

reason

The reason for the focus request (default: Unknown).

Returns:

Pointer to this node if focus was granted, nullptr otherwise.

Float getPropertyRelativeTargetContainerLength(const CSS::PropertyRelativeTarget& relativeTarget, const Float& defaultValue = 0, const Uint32& propertyIndex = 0) const

Gets a property’s value relative to a container length.

Evaluates a CSS property that has a relative target (like percentage or viewport units) and converts it to an absolute length based on the appropriate container dimensions.

Parameters:

relativeTarget

The relative target container (width, height, etc.).

defaultValue

The default value if the property cannot be evaluated.

propertyIndex

The property index for multi-value properties (default: 0).

Returns:

The computed length in pixels.

virtual Float convertLength(const CSS::StyleSheetLength& length, const Float& containerLength) const

Converts a CSS length to pixels.

Parses and converts a CSS-style length value (with units like px, dp, %, em, rem, etc.) to an absolute pixel value based on the container length and current context.

Parameters:

length

The CSS length to convert.

containerLength

The reference container length in pixels.

Returns:

The computed length in pixels.

Float convertLengthAsDp(const CSS::StyleSheetLength& length, const Float& containerLength) const

Converts a CSS length to density-independent pixels (dp).

Similar to convertLength but returns the result in dp units instead of pixels.

Parameters:

length

The CSS length to convert.

containerLength

The reference container length in pixels.

Returns:

The computed length in dp.

Float lengthFromValue(const std::string& value, const CSS::PropertyRelativeTarget& relativeTarget, const Float& defaultValue = 0, const Uint32& propertyIndex = 0) const

Evaluates a CSS length string to a pixel value.

Parses a string containing a CSS length value and converts it to pixels using the specified relative target for percentage/relative units.

Parameters:

value

The CSS length string (e.g., “10px”, “50%”, “1em”).

relativeTarget

The relative target for relative units.

defaultValue

The default value if parsing fails (default: 0).

propertyIndex

The property index for multi-value properties (default: 0).

Returns:

The computed length in pixels.

Float lengthFromValue(const CSS::StyleSheetProperty& property, const Float& defaultValue = 0)

Evaluates a CSS property to a pixel value.

Convenience method that extracts the value from a StyleSheetProperty and converts it to pixels.

Parameters:

property

The StyleSheetProperty containing the value to evaluate.

defaultValue

The default value if the property is not set (default: 0).

Returns:

The computed length in pixels.

Float lengthFromValueAsDp(const std::string& value, const CSS::PropertyRelativeTarget& relativeTarget, const Float& defaultValue = 0, const Uint32& propertyIndex = 0) const

Evaluates a CSS length string to a dp value.

Similar to lengthFromValue but returns the result in dp units.

Parameters:

value

The CSS length string.

relativeTarget

The relative target for relative units.

defaultValue

The default value if parsing fails (default: 0).

propertyIndex

The property index for multi-value properties (default: 0).

Returns:

The computed length in dp.

Float lengthFromValueAsDp(const CSS::StyleSheetProperty& property, const Float& defaultValue = 0) const

Evaluates a CSS property to a dp value.

Convenience method that extracts the value from a StyleSheetProperty and converts it to dp.

Parameters:

property

The StyleSheetProperty containing the value to evaluate.

defaultValue

The default value if the property is not set (default: 0).

Returns:

The computed length in dp.

UISceneNode* getUISceneNode() const

Gets the UISceneNode that contains this node.

Returns the UI scene node which is the root of the UI rendering hierarchy that this node belongs to.

Returns:

Pointer to the UISceneNode or nullptr.

Input* getInput() const

Gets the input manager.

Returns the Input object used for handling keyboard and mouse input from the window associated with this UI node.

Returns:

Pointer to the Input object.

void setMinWidth(const Float& width)

Sets the minimum width constraint.

Sets the minimum width that this node can be sized to. The node will not shrink below this width during layout.

Parameters:

width

The minimum width in dp.

void setMinHeight(const Float& height)

Sets the minimum height constraint.

Sets the minimum height that this node can be sized to. The node will not shrink below this height during layout.

Parameters:

height

The minimum height in dp.

void setMinSize(const Sizef& size)

Sets both minimum width and height constraints.

Sets the minimum size constraints for this node.

Parameters:

size

The minimum size in dp.

const Sizef& getCurMinSize() const

Gets the current minimum size.

Returns the minimum size constraints currently set on this node.

Returns:

The minimum size as a Sizef in dp.

Rectf getLocalDpBounds() const

Gets the local bounds in density-independent pixels.

Returns the rectangle representing the node’s local coordinate space (0,0 to width,height) in dp units.

Returns:

The local bounds as a Rectf.

virtual void nodeDraw()

Virtual method for custom node drawing.

Override this method to implement custom drawing for the node. This is called after background and before foreground/border. Default implementation does nothing.

void clearForeground()

Clears the foreground drawable.

Deletes and removes the foreground drawable from this node.

void clearBackground()

Clears the background drawable.

Deletes and removes the background drawable from this node.

const ClipType& getClipType() const

Gets the current clipping type.

Returns what type of clipping is applied to this node’s content.

Returns:

The current ClipType.

UINode* setClipType(const ClipType& clipType)

Sets the clipping type.

Controls how the node’s content is clipped to its bounds or padding.

Parameters:

clipType

The clipping type to apply.

Returns:

Pointer to this node for method chaining.

bool hasBorder() const

Checks if the node has a border.

Returns:

True if border is enabled, false otherwise.

virtual const Rectf& getPixelsPadding() const

Gets the padding in actual pixels.

Returns the padding values in pixel units. For UINode this returns a zero-sized rect as padding is typically managed by UIWidget.

Returns:

The padding as a Rectf in pixels.

const std::string& getMinWidthEq() const

Gets the minimum width equation.

Returns the CSS-style expression that defines the minimum width, if one was set (e.g., “50%”, “100px”).

Returns:

The minimum width equation string.

void setMinSizeEq(const std::string& minWidthEq, const std::string& minHeightEq)

Sets both minimum width and height equations.

Sets dynamic minimum size constraints using CSS-style expressions. These are evaluated during layout to determine the minimum size.

Parameters:

minWidthEq

The minimum width expression (e.g., “50%”).

minHeightEq

The minimum height expression.

void setMinWidthEq(const std::string& minWidthEq)

Sets the minimum width equation.

Sets a dynamic minimum width constraint using a CSS-style expression.

Parameters:

minWidthEq

The minimum width expression.

const std::string& getMinHeightEq() const

Gets the minimum height equation.

Returns the CSS-style expression for minimum height.

Returns:

The minimum height equation string.

void setMinHeightEq(const std::string& minHeightEq)

Sets the minimum height equation.

Sets a dynamic minimum height constraint using a CSS-style expression.

Parameters:

minHeightEq

The minimum height expression.

const std::string& getMaxWidthEq() const

Gets the maximum width equation.

Returns the CSS-style expression that defines the maximum width.

Returns:

The maximum width equation string.

void setMaxSizeEq(const std::string& maxWidthEq, const std::string& maxHeightEq)

Sets both maximum width and height equations.

Sets dynamic maximum size constraints using CSS-style expressions.

Parameters:

maxWidthEq

The maximum width expression.

maxHeightEq

The maximum height expression.

void setMaxWidthEq(const std::string& maxWidthEq)

Sets the maximum width equation.

Sets a dynamic maximum width constraint using a CSS-style expression.

Parameters:

maxWidthEq

The maximum width expression.

const std::string& getMaxHeightEq() const

Gets the maximum height equation.

Returns the CSS-style expression for maximum height.

Returns:

The maximum height equation string.

void setMaxHeightEq(const std::string& maxHeightEq)

Sets the maximum height equation.

Sets a dynamic maximum height constraint using a CSS-style expression.

Parameters:

maxHeightEq

The maximum height expression.

Sizef getMinSize() const

Gets the computed minimum size in dp.

Evaluates any minimum size equations and returns the actual minimum size that should be enforced during layout.

Returns:

The computed minimum size in dp.

Sizef getMaxSize() const

Gets the computed maximum size in dp.

Evaluates any maximum size equations and returns the actual maximum size that should be enforced during layout.

Returns:

The computed maximum size in dp.

Sizef getMinSizePx() const

Gets the computed minimum size in pixels.

Similar to getMinSize() but returns the result in pixel units.

Returns:

The computed minimum size in pixels.

Sizef getMaxSizePx() const

Gets the computed maximum size in pixels.

Similar to getMaxSize() but returns the result in pixel units.

Returns:

The computed maximum size in pixels.

Sizef fitMinMaxSizeDp(const Sizef& size) const

Fits a size to the minimum and maximum constraints in dp.

Takes a proposed size and adjusts it to fall within the minimum and maximum size constraints, accounting for equations.

Parameters:

size

The proposed size in dp.

Returns:

The adjusted size that satisfies min/max constraints in dp.

Sizef fitMinMaxSizePx(const Sizef& size) const

Fits a size to the minimum and maximum constraints in pixels.

Similar to fitMinMaxSizeDp but operates on pixel values.

Parameters:

size

The proposed size in pixels.

Returns:

The adjusted size that satisfies min/max constraints in pixels.

virtual bool isScrollable() const

Checks if the node is scrollable.

Determines whether this node supports scrolling behavior.

Returns:

True if the node is scrollable, false otherwise.