.. 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: struct_EE_UI_UISceneNode_AsyncResourceLoadState.rst class_EE_UI_UISceneNode_Context.rst 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`; typedef std::function :target:`AsyncResourceMainThreadFunc`; // structs struct :ref:`AsyncResourceLoadState`; // classes class :ref:`Context`; // construction virtual :ref:`~UISceneNode`(); // methods :ref:`Context` :ref:`makeCurrent`(); 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); void :ref:`setViewportPixelsSize`(const :ref:`Sizef`& size); void :ref:`clearViewportPixelsSize`(); const :ref:`Sizef`& :ref:`getViewportPixelsSize`() const; void :ref:`setVisibleBoundsNode`(:ref:`Node`* node); const :ref:`Rectf`& :ref:`getVisibleWorldBounds`(); void :ref:`setLayoutViewportPixelsSize`(const :ref:`Sizef`& size); void :ref:`clearLayoutViewportPixelsSize`(); const :ref:`Sizef`& :ref:`getLayoutViewportPixelsSize`() const; void :ref:`setFollowParentSize`(bool followParentSize); bool :ref:`followsParentSize`() const; void :ref:`initializeEmbeddedFromHost`(UISceneNode* hostScene); const std::vector& :ref:`getChildUISceneNodes`() const; void :ref:`setHighlightOverRecursive`(bool highlight); void :ref:`setHighlightFocusRecursive`(bool highlight); void :ref:`setDrawBoxesRecursive`(bool draw); void :ref:`setDrawDebugDataRecursive`(bool debug); virtual const :ref:`Sizef`& :ref:`getSize`() const; virtual void :ref:`update`(const :ref:`Time`& elapsed); void :ref:`flushDirtyStyleAndLayout`(); 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 = {}, std::optional<:ref:`CSS::StyleSheet::SourceOrder`> sourceOrder = {}); void :ref:`combineStyleSheet`(const std::string& inlineStyleSheet, bool forceReloadStyle = true, const :ref:`Uint32`& marker = 0, :ref:`URI` baseURI = {}, std::optional<:ref:`CSS::StyleSheet::SourceOrder`> sourceOrder = {}); :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, :ref:`LayoutInvalidationFlags` reasons = 0); 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:`DrawablePtr` :ref:`findIconDrawable`(const std::string& iconName, const size_t& drawableSize); :ref:`DrawableResolver`& :ref:`getDrawableResolver`(); const :ref:`DrawableResolver`& :ref:`getDrawableResolver`() const; :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 :ref:`KeyBindings::ShortcutMap`& binds); void :ref:`setKeyBindingCommand`(const std::string& command, :ref:`KeyBindingCommand` func); void :target:`removeKeyBindingCommand`(const std::string& command); void :ref:`executeKeyBindingCommand`(const std::string& command); :ref:`UIEventDispatcher`* :ref:`getUIEventDispatcher`() const; :ref:`ColorSchemePreference` :ref:`getColorSchemePreference`() const; void :ref:`updateWindowTitleBarColor`(); void :ref:`setColorSchemePreference`(const :ref:`ColorSchemeExtPreference`& colorSchemePreference); void :ref:`setColorSchemePreference`(const :ref:`ColorSchemePreference`& colorSchemePreference); :ref:`ContrastPreference` :ref:`getContrastPreference`() const; void :ref:`setContrastPreference`(const :ref:`ContrastExtPreference`& contrastPreference); void :ref:`setContrastPreference`(const :ref:`ContrastPreference`& contrastPreference); void :ref:`setDefaultTextHints`(:ref:`Uint32` textHints); :ref:`Uint32` :target:`getDefaultTextHints`() const; UISceneNode* :ref:`setSmoothScrollEnabled`(bool enabled, bool applyNow = false); bool :ref:`isSmoothScrollEnabled`() const; 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); const :ref:`Graphics::ResourceScopePtr`& :ref:`getResourceScope`() const; UISceneNode* :ref:`setResourceScope`(:ref:`Graphics::ResourceScopePtr` resourceScope); void :ref:`setTheme`(:ref:`UITheme`* theme); :ref:`CSS::MediaFeatures` :ref:`getMediaFeatures`() const; :ref:`SmallVector`<:ref:`UIWidget`*, 8> :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 :ref:`navigate`(const :ref:`NavigationRequest`& request); void :ref:`setNavigationInterceptorCb`(std::function`&request)> cb); bool :ref:`setNavigationInterceptorCb`(const :ref:`Node`* root, std::function`&request)> cb); :ref:`URI` :ref:`solveRelativePath`(:ref:`URI` uri, :ref:`URI` baseURI = {}); :ref:`URI` :ref:`getReferer`() const; const :ref:`CookieManager`& :target:`getCookieManager`() const; :ref:`CookieManager`& :target:`getCookieManager`(); void :ref:`setCookieManager`(std::shared_ptr<:ref:`CookieManager`> manager); const :ref:`WebResourceCachePtr`& :target:`getWebResourceCache`() const; UISceneNode* :target:`setWebResourceCache`(:ref:`WebResourceCachePtr` cache, :ref:`CachePartitionId` partition = 0); :ref:`DocumentSessionId` :target:`getDocumentSessionId`() const; :ref:`Uint64` :target:`beginDocumentNavigation`(const :ref:`URI`& uri); :ref:`Uint64` :target:`getDocumentGeneration`() const; void :target:`requestWebResource`(:ref:`WebResourceRequest` request, :ref:`WebResourceCache::Callback` callback); :ref:`Graphics::TexturePtr` :target:`requestWebTexture`(:ref:`WebResourceRequest` request, :ref:`WebResourceCache::Callback` callback = {}); void :target:`invalidateAsyncResourceLoads`(); virtual void :ref:`invalidate`(:ref:`Node`* invalidator); :ref:`Font`* :target:`getFontFromNamesList`(std::string_view names, :ref:`Uint32` fontStyle = 0, :ref:`FontWeight` weight = :ref:`FontWeight::Normal`) const; std::string :target:`getFontFamilyName`(:ref:`Font`* font) const; void :target:`clearFontFaces`(); :ref:`Font`* :target:`reevaluateFontStyle`(:ref:`Font`* currentFont, :ref:`Uint32` fontStyle, :ref:`FontWeight` weight = :ref:`FontWeight::Normal`) const; void :target:`loadFontStyleVariants`(:ref:`Font`* font, const std::string& family) const; :ref:`Uint32` :target:`getCurrentMarker`() const; void :target:`loadHTMLBasicCSS`(); void :target:`loadHTMLBaseCSS`(); std::shared_ptr<:ref:`AsyncResourceLoadState`> :target:`getAsyncResourceLoadState`() const; static UISceneNode* :ref:`New`(:ref:`EE::Window::Window`* window = NULL, bool importDefaultResources = true); static :ref:`Uint32` :target:`resolveTextHints`(:ref:`Uint32` defaultHints, :ref:`Uint32` overrideValue, :ref:`Uint32` overrideMask); static bool :target:`isAsyncResourceLoadCurrent`(const std::shared_ptr<:ref:`AsyncResourceLoadState`>& resourceState, :ref:`Uint64` generation); static void :target:`runAsyncResourceOnMainThread`(const std::shared_ptr<:ref:`AsyncResourceLoadState`>& resourceState, :ref:`Uint64` generation, :ref:`AsyncResourceMainThreadFunc` func, const :ref:`Time`& delay = Seconds(0)); }; 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; bool :ref:`isTextNode`() 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:`EventConnection` :ref:`connect`(const :ref:`Uint32`& eventType, :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:`getActionsByTag`(const :ref:`Action::UniqueID`& tag, :ref:`SmallVector`<:ref:`Action`*, 4>& actions); 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:`inClosingTree`() 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; void :ref:`clipSmartEnable`(const :ref:`Int32`& x, const :ref:`Int32`& y, const :ref:`Uint32`& Width, const :ref:`Uint32`& Height); void :ref:`clipSmartDisable`(); 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); 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; makeCurrent .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a3c949b8f07edac6b22bdbb2a18a2b608: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Context` makeCurrent() Makes this scene and its native window current for the returned scope. .. 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 :ref:`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 :ref:`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; setViewportPixelsSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a0010f718357ccba2f4007ea0c095e7d1: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setViewportPixelsSize(const :ref:`Sizef`& size) Sets the viewport size used by viewport-relative :ref:`CSS ` and media queries. The viewport size is independent from the scene extent. This is useful for embedded, scrollable scenes whose actual size represents their document extent. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - size - The viewport size in pixels. .. index:: pair: function; clearViewportPixelsSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1aef142f6cb194a924b286065f4cd38341: .. ref-code-block:: cpp :class: doxyrest-title-code-block void clearViewportPixelsSize() Clears the explicit viewport size so the scene extent is used as the viewport. .. index:: pair: function; getViewportPixelsSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ac79cfe02186c0e4df0480e63ac9eb000: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`Sizef`& getViewportPixelsSize() const .. rubric:: Returns: The explicit viewport size, or the scene extent when no override is set. .. index:: pair: function; setVisibleBoundsNode .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a1525a87c7824d70a9b62d33690adc18a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setVisibleBoundsNode(:ref:`Node`* node) Sets the node whose world bounds delimit the visible portion of this scene. Embedded scenes can have an extent larger than their host viewport. Binding the visible bounds to the host's clipping node lets render culling use that viewport while preserving the full scene extent for layout and scrolling. The node must outlive this scene or clear the binding before it is destroyed. .. index:: pair: function; getVisibleWorldBounds .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1acba4e0349ea5360fdd33592cfaa00030: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`Rectf`& getVisibleWorldBounds() .. rubric:: Returns: The visible world bounds used for render culling. .. index:: pair: function; setLayoutViewportPixelsSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ab36e5663a1be5fc2685b1f942b7cb5d6: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setLayoutViewportPixelsSize(const :ref:`Sizef`& size) Sets the layout viewport size used by the scene root as the initial containing block. Embedded document scenes can have a scroll extent larger than the CSS/layout viewport. This keeps root/body normal-flow layout viewport-sized while the scroll target owns overflow. .. index:: pair: function; clearLayoutViewportPixelsSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ad97832184ce97478c48642b630bb79c5: .. ref-code-block:: cpp :class: doxyrest-title-code-block void clearLayoutViewportPixelsSize() Clears the explicit layout viewport size so the :ref:`CSS ` viewport is used. .. index:: pair: function; getLayoutViewportPixelsSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a45b15e67a37f556b5df415c7daff5d00: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`Sizef`& getLayoutViewportPixelsSize() const .. rubric:: Returns: The explicit layout viewport size, or the :ref:`CSS ` viewport when no override is set. .. index:: pair: function; setFollowParentSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1af0499c6552e2882863fdb7dee86401b8: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setFollowParentSize(bool followParentSize) Controls whether a nested scene automatically follows its direct parent's size. Existing nested scenes follow their parent by default. .. index:: pair: function; followsParentSize .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a5ecaedaf8763a627c167b04f8fbc9844: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool followsParentSize() const .. rubric:: Returns: Whether a nested scene automatically follows its direct parent's size. .. index:: pair: function; initializeEmbeddedFromHost .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1adbd6e82f8cf9461b4fb80e7fd74940d9: .. ref-code-block:: cpp :class: doxyrest-title-code-block void initializeEmbeddedFromHost(UISceneNode* hostScene) Binds an embedded scene to host-scene services without copying document state. Copies only shared platform/configuration services: dispatcher, DPI/window pointer, thread pool, color/contrast and font-rendering preferences, and default font/theme pointers. Stylesheets, URI, referer, cookies, navigation callbacks, actions, roots, resource scope, and dirty queues remain owned by this scene. .. index:: pair: function; getChildUISceneNodes .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ab982ed7152156e1c8d85bcc04c165a73: .. ref-code-block:: cpp :class: doxyrest-title-code-block const std::vector& getChildUISceneNodes() const .. rubric:: Returns: Direct embedded :ref:`UI ` scenes hosted below this scene's node tree. .. index:: pair: function; setHighlightOverRecursive .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a9ac74652f0f75e833906538b5a91b95a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setHighlightOverRecursive(bool highlight) Enables or disables mouse-over highlighting in this scene and embedded :ref:`UI ` scenes. .. index:: pair: function; setHighlightFocusRecursive .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ab3bf4170fb5b2c8ec90f022182f85cb3: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setHighlightFocusRecursive(bool highlight) Enables or disables focus highlighting in this scene and embedded :ref:`UI ` scenes. .. index:: pair: function; setDrawBoxesRecursive .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1abe7840e29e91821a8c59ace7c2659b27: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setDrawBoxesRecursive(bool draw) Enables or disables box debug drawing in this scene and embedded :ref:`UI ` scenes. .. index:: pair: function; setDrawDebugDataRecursive .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1aea2056e3fd686ef6f97e72b79a409915: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setDrawDebugDataRecursive(bool debug) Enables or disables debug-data drawing in this scene and embedded :ref:`UI ` scenes. .. 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; flushDirtyStyleAndLayout .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a9c0449ab028ba98652bbe470fd68b27e: .. ref-code-block:: cpp :class: doxyrest-title-code-block void flushDirtyStyleAndLayout() Flushes dirty styles, style states, and layouts without running scene/node updates. This is intended for embedded document scenes that need synchronous style/layout settlement before measuring scroll extent. It must not run actions, timers, scheduled updates, or arbitrary node update callbacks. .. 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_1aee4ef1f5223ec9199d5befcdccb56b84: .. ref-code-block:: cpp :class: doxyrest-title-code-block void combineStyleSheet(const :ref:`CSS::StyleSheet`& styleSheet, bool forceReloadStyle = true, :ref:`URI` baseURI = {}, std::optional<:ref:`CSS::StyleSheet::SourceOrder`> sourceOrder = {}) 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 ` * - sourceOrder - Reserved document order for a stylesheet loaded asynchronously. .. index:: pair: function; combineStyleSheet .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a5a5ca9e8bb20dc8e32d4c67ebc68b428: .. 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 = {}, std::optional<:ref:`CSS::StyleSheet::SourceOrder`> sourceOrder = {}) 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 ` * - sourceOrder - Reserved document order for a stylesheet loaded asynchronously. .. 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, re-evaluates the dirty-ancestor relationship for an already queued widget after reparenting. Descendant entries are coalesced during processing. .. 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, re-evaluates the dirty-ancestor relationship and animation policy for an already queued widget after reparenting. Descendant entries are coalesced during processing. .. index:: pair: function; invalidateLayout .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a8ed4f36f9cc25d71924209f763f9081f: .. ref-code-block:: cpp :class: doxyrest-title-code-block void invalidateLayout(:ref:`UILayout`* widget, :ref:`LayoutInvalidationFlags` reasons = 0) 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_1a1172782e638e76eea3e1af1de3afa71a: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DrawablePtr` 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; getDrawableResolver .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a269775935f8cbeedad2af26f3f983ea5: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`DrawableResolver`& getDrawableResolver() .. rubric:: Returns: This scene's drawable resolver. .. index:: pair: function; getDrawableResolver .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1acb59014d8a72d8d0c7ac79efeae6e1bc: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`DrawableResolver`& getDrawableResolver() const .. rubric:: Returns: This scene's drawable resolver. .. 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_1ad03ee69ef6e391c622e63126858634f4: .. ref-code-block:: cpp :class: doxyrest-title-code-block void addKeyBinds(const :ref:`KeyBindings::ShortcutMap`& 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; updateWindowTitleBarColor .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ae3ccc71cc5e348ea56e7ceaf1df3d68c: .. ref-code-block:: cpp :class: doxyrest-title-code-block void updateWindowTitleBarColor() Updates the macOS titlebar from the active theme after changing the color scheme or style. .. 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; getContrastPreference .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a27a5369ac618425ca2d7670182728b59: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`ContrastPreference` getContrastPreference() const Gets the current contrast preference. .. rubric:: Returns: The ContrastPreference. .. index:: pair: function; setContrastPreference .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1afafb3c796877af572a327d97c8eed3c9: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setContrastPreference(const :ref:`ContrastExtPreference`& contrastPreference) Sets the contrast preference from extended preference. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - contrastPreference - The extended ContrastExtPreference. .. index:: pair: function; setContrastPreference .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a364008219ec6857f4569efa5ad390b59: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setContrastPreference(const :ref:`ContrastPreference`& contrastPreference) Sets the contrast preference directly. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - contrastPreference - The ContrastPreference. .. index:: pair: function; setDefaultTextHints .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a33d7f609ea5b8d9b3c9e29a6724047d6: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setDefaultTextHints(:ref:`Uint32` textHints) Sets the OpenType feature hints inherited by text-producing widgets in this scene. .. index:: pair: function; setSmoothScrollEnabled .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a1da258fd69739d04d5796a70e67b1dfd: .. ref-code-block:: cpp :class: doxyrest-title-code-block UISceneNode* setSmoothScrollEnabled(bool enabled, bool applyNow = false) Sets the default smooth-scrolling policy for this :ref:`UI ` scene hierarchy. Embedded :ref:`UI ` scenes inherit the value from their root host scene. New scrollable widgets snapshot this value when they are created and can override it individually. When applyNow is true, all existing scrollable widgets in the hierarchy are updated too. .. index:: pair: function; isSmoothScrollEnabled .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a5ab55d617245a88ea39a7935bc3a5d2e: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool isSmoothScrollEnabled() const .. rubric:: Returns: The smooth-scrolling default inherited from the root host :ref:`UI ` scene. .. 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; getResourceScope .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1aecbd0bba141a64ef2c8b5e1d452983a7: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`Graphics::ResourceScopePtr`& getResourceScope() const .. rubric:: Returns: The :ref:`Graphics ` resource lookup and ownership boundary of this scene. .. index:: pair: function; setResourceScope .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a855fd070cce4b90f6e36e7e7924f0cfd: .. ref-code-block:: cpp :class: doxyrest-title-code-block UISceneNode* setResourceScope(:ref:`Graphics::ResourceScopePtr` resourceScope) Replaces this scene's resource boundary, allowing intentional sharing between scenes. Scenes created with default-resource importing enabled also import the default catalog into the replacement scope. Scenes created with it disabled leave the replacement scope unchanged. .. 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) Applies a borrowed theme to the widgets in this :ref:`UI ` scene. Each affected widget stores a non-owning ``UITheme*``; this function does not retain ``theme``. The theme must therefore outlive every widget using it. Normally callers establish that lifetime first by adding the corresponding ``UIThemePtr`` to this scene's :ref:`UIThemeManager ` or by setting it as the manager's default theme. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - theme - Borrowed theme to apply recursively. May be null to clear explicit widget themes. .. 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_1aea185247704eddcf4d64b974ff37c64e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`SmallVector`<:ref:`UIWidget`*, 8> 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; navigate .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a8f0bd2e5dfa6ca2752a1c99ef4e8778c: .. ref-code-block:: cpp :class: doxyrest-title-code-block void navigate(const :ref:`NavigationRequest`& request) Handles navigation (GET/POST) with request body and custom headers. .. index:: pair: function; setNavigationInterceptorCb .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1ab54164544729f7cb618bff8346791c1d: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setNavigationInterceptorCb(std::function`&request)> cb) Sets a callback to intercept :ref:`navigate() ` calls. Return true to handle the request, false to fall through to the URL interceptor and default handling. .. index:: pair: function; setNavigationInterceptorCb .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1acceedbf3ce058a1e48cdde78e064dd75: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool setNavigationInterceptorCb(const :ref:`Node`* root, std::function`&request)> cb) Registers an interceptor for requests originating in root's subtree. Interceptors run from the source's nearest scope outward, before the scene-wide callback. Pass an empty callback to unregister; the owner must unregister before root is destroyed or when it moves scenes. Registration requires root to be this scene or a descendant. Unregistration also accepts roots that have already left the scene's tree. Each scope supports one callback. Requests without a source use the scene-wide callback. Returns true on registration/replacement or removal, and false for an invalid root or when attempting to remove a scope that is not registered. .. 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 .. index:: pair: function; setCookieManager .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a8676e24de2ba5a835318fa62510d6639: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setCookieManager(std::shared_ptr<:ref:`CookieManager`> manager) Share one cookie jar across document scenes. Passing nullptr creates a fresh private jar. .. index:: pair: function; invalidate .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a14c2dc56f7b7814d11177478589901be: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void invalidate(:ref:`Node`* invalidator) Invalidates this node and optionally its children. Marks this node as needing redraw. If the node is visible and has non-zero alpha, sets the view dirty flag. Derived classes may override to add custom invalidation logic. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - invalidator - The node that caused the invalidation (unused in base). .. index:: pair: function; New .. _doxid-class_e_e_1_1_u_i_1_1_u_i_scene_node_1a8f4634e1817bd3fecd174eb04878e42a: .. ref-code-block:: cpp :class: doxyrest-title-code-block static UISceneNode* New(:ref:`EE::Window::Window`* window = NULL, bool importDefaultResources = true) 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. * - importDefaultResources - Whether the scene scope automatically imports the catalog from :ref:`Graphics::defaultResourceScope() `. Keep this enabled for normal application scenes. Disable it for intentionally isolated scenes that must only resolve local or explicitly imported resources. .. rubric:: Returns: Pointer to the newly created :ref:`UISceneNode ` instance.