Public Member Functions |
| | __init__ (string name) |
| | clearFrame () |
| | Removes the bounding rectangle from the item.
|
| | clearSound (string event) |
| | Removes the sound associated with the indicated event.
|
| | clearStateDef (int state) |
| | Resets the NodePath assigned to the indicated state to its initial default, with only a frame representation if appropriate.
|
| bool | getActive () |
| | Returns whether the PGItem is currently active for mouse events.
|
| bool | getBackgroundFocus () |
| | Returns whether background_focus is currently enabled.
|
| string | getEnterEvent () |
| | Returns the event name that will be thrown when the item is active and the mouse enters its frame, but not any nested frames.
|
| string | getExitEvent () |
| | Returns the event name that will be thrown when the item is active and the mouse exits its frame, or enters a nested frame.
|
| bool | getFocus () |
| | Returns whether the PGItem currently has focus for keyboard events.
|
| string | getFocusInEvent () |
| | Returns the event name that will be thrown when the item gets the keyboard focus.
|
| string | getFocusOutEvent () |
| | Returns the event name that will be thrown when the item loses the keyboard focus.
|
| LVecBase4f const | getFrame () |
| | Returns the bounding rectangle of the item.
|
| LMatrix4f | getFrameInvXform () |
| | Returns the inverse of the frame transform matrix.
|
| PGFrameStyle | getFrameStyle (int state) |
| | Returns the kind of frame that will be drawn behind the item when it is in the indicated state.
|
| string | getId () |
| | Returns the unique ID assigned to this PGItem.
|
| string | getKeystrokeEvent () |
| | Returns the event name that will be thrown when the item is active and any key is pressed by the user.
|
| int | getNumStateDefs () |
| | Returns one more than the highest-numbered state def that was ever assigned to the PGItem.
|
| string | getPressEvent (ButtonHandle const button) |
| | Returns the event name that will be thrown when the item is active and the indicated mouse or keyboard button is depressed while the mouse is within the frame.
|
| string | getReleaseEvent (ButtonHandle const button) |
| | Returns the event name that will be thrown when the item is active and the indicated mouse or keyboard button, formerly clicked down is within the frame, is released.
|
| string | getRepeatEvent (ButtonHandle const button) |
| | Returns the event name that will be thrown when the item is active and the indicated mouse or keyboard button is continuously held down while the mouse is within the frame.
|
| AudioSound | getSound (string event) |
| | Returns the sound associated with the indicated event, or NULL if there is no associated sound.
|
| int | getState () |
| | Returns the "state" of this particular PGItem.
|
| NodePath | getStateDef (int state) |
| | Returns the Node that is the root of the subgraph that will be drawn when the PGItem is in the indicated state.
|
| list | getStateDefs () |
| int | getSuppressFlags () |
| | This is just an interface to get the suppress flags on the underlying MouseWatcherRegion.
|
| string | getWithinEvent () |
| | Returns the event name that will be thrown when the item is active and the mouse moves within the boundaries of the frame.
|
| string | getWithoutEvent () |
| | Returns the event name that will be thrown when the item is active and the mouse moves completely outside the boundaries of the frame.
|
| bool | hasFrame () |
| | Returns true if the item has a bounding rectangle; see set_frame().
|
| bool | hasSound (string event) |
| | Returns true if there is a sound associated with the indicated event, or false otherwise.
|
| bool | hasStateDef (int state) |
| | Returns true if get_state_def() has ever been called for the indicated state (thus defining a render subgraph for this state index), false otherwise.
|
| NodePath | instanceToStateDef (int state, NodePath const path) |
| | Parents an instance of the bottom node of the indicated NodePath to the indicated state index.
|
| | setActive (bool active) |
| | Sets whether the PGItem is active for mouse watching.
|
| | setBackgroundFocus (bool focus) |
| | Sets the background_focus flag for this item.
|
| | setFocus (bool focus) |
| | Sets whether the PGItem currently has keyboard focus.
|
| | setFrame (LVecBase4f const frame) |
| | Sets the bounding rectangle of the item, in local coordinates.
|
| | setFrame (float left, float right, float bottom, float top) |
| | Sets the bounding rectangle of the item, in local coordinates.
|
| | setFrameStyle (int state, PGFrameStyle const style) |
| | Changes the kind of frame that will be drawn behind the item when it is in the indicated state.
|
| | setId (string id) |
| | Set the unique ID assigned to this PGItem.
|
| | setName (string name) |
| | setSound (string event, AudioSound sound) |
| | Sets the sound that will be played whenever the indicated event occurs.
|
| | setState (int state) |
| | Sets the "state" of this particular PGItem.
|
| | setSuppressFlags (int suppress_flags) |
| | This is just an interface to set the suppress flags on the underlying MouseWatcherRegion.
|
Static Public Member Functions |
| static TypeHandle | getClassType () |
| static string | getEnterPrefix () |
| | Returns the prefix that is used to define the enter event for all PGItems.
|
| static string | getExitPrefix () |
| | Returns the prefix that is used to define the exit event for all PGItems.
|
| static string | getFocusInPrefix () |
| | Returns the prefix that is used to define the focus_in event for all PGItems.
|
| static PGItem | getFocusItem () |
| | Returns the one PGItem in the world that currently has keyboard focus, if any, or NULL if no item has keyboard focus.
|
| static string | getFocusOutPrefix () |
| | Returns the prefix that is used to define the focus_out event for all PGItems.
|
| static string | getKeystrokePrefix () |
| | Returns the prefix that is used to define the keystroke event for all PGItems.
|
| static string | getPressPrefix () |
| | Returns the prefix that is used to define the press event for all PGItems.
|
| static string | getReleasePrefix () |
| | Returns the prefix that is used to define the release event for all PGItems.
|
| static string | getRepeatPrefix () |
| | Returns the prefix that is used to define the repeat event for all PGItems.
|
| static TextNode | getTextNode () |
| | Returns the TextNode object that will be used by all PGItems to generate default labels given a string.
|
| static string | getWithinPrefix () |
| | Returns the prefix that is used to define the within event for all PGItems.
|
| static string | getWithoutPrefix () |
| | Returns the prefix that is used to define the without event for all PGItems.
|
| static | setTextNode (TextNode node) |
| | Changes the TextNode object that will be used by all PGItems to generate default labels given a string.
|
This is the base class for all the various kinds of gui widget objects.
It is a Node which corresponds to a rectangular region on the screen, and it may have any number of "state" subgraphs, one of which is rendered at any given time according to its current state.
The PGItem node must be parented to the scene graph somewhere beneath a PGTop node in order for this behavior to work.