.. index:: pair: class; EE::UI::UISceneNode .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node: class EE::UI::UISceneNode ========================= .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class UISceneNode: public :ref:`EE::Scene::SceneNode` { public: // typedefs typedef std::function :target:`KeyBindingCommand`; // construction virtual :ref:`~UISceneNode`(); // methods static UISceneNode* :ref:`New`(:ref:`EE::Window::Window`* window = NULL); virtual :ref:`Node`* :ref:`setSize`(const :ref:`Sizef`& size); virtual :ref:`Node`* :ref:`setSize`(const :ref:`Float`& Width, const :ref:`Float`& Height); UISceneNode* :ref:`setPixelsSize`(const :ref:`Sizef`& size); UISceneNode* :ref:`setPixelsSize`(const :ref:`Float`& x, const :ref:`Float`& y); virtual const :ref:`Sizef`& :ref:`getSize`() const; virtual void :ref:`update`(const :ref:`Time`& elapsed); void :ref:`setTranslator`(:ref:`Translator` translator); void :ref:`setTranslator`(:ref:`Translator`&& translator); const :ref:`Translator`& :ref:`getTranslator`() const; :ref:`Translator`& :ref:`getTranslator`(); :ref:`String` :ref:`getTranslatorString`(const std::string& str); :ref:`String` :ref:`getTranslatorString`(const std::string& str, const :ref:`String`& defaultValue); :ref:`String` :ref:`getTranslatorStringFromKey`(const std::string& key, const :ref:`String`& defaultValue); :ref:`String` :ref:`i18n`(const std::string& key, const :ref:`String`& defaultValue); :ref:`UIWidget`* :ref:`loadLayoutNodes`(pugi::xml_node node, :ref:`Node`* parent, const :ref:`Uint32`& marker); :ref:`UIWidget`* :ref:`loadLayoutFromFile`(const std::string& layoutPath, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0); :ref:`UIWidget`* :ref:`loadLayoutFromString`(const std::string& layoutString, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0); :ref:`UIWidget`* :ref:`loadLayoutFromString`(const char* layoutString, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0); :ref:`UIWidget`* :ref:`loadLayoutFromMemory`(const void* buffer, :ref:`Int32` bufferSize, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0); :ref:`UIWidget`* :ref:`loadLayoutFromStream`(:ref:`IOStream`& stream, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0); :ref:`UIWidget`* :ref:`loadLayoutFromPack`(:ref:`Pack`* pack, const std::string& FilePackPath, :ref:`Node`* parent = NULL); void :ref:`setStyleSheet`(const :ref:`CSS::StyleSheet`& styleSheet, bool loadStyle = true); void :ref:`setStyleSheet`(const std::string& inlineStyleSheet); void :ref:`combineStyleSheet`(const :ref:`CSS::StyleSheet`& styleSheet, bool forceReloadStyle = true, :ref:`URI` baseURI = {}); void :ref:`combineStyleSheet`(const std::string& inlineStyleSheet, bool forceReloadStyle = true, const :ref:`Uint32`& marker = 0, :ref:`URI` baseURI = {}); :ref:`CSS::StyleSheet`& :ref:`getStyleSheet`(); bool :ref:`hasStyleSheet`(); bool :ref:`isLoading`() const; :ref:`UIThemeManager`* :ref:`getUIThemeManager`() const; :ref:`UIWidget`* :ref:`getRoot`() const; void :ref:`invalidateStyle`(:ref:`UIWidget`* widget, bool tryReinsert = false); void :ref:`invalidateStyleState`(:ref:`UIWidget`* widget, bool disableCSSAnimations = false, bool tryReinsert = false); void :ref:`invalidateLayout`(:ref:`UILayout`* widget); void :ref:`setIsLoading`(bool isLoading); void :ref:`updateDirtyLayouts`(); void :ref:`updateDirtyStyles`(); void :ref:`updateDirtyStyleStates`(); bool :ref:`isUpdatingLayouts`() const; :ref:`UIIconThemeManager`* :ref:`getUIIconThemeManager`() const; :ref:`UIIcon`* :ref:`findIcon`(const std::string& iconName); :ref:`Drawable`* :ref:`findIconDrawable`(const std::string& iconName, const size_t& drawableSize); :ref:`KeyBindings`& :ref:`getKeyBindings`(); void :ref:`setKeyBindings`(const :ref:`KeyBindings`& keyBindings); void :ref:`addKeyBindingString`(const std::string& shortcut, const std::string& command); void :ref:`addKeyBinding`(const :ref:`KeyBindings::Shortcut`& shortcut, const std::string& command); void :ref:`replaceKeyBindingString`(const std::string& shortcut, const std::string& command); void :ref:`replaceKeyBinding`(const :ref:`KeyBindings::Shortcut`& shortcut, const std::string& command); void :ref:`addKeyBindsString`(const std::map& binds); void :ref:`addKeyBinds`(const std::map<:ref:`KeyBindings::Shortcut`, std::string>& binds); void :ref:`setKeyBindingCommand`(const std::string& command, :ref:`KeyBindingCommand` func); void :ref:`executeKeyBindingCommand`(const std::string& command); :ref:`UIEventDispatcher`* :ref:`getUIEventDispatcher`() const; :ref:`ColorSchemePreference` :ref:`getColorSchemePreference`() const; void :ref:`setColorSchemePreference`(const :ref:`ColorSchemeExtPreference`& colorSchemePreference); void :ref:`setColorSchemePreference`(const :ref:`ColorSchemePreference`& colorSchemePreference); const :ref:`Uint32`& :ref:`getMaxInvalidationDepth`() const; void :ref:`setMaxInvalidationDepth`(const :ref:`Uint32`& maxInvalidationDepth); virtual void :ref:`nodeToWorldTranslation`(:ref:`Vector2f`& Pos) const; void :ref:`reloadStyle`(bool disableAnimations = false, bool forceReApplyProperties = false, bool resetPropertiesCache = false); bool :ref:`hasThreadPool`() const; std::shared_ptr<:ref:`ThreadPool`> :ref:`getThreadPool`(); void :ref:`setThreadPool`(const std::shared_ptr<:ref:`ThreadPool`>& threadPool); void :ref:`setTheme`(:ref:`UITheme`* theme); :ref:`CSS::MediaFeatures` :ref:`getMediaFeatures`() const; std::vector<:ref:`UIWidget`*> :ref:`loadNode`(pugi::xml_node node, :ref:`Node`* parent, const :ref:`Uint32`& marker = 0); void :ref:`setURI`(const :ref:`URI`& uri); void :ref:`setURIFromURL`(const :ref:`URI`& url); const :ref:`URI`& :ref:`getURI`() const; void :ref:`openURL`(:ref:`URI` uri); void :target:`setURLInterceptorCb`(std::function` uri)> cb); :ref:`URI` :ref:`solveRelativePath`(:ref:`URI` uri, :ref:`URI` baseURI = {}); :ref:`URI` :ref:`getReferer`() const; }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // typedefs typedef std::function`*)> :ref:`EventCallback`; // methods virtual void :ref:`setPosition`(const :ref:`Vector2f`& position); virtual void :ref:`setRotation`(float angle); virtual void :ref:`setScale`(float factorX, float factorY); virtual void :ref:`setScale`(const :ref:`Vector2f`& factors); virtual void :ref:`setScaleOrigin`(float x, float y); virtual void :ref:`setScaleOrigin`(const :ref:`Vector2f`& origin); virtual void :ref:`setRotationOrigin`(float x, float y); virtual void :ref:`setRotationOrigin`(const :ref:`Vector2f`& origin); virtual const :ref:`Vector2f`& :ref:`getRotationOrigin`() const; virtual const :ref:`Vector2f`& :ref:`getPosition`() const; virtual const float& :ref:`getRotation`() const; virtual const :ref:`Vector2f`& :ref:`getScale`() const; virtual const :ref:`Vector2f`& :ref:`getScaleOrigin`() const; void :ref:`move`(float offsetX, float offsetY); void :ref:`move`(const :ref:`Vector2f`& offset); void :ref:`rotate`(float angle); void :ref:`scale`(float factorX, float factorY); void :ref:`scale`(const :ref:`Vector2f`& factor); const :ref:`Transform`& :ref:`getTransform`() const; const :ref:`Transform`& :ref:`getInverseTransform`() const; static :ref:`Node`* :ref:`New`(); virtual void :ref:`worldToNodeTranslation`(:ref:`Vector2f`& position) const; virtual void :ref:`nodeToWorldTranslation`(:ref:`Vector2f`& position) const; virtual void :ref:`worldToNode`(:ref:`Vector2i`& pos) const; virtual void :ref:`nodeToWorld`(:ref:`Vector2i`& pos) const; virtual void :ref:`worldToNode`(:ref:`Vector2f`& pos) const; virtual void :ref:`nodeToWorld`(:ref:`Vector2f`& pos) const; virtual :ref:`Uint32` :ref:`getType`() const; virtual bool :ref:`isType`(const :ref:`Uint32`& type) const; void :ref:`messagePost`(const :ref:`NodeMessage`* Msg); virtual void :ref:`setPosition`(const :ref:`Vector2f`& Pos); virtual :ref:`Node`* :ref:`setPosition`(const :ref:`Float`& x, const :ref:`Float`& y); virtual :ref:`Node`* :ref:`setSize`(const :ref:`Sizef`& size); :ref:`Node`* :ref:`setSize`(const :ref:`Float`& Width, const :ref:`Float`& Height); virtual const :ref:`Sizef`& :ref:`getSize`() const; const :ref:`Sizef`& :ref:`getPixelsSize`() const; :ref:`Node`* :ref:`setVisible`(const bool& visible, bool emitEventNotification = true); :ref:`Node`* :ref:`setChildrenVisibility`(bool visible, bool emitEventNotification = true); bool :ref:`isVisible`() const; bool :ref:`hasVisibility`() const; :ref:`Node`* :ref:`setEnabled`(const bool& enabled); bool :ref:`isEnabled`() const; bool :ref:`isDisabled`() const; :ref:`Node`* :ref:`getParent`() const; :ref:`Node`* :ref:`setParent`(:ref:`Node`* parent); virtual void :ref:`close`(); virtual void :ref:`draw`(); virtual void :ref:`update`(const :ref:`Time`& time); virtual void :ref:`scheduledUpdate`(const :ref:`Time`& time); :ref:`Node`* :ref:`getNextNode`() const; :ref:`Node`* :ref:`getPrevNode`() const; :ref:`Node`* :ref:`getNextNodeLoop`() const; :ref:`Node`* :ref:`setData`(const :ref:`UintPtr`& data); const :ref:`UintPtr`& :ref:`getData`() const; :ref:`Node`* :ref:`setBlendMode`(const :ref:`BlendMode`& blend); const :ref:`BlendMode`& :ref:`getBlendMode`() const; :ref:`Node`* :ref:`toFront`(); :ref:`Node`* :ref:`toBack`(); void :ref:`toPosition`(const :ref:`Uint32`& position); const :ref:`Uint32`& :ref:`getNodeFlags`() const; void :ref:`setNodeFlags`(const :ref:`Uint32`& flags); bool :ref:`isSceneNode`() const; bool :ref:`isUISceneNode`() const; bool :ref:`isUINode`() const; bool :ref:`isWidget`() const; bool :ref:`isWindow`() const; bool :ref:`isLayout`() const; bool :ref:`isClipped`() const; bool :ref:`isRotated`() const; bool :ref:`isScaled`() const; bool :ref:`isFrameBuffer`() const; bool :ref:`isMouseOver`() const; bool :ref:`isMouseOverMeOrChildren`() const; bool :ref:`isMeOrParentTreeVisible`() const; bool :ref:`isMeOrParentTreeRotated`() const; bool :ref:`isMeOrParentTreeScaled`() const; bool :ref:`isMeOrParentTreeScaledOrRotated`() const; bool :ref:`isMeOrParentTreeScaledOrRotatedOrFrameBuffer`() const; :ref:`Uint32` :ref:`addEventListener`(const :ref:`Uint32`& eventType, const :ref:`EventCallback`& callback); :ref:`Uint32` :ref:`on`(const :ref:`Uint32`& eventType, const :ref:`EventCallback`& callback); :ref:`Uint32` :ref:`onClick`(const std::function`*)>& callback, const :ref:`MouseButton`& button = MouseButton::EE_BUTTON_LEFT); :ref:`Uint32` :ref:`onDoubleClick`(const std::function`*)>& callback, const :ref:`MouseButton`& button = MouseButton::EE_BUTTON_LEFT); void :ref:`removeEventsOfType`(const :ref:`Uint32`& eventType); void :ref:`removeEventListener`(const :ref:`Uint32`& callbackId); void :ref:`removeEventListener`(const std::vector<:ref:`Uint32`>& callbacksIds); void :ref:`clearEventListener`(); :ref:`Node`* :ref:`getFirstChild`() const; :ref:`Node`* :ref:`getLastChild`() const; const :ref:`Polygon2f`& :ref:`getWorldPolygon`(); const :ref:`Rectf`& :ref:`getWorldBounds`(); bool :ref:`isParentOf`(const :ref:`Node`* node) const; void :ref:`sendEvent`(const :ref:`Event`* Event); void :ref:`sendMouseEvent`(const :ref:`Uint32`& Event, const :ref:`Vector2i`& position, const :ref:`Uint32`& flags); void :ref:`sendCommonEvent`(const :ref:`Uint32`& Event); void :ref:`sendTextEvent`(const :ref:`Uint32`& event, const std::string& text); void :ref:`closeAllChildren`(); const std::string& :ref:`getId`() const; virtual :ref:`Node`* :ref:`setId`(const std::string& id); const :ref:`String::HashType`& :ref:`getIdHash`() const; :ref:`Node`* :ref:`find`(const std::string& id) const; :ref:`Node`* :ref:`hasChild`(const std::string& id) const; template T* :ref:`find`(const std::string& id) const; template T* :ref:`bind`(const std::string& id, T*& node); template T* :ref:`asType`(); template const T* :ref:`asConstType`() const; :ref:`Node`* :ref:`findByType`(const :ref:`Uint32`& type) const; template T* :ref:`findByType`(const :ref:`Uint32`& type) const; template T* :ref:`bindByType`(const :ref:`Uint32`& type, T*& node); std::vector<:ref:`Node`*> :ref:`findAllByType`(const :ref:`Uint32`& type) const; template std::vector :ref:`findAllByType`(const :ref:`Uint32`& type) const; bool :ref:`inNodeTree`(:ref:`Node`* node) const; bool :ref:`isReverseDraw`() const; void :ref:`setReverseDraw`(bool reverseDraw); void :ref:`invalidateDraw`(); virtual void :ref:`setRotation`(float angle); void :ref:`setRotation`(const :ref:`Float`& angle, const :ref:`OriginPoint`& center); const :ref:`OriginPoint`& :ref:`getRotationOriginPoint`() const; void :ref:`setRotationOriginPoint`(const :ref:`OriginPoint`& center); void :ref:`setRotationOriginPointPixels`(const :ref:`OriginPoint`& center); void :ref:`setRotationOriginPointX`(const std::string& xEq); void :ref:`setRotationOriginPointY`(const std::string& yEq); :ref:`Vector2f` :ref:`getRotationCenter`() const; void :ref:`setScale`(const :ref:`Float`& scale); virtual void :ref:`setScale`(const :ref:`Vector2f`& scale); void :ref:`setScale`(const :ref:`Vector2f`& scale, const :ref:`OriginPoint`& center); void :ref:`setScale`(const :ref:`Float`& scale, const :ref:`OriginPoint`& center); const :ref:`OriginPoint`& :ref:`getScaleOriginPoint`() const; void :ref:`setScaleOriginPoint`(const :ref:`OriginPoint`& center); void :ref:`setScaleOriginPointPixels`(const :ref:`OriginPoint`& center); void :ref:`setScaleOriginPointX`(const std::string& xEq); void :ref:`setScaleOriginPointY`(const std::string& yEq); :ref:`Vector2f` :ref:`getScaleCenter`() const; virtual void :ref:`setScale`(float factorX, float factorY); virtual void :ref:`setScaleOrigin`(float x, float y); virtual void :ref:`setRotationOrigin`(float x, float y); const :ref:`Float`& :ref:`getAlpha`() const; virtual void :ref:`setAlpha`(const :ref:`Float`& alpha); virtual void :ref:`setChildrenAlpha`(const :ref:`Float`& alpha); :ref:`ActionManager`* :ref:`getActionManager`() const; :ref:`Node`* :ref:`runAction`(:ref:`Action`* action); bool :ref:`removeAction`(:ref:`Action`* action); bool :ref:`removeActions`(const std::vector<:ref:`Action`*>& actions); bool :ref:`removeActionsByTag`(const :ref:`Action::UniqueID`& tag); std::vector<:ref:`Action`*> :ref:`getActions`(); std::vector<:ref:`Action`*> :ref:`getActionsByTag`(const :ref:`Action::UniqueID`& tag); void :ref:`clearActions`(); :ref:`Transform` :ref:`getLocalTransform`() const; :ref:`Transform` :ref:`getGlobalTransform`() const; :ref:`Transform` :ref:`getNodeToWorldTransform`() const; :ref:`Transform` :ref:`getWorldToNodeTransform`() const; :ref:`Vector2f` :ref:`convertToNodeSpace`(const :ref:`Vector2f`& worldPoint) const; :ref:`Vector2f` :ref:`convertToWorldSpace`(const :ref:`Vector2f`& nodePoint) const; :ref:`Rectf` :ref:`getLocalBounds`() const; bool :ref:`hasFocus`() const; bool :ref:`hasFocusWithin`() const; virtual :ref:`Node`* :ref:`setFocus`(:ref:`NodeFocusReason` reason = :ref:`NodeFocusReason::Unknown`); :ref:`Node`* :ref:`getFirstWidget`() const; :ref:`Node`* :ref:`getParentWidget`() const; void :ref:`enableReportSizeChangeToChildren`(); void :ref:`disableReportSizeChangeToChildren`(); bool :ref:`reportSizeChangeToChildren`() const; :ref:`Node`* :ref:`centerHorizontal`(); :ref:`Node`* :ref:`centerVertical`(); :ref:`Node`* :ref:`center`(); :ref:`Node`* :ref:`clipEnable`(); :ref:`Node`* :ref:`clipDisable`(); void :ref:`writeNodeFlag`(const :ref:`Uint32`& Flag, const :ref:`Uint32`& Val); :ref:`SceneNode`* :ref:`getSceneNode`() const; :ref:`EventDispatcher`* :ref:`getEventDispatcher`() const; virtual bool :ref:`isDrawInvalidator`() const; bool :ref:`invalidated`() const; virtual void :ref:`invalidate`(:ref:`Node`* invalidator); :ref:`Uint32` :ref:`getChildCount`() const; :ref:`Uint32` :ref:`getChildOfTypeCount`(const :ref:`Uint32`& type) const; :ref:`Node`* :ref:`getChildAt`(:ref:`Uint32` index) const; :ref:`Uint32` :ref:`getNodeIndex`() const; :ref:`Uint32` :ref:`getNodeOfTypeIndex`() const; void :ref:`runOnMainThread`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& delay = Seconds(0), const :ref:`Action::UniqueID`& uniqueIdentifier = 0); bool :ref:`ensureMainThread`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Action::UniqueID`& uniqueIdentifier = 0); void :ref:`setTimeout`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& delay = Seconds(0), const :ref:`Action::UniqueID`& uniqueIdentifier = 0); void :ref:`setInterval`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& interval, const :ref:`Action::UniqueID`& uniqueIdentifier = 0); void :ref:`debounce`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& delay, const :ref:`Action::UniqueID`& uniqueIdentifier); bool :ref:`isChild`(:ref:`Node`* child) const; bool :ref:`inParentTreeOf`(:ref:`Node`* child) const; bool :ref:`inParentTreeOfType`(:ref:`Uint32` type) const; :ref:`Node`* :ref:`getParentOfType`(:ref:`Uint32` type) const; void :ref:`setLoadingState`(bool loading); bool :ref:`isLoadingState`() const; virtual void :ref:`onIdChange`(); bool :ref:`isClosing`() const; bool :ref:`isClosingChildren`() const; virtual :ref:`Node`* :ref:`overFind`(const :ref:`Vector2f`& Point); void :ref:`detach`(); void :ref:`forEachNode`(std::function`*)> func); void :ref:`forEachChild`(std::function`*)> func); virtual void :ref:`nodeDraw`(); :ref:`Uint32` :ref:`forceKeyDown`(const :ref:`KeyEvent`& event); :ref:`Uint32` :ref:`foceKeyUp`(const :ref:`KeyEvent`& event); :ref:`Uint32` :ref:`forceTextInput`(const :ref:`TextInputEvent`& Event); const :ref:`Vector2f`& :ref:`getScreenPos`() const; :ref:`Rectf` :ref:`getScreenRect`() const; bool :ref:`hasEventsOfType`(const :ref:`Uint32`& eventType) const; static :ref:`SceneNode`* :ref:`New`(:ref:`EE::Window::Window`* window = NULL); void :ref:`enableFrameBuffer`(); void :ref:`disableFrameBuffer`(); bool :ref:`ownsFrameBuffer`() const; virtual void :ref:`draw`(); virtual void :ref:`update`(const :ref:`Time`& elapsed); void :ref:`enableDrawInvalidation`(); void :ref:`disableDrawInvalidation`(); :ref:`EE::Window::Window`* :ref:`getWindow`(); :ref:`FrameBuffer`* :ref:`getFrameBuffer`() const; void :ref:`setEventDispatcher`(:ref:`EventDispatcher`* eventDispatcher); :ref:`EventDispatcher`* :ref:`getEventDispatcher`() const; void :ref:`setDrawDebugData`(bool debug); bool :ref:`getDrawDebugData`() const; void :ref:`setDrawBoxes`(bool draw); bool :ref:`getDrawBoxes`() const; void :ref:`setHighlightOver`(bool Highlight); bool :ref:`getHighlightOver`() const; void :ref:`setHighlightFocus`(bool Highlight); bool :ref:`getHighlightFocus`() const; void :ref:`setHighlightInvalidation`(bool Highlight); bool :ref:`getHighlightInvalidation`() const; void :ref:`setHighlightOverColor`(const :ref:`Color`& Color); const :ref:`Color`& :ref:`getHighlightOverColor`() const; void :ref:`setHighlightFocusColor`(const :ref:`Color`& Color); const :ref:`Color`& :ref:`getHighlightFocusColor`() const; void :ref:`setHighlightInvalidationColor`(const :ref:`Color`& Color); const :ref:`Color`& :ref:`getHighlightInvalidationColor`() const; const :ref:`Time`& :ref:`getElapsed`() const; bool :ref:`usesInvalidation`() const; void :ref:`setUseGlobalCursors`(bool use); bool :ref:`getUseGlobalCursors`(); void :ref:`setCursor`(:ref:`Cursor::Type` cursor); virtual bool :ref:`isDrawInvalidator`() const; :ref:`ActionManager`* :ref:`getActionManager`() const; void :ref:`subscribeScheduledUpdate`(:ref:`Node`* node); void :ref:`unsubscribeScheduledUpdate`(:ref:`Node`* node); bool :ref:`isSubscribedForScheduledUpdate`(:ref:`Node`* node); void :ref:`addMouseOverNode`(:ref:`Node`* node); void :ref:`removeMouseOverNode`(:ref:`Node`* node); bool :ref:`getUpdateAllChildren`() const; void :ref:`setUpdateAllChildren`(bool updateAllChildren); const :ref:`Float`& :ref:`getDPI`() const; bool :ref:`getVerbose`() const; void :ref:`setVerbose`(bool verbose); .. _details-class_e_e_1_1_u_i_1_1_u_i_scene_node: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Construction ------------ .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ab92baa424b570eb22f48edbb860d27a8: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual ~UISceneNode() Destroys the :ref:`UISceneNode ` and cleans up resources. Deletes theme managers, icon theme manager, font faces, and event dispatcher. Also calls :ref:`childDeleteAll() ` to ensure proper cleanup order (before thread pool). Methods ------- .. index:: pair: function; New .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1affa0cb2cdb6d74da7d81640b2756ccf1: .. ref-code-block:: cpp :class: doxyrest-title-code-block static UISceneNode* New(:ref:`EE::Window::Window`* window = NULL) Creates a new :ref:`UISceneNode ` instance. This is the factory method for creating :ref:`UISceneNode ` instances. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - window - Pointer to the window to associate with this :ref:`UI ` scene node. If NULL, uses the current window from Engine. .. rubric:: Returns: Pointer to the newly created :ref:`UISceneNode ` instance. .. index:: pair: function; setSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a845e7e1cb2cff05cd88599131062cca9: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Node`* setSize(const :ref:`Sizef`& size) Sets the size in density-independent pixels (dp). Override of SceneNode::setSize to also update dp size and trigger media changes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - size - The new size in dp. .. rubric:: Returns: Pointer to this node for method chaining. .. index:: pair: function; setSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a36d7fc6228e6393e69f360600e3d8964: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Node`* setSize(const :ref:`Float`& Width, const :ref:`Float`& Height) Sets the size in density-independent pixels (dp). Override of SceneNode::setSize with individual dimensions. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - Width - The width in dp. * - Height - The height in dp. .. rubric:: Returns: Pointer to this node for method chaining. .. index:: pair: function; setPixelsSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ae7471d15f70feaf3a037bd847ebd64f3: .. ref-code-block:: cpp :class: doxyrest-title-code-block UISceneNode* setPixelsSize(const :ref:`Sizef`& size) Sets the size in actual screen pixels. Sets the pixel size directly and updates the dp size accordingly. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - size - The new size in pixels. .. rubric:: Returns: Pointer to this node for method chaining. .. index:: pair: function; setPixelsSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a837ba81f2613012cbac56057a1dc6a72: .. ref-code-block:: cpp :class: doxyrest-title-code-block UISceneNode* setPixelsSize(const :ref:`Float`& x, const :ref:`Float`& y) Sets the size in actual screen pixels. Sets the pixel size using individual dimensions. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - x - The width in pixels. * - y - The height in pixels. .. rubric:: Returns: Pointer to this node for method chaining. .. index:: pair: function; getSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ad047129c465d4bf099c7099367f41cc0: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual const :ref:`Sizef`& getSize() const Gets the size in density-independent pixels (dp). .. rubric:: Returns: The size as a const Sizef reference in dp. .. index:: pair: function; update .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1af75b2a4f670427910f9734395091a31e: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void update(const :ref:`Time`& elapsed) Updates the :ref:`UISceneNode `. Override that adds UI-specific update logic including: * Updating dirty styles, style states, and layouts * Handling multiple invalidation passes if needed * Processing scheduled updates .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - elapsed - The time elapsed since the last update. .. index:: pair: function; setTranslator .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a9acbd10614538b22c4a0741c22557b2a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setTranslator(:ref:`Translator` translator) Sets the translator for internationalization. The translator is used to translate strings throughout the :ref:`UI `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - translator - The Translator object to set. .. index:: pair: function; setTranslator .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ae5ae9c484f1099a3b8402530febe9823: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setTranslator(:ref:`Translator`&& translator) Sets the translator for internationalization. The translator is used to translate strings throughout the :ref:`UI `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - translator - The Translator object to set. .. index:: pair: function; getTranslator .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a027f994c1c24447a107ee8882e158c6c: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`Translator`& getTranslator() const Gets the translator as a const reference. .. rubric:: Returns: The const Translator reference. .. index:: pair: function; getTranslator .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a9c948e9c317f2b8e94bb30c961e5d9af: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Translator`& getTranslator() Gets the translator as a non-const reference. .. rubric:: Returns: The Translator reference for modification. .. index:: pair: function; getTranslatorString .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a01acd8421b1a957b43f9c2a230794afc: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`String` getTranslatorString(const std::string& str) Gets a translated string. Translates the given string using the translator. Supports special @string syntax for lookups and function-style expressions. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - str - The string to translate. .. rubric:: Returns: The translated string, or the original if no translation found. .. index:: pair: function; getTranslatorString .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a86202dcced6a9dd83ff162ba12f5c9e6: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`String` getTranslatorString(const std::string& str, const :ref:`String`& defaultValue) Gets a translated string with default value. Similar to :ref:`getTranslatorString() ` but returns defaultValue if translation is not found. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - str - The string to translate. * - defaultValue - The default value to use if translation fails. .. rubric:: Returns: The translated string or default value. .. index:: pair: function; getTranslatorStringFromKey .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a60f4f8ad1b3321b039a4da957322c1d0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`String` getTranslatorStringFromKey(const std::string& key, const :ref:`String`& defaultValue) Gets a translated string from a translation key. Looks up the translation using the specified key. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - key - The translation key to look up. * - defaultValue - The default value if key not found. .. rubric:: Returns: The translated string or default value. .. index:: pair: function; i18n .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1aa4240f59f93353ac86ff4d0d1439447a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`String` i18n(const std::string& key, const :ref:`String`& defaultValue) Translates a string (internationalization shorthand). Convenience method equivalent to :ref:`getTranslatorStringFromKey() `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - key - The translation key. * - defaultValue - The default value if translation not found. .. rubric:: Returns: The translated string or default value. .. index:: pair: function; loadLayoutNodes .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a3c4bb167bc6157dd4aa5f49804a35b60: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIWidget`* loadLayoutNodes(pugi::xml_node node, :ref:`Node`* parent, const :ref:`Uint32`& marker) Loads :ref:`UI ` layout from an XML node. Parses the XML node and creates UIWidgets accordingly. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - node - The XML node to load from. * - parent - The parent node to attach widgets to (default: this). * - marker - A marker value to associate with loaded styles. .. rubric:: Returns: The root :ref:`UIWidget ` created, or NULL if none. .. index:: pair: function; loadLayoutFromFile .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a5e64620e49ec45d94b78f68cf3daf3cb: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIWidget`* loadLayoutFromFile(const std::string& layoutPath, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0) Loads a :ref:`UI ` layout from a file. Parses an XML layout file and creates the :ref:`UI ` hierarchy. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - layoutPath - Path to the layout file. * - parent - Parent node for the layout (default: this). * - marker - Marker for style association. .. rubric:: Returns: The root widget, or NULL if loading failed. .. index:: pair: function; loadLayoutFromString .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ac01ded8c6c0de13cc03d8a13f2344264: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIWidget`* loadLayoutFromString(const std::string& layoutString, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0) Loads a :ref:`UI ` layout from a string. Parses an XML string and creates the :ref:`UI ` hierarchy. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - layoutString - The XML layout string. * - parent - Parent node for the layout (default: this). * - marker - Marker for style association. .. rubric:: Returns: The root widget, or NULL if parsing failed. .. index:: pair: function; loadLayoutFromString .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ab05861c4fc73fb43dbd89143933a6eed: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIWidget`* loadLayoutFromString(const char* layoutString, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0) Loads a :ref:`UI ` layout from a C string. Parses an XML C-string and creates the :ref:`UI ` hierarchy. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - layoutString - The XML layout C-string. * - parent - Parent node for the layout (default: this). * - marker - Marker for style association. .. rubric:: Returns: The root widget, or NULL if parsing failed. .. index:: pair: function; loadLayoutFromMemory .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ac69779e1688946cb891ec67dea915fa0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIWidget`* loadLayoutFromMemory(const void* buffer, :ref:`Int32` bufferSize, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0) Loads a :ref:`UI ` layout from a memory buffer. Parses XML from a memory buffer and creates the :ref:`UI ` hierarchy. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - buffer - Pointer to the XML data in memory. * - bufferSize - Size of the buffer in bytes. * - parent - Parent node for the layout (default: this). * - marker - Marker for style association. .. rubric:: Returns: The root widget, or NULL if parsing failed. .. index:: pair: function; loadLayoutFromStream .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ac6ee026406a5c3dd56e7a44bf18ae12f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIWidget`* loadLayoutFromStream(:ref:`IOStream`& stream, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0) Loads a :ref:`UI ` layout from an I/O stream. Reads XML from an IOStream and creates the :ref:`UI ` hierarchy. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - stream - The input stream to read from. * - parent - Parent node for the layout (default: this). * - marker - Marker for style association. .. rubric:: Returns: The root widget, or NULL if reading or parsing failed. .. index:: pair: function; loadLayoutFromPack .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ad41069c3b23350e7a5aa884926f89775: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIWidget`* loadLayoutFromPack(:ref:`Pack`* pack, const std::string& FilePackPath, :ref:`Node`* parent = NULL) Loads a :ref:`UI ` layout from a pack file. Extracts XML from a pack (archive) and creates the :ref:`UI ` hierarchy. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - pack - Pointer to the Pack to read from. * - FilePackPath - Path within the pack to the layout file. * - parent - Parent node for the layout (default: this). .. rubric:: Returns: The root widget, or NULL if extraction or parsing failed. .. index:: pair: function; setStyleSheet .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ac0f8a74e4286be95ffc2dc5d19ab6585: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setStyleSheet(const :ref:`CSS::StyleSheet`& styleSheet, bool loadStyle = true) Sets the stylesheet for this :ref:`UISceneNode `. Replaces the current stylesheet with a new one and optionally loads the styles immediately. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - styleSheet - The :ref:`CSS ` StyleSheet to set. * - loadStyle - If true, applies the styles immediately (default: true). .. index:: pair: function; setStyleSheet .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a93297471af6401e204791a6621a5aba5: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setStyleSheet(const std::string& inlineStyleSheet) Sets the stylesheet from an inline :ref:`CSS ` string. Parses the :ref:`CSS ` string and sets it as the stylesheet. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - inlineStyleSheet - The :ref:`CSS ` stylesheet as a string. .. index:: pair: function; combineStyleSheet .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ab936557d927d961baeffe699d4d10cd6: .. ref-code-block:: cpp :class: doxyrest-title-code-block void combineStyleSheet(const :ref:`CSS::StyleSheet`& styleSheet, bool forceReloadStyle = true, :ref:`URI` baseURI = {}) Combines a stylesheet with the existing one. Merges the given stylesheet into the current stylesheet. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - styleSheet - The :ref:`CSS ` StyleSheet to combine. * - forceReloadStyle - If true, forces immediate style reload (default: true). * - baseURI - If the resource was loaded from an URI, pass the URI in order to solve relative paths in :ref:`CSS ` .. index:: pair: function; combineStyleSheet .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a52e3da859812a56eb24098c73c1e58f0: .. ref-code-block:: cpp :class: doxyrest-title-code-block void combineStyleSheet(const std::string& inlineStyleSheet, bool forceReloadStyle = true, const :ref:`Uint32`& marker = 0, :ref:`URI` baseURI = {}) Combines an inline stylesheet with the existing one. Parses the :ref:`CSS ` string and merges it with the current stylesheet. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - inlineStyleSheet - The :ref:`CSS ` stylesheet as a string. * - forceReloadStyle - If true, forces immediate style reload (default: true). * - marker - Marker to associate with the new styles. * - baseURI - If the resource was loaded from an URI, pass the URI in order to solve relative paths in :ref:`CSS ` .. index:: pair: function; getStyleSheet .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ae5f4108dd1c5a7d21e918fd392623b8c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`CSS::StyleSheet`& getStyleSheet() Gets the reference to the current stylesheet. .. rubric:: Returns: Reference to the :ref:`CSS ` StyleSheet. .. index:: pair: function; hasStyleSheet .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a80db9debcfdc941c485d06f07394b337: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool hasStyleSheet() Checks if a stylesheet is set. .. rubric:: Returns: True if a non-empty stylesheet exists, false otherwise. .. index:: pair: function; isLoading .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1acd32320b5da21815651b7ac67771ae36: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool isLoading() const Checks if the :ref:`UISceneNode ` is currently loading. This flag is set during layout loading operations. .. rubric:: Returns: Const reference to the loading state boolean. .. index:: pair: function; getUIThemeManager .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a6d39541e4c5ff2854a32e93298536e5f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIThemeManager`* getUIThemeManager() const Gets the :ref:`UIThemeManager `. The theme manager is responsible for loading and providing :ref:`UI ` themes. .. rubric:: Returns: Pointer to the :ref:`UIThemeManager `. .. index:: pair: function; getRoot .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a3de8efcae88c85a2d613cef2e8c3fc1f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIWidget`* getRoot() const Gets the root widget of this :ref:`UISceneNode `. The root is a :ref:`UIRoot ` widget that contains all other :ref:`UI ` widgets. .. rubric:: Returns: Pointer to the root :ref:`UIWidget `. .. index:: pair: function; invalidateStyle .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a0c1b376c83abd40bb983c33012753110: .. ref-code-block:: cpp :class: doxyrest-title-code-block void invalidateStyle(:ref:`UIWidget`* widget, bool tryReinsert = false) Invalidates the style of a widget. Marks the widget's style as needing to be reloaded. The widget will have its :ref:`CSS ` re-applied during the next update cycle. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - widget - Pointer to the :ref:`UIWidget ` to invalidate. * - tryReinsert - If true, attempts to reposition the widget in the dirty set. .. index:: pair: function; invalidateStyleState .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a0f7749746e6c7de7f46610e9ab5c9bb2: .. ref-code-block:: cpp :class: doxyrest-title-code-block void invalidateStyleState(:ref:`UIWidget`* widget, bool disableCSSAnimations = false, bool tryReinsert = false) Invalidates the style state of a widget. Marks the widget's style state (pseudo-classes) as needing to be re-evaluated and re-applied. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - widget - Pointer to the :ref:`UIWidget ` to invalidate. * - disableCSSAnimations - If true, disables :ref:`CSS ` animations during the update. * - tryReinsert - If true, attempts to reposition the widget in the dirty set. .. index:: pair: function; invalidateLayout .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a1b6d5c001969922b9f278d104dd7256b: .. ref-code-block:: cpp :class: doxyrest-title-code-block void invalidateLayout(:ref:`UILayout`* widget) Invalidates the layout of a :ref:`UILayout ` widget. Marks the layout as needing to be recalculated. The layout will be updated during the next update cycle. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - widget - Pointer to the :ref:`UILayout ` to invalidate. .. index:: pair: function; setIsLoading .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a967a0a6e2a7fbbaa401bb34927bcf94b: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setIsLoading(bool isLoading) Sets the loading state flag. This is typically managed internally but can be set manually if needed. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - isLoading - The loading state to set. .. index:: pair: function; updateDirtyLayouts .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a40c1ad3c537465116fb574f5aee4924a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void updateDirtyLayouts() Updates all dirty layouts. Processes the mDirtyLayouts set and calls updateLayoutTree() on each layout that needs recalculation. .. index:: pair: function; updateDirtyStyles .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1af029b02cf7539dfd669b5e7b3bfe1804: .. ref-code-block:: cpp :class: doxyrest-title-code-block void updateDirtyStyles() Updates all dirty styles. Processes the mDirtyStyle set and calls :ref:`reloadStyle() ` on each widget that needs its :ref:`CSS ` style re-applied. .. index:: pair: function; updateDirtyStyleStates .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a7c7d1a40c5f5beb31754f2919356068a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void updateDirtyStyleStates() Updates all dirty style states. Processes the mDirtyStyleState set and calls reportStyleStateChangeRecursive() on each widget that needs its pseudo-class state re-evaluated. .. index:: pair: function; isUpdatingLayouts .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1adea8242260df9459e3ca2fea9516f96b: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool isUpdatingLayouts() const Checks if dirty layouts are currently being updated. Useful to avoid re-entrancy or to check if layout updates are in progress. .. rubric:: Returns: Const reference to the boolean indicating layout update status. .. index:: pair: function; getUIIconThemeManager .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a7ebd133bf71296f81c22fb350b36ee35: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIIconThemeManager`* getUIIconThemeManager() const Gets the :ref:`UIIconThemeManager `. The icon theme manager handles lookups of icon drawables by name. .. rubric:: Returns: Pointer to the :ref:`UIIconThemeManager `. .. index:: pair: function; findIcon .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a8d2296b2ded1255cf838b6c9c3b2c16c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIIcon`* findIcon(const std::string& iconName) Finds an icon by name. Searches the icon theme manager for an icon with the specified name. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - iconName - The name of the icon to find. .. rubric:: Returns: Pointer to the :ref:`UIIcon `, or nullptr if not found. .. index:: pair: function; findIconDrawable .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1aaeb57efb670f5cc1e3812cf6b29416b8: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Drawable`* findIconDrawable(const std::string& iconName, const size_t& drawableSize) Finds an icon drawable by name and size. Convenience method that gets an icon and then retrieves a drawable of the specified size. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - iconName - The name of the icon to find. * - drawableSize - The desired size of the drawable in pixels. .. rubric:: Returns: Pointer to the Drawable, or nullptr if not found. .. index:: pair: function; getKeyBindings .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a9eced3e143cc7d4b7ea084218fbd0012: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`KeyBindings`& getKeyBindings() Gets the keybindings manager. The keybindings system maps keyboard shortcuts to commands. .. rubric:: Returns: Reference to the :ref:`KeyBindings ` object. .. index:: pair: function; setKeyBindings .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a37587d67be000c8bedf78a40184ed638: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setKeyBindings(const :ref:`KeyBindings`& keyBindings) Sets the keybindings. Replaces the current keybindings with a new set. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - keyBindings - The :ref:`KeyBindings ` object to set. .. index:: pair: function; addKeyBindingString .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a4fc9fac7349bc35a97566e4df8d78bb0: .. ref-code-block:: cpp :class: doxyrest-title-code-block void addKeyBindingString(const std::string& shortcut, const std::string& command) Adds a keybinding from string shortcut to command. Shortcut format is typically like "Ctrl+S" or "Alt+Enter". .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - shortcut - The string representation of the shortcut. * - command - The command to execute when shortcut is pressed. .. index:: pair: function; addKeyBinding .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1abfe3999471351d07f3e202fcafaecffc: .. ref-code-block:: cpp :class: doxyrest-title-code-block void addKeyBinding(const :ref:`KeyBindings::Shortcut`& shortcut, const std::string& command) Adds a keybinding from Shortcut to command. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - shortcut - The :ref:`KeyBindings::Shortcut ` structure. * - command - The command to execute when shortcut is pressed. .. index:: pair: function; replaceKeyBindingString .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a00b4fea4acac62cc92fc05b60c810ba7: .. ref-code-block:: cpp :class: doxyrest-title-code-block void replaceKeyBindingString(const std::string& shortcut, const std::string& command) Replaces a keybinding using string shortcut. If the shortcut already exists, it is replaced; otherwise it is added. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - shortcut - The string representation of the shortcut. * - command - The command to execute. .. index:: pair: function; replaceKeyBinding .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a129526ed352a3491b0932862ffc0f9df: .. ref-code-block:: cpp :class: doxyrest-title-code-block void replaceKeyBinding(const :ref:`KeyBindings::Shortcut`& shortcut, const std::string& command) Replaces a keybinding using Shortcut. If the shortcut already exists, it is replaced; otherwise it is added. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - shortcut - The :ref:`KeyBindings::Shortcut ` structure. * - command - The command to execute. .. index:: pair: function; addKeyBindsString .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1acba2620205a2707a4cbb2c096acae537: .. ref-code-block:: cpp :class: doxyrest-title-code-block void addKeyBindsString(const std::map& binds) Adds multiple keybindings from string map. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - binds - Map of shortcut strings to command strings. .. index:: pair: function; addKeyBinds .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a4c6274986d9b3ed2d68777686ebcb1c8: .. ref-code-block:: cpp :class: doxyrest-title-code-block void addKeyBinds(const std::map<:ref:`KeyBindings::Shortcut`, std::string>& binds) Adds multiple keybindings from Shortcut map. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - binds - Map of :ref:`KeyBindings::Shortcut ` to command strings. .. index:: pair: function; setKeyBindingCommand .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a15261075e138c314a4aff480a60ffb5f: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setKeyBindingCommand(const std::string& command, :ref:`KeyBindingCommand` func) Sets a function to execute for a command. Associates a command string with a callable function. This allows keybindings to trigger custom code. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - command - The command string. * - func - The function to call when the command is executed. .. index:: pair: function; executeKeyBindingCommand .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a61dc5a92ca2c0aee98376d9fb2fb3e91: .. ref-code-block:: cpp :class: doxyrest-title-code-block void executeKeyBindingCommand(const std::string& command) Executes a keybinding command. Triggers the function associated with the given command string. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - command - The command string to execute. .. index:: pair: function; getUIEventDispatcher .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1adf2eba3bb0373150f7b8eaa0cce91d3b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`UIEventDispatcher`* getUIEventDispatcher() const Gets the UI-specific event dispatcher. Casts the generic event dispatcher to a :ref:`UIEventDispatcher `. .. rubric:: Returns: Pointer to the :ref:`UIEventDispatcher `, or nullptr if not set. .. index:: pair: function; getColorSchemePreference .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a152a5d7ed58408f8170202e701b0a9df: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`ColorSchemePreference` getColorSchemePreference() const Gets the current color scheme preference. .. rubric:: Returns: The ColorSchemePreference (Light or Dark). .. index:: pair: function; setColorSchemePreference .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1af5f8dd0d90ecef8c613a91f18d15b065: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setColorSchemePreference(const :ref:`ColorSchemeExtPreference`& colorSchemePreference) Sets the color scheme preference from extended preference. Converts extended preference (Light/Dark/System) to standard preference. For :ref:`System `, detects OS preference automatically. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - colorSchemePreference - The extended ColorSchemeExtPreference. .. index:: pair: function; setColorSchemePreference .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1aad1604cc4f55654ba667fc78d8bd6ef4: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setColorSchemePreference(const :ref:`ColorSchemePreference`& colorSchemePreference) Sets the color scheme preference directly. Controls whether the :ref:`UI ` uses light or dark color scheme by default. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - colorSchemePreference - The ColorSchemePreference. .. index:: pair: function; getMaxInvalidationDepth .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a626be47b56a24d57f233d4a539699ffd: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`Uint32`& getMaxInvalidationDepth() const Gets the maximum invalidation depth. This controls how many times the update cycle will re-process dirty states to ensure all cascading style/layout changes are applied. .. rubric:: Returns: Const reference to max invalidation depth. .. index:: pair: function; setMaxInvalidationDepth .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1aac436543129c0dbf8d3c80a836772a15: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setMaxInvalidationDepth(const :ref:`Uint32`& maxInvalidationDepth) Sets the maximum invalidation depth. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - maxInvalidationDepth - The maximum number of invalidation passes. .. index:: pair: function; nodeToWorldTranslation .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a62d38ec96cff1c70cd56922519d6fbfc: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void nodeToWorldTranslation(:ref:`Vector2f`& Pos) const Transforms node-local coordinates to world coordinates. Override that uses dp (density-independent pixels) positions. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - Pos - Reference to the position to transform (modified in place). .. index:: pair: function; reloadStyle .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1addbc0d2371216248851c89e4ae43fcad: .. ref-code-block:: cpp :class: doxyrest-title-code-block void reloadStyle(bool disableAnimations = false, bool forceReApplyProperties = false, bool resetPropertiesCache = false) Reloads the :ref:`UI ` styles. Forces all widgets to re-apply their :ref:`CSS ` styles, optionally disabling animations, forcing re-application, or resetting property caches. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - disableAnimations - If true, :ref:`CSS ` animations are disabled during reload. * - forceReApplyProperties - If true, all properties are re-applied even if unchanged. * - resetPropertiesCache - If true, property cache is cleared. .. index:: pair: function; hasThreadPool .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a187f15a6e2208a5f111d76f9d6091315: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool hasThreadPool() const Checks if a thread pool is available. .. rubric:: Returns: True if a thread pool has been set, false otherwise. .. index:: pair: function; getThreadPool .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a5db71db1786e3e74d50d944ac094f8a5: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::shared_ptr<:ref:`ThreadPool`> getThreadPool() Gets the thread pool. .. rubric:: Returns: Shared pointer to the ThreadPool, or nullptr if none set. .. index:: pair: function; setThreadPool .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ac12b65961f10a3c1aa8a7f79700debd8: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setThreadPool(const std::shared_ptr<:ref:`ThreadPool`>& threadPool) Sets the thread pool for background tasks. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - threadPool - Shared pointer to the ThreadPool to use. .. index:: pair: function; setTheme .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a165b9b52e006d478681bc0317eec840a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setTheme(:ref:`UITheme`* theme) Sets the theme for the entire :ref:`UI ` scene. Applies the theme to the root widget and all children. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - theme - Pointer to the :ref:`UITheme ` to set. .. index:: pair: function; getMediaFeatures .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a8bec10292429d389d63c67cd7e22630d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`CSS::MediaFeatures` getMediaFeatures() const Gets the current media features. Returns information about the current media environment (screen size, resolution, color scheme, etc.) for :ref:`CSS ` media queries. .. rubric:: Returns: :ref:`CSS::MediaFeatures ` structure with current media values. .. index:: pair: function; loadNode .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a4338bb1bfb5a4d893f5770151785141e: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector<:ref:`UIWidget`*> loadNode(pugi::xml_node node, :ref:`Node`* parent, const :ref:`Uint32`& marker = 0) Loads :ref:`UI ` nodes from XML. Core method that parses XML and creates widget hierarchy. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - node - The XML node to parse. * - parent - The parent to attach widgets to. * - marker - Marker for style association. .. rubric:: Returns: Vector of root widgets created. .. index:: pair: function; setURI .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1af5f0dd4ffff7dcdf8fdc2535cae75074: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setURI(const :ref:`URI`& uri) Sets the document / scene URI used to resolve paths of inner elements .. index:: pair: function; setURIFromURL .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a92da76cfbc466091d1e2afa6ddc70ebb: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setURIFromURL(const :ref:`URI`& url) Sets the document / scene URI used to resolve paths from a complete URI (with path+query+fragment+etc) .. index:: pair: function; getURI .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ae6f8d5df44511d51feffb9445a5f5b3d: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`URI`& getURI() const .. rubric:: Returns: the document / scene URI used to resolve paths of inner elements .. index:: pair: function; openURL .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a1d67c9a3a7f3cb7279e3575ca67a0bcd: .. ref-code-block:: cpp :class: doxyrest-title-code-block void openURL(:ref:`URI` uri) Handles opening an specific URI .. index:: pair: function; solveRelativePath .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1aa3a1066e2dfd221b142548a58afb9722: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`URI` solveRelativePath(:ref:`URI` uri, :ref:`URI` baseURI = {}) Solves a relative path with no scheme or authority into a complete URI. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - baseURI - If must solve from a specific baseURI it must be passed here. .. index:: pair: function; getReferer .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a9e4f553ae7bcfda0b6f0793c2126e6ec: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`URI` getReferer() const .. rubric:: Returns: The document referer