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

#include <WtNode.h>

Public Member Functions

 WtNodeGeometry (std::unique_ptr< WtNodeDataModel > const &dataModel, Wt::WPaintDevice *paintDevice)
 
 ~WtNodeGeometry ()
 
unsigned int height () const
 
void setHeight (unsigned int h)
 
unsigned int width () const
 
void setWidth (unsigned int w)
 
unsigned int entryHeight () const
 
void setEntryHeight (unsigned int h)
 
unsigned int entryWidth () const
 
void setEntryWidth (unsigned int w)
 
unsigned int hotkeyWidth () const
 
void setHotkeyWidth (unsigned int w)
 
unsigned int hotkeyIncline () const
 
void setHotkeyIncline (unsigned int inc)
 
unsigned int hotkeyOffset () const
 
void setHotkeyOffset (unsigned int offset)
 
unsigned int spacing () const
 
unsigned int captionHeightSpacing () const
 
void setSpacing (unsigned int s)
 
bool hovered () const
 
void setHovered (unsigned int h)
 
unsigned int nSources () const
 
unsigned int nSinks () const
 
Wt::WPointF const & draggingPos () const
 
void setDraggingPosition (Wt::WPointF const &pos)
 
void ShowTips () const
 
void HideTips () const
 
bool getPortTipsState () const
 
void ShowPortTips () const
 
void HidePortTips () const
 
std::string strFormat (std::string str) const
 
Wt::WRectF entryBoundingRect () const
 
Wt::WRectF boundingRect () const
 
void recalculateSize () const
 
double calculateWidth (std::string) const
 
double calculateWidth (int num) const
 
Wt::WPointF portScenePosition (PortIndex index, PortType portType, Wt::WTransform const &t=Wt::WTransform()) const
 
PortIndex checkHitScenePoint (PortType portType, Wt::WPointF point, Wt::WTransform const &t=Wt::WTransform()) const
 
PortIndex hoverHitScenePoint (PortType portType, Wt::WPointF point, Wt::WTransform const &t=Wt::WTransform()) const
 
PortIndex hoverHitPortArea (PortType portType, Wt::WPointF const scenePoint, Wt::WTransform const &sceneTransform, WtNodeGeometry const &geom, WtNodeDataModel const *mode, Wt::WFontMetrics const &metrics) const
 
PortIndex findHitPort (PortType portType, Wt::WPointF const scenePoint, Wt::WTransform const &sceneTransform, WtNodeGeometry const &geom, WtNodeDataModel const *model) const
 
bool checkHitHotKey0 (Wt::WPointF point, Wt::WTransform const &t=Wt::WTransform()) const
 
bool checkHitHotKey1 (Wt::WPointF point, Wt::WTransform const &t=Wt::WTransform()) const
 
Wt::WRectF resizeRect () const
 
Wt::WPointF widgetPosition () const
 
int equivalentWidgetHeight () const
 
unsigned int validationHeight () const
 
unsigned int validationWidth () const
 
unsigned int captionHeight () const
 
unsigned int captionWidth () const
 

Public Attributes

PortType hoverport_type
 
PortIndex hoverport_id
 
bool * isPortTipsShow
 
bool * isNodeTipsShow
 

Private Member Functions

unsigned int portWidth (PortType portType) const
 

Private Attributes

unsigned int _width
 
unsigned int _height
 
unsigned int _entryWidth
 
unsigned int _inputPortWidth
 
unsigned int _outputPortWidth
 
unsigned int _entryHeight
 
unsigned int _spacing
 
unsigned int _captionHeightSpacing
 
unsigned int _hotkeyWidth
 
unsigned int _hotkeyIncline
 
unsigned int _hotkeyOffset
 
bool _hovered
 
unsigned int _nSources
 
unsigned int _nSinks
 
Wt::WPointF _draggingPos
 
std::unique_ptr< WtNodeDataModel > const & _dataModel
 
Wt::WFontMetrics _fontMetrics
 

Detailed Description

Definition at line 24 of file WtNode.h.

Constructor & Destructor Documentation

◆ WtNodeGeometry()

WtNodeGeometry::WtNodeGeometry ( std::unique_ptr< WtNodeDataModel > const & dataModel,
Wt::WPaintDevice * paintDevice )

Definition at line 15 of file WtNode.cpp.

Here is the caller graph for this function:

◆ ~WtNodeGeometry()

WtNodeGeometry::~WtNodeGeometry ( )

Definition at line 37 of file WtNode.cpp.

Member Function Documentation

◆ boundingRect()

Wt::WRectF WtNodeGeometry::boundingRect ( ) const

Definition at line 221 of file WtNode.cpp.

Here is the call graph for this function:

◆ calculateWidth() [1/2]

double WtNodeGeometry::calculateWidth ( int num) const

Definition at line 546 of file WtNode.cpp.

Here is the call graph for this function:

◆ calculateWidth() [2/2]

double WtNodeGeometry::calculateWidth ( std::string str) const

Definition at line 539 of file WtNode.cpp.

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

◆ captionHeight()

unsigned int WtNodeGeometry::captionHeight ( ) const

Definition at line 516 of file WtNode.cpp.

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

◆ captionHeightSpacing()

unsigned int WtNodeGeometry::captionHeightSpacing ( ) const
inline

Definition at line 61 of file WtNode.h.

Here is the caller graph for this function:

◆ captionWidth()

unsigned int WtNodeGeometry::captionWidth ( ) const

Definition at line 526 of file WtNode.cpp.

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

◆ checkHitHotKey0()

bool WtNodeGeometry::checkHitHotKey0 ( Wt::WPointF point,
Wt::WTransform const & t = Wt::WTransform() ) const

Definition at line 117 of file WtNode.cpp.

Here is the call graph for this function:

◆ checkHitHotKey1()

bool WtNodeGeometry::checkHitHotKey1 ( Wt::WPointF point,
Wt::WTransform const & t = Wt::WTransform() ) const

Definition at line 142 of file WtNode.cpp.

Here is the call graph for this function:

◆ checkHitScenePoint()

PortIndex WtNodeGeometry::checkHitScenePoint ( PortType portType,
Wt::WPointF point,
Wt::WTransform const & t = Wt::WTransform() ) const

Definition at line 312 of file WtNode.cpp.

Here is the call graph for this function:

◆ draggingPos()

Wt::WPointF const & WtNodeGeometry::draggingPos ( ) const
inline

Definition at line 73 of file WtNode.h.

Here is the caller graph for this function:

◆ entryBoundingRect()

Wt::WRectF WtNodeGeometry::entryBoundingRect ( ) const

Definition at line 211 of file WtNode.cpp.

◆ entryHeight()

unsigned int WtNodeGeometry::entryHeight ( ) const
inline

Definition at line 39 of file WtNode.h.

◆ entryWidth()

unsigned int WtNodeGeometry::entryWidth ( ) const
inline

Definition at line 43 of file WtNode.h.

◆ equivalentWidgetHeight()

int WtNodeGeometry::equivalentWidgetHeight ( ) const

◆ findHitPort()

PortIndex WtNodeGeometry::findHitPort ( PortType portType,
Wt::WPointF const scenePoint,
Wt::WTransform const & sceneTransform,
WtNodeGeometry const & geom,
WtNodeDataModel const * model ) const
Here is the call graph for this function:

◆ getPortTipsState()

bool WtNodeGeometry::getPortTipsState ( ) const

Definition at line 78 of file WtNode.cpp.

◆ height()

unsigned int WtNodeGeometry::height ( ) const
inline

Definition at line 31 of file WtNode.h.

Here is the caller graph for this function:

◆ HidePortTips()

void WtNodeGeometry::HidePortTips ( ) const

Definition at line 70 of file WtNode.cpp.

◆ HideTips()

void WtNodeGeometry::HideTips ( ) const

Definition at line 63 of file WtNode.cpp.

◆ hotkeyIncline()

unsigned int WtNodeGeometry::hotkeyIncline ( ) const
inline

Definition at line 51 of file WtNode.h.

Here is the caller graph for this function:

◆ hotkeyOffset()

unsigned int WtNodeGeometry::hotkeyOffset ( ) const
inline

Definition at line 55 of file WtNode.h.

Here is the caller graph for this function:

◆ hotkeyWidth()

unsigned int WtNodeGeometry::hotkeyWidth ( ) const
inline

Definition at line 47 of file WtNode.h.

Here is the caller graph for this function:

◆ hovered()

bool WtNodeGeometry::hovered ( ) const
inline

Definition at line 65 of file WtNode.h.

Here is the caller graph for this function:

◆ hoverHitPortArea()

PortIndex WtNodeGeometry::hoverHitPortArea ( PortType portType,
Wt::WPointF const scenePoint,
Wt::WTransform const & sceneTransform,
WtNodeGeometry const & geom,
WtNodeDataModel const * mode,
Wt::WFontMetrics const & metrics ) const
Here is the call graph for this function:

◆ hoverHitScenePoint()

PortIndex WtNodeGeometry::hoverHitScenePoint ( PortType portType,
Wt::WPointF point,
Wt::WTransform const & t = Wt::WTransform() ) const

Definition at line 344 of file WtNode.cpp.

Here is the call graph for this function:

◆ nSinks()

unsigned int WtNodeGeometry::nSinks ( ) const

Definition at line 112 of file WtNode.cpp.

◆ nSources()

unsigned int WtNodeGeometry::nSources ( ) const

Definition at line 107 of file WtNode.cpp.

◆ portScenePosition()

Wt::WPointF WtNodeGeometry::portScenePosition ( PortIndex index,
PortType portType,
Wt::WTransform const & t = Wt::WTransform() ) const

Definition at line 270 of file WtNode.cpp.

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

◆ portWidth()

unsigned int WtNodeGeometry::portWidth ( PortType portType) const
private

Definition at line 552 of file WtNode.cpp.

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

◆ recalculateSize()

void WtNodeGeometry::recalculateSize ( ) const

Definition at line 233 of file WtNode.cpp.

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

◆ resizeRect()

Wt::WRectF WtNodeGeometry::resizeRect ( ) const

Definition at line 167 of file WtNode.cpp.

Here is the caller graph for this function:

◆ setDraggingPosition()

void WtNodeGeometry::setDraggingPosition ( Wt::WPointF const & pos)
inline

Definition at line 78 of file WtNode.h.

◆ setEntryHeight()

void WtNodeGeometry::setEntryHeight ( unsigned int h)
inline

Definition at line 41 of file WtNode.h.

◆ setEntryWidth()

void WtNodeGeometry::setEntryWidth ( unsigned int w)
inline

Definition at line 45 of file WtNode.h.

◆ setHeight()

void WtNodeGeometry::setHeight ( unsigned int h)
inline

Definition at line 33 of file WtNode.h.

◆ setHotkeyIncline()

void WtNodeGeometry::setHotkeyIncline ( unsigned int inc)
inline

Definition at line 53 of file WtNode.h.

◆ setHotkeyOffset()

void WtNodeGeometry::setHotkeyOffset ( unsigned int offset)
inline

Definition at line 57 of file WtNode.h.

◆ setHotkeyWidth()

void WtNodeGeometry::setHotkeyWidth ( unsigned int w)
inline

Definition at line 49 of file WtNode.h.

◆ setHovered()

void WtNodeGeometry::setHovered ( unsigned int h)
inline

Definition at line 67 of file WtNode.h.

◆ setSpacing()

void WtNodeGeometry::setSpacing ( unsigned int s)
inline

Definition at line 63 of file WtNode.h.

◆ setWidth()

void WtNodeGeometry::setWidth ( unsigned int w)
inline

Definition at line 37 of file WtNode.h.

◆ ShowPortTips()

void WtNodeGeometry::ShowPortTips ( ) const

Definition at line 80 of file WtNode.cpp.

◆ ShowTips()

void WtNodeGeometry::ShowTips ( ) const

Definition at line 42 of file WtNode.cpp.

◆ spacing()

unsigned int WtNodeGeometry::spacing ( ) const
inline

Definition at line 59 of file WtNode.h.

◆ strFormat()

std::string WtNodeGeometry::strFormat ( std::string str) const

Definition at line 193 of file WtNode.cpp.

Here is the caller graph for this function:

◆ validationHeight()

unsigned int WtNodeGeometry::validationHeight ( ) const

Definition at line 177 of file WtNode.cpp.

Here is the caller graph for this function:

◆ validationWidth()

unsigned int WtNodeGeometry::validationWidth ( ) const

Definition at line 184 of file WtNode.cpp.

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

◆ widgetPosition()

Wt::WPointF WtNodeGeometry::widgetPosition ( ) const

◆ width()

unsigned int WtNodeGeometry::width ( ) const
inline

Definition at line 35 of file WtNode.h.

Here is the caller graph for this function:

Member Data Documentation

◆ _captionHeightSpacing

unsigned int WtNodeGeometry::_captionHeightSpacing
private

Definition at line 168 of file WtNode.h.

◆ _dataModel

std::unique_ptr<WtNodeDataModel> const& WtNodeGeometry::_dataModel
private

Definition at line 181 of file WtNode.h.

◆ _draggingPos

Wt::WPointF WtNodeGeometry::_draggingPos
private

Definition at line 179 of file WtNode.h.

◆ _entryHeight

unsigned int WtNodeGeometry::_entryHeight
mutableprivate

Definition at line 166 of file WtNode.h.

◆ _entryWidth

unsigned int WtNodeGeometry::_entryWidth
private

Definition at line 163 of file WtNode.h.

◆ _fontMetrics

Wt::WFontMetrics WtNodeGeometry::_fontMetrics
mutableprivate

Definition at line 183 of file WtNode.h.

◆ _height

unsigned int WtNodeGeometry::_height
mutableprivate

Definition at line 162 of file WtNode.h.

◆ _hotkeyIncline

unsigned int WtNodeGeometry::_hotkeyIncline
private

Definition at line 171 of file WtNode.h.

◆ _hotkeyOffset

unsigned int WtNodeGeometry::_hotkeyOffset
private

Definition at line 172 of file WtNode.h.

◆ _hotkeyWidth

unsigned int WtNodeGeometry::_hotkeyWidth
private

Definition at line 170 of file WtNode.h.

◆ _hovered

bool WtNodeGeometry::_hovered
private

Definition at line 174 of file WtNode.h.

◆ _inputPortWidth

unsigned int WtNodeGeometry::_inputPortWidth
mutableprivate

Definition at line 164 of file WtNode.h.

◆ _nSinks

unsigned int WtNodeGeometry::_nSinks
private

Definition at line 177 of file WtNode.h.

◆ _nSources

unsigned int WtNodeGeometry::_nSources
private

Definition at line 176 of file WtNode.h.

◆ _outputPortWidth

unsigned int WtNodeGeometry::_outputPortWidth
mutableprivate

Definition at line 165 of file WtNode.h.

◆ _spacing

unsigned int WtNodeGeometry::_spacing
private

Definition at line 167 of file WtNode.h.

◆ _width

unsigned int WtNodeGeometry::_width
mutableprivate

Definition at line 161 of file WtNode.h.

◆ hoverport_id

PortIndex WtNodeGeometry::hoverport_id

Definition at line 88 of file WtNode.h.

◆ hoverport_type

PortType WtNodeGeometry::hoverport_type

Definition at line 87 of file WtNode.h.

◆ isNodeTipsShow

bool* WtNodeGeometry::isNodeTipsShow

Definition at line 91 of file WtNode.h.

◆ isPortTipsShow

bool* WtNodeGeometry::isPortTipsShow

Definition at line 90 of file WtNode.h.


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