PeriDyno 1.2.1
Loading...
Searching...
No Matches
WtNodeFlowWidget Class Reference

#include <WtNodeFlowWidget.h>

Inheritance diagram for WtNodeFlowWidget:
Collaboration diagram for WtNodeFlowWidget:

Public Member Functions

 WtNodeFlowWidget (std::shared_ptr< dyno::SceneGraph > scene)
 
 ~WtNodeFlowWidget ()
 
void onMouseMove (const Wt::WMouseEvent &event) override
 
void onMouseWentDown (const Wt::WMouseEvent &event) override
 
void onMouseWentUp (const Wt::WMouseEvent &event) override
 
void onKeyWentDown () override
 
void deleteNode (WtNode &n)
 
void disconnectionsFromNode (WtNode &node)
 
void moveNode (WtNode &n, const Wt::WPointF &newLocaton)
 
void enableRendering (WtNode &n, bool checked)
 
void enablePhysics (WtNode &n, bool checked)
 
void setSelectNode (std::shared_ptr< dyno::Node > node)
 
- Public Member Functions inherited from WtFlowWidget
 WtFlowWidget (std::shared_ptr< dyno::SceneGraph > scene)
 
virtual ~WtFlowWidget ()=default
 
void onMouseWheel (const Wt::WMouseEvent &event)
 
void zoomIn ()
 
void zoomOut ()
 
void reorderNode ()
 
void updateAll ()
 
bool checkMouseInRect (Wt::WPointF mousePoint, WtFlowNodeData nodeData)
 
bool checkMouseInPoints (Wt::WPointF mousePoint, WtFlowNodeData nodeData, PortState portState)
 
Wt::WPainterPath cubicPath (Wt::WPointF source, Wt::WPointF sink)
 
std::pair< Wt::WPointF, Wt::WPointF > pointsC1C2 (Wt::WPointF source, Wt::WPointF sink)
 
void drawSketchLine (Wt::WPainter *painter, Wt::WPointF source, Wt::WPointF sink)
 
Wt::Signal< int > & selectNodeSignal ()
 
Wt::Signal & updateCanvas ()
 

Protected Member Functions

void paintEvent (Wt::WPaintDevice *paintDevice)
 
bool checkMouseInAllRect (Wt::WPointF mousePoint)
 
bool checkMouseInHotKey0 (Wt::WPointF mousePoint, WtFlowNodeData nodeData)
 
bool checkMouseInHotKey1 (Wt::WPointF mousePoint, WtFlowNodeData nodeData)
 
Wt::WPointF getPortPosition (Wt::WPointF origin, connectionPointData portData)
 
void disconnect (std::shared_ptr< Node > exportNode, std::shared_ptr< Node > inportNode, connectionPointData inPoint, connectionPointData outPoint, WtNode *inWtNode, WtNode *outWtNode)
 

Protected Attributes

WtNodeFlowScenenode_scene = nullptr
 
std::map< dyno::ObjectId, WtNode * > nodeMap
 
WtNodeconnectionOutNode
 
std::shared_ptr< NodemOutNode
 
std::vector< sceneConnectionsceneConnections
 
- Protected Attributes inherited from WtFlowWidget
double mZoomFactor
 
Wt::WPointF mLastMousePos
 
Wt::WPointF mLastDelta
 
bool isDragging = false
 
bool canMoveNode = false
 
bool reorderFlag = true
 
bool mEditingEnabled = true
 
bool drawLineFlag = false
 
Wt::WPointF mTranslate = Wt::WPointF(0, 0)
 
Wt::WPointF mTranslateNode = Wt::WPointF(0, 0)
 
Wt::WPointF mMousePoint = Wt::WPointF(0, 0)
 
std::shared_ptr< dyno::SceneGraphmScene
 
Wt::Signal< int > _selectNodeSignal
 
Wt::Signal _updateCanvas
 
int selectType = -1
 
int selectedNum = 0
 
Wt::WPointF sourcePoint
 
Wt::WPointF sinkPoint
 
connectionPointData outPoint
 
connectionPointData inPoint
 

Detailed Description

Definition at line 21 of file WtNodeFlowWidget.h.

Constructor & Destructor Documentation

◆ WtNodeFlowWidget()

WtNodeFlowWidget::WtNodeFlowWidget ( std::shared_ptr< dyno::SceneGraph > scene)

Definition at line 6 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:

◆ ~WtNodeFlowWidget()

WtNodeFlowWidget::~WtNodeFlowWidget ( )

Definition at line 16 of file WtNodeFlowWidget.cpp.

Member Function Documentation

◆ checkMouseInAllRect()

bool WtNodeFlowWidget::checkMouseInAllRect ( Wt::WPointF mousePoint)
protected

Definition at line 282 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkMouseInHotKey0()

bool WtNodeFlowWidget::checkMouseInHotKey0 ( Wt::WPointF mousePoint,
WtFlowNodeData nodeData )
protected

Definition at line 299 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkMouseInHotKey1()

bool WtNodeFlowWidget::checkMouseInHotKey1 ( Wt::WPointF mousePoint,
WtFlowNodeData nodeData )
protected

Definition at line 314 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteNode()

void WtNodeFlowWidget::deleteNode ( WtNode & n)

Definition at line 356 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disconnect()

void WtNodeFlowWidget::disconnect ( std::shared_ptr< Node > exportNode,
std::shared_ptr< Node > inportNode,
connectionPointData inPoint,
connectionPointData outPoint,
WtNode * inWtNode,
WtNode * outWtNode )
protected

Definition at line 415 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disconnectionsFromNode()

void WtNodeFlowWidget::disconnectionsFromNode ( WtNode & node)

Definition at line 379 of file WtNodeFlowWidget.cpp.

◆ enablePhysics()

void WtNodeFlowWidget::enablePhysics ( WtNode & n,
bool checked )

Definition at line 406 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enableRendering()

void WtNodeFlowWidget::enableRendering ( WtNode & n,
bool checked )

Definition at line 396 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPortPosition()

Wt::WPointF WtNodeFlowWidget::getPortPosition ( Wt::WPointF origin,
connectionPointData portData )
protected

Definition at line 329 of file WtNodeFlowWidget.cpp.

Here is the caller graph for this function:

◆ moveNode()

void WtNodeFlowWidget::moveNode ( WtNode & n,
const Wt::WPointF & newLocaton )

Definition at line 385 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onKeyWentDown()

void WtNodeFlowWidget::onKeyWentDown ( )
overridevirtual

Implements WtFlowWidget.

Definition at line 234 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:

◆ onMouseMove()

void WtNodeFlowWidget::onMouseMove ( const Wt::WMouseEvent & event)
overridevirtual

Implements WtFlowWidget.

Definition at line 100 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onMouseWentDown()

void WtNodeFlowWidget::onMouseWentDown ( const Wt::WMouseEvent & event)
overridevirtual

Implements WtFlowWidget.

Definition at line 18 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onMouseWentUp()

void WtNodeFlowWidget::onMouseWentUp ( const Wt::WMouseEvent & event)
overridevirtual

Implements WtFlowWidget.

Definition at line 138 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ paintEvent()

void WtNodeFlowWidget::paintEvent ( Wt::WPaintDevice * paintDevice)
protected

Definition at line 253 of file WtNodeFlowWidget.cpp.

Here is the call graph for this function:

◆ setSelectNode()

void WtNodeFlowWidget::setSelectNode ( std::shared_ptr< dyno::Node > node)

Definition at line 246 of file WtNodeFlowWidget.cpp.

Member Data Documentation

◆ connectionOutNode

WtNode* WtNodeFlowWidget::connectionOutNode
protected

Definition at line 61 of file WtNodeFlowWidget.h.

◆ mOutNode

std::shared_ptr<Node> WtNodeFlowWidget::mOutNode
protected

Definition at line 63 of file WtNodeFlowWidget.h.

◆ node_scene

WtNodeFlowScene* WtNodeFlowWidget::node_scene = nullptr
protected

Definition at line 59 of file WtNodeFlowWidget.h.

◆ nodeMap

std::map<dyno::ObjectId, WtNode*> WtNodeFlowWidget::nodeMap
protected

Definition at line 60 of file WtNodeFlowWidget.h.

◆ sceneConnections

std::vector<sceneConnection> WtNodeFlowWidget::sceneConnections
protected

Definition at line 64 of file WtNodeFlowWidget.h.


The documentation for this class was generated from the following files: