Clarisse 5.0 SP8 SDK
 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), bool top_down=false)
 layout the given nodes.
void locate_nodes_horizontally (const GMathVec2i &init_pos)
void locate_nodes_vertically (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)
void set_spacing (unsigned int spacing)
- 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
const unsigned long & get_class_info_id () const
virtual bool is_kindof (const CoreClassInfo &cinfo) const
virtual const CoreClassInfoget_class_info () 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

Protected Member Functions

GuiNodalNodeBaseget_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)


class GuiNodalLayoutGrid

Additional Inherited Members

- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
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 

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

[in]nodes_batchnodes to search in recursively
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.

Any existing link involving nodes which are not in the nodes list will not be considered
[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]
GuiNodalNodeBase * GuiNodalLayouter::get_top_parent_node_in_batch ( const CoreSet< GuiNodalNodeBase * > &  batch,
GuiNodalNodeBase node 

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

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

layout the given nodes.

layout_nodes nodes to be layouted initial position for the layouted nodes