| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
TeViewTree Class Reference

A class to deal with branchs in a view tree structure. More...

`#include <TeViewNode.h>`

Inheritance diagram for TeViewTree:

List of all members.

## Public Member Functions

| TeViewTree (const string &name="")
| Constructor.
| TeViewTree (const TeViewNodeParams &params)
| Constructor.
virtual | ~TeViewTree ()
| Destructor.
virtual void | visibility (int vis)
| Sets the nodes visibility.
virtual int | visibility ()
| Returns the nodes visibility.
virtual void | swap (unsigned int i, unsigned int j)
| Swap nodes.
virtual void | moveUp (TeViewNode *node)
| Moves a node up in the tree structure.
virtual void | moveDown (TeViewNode *node)
| Moves a node down in the tree structure.
virtual void | add (TeViewNode *node, const bool &updatePriority=true)
| Adds a node to the structure.
virtual TeViewNode * | remove (const string &name)
| Removes a node identified by its name.
virtual TeViewNode * | removeID (int id)
| Removes a node through its identifier.
virtual TeViewNode * | retrieve (unsigned int i)
| Retrieves a node through its index.
virtual void | draw ()
| Draw a node.
unsigned int | size ()
| Returns the size of the structure.
vector< TeViewNode * > & | nodes ()
| Returns the vector of View nodes.
void | sort ()
| Sort the vector of nodes according to their priorities.
virtual void | clear ()
| Unlinks the nodes from the view tree.
virtual int | moveTop (TeViewNode *node)
int | moveBottom (TeViewNode *node)
virtual void | insertFront (TeViewNode *node)
virtual TeViewNode * | find (int id)
virtual TeViewNode * | find (std::string name, bool caseS=false)
virtual TeBox | box (bool onlyVisible, TeProjection *projection)
virtual bool | assertsPriorities ()

## Detailed Description

A class to deal with branchs in a view tree structure.

## Constructor & Destructor Documentation

TeViewTree::TeViewTree | ( | const string & | name = `""` | ) | `[inline]`

Constructor.

TeViewTree::TeViewTree | ( | const TeViewNodeParams & | params | ) | `[inline]`

Constructor.

TeViewTree::~TeViewTree | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

void TeViewTree::add | ( | TeViewNode * | node,
|  | const bool & | updatePriority = `true`
| ) |  | `[virtual]`

Adds a node to the structure.

Reimplemented from TeViewNode.

bool TeViewTree::assertsPriorities | ( |  | ) | `[virtual]`

Asserts the nodes priorities by the positions. Returns true if any priority was updated, otherwise returns false.

TeBox TeViewTree::box | ( | bool | onlyVisible,
|  | TeProjection * | projection
| ) |  | `[virtual]`

Returns the boundary box of the tree view themes

Parameters:

  projection | The returned box coordinates will be in the given projection

void TeViewTree::clear | ( | void |  | ) | `[virtual]`

Unlinks the nodes from the view tree.

void TeViewTree::draw | ( |  | ) | `[virtual]`

Draw a node.

Reimplemented from TeViewNode.

TeViewNode * TeViewTree::find | ( | int | id | ) | `[virtual]`

Look at a View Tree for a node with the given id.

Parameters:

  id | Id of the node to be found

TeViewNode * TeViewTree::find | ( | std::string | name,
|  | bool | caseS = `false`
| ) |  | `[virtual]`

Look at a View Tree for a node with the given name.

Parameters:

  name | name of the node to be found
  caseS(optional) | true if the given name is case sensitive

void TeViewTree::insertFront | ( | TeViewNode * | node | ) | `[virtual]`

Inserts the given node to at the begin of the view tree.

Parameters:

  node | node to be added

int TeViewTree::moveBottom | ( | TeViewNode * | node | ) |

Move the given node to the bottom of it's tree.

Parameters:

  node | to be moved

Returns:
  the number of positions the node has been moved

void TeViewTree::moveDown | ( | TeViewNode * | node | ) | `[virtual]`

Moves a node down in the tree structure.

Reimplemented from TeViewNode.

int TeViewTree::moveTop | ( | TeViewNode * | node | ) | `[virtual]`

Move the given node to the top of it's tree.

Parameters:

  node | to be moved

Returns:
  the number of positions the node has been moved

void TeViewTree::moveUp | ( | TeViewNode * | node | ) | `[virtual]`

Moves a node up in the tree structure.

Reimplemented from TeViewNode.

vector<TeViewNode*>& TeViewTree::nodes | ( |  | ) | `[inline]`

Returns the vector of View nodes.

TeViewNode * TeViewTree::remove | ( | const string & | name | ) | `[virtual]`

Removes a node identified by its name.

Reimplemented from TeViewNode.

TeViewNode * TeViewTree::removeID | ( | int | id | ) | `[virtual]`

Removes a node through its identifier.

Reimplemented from TeViewNode.

virtual TeViewNode* TeViewTree::retrieve | ( | unsigned int | i | ) | `[inline, virtual]`

Retrieves a node through its index.

unsigned int TeViewTree::size | ( | void |  | ) | `[inline]`

Returns the size of the structure.

void TeViewTree::sort | ( |  | ) | `[virtual]`

Sort the vector of nodes according to their priorities.

Reimplemented from TeViewNode.

void TeViewTree::swap | ( | unsigned int | i,
|  | unsigned int | j
| ) |  | `[virtual]`

Swap nodes.

Reimplemented from TeViewNode.

void TeViewTree::visibility | ( | int | vis | ) | `[virtual]`

Sets the nodes visibility.

Reimplemented from TeViewNode.

int TeViewTree::visibility | ( |  | ) | `[virtual]`

Returns the nodes visibility.

Reimplemented from TeViewNode.

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeViewNode.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeViewNode.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines