.. index:: pair: class; EE::Scene::Node .. _doxid-class_e_e_1_1_scene_1_1_node: class EE::Scene::Node ===================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class Node: public :ref:`EE::Math::Transformable` { public: // typedefs typedef std::function`*)> :target:`EventCallback`; // construction virtual :target:`~Node`(); // methods static Node* :target:`New`(); virtual void :target:`worldToNodeTranslation`(:ref:`Vector2f`& position) const; virtual void :target:`nodeToWorldTranslation`(:ref:`Vector2f`& position) const; virtual void :target:`worldToNode`(:ref:`Vector2i`& pos) const; virtual void :target:`nodeToWorld`(:ref:`Vector2i`& pos) const; virtual void :target:`worldToNode`(:ref:`Vector2f`& pos) const; virtual void :target:`nodeToWorld`(:ref:`Vector2f`& pos) const; virtual :ref:`Uint32` :target:`getType`() const; virtual bool :target:`isType`(const :ref:`Uint32`& type) const; void :target:`messagePost`(const :ref:`NodeMessage`* Msg); virtual void :target:`setPosition`(const :ref:`Vector2f`& Pos); virtual Node* :target:`setPosition`(const :ref:`Float`& x, const :ref:`Float`& y); virtual Node* :target:`setSize`(const :ref:`Sizef`& size); Node* :target:`setSize`(const :ref:`Float`& Width, const :ref:`Float`& Height); virtual const :ref:`Sizef`& :target:`getSize`() const; const :ref:`Sizef`& :target:`getPixelsSize`() const; Node* :target:`setVisible`(const bool& visible, bool emitEventNotification = true); Node* :target:`setChildsVisibility`(bool visible, bool emitEventNotification = true); bool :target:`isVisible`() const; bool :target:`isHided`() const; Node* :target:`setEnabled`(const bool& enabled); bool :target:`isEnabled`() const; bool :target:`isDisabled`() const; Node* :target:`getParent`() const; Node* :target:`setParent`(Node* parent); virtual void :target:`close`(); virtual void :target:`draw`(); virtual void :target:`update`(const :ref:`Time`& time); virtual void :target:`scheduledUpdate`(const :ref:`Time`& time); Node* :target:`getNextNode`() const; Node* :target:`getPrevNode`() const; Node* :target:`getNextNodeLoop`() const; Node* :target:`setData`(const :ref:`UintPtr`& data); const :ref:`UintPtr`& :target:`getData`() const; Node* :target:`setBlendMode`(const :ref:`BlendMode`& blend); const :ref:`BlendMode`& :target:`getBlendMode`() const; Node* :target:`toFront`(); Node* :target:`toBack`(); void :target:`toPosition`(const :ref:`Uint32`& position); const :ref:`Uint32`& :target:`getNodeFlags`() const; void :ref:`setNodeFlags`(const :ref:`Uint32`& flags); bool :target:`isSceneNode`() const; bool :target:`isUISceneNode`() const; bool :target:`isUINode`() const; bool :target:`isWidget`() const; bool :target:`isWindow`() const; bool :target:`isLayout`() const; bool :target:`isClipped`() const; bool :target:`isRotated`() const; bool :target:`isScaled`() const; bool :target:`isFrameBuffer`() const; bool :target:`isMouseOver`() const; bool :target:`isMouseOverMeOrChilds`() const; bool :target:`isMeOrParentTreeVisible`() const; bool :target:`isMeOrParentTreeRotated`() const; bool :target:`isMeOrParentTreeScaled`() const; bool :target:`isMeOrParentTreeScaledOrRotated`() const; bool :target:`isMeOrParentTreeScaledOrRotatedOrFrameBuffer`() const; :ref:`Uint32` :target:`addEventListener`(const :ref:`Uint32`& eventType, const :ref:`EventCallback`& callback); :ref:`Uint32` :target:`on`(const :ref:`Uint32`& eventType, const :ref:`EventCallback`& callback); :ref:`Uint32` :target:`onClick`(const std::function`*)>& callback, const :ref:`MouseButton`& button = MouseButton::EE_BUTTON_LEFT); void :target:`removeEventsOfType`(const :ref:`Uint32`& eventType); void :target:`removeEventListener`(const :ref:`Uint32`& callbackId); void :target:`removeEventListener`(const std::vector<:ref:`Uint32`>& callbacksIds); void :target:`clearEventListener`(); Node* :target:`getFirstChild`() const; Node* :target:`getLastChild`() const; const :ref:`Polygon2f`& :target:`getWorldPolygon`(); const :ref:`Rectf`& :target:`getWorldBounds`(); bool :target:`isParentOf`(const Node* node) const; void :target:`sendEvent`(const :ref:`Event`* Event); void :target:`sendMouseEvent`(const :ref:`Uint32`& Event, const :ref:`Vector2i`& position, const :ref:`Uint32`& flags); void :target:`sendCommonEvent`(const :ref:`Uint32`& Event); void :target:`sendTextEvent`(const :ref:`Uint32`& event, const std::string& text); void :target:`childsCloseAll`(); const std::string& :target:`getId`() const; virtual Node* :target:`setId`(const std::string& id); const :ref:`String::HashType`& :target:`getIdHash`() const; Node* :target:`find`(const std::string& id) const; Node* :target:`hasChild`(const std::string& id) const; template T* :target:`find`(const std::string& id) const; template T* :target:`bind`(const std::string& id, T*& node); template T* :target:`asType`(); template const T* :target:`asConstType`() const; Node* :target:`findByType`(const :ref:`Uint32`& type) const; template T* :target:`findByType`(const :ref:`Uint32`& type) const; template T* :target:`bindByType`(const :ref:`Uint32`& type, T*& node); std::vector :target:`findAllByType`(const :ref:`Uint32`& type) const; template std::vector :target:`findAllByType`(const :ref:`Uint32`& type) const; bool :target:`inNodeTree`(Node* node) const; bool :target:`isReverseDraw`() const; void :target:`setReverseDraw`(bool reverseDraw); void :target:`invalidateDraw`(); virtual void :target:`setRotation`(float angle); void :target:`setRotation`(const :ref:`Float`& angle, const :ref:`OriginPoint`& center); const :ref:`OriginPoint`& :target:`getRotationOriginPoint`() const; void :target:`setRotationOriginPoint`(const :ref:`OriginPoint`& center); void :target:`setRotationOriginPointX`(const std::string& xEq); void :target:`setRotationOriginPointY`(const std::string& yEq); :ref:`Vector2f` :target:`getRotationCenter`() const; virtual void :target:`setScale`(const :ref:`Vector2f`& scale); void :target:`setScale`(const :ref:`Vector2f`& scale, const :ref:`OriginPoint`& center); void :target:`setScale`(const :ref:`Float`& scale, const :ref:`OriginPoint`& center = OriginPoint::OriginCenter); const :ref:`OriginPoint`& :target:`getScaleOriginPoint`() const; void :target:`setScaleOriginPoint`(const :ref:`OriginPoint`& center); void :target:`setScaleOriginPointX`(const std::string& xEq); void :target:`setScaleOriginPointY`(const std::string& yEq); :ref:`Vector2f` :target:`getScaleCenter`() const; virtual void :target:`setScale`(float factorX, float factorY); virtual void :target:`setScaleOrigin`(float x, float y); virtual void :target:`setRotationOrigin`(float x, float y); const :ref:`Float`& :target:`getAlpha`() const; virtual void :target:`setAlpha`(const :ref:`Float`& alpha); virtual void :target:`setChildsAlpha`(const :ref:`Float`& alpha); :ref:`ActionManager`* :target:`getActionManager`() const; Node* :target:`runAction`(:ref:`Action`* action); bool :target:`removeAction`(:ref:`Action`* action); bool :target:`removeActions`(const std::vector<:ref:`Action`*>& actions); bool :target:`removeActionsByTag`(const :ref:`String::HashType`& tag); std::vector<:ref:`Action`*> :target:`getActions`(); std::vector<:ref:`Action`*> :target:`getActionsByTag`(const :ref:`Uint32`& tag); void :target:`clearActions`(); :ref:`Transform` :target:`getLocalTransform`() const; :ref:`Transform` :target:`getGlobalTransform`() const; :ref:`Transform` :target:`getNodeToWorldTransform`() const; :ref:`Transform` :target:`getWorldToNodeTransform`() const; :ref:`Vector2f` :target:`convertToNodeSpace`(const :ref:`Vector2f`& worldPoint) const; :ref:`Vector2f` :target:`convertToWorldSpace`(const :ref:`Vector2f`& nodePoint) const; :ref:`Rectf` :target:`getLocalBounds`() const; bool :target:`hasFocus`() const; bool :target:`hasFocusWithin`() const; virtual Node* :target:`setFocus`(:ref:`NodeFocusReason` reason = :ref:`NodeFocusReason::Unknown`); Node* :target:`getFirstWidget`() const; Node* :target:`getParentWidget`() const; void :target:`enableReportSizeChangeToChilds`(); void :target:`disableReportSizeChangeToChilds`(); bool :target:`reportSizeChangeToChilds`() const; Node* :target:`centerHorizontal`(); Node* :target:`centerVertical`(); Node* :target:`center`(); Node* :target:`clipEnable`(); Node* :target:`clipDisable`(); void :target:`writeNodeFlag`(const :ref:`Uint32`& Flag, const :ref:`Uint32`& Val); :ref:`SceneNode`* :target:`getSceneNode`() const; :ref:`EventDispatcher`* :target:`getEventDispatcher`() const; virtual bool :target:`isDrawInvalidator`() const; bool :target:`invalidated`() const; virtual void :target:`invalidate`(Node* invalidator); :ref:`Uint32` :target:`getChildCount`() const; :ref:`Uint32` :target:`getChildOfTypeCount`(const :ref:`Uint32`& type) const; Node* :target:`getChildAt`(:ref:`Uint32` Index) const; :ref:`Uint32` :target:`getNodeIndex`() const; :ref:`Uint32` :target:`getNodeOfTypeIndex`() const; void :target:`runOnMainThread`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& delay = Seconds(0), const :ref:`Uint32`& uniqueIdentifier = 0); void :target:`setTimeout`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& delay = Seconds(0), const :ref:`Uint32`& uniqueIdentifier = 0); void :target:`debounce`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& delay, const :ref:`Uint32`& uniqueIdentifier); void :target:`setInterval`(:ref:`Actions::Runnable::RunnableFunc` runnable, const :ref:`Time`& interval, const :ref:`Uint32`& uniqueIdentifier = 0); bool :target:`isChild`(Node* child) const; bool :target:`inParentTreeOf`(Node* child) const; void :target:`setLoadingState`(bool loading); bool :target:`isLoadingState`() const; virtual void :target:`onIdChange`(); bool :target:`isClosing`() const; bool :target:`isClosingChildren`() const; virtual Node* :target:`overFind`(const :ref:`Vector2f`& Point); void :ref:`detach`(); void :target:`forEachNode`(std::function func); void :target:`forEachChild`(std::function func); virtual void :target:`nodeDraw`(); :ref:`Uint32` :target:`forceKeyDown`(const :ref:`KeyEvent`& event); :ref:`Uint32` :target:`foceKeyUp`(const :ref:`KeyEvent`& event); :ref:`Uint32` :target:`forceTextInput`(const :ref:`TextInputEvent`& Event); const :ref:`Vector2f`& :target:`getScreenPos`() const; :ref:`Rectf` :target:`getScreenRect`() const; bool :target:`hasEventsOfType`(const :ref:`Uint32`& eventType) const; }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // 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; .. _details-class_e_e_1_1_scene_1_1_node: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; setNodeFlags .. _doxid-class_e_e_1_1_scene_1_1_node_1a45f94856db0643e6ee1030d956590136: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setNodeFlags(const :ref:`Uint32`& flags) Use it at your own risk .. index:: pair: function; detach .. _doxid-class_e_e_1_1_scene_1_1_node_1ade57d00c22b2beb8041ea6fe67cbe0a0: .. ref-code-block:: cpp :class: doxyrest-title-code-block void detach() This removes the node from its parent. Never use this unless you know what you are doing.