Gecode::Gist::VisualNode Class Reference
Node class that supports visual layout. More...
#include <visualnode.hh>
Public Member Functions | |
VisualNode (void) | |
Constructor. | |
VisualNode (Space *root) | |
Constructor for root node from root and b. | |
~VisualNode (void) | |
Destructor. | |
bool | isHidden (void) |
Return if node is hidden. | |
void | setHidden (bool h) |
Set hidden state to h. | |
void | dirtyUp (void) |
Mark all nodes up the path to the parent as dirty. | |
void | layout (void) |
Compute layout for the subtree of this node. | |
int | getOffset (void) |
Return offset off this node from its parent. | |
void | setOffset (int n) |
Set offset of this node, relative to its parent. | |
bool | isDirty (void) |
Return whether node is marked as dirty. | |
void | setDirty (bool d) |
Mark node as dirty. | |
bool | childrenLayoutIsDone (void) |
Return whether the layout of the node's children has been completed. | |
void | setChildrenLayoutDone (bool d) |
Mark node whether the layout of the node's children has been completed. | |
bool | isMarked (void) |
Return whether node is marked. | |
void | setMarked (bool m) |
Set mark of this node. | |
void | pathUp (void) |
Set all nodes from the node to the root to be on the path. | |
void | unPathUp (void) |
Set all nodes from the node to the root not to be on the path. | |
bool | isOnPath (void) |
Return whether node is on the path. | |
int | getPathAlternative (void) |
Return the alternative of the child that is on the path (-1 if none). | |
void | setOnPath (bool onPath0) |
Set whether node is on the path. | |
void | toggleHidden (void) |
Toggle whether this node is hidden. | |
void | hideFailed (void) |
Hide all failed subtrees of this node. | |
void | unhideAll (void) |
Unhide all nodes in the subtree of this node. | |
Shape * | getShape (void) |
Return the shape of this node. | |
void | setShape (Shape *s) |
Set the shape of this node. | |
void | computeShape (VisualNode *root) |
Compute the shape according to the shapes of the children. | |
void | setBoundingBox (BoundingBox b) |
Set the bounding box. | |
BoundingBox | getBoundingBox (void) |
Return the bounding box. | |
void | changedStatus () |
Signal that the status has changed. | |
VisualNode * | getParent (void) |
Return the parent. | |
VisualNode * | getChild (int i) |
Return child i. | |
VisualNode * | findNode (int x, int y) |
Find a node in this subtree at coordinates x, y. | |
std::string | toolTip (BestNode *curBest, int c_d, int a_d) |
Return string that is used as a tool tip. | |
size_t | size (void) const |
Return size information. | |
Protected Types | |
enum | VisualNodeFlags { DIRTY = SpaceNode::LASTBIT+1, CHILDRENLAYOUTDONE, HIDDEN, MARKED, ONPATH } |
Flags for VisualNodes. More... | |
Protected Member Functions | |
bool | containsCoordinateAtDepth (int x, int depth) |
Check if the x at depth depth lies in this subtree. | |
Protected Attributes | |
Shape * | shape |
Shape of this node. | |
int | offset |
Relative offset from the parent node. | |
BoundingBox | box |
Bounding box of this node. |
Detailed Description
Node class that supports visual layout.
Definition at line 123 of file visualnode.hh.
Member Enumeration Documentation
enum Gecode::Gist::VisualNode::VisualNodeFlags [protected] |
Flags for VisualNodes.
Definition at line 126 of file visualnode.hh.
Constructor & Destructor Documentation
Gecode::Gist::VisualNode::VisualNode | ( | void | ) |
Constructor.
Definition at line 67 of file visualnode.cpp.
Gecode::Gist::VisualNode::VisualNode | ( | Space * | root | ) |
Constructor for root node from root and b.
Definition at line 79 of file visualnode.cpp.
Gecode::Gist::VisualNode::~VisualNode | ( | void | ) |
Destructor.
Definition at line 92 of file visualnode.cpp.
Member Function Documentation
bool Gecode::Gist::VisualNode::containsCoordinateAtDepth | ( | int | x, | |
int | depth | |||
) | [protected] |
Check if the x at depth depth lies in this subtree.
Definition at line 174 of file visualnode.cpp.
bool Gecode::Gist::VisualNode::isHidden | ( | void | ) | [inline] |
Return if node is hidden.
Definition at line 105 of file visualnode.hpp.
void Gecode::Gist::VisualNode::setHidden | ( | bool | h | ) | [inline] |
Set hidden state to h.
Definition at line 110 of file visualnode.hpp.
void Gecode::Gist::VisualNode::dirtyUp | ( | void | ) |
Mark all nodes up the path to the parent as dirty.
Definition at line 97 of file visualnode.cpp.
void Gecode::Gist::VisualNode::layout | ( | void | ) |
Compute layout for the subtree of this node.
Definition at line 108 of file visualnode.cpp.
int Gecode::Gist::VisualNode::getOffset | ( | void | ) | [inline] |
Return offset off this node from its parent.
Definition at line 115 of file visualnode.hpp.
void Gecode::Gist::VisualNode::setOffset | ( | int | n | ) | [inline] |
Set offset of this node, relative to its parent.
Definition at line 118 of file visualnode.hpp.
bool Gecode::Gist::VisualNode::isDirty | ( | void | ) | [inline] |
Return whether node is marked as dirty.
Definition at line 121 of file visualnode.hpp.
void Gecode::Gist::VisualNode::setDirty | ( | bool | d | ) | [inline] |
Mark node as dirty.
Definition at line 126 of file visualnode.hpp.
bool Gecode::Gist::VisualNode::childrenLayoutIsDone | ( | void | ) | [inline] |
Return whether the layout of the node's children has been completed.
Definition at line 131 of file visualnode.hpp.
void Gecode::Gist::VisualNode::setChildrenLayoutDone | ( | bool | d | ) | [inline] |
Mark node whether the layout of the node's children has been completed.
Definition at line 136 of file visualnode.hpp.
bool Gecode::Gist::VisualNode::isMarked | ( | void | ) | [inline] |
Return whether node is marked.
Definition at line 141 of file visualnode.hpp.
void Gecode::Gist::VisualNode::setMarked | ( | bool | m | ) | [inline] |
Set mark of this node.
Definition at line 146 of file visualnode.hpp.
void Gecode::Gist::VisualNode::pathUp | ( | void | ) |
Set all nodes from the node to the root to be on the path.
Definition at line 122 of file visualnode.cpp.
void Gecode::Gist::VisualNode::unPathUp | ( | void | ) |
Set all nodes from the node to the root not to be on the path.
Definition at line 130 of file visualnode.cpp.
bool Gecode::Gist::VisualNode::isOnPath | ( | void | ) | [inline] |
Return whether node is on the path.
Definition at line 151 of file visualnode.hpp.
int Gecode::Gist::VisualNode::getPathAlternative | ( | void | ) |
Return the alternative of the child that is on the path (-1 if none).
Definition at line 139 of file visualnode.cpp.
void Gecode::Gist::VisualNode::setOnPath | ( | bool | onPath0 | ) | [inline] |
Set whether node is on the path.
Definition at line 156 of file visualnode.hpp.
void Gecode::Gist::VisualNode::toggleHidden | ( | void | ) |
Toggle whether this node is hidden.
Definition at line 148 of file visualnode.cpp.
void Gecode::Gist::VisualNode::hideFailed | ( | void | ) |
Hide all failed subtrees of this node.
Definition at line 154 of file visualnode.cpp.
void Gecode::Gist::VisualNode::unhideAll | ( | void | ) |
Unhide all nodes in the subtree of this node.
Definition at line 162 of file visualnode.cpp.
Shape * Gecode::Gist::VisualNode::getShape | ( | void | ) | [inline] |
Return the shape of this node.
Definition at line 161 of file visualnode.hpp.
void Gecode::Gist::VisualNode::setShape | ( | Shape * | s | ) |
Set the shape of this node.
Definition at line 316 of file visualnode.cpp.
void Gecode::Gist::VisualNode::computeShape | ( | VisualNode * | root | ) |
Compute the shape according to the shapes of the children.
Definition at line 323 of file visualnode.cpp.
void Gecode::Gist::VisualNode::setBoundingBox | ( | BoundingBox | b | ) | [inline] |
Set the bounding box.
Definition at line 164 of file visualnode.hpp.
BoundingBox Gecode::Gist::VisualNode::getBoundingBox | ( | void | ) | [inline] |
Return the bounding box.
Definition at line 167 of file visualnode.hpp.
void Gecode::Gist::VisualNode::changedStatus | ( | ) |
Signal that the status has changed.
Definition at line 171 of file visualnode.cpp.
VisualNode * Gecode::Gist::VisualNode::getParent | ( | void | ) | [inline] |
Return the parent.
Reimplemented from Gecode::Gist::SpaceNode.
Definition at line 170 of file visualnode.hpp.
VisualNode * Gecode::Gist::VisualNode::getChild | ( | int | i | ) | [inline] |
Return child i.
Reimplemented from Gecode::Gist::SpaceNode.
Definition at line 175 of file visualnode.hpp.
VisualNode * Gecode::Gist::VisualNode::findNode | ( | int | x, | |
int | y | |||
) |
Find a node in this subtree at coordinates x, y.
Definition at line 189 of file visualnode.cpp.
std::string Gecode::Gist::VisualNode::toolTip | ( | BestNode * | curBest, | |
int | c_d, | |||
int | a_d | |||
) |
Return string that is used as a tool tip.
Definition at line 219 of file visualnode.cpp.
size_t Gecode::Gist::VisualNode::size | ( | void | ) | const |
Return size information.
Definition at line 424 of file visualnode.cpp.
Member Data Documentation
Shape* Gecode::Gist::VisualNode::shape [protected] |
Shape of this node.
Definition at line 135 of file visualnode.hh.
int Gecode::Gist::VisualNode::offset [protected] |
Relative offset from the parent node.
Definition at line 137 of file visualnode.hh.
BoundingBox Gecode::Gist::VisualNode::box [protected] |
Bounding box of this node.
Definition at line 139 of file visualnode.hh.
The documentation for this class was generated from the following files:
- gecode/gist/visualnode.hh (Revision: 9076)
- gecode/gist/visualnode.cpp (Revision: 8151)
- gecode/gist/visualnode.hpp (Revision: 9766)