.. 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 :target:`UISceneNode`(:ref:`EE::Window::Window`* window = NULL); virtual :target:`~UISceneNode`(); // methods static UISceneNode* :target:`New`(:ref:`EE::Window::Window`* window = NULL); virtual :ref:`Node`* :target:`setSize`(const :ref:`Sizef`& size); virtual :ref:`Node`* :target:`setSize`(const :ref:`Float`& Width, const :ref:`Float`& Height); UISceneNode* :target:`setPixelsSize`(const :ref:`Sizef`& size); UISceneNode* :target:`setPixelsSize`(const :ref:`Float`& x, const :ref:`Float`& y); virtual const :ref:`Sizef`& :target:`getSize`() const; virtual void :target:`update`(const :ref:`Time`& elapsed); void :target:`setTranslator`(:ref:`Translator` translator); const :ref:`Translator`& :target:`getTranslator`() const; :ref:`Translator`& :target:`getTranslator`(); :ref:`String` :target:`getTranslatorString`(const std::string& str); :ref:`String` :target:`getTranslatorString`(const std::string& str, const :ref:`String`& defaultValue); :ref:`String` :target:`getTranslatorStringFromKey`(const std::string& key, const :ref:`String`& defaultValue); :ref:`String` :target:`i18n`(const std::string& key, const :ref:`String`& defaultValue); :ref:`UIWidget`* :target:`loadLayoutNodes`(pugi::xml_node node, :ref:`Node`* parent, const :ref:`Uint32`& marker); :ref:`UIWidget`* :target:`loadLayoutFromFile`(const std::string& layoutPath, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0); :ref:`UIWidget`* :target:`loadLayoutFromString`(const std::string& layoutString, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0); :ref:`UIWidget`* :target:`loadLayoutFromString`(const char* layoutString, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0); :ref:`UIWidget`* :target:`loadLayoutFromMemory`(const void* buffer, :ref:`Int32` bufferSize, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0); :ref:`UIWidget`* :target:`loadLayoutFromStream`(:ref:`IOStream`& stream, :ref:`Node`* parent = NULL, const :ref:`Uint32`& marker = 0); :ref:`UIWidget`* :target:`loadLayoutFromPack`(:ref:`Pack`* pack, const std::string& FilePackPath, :ref:`Node`* parent = NULL); void :target:`setStyleSheet`(const :ref:`CSS::StyleSheet`& styleSheet); void :target:`setStyleSheet`(const std::string& inlineStyleSheet); void :target:`combineStyleSheet`(const :ref:`CSS::StyleSheet`& styleSheet, const bool& forceReloadStyle = true); void :target:`combineStyleSheet`(const std::string& inlineStyleSheet, const bool& forceReloadStyle = true, const :ref:`Uint32`& marker = 0); :ref:`CSS::StyleSheet`& :target:`getStyleSheet`(); bool :target:`hasStyleSheet`(); const bool& :target:`isLoading`() const; :ref:`UIThemeManager`* :target:`getUIThemeManager`() const; :ref:`UIWidget`* :target:`getRoot`() const; void :target:`invalidateStyle`(:ref:`UIWidget`* widget, bool tryReinsert = false); void :target:`invalidateStyleState`(:ref:`UIWidget`* widget, bool disableCSSAnimations = false, bool tryReinsert = false); void :target:`invalidateLayout`(:ref:`UILayout`* widget); void :target:`setIsLoading`(bool isLoading); void :target:`updateDirtyLayouts`(); void :target:`updateDirtyStyles`(); void :target:`updateDirtyStyleStates`(); const bool& :target:`isUpdatingLayouts`() const; :ref:`UIIconThemeManager`* :target:`getUIIconThemeManager`() const; :ref:`UIIcon`* :target:`findIcon`(const std::string& iconName); :ref:`Drawable`* :ref:`findIconDrawable`(const std::string& iconName, const size_t& drawableSize); :ref:`KeyBindings`& :target:`getKeyBindings`(); void :target:`setKeyBindings`(const :ref:`KeyBindings`& keyBindings); void :target:`addKeyBindingString`(const std::string& shortcut, const std::string& command); void :target:`addKeyBinding`(const :ref:`KeyBindings::Shortcut`& shortcut, const std::string& command); void :target:`replaceKeyBindingString`(const std::string& shortcut, const std::string& command); void :target:`replaceKeyBinding`(const :ref:`KeyBindings::Shortcut`& shortcut, const std::string& command); void :target:`addKeyBindsString`(const std::map& binds); void :target:`addKeyBinds`(const std::map<:ref:`KeyBindings::Shortcut`, std::string>& binds); void :target:`setKeyBindingCommand`(const std::string& command, :ref:`KeyBindingCommand` func); void :target:`executeKeyBindingCommand`(const std::string& command); :ref:`UIEventDispatcher`* :target:`getUIEventDispatcher`() const; :ref:`ColorSchemePreference` :target:`getColorSchemePreference`() const; void :target:`setColorSchemePreference`(const :ref:`ColorSchemePreference`& colorSchemePreference); const :ref:`Uint32`& :target:`getMaxInvalidationDepth`() const; void :target:`setMaxInvalidationDepth`(const :ref:`Uint32`& maxInvalidationDepth); virtual void :target:`nodeToWorldTranslation`(:ref:`Vector2f`& Pos) const; void :target:`reloadStyle`(bool disableAnimations = false, bool forceReApplyProperties = false); bool :target:`hasThreadPool`() const; std::shared_ptr<:ref:`ThreadPool`> :target:`getThreadPool`(); void :target:`setThreadPool`(const std::shared_ptr<:ref:`ThreadPool`>& threadPool); void :target:`setTheme`(:ref:`UITheme`* theme); }; 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:`setChildsVisibility`(bool visible, bool emitEventNotification = true); bool :ref:`isVisible`() const; bool :ref:`isHided`() 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:`isMouseOverMeOrChilds`() 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); 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:`childsCloseAll`(); 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:`setRotationOriginPointX`(const std::string& xEq); void :ref:`setRotationOriginPointY`(const std::string& yEq); :ref:`Vector2f` :ref:`getRotationCenter`() const; 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 = OriginPoint::OriginCenter); const :ref:`OriginPoint`& :ref:`getScaleOriginPoint`() const; void :ref:`setScaleOriginPoint`(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:`setChildsAlpha`(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:`String::HashType`& tag); std::vector<:ref:`Action`*> :ref:`getActions`(); std::vector<:ref:`Action`*> :ref:`getActionsByTag`(const :ref:`Uint32`& 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:`Node`* :ref:`getFirstWidget`() const; :ref:`Node`* :ref:`getParentWidget`() const; void :ref:`enableReportSizeChangeToChilds`(); void :ref:`disableReportSizeChangeToChilds`(); bool :ref:`reportSizeChangeToChilds`() 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:`Uint32`& uniqueIdentifier = 0); void :ref:`setTimeout`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& delay = Seconds(0), const :ref:`Uint32`& uniqueIdentifier = 0); void :ref:`debounce`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& delay, const :ref:`Uint32`& uniqueIdentifier); void :ref:`setInterval`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& interval, const :ref:`Uint32`& uniqueIdentifier = 0); bool :ref:`isChild`(:ref:`Node`* child) const; bool :ref:`inParentTreeOf`(:ref:`Node`* child) 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`(const bool& use); const 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); const bool& :ref:`getUpdateAllChilds`() const; void :ref:`setUpdateAllChilds`(const bool& updateAllChilds); 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 ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. 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) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - drawableSize - Size in pixels