Panda3D

- Main Page
- Packages
- Classes

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

Public Member Functions | Static Public Member Functions

# PGTop Class Reference

The "top" node of the new Panda GUI system. More...

Inheritance diagram for PGTop:

List of all members.

## Public Member Functions
| PGTop (string name)
MouseWatcherGroup | getGroup ()
| Returns the MouseWatcherGroup pointer that the PGTop object registers its PG items with, or NULL if the MouseWatcher has not yet been set.
MouseWatcher | getMouseWatcher ()
| Returns the MouseWatcher pointer that the PGTop object registers its PG items with, or NULL if the MouseWatcher has not yet been set.
int | getStartSort ()
| Returns the sort index that is assigned during the traversal to the first PGItem that is discovered during traversal.
| setMouseWatcher (MouseWatcher watcher)
| Sets the MouseWatcher pointer that the PGTop object registers its PG items with.
| setStartSort (int start_sort)
| Specifies the sort index that is assigned during the traversal to the first PGItem that is discovered during traversal.
## Static Public Member Functions
static TypeHandle | getClassType ()

## Detailed Description

The "top" node of the new Panda GUI system.

This node must be parented to the 2-d scene graph, and all PG objects should be parented to this node or somewhere below it. PG objects not parented within this hierarchy will not be clickable.

This node begins the special traversal of the PG objects that registers each node within the MouseWatcher and forces everything to render in a depth-first, left-to-right order, appropriate for 2-d objects.

## Constructor & Destructor Documentation

PGTop | ( | string | name | ) |

## Member Function Documentation

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from PandaNode.

MouseWatcherGroup getGroup | ( |  | ) |

Returns the MouseWatcherGroup pointer that the PGTop object registers its PG items with, or NULL if the MouseWatcher has not yet been set.

MouseWatcher getMouseWatcher | ( |  | ) |

Returns the MouseWatcher pointer that the PGTop object registers its PG items with, or NULL if the MouseWatcher has not yet been set.

int getStartSort | ( |  | ) |

Returns the sort index that is assigned during the traversal to the first PGItem that is discovered during traversal.

See set_start_sort().

setMouseWatcher | ( | MouseWatcher | watcher | ) |

Sets the MouseWatcher pointer that the PGTop object registers its PG items with.

This must be set before the PG items are active.

setStartSort | ( | int | start_sort | ) |

Specifies the sort index that is assigned during the traversal to the first PGItem that is discovered during traversal.

Subsequent PGItems will be assigned consecutively higher sort indexes.

This number is used by the MouseWatcher system to rank the clickable mouse regions in the same order in which the items are rendered, so that items on top will receive mouse priority.

Normally, it makes the most sense to leave this initial value at its default value of 0, unless you need the PGItems to have a particular sort value with respect to some other objects in the scene (particularly with a second PGTop node).

All Classes Namespaces Functions Variables Enumerations Enumerator Properties