Clarisse 4.0 SP5b SDK  4.0.0.0.5.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Friends | List of all members
GuiNodalLayouter Class Reference
Inheritance diagram for GuiNodalLayouter:
CoreBaseObject CoreBaseType

Public Member Functions

 GuiNodalLayouter (GuiNodal &graph)
 
virtual void layout (const CoreSet< GuiNodalNodeBase * > &layout_nodes, const GMathVec2i &init_pos=GMathVec2i(0, 0))
 layout the given nodes.
 
void locate_nodes (const GMathVec2i &init_pos)
 
void get_root_nodes (const CoreSet< GuiNodalNodeBase * > &nodes, CoreSet< GuiNodalNodeBase * > &root_nodes, CoreSet< GuiNodalNodeBase * > &single_nodes)
 Get root nodes considering only the given nodes.
 
const GuiNodalget_graph () const
 
void set_silent_layout (const bool &value)
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
virtual size_t get_memory_size () const
 
CoreString get_class_info_name () const
 
CoreString get_class_interface () const
 
const unsigned long & get_class_info_id () const
 
bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
bool operator== (const CoreBaseObject &obj) const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 
bool operator== (const CoreBaseType &obj) const
 

Protected Member Functions

GuiNodalNodeget_top_parent_node_in_batch (const CoreSet< GuiNodalNodeBase * > &batch, GuiNodalNodeBase *node)
 returns the first -visible- node parent existing in given batch node
 
void layout_node (GuiNodalNodeBase &node, GuiNodalLayoutGrid &grid, CoreSet< GuiNodalNodeBase * > &nodes_batch)
 Add a node in the grid and add recursively its previous and next nodes – O (next) – O (current) – O (previous)
 
void add_grid_node (GuiNodalLayoutGrid &grid, GuiNodalNodeBase &node)
 
GuiNodalLayoutGridget_grid_for_node (GuiNodalNodeBase &node)
 
GuiNodalNodeBaseget_node_for_grid (GuiNodalLayoutGrid &grid)
 
void remove_node_grid (GuiNodalNodeBase &node)
 
GuiNodalNodeBase_deep_search (GuiNodalNodeBase *node, const CoreSet< GuiNodalNodeBase * > &nodes_to_search)
 Search inside given nodes and their children recursively if the given node exists [in] node node to look for.
 
GuiNodalNodeBasedeep_search (GuiNodalNodeBase *node, const CoreSet< GuiNodalNodeBase * > &nodes_to_search)
 

Friends

class GuiNodalLayoutGrid
 

Additional Inherited Members

- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 

Member Function Documentation

GuiNodalNodeBase * GuiNodalLayouter::_deep_search ( GuiNodalNodeBase node,
const CoreSet< GuiNodalNodeBase * > &  nodes_batch 
)
protected

Search inside given nodes and their children recursively if the given node exists [in] node node to look for.

Parameters
[in]nodes_batchnodes to search in recursively
Returns
0 if not found, node if directly found in nodes_batch, or its parent from nodes_batch.
void GuiNodalLayouter::get_root_nodes ( const CoreSet< GuiNodalNodeBase * > &  nodes,
CoreSet< GuiNodalNodeBase * > &  root_nodes,
CoreSet< GuiNodalNodeBase * > &  single_nodes 
)

Get root nodes considering only the given nodes.

Note
Any existing link involving nodes which are not in the nodes list will not be considered
Parameters
[in]nodesgraph nodes
[out]root_nodesroot nodes found
[out]single_nodessingle nodes found, without any connections within the given nodes [connections to external nodes are not considered]
GuiNodalNode * GuiNodalLayouter::get_top_parent_node_in_batch ( const CoreSet< GuiNodalNodeBase * > &  batch,
GuiNodalNodeBase node 
)
protected

returns the first -visible- node parent existing in given batch node

Parameters
[in]batchlist of nodes to search in
[in]nodeto search through hierarchy
Returns
node found in incoming node hierarchy or 0
void GuiNodalLayouter::layout ( const CoreSet< GuiNodalNodeBase * > &  layout_nodes,
const GMathVec2i &  init_pos = GMathVec2i(0, 0) 
)
virtual

layout the given nodes.

layout_nodes nodes to be layouted initial position for the layouted nodes