Panda3D
Public Member Functions | Static Public Member Functions | List of all members
ButtonRegistry Class Reference

The ButtonRegistry class maintains all the assigned ButtonHandles in a given system. More...

Public Member Functions

 __init__ (const ButtonRegistry)
 
ButtonHandle findAsciiButton (char ascii_equivalent)
 Finds a ButtonHandle in the registry matching the indicated ASCII equivalent character. More...
 
ButtonHandle findButton (str name)
 Finds a ButtonHandle in the registry matching the indicated name. More...
 
ButtonHandle getButton (str name)
 Finds a ButtonHandle in the registry matching the indicated name. More...
 
 write (Ostream out)
 

Static Public Member Functions

static ButtonRegistry ptr ()
 Returns the pointer to the global ButtonRegistry object. More...
 

Detailed Description

The ButtonRegistry class maintains all the assigned ButtonHandles in a given system.

There should be only one ButtonRegistry class during the lifetime of the application.

Member Function Documentation

◆ __init__()

__init__ ( const  ButtonRegistry)

◆ findAsciiButton()

ButtonHandle findAsciiButton ( char  ascii_equivalent)

Finds a ButtonHandle in the registry matching the indicated ASCII equivalent character.

If there is no such ButtonHandle, returns ButtonHandle::none().

◆ findButton()

ButtonHandle findButton ( str  name)

Finds a ButtonHandle in the registry matching the indicated name.

If there is no such ButtonHandle, returns ButtonHandle::none().

◆ getButton()

ButtonHandle getButton ( str  name)

Finds a ButtonHandle in the registry matching the indicated name.

If there is no such ButtonHandle, registers a new one and returns it.

◆ ptr()

static ButtonRegistry ptr ( )
static

Returns the pointer to the global ButtonRegistry object.

◆ write()

write ( Ostream  out)