Panda3D
Public Member Functions | List of all members
GraphicsWindowInputDevice Class Reference

This is a structure representing a single input device that may be associated with a window. Typically this will be a keyboard/mouse pair, and there will be exactly one of these associated with each window, but other variants are possible. More...

Public Member Functions

 buttonDown (ButtonHandle button)
 Records that the indicated button has been depressed. More...
 
 buttonDown (ButtonHandle button, double time)
 Records that the indicated button has been depressed. More...
 
 buttonResumeDown (ButtonHandle button)
 Records that the indicated button was depressed earlier, and we only just detected the event after the fact. This is mainly useful for tracking the state of modifier keys. More...
 
 buttonResumeDown (ButtonHandle button, double time)
 Records that the indicated button was depressed earlier, and we only just detected the event after the fact. This is mainly useful for tracking the state of modifier keys. More...
 
 buttonUp (ButtonHandle button)
 Records that the indicated button has been released. More...
 
 buttonUp (ButtonHandle button, double time)
 Records that the indicated button has been released. More...
 
 candidate (str candidate_string, size_t highlight_start, size_t highlight_end, size_t cursor_pos)
 Records that the indicated candidate string has been highlighted. This is used to implement IME support for typing in international languages, especially Chinese/Japanese/Korean. More...
 
 focusLost ()
 This should be called when the window focus is lost, so that we may miss upcoming button events (especially "up" events) for the next period of time. It generates keyboard and mouse "up" events for those buttons that we previously sent unpaired "down" events, so that the Panda application will believe all buttons are now released. More...
 
 focusLost (double time)
 This should be called when the window focus is lost, so that we may miss upcoming button events (especially "up" events) for the next period of time. It generates keyboard and mouse "up" events for those buttons that we previously sent unpaired "down" events, so that the Panda application will believe all buttons are now released. More...
 
 keystroke (int keycode)
 Records that the indicated keystroke has been generated. More...
 
 keystroke (int keycode, double time)
 Records that the indicated keystroke has been generated. More...
 
 rawButtonDown (ButtonHandle button)
 Records that the indicated button has been depressed. More...
 
 rawButtonDown (ButtonHandle button, double time)
 Records that the indicated button has been depressed. More...
 
 rawButtonUp (ButtonHandle button)
 Records that the indicated button has been released. More...
 
 rawButtonUp (ButtonHandle button, double time)
 Records that the indicated button has been released. More...
 
 setPointer (bool inwin, double x, double y, double time)
 Records that a mouse movement has taken place. More...
 
 setPointerInWindow (double x, double y)
 To be called by a particular kind of GraphicsWindow to indicate that the pointer is within the window, at the given pixel coordinates. More...
 
 setPointerInWindow (double x, double y, double time)
 To be called by a particular kind of GraphicsWindow to indicate that the pointer is within the window, at the given pixel coordinates. More...
 
 setPointerOutOfWindow ()
 To be called by a particular kind of GraphicsWindow to indicate that the pointer is no longer within the window. More...
 
 setPointerOutOfWindow (double time)
 To be called by a particular kind of GraphicsWindow to indicate that the pointer is no longer within the window. More...
 

Detailed Description

This is a structure representing a single input device that may be associated with a window. Typically this will be a keyboard/mouse pair, and there will be exactly one of these associated with each window, but other variants are possible.

Member Function Documentation

◆ buttonDown() [1/2]

buttonDown ( ButtonHandle  button)

Records that the indicated button has been depressed.

◆ buttonDown() [2/2]

buttonDown ( ButtonHandle  button,
double  time 
)

Records that the indicated button has been depressed.

◆ buttonResumeDown() [1/2]

buttonResumeDown ( ButtonHandle  button)

Records that the indicated button was depressed earlier, and we only just detected the event after the fact. This is mainly useful for tracking the state of modifier keys.

◆ buttonResumeDown() [2/2]

buttonResumeDown ( ButtonHandle  button,
double  time 
)

Records that the indicated button was depressed earlier, and we only just detected the event after the fact. This is mainly useful for tracking the state of modifier keys.

◆ buttonUp() [1/2]

buttonUp ( ButtonHandle  button)

Records that the indicated button has been released.

◆ buttonUp() [2/2]

buttonUp ( ButtonHandle  button,
double  time 
)

Records that the indicated button has been released.

◆ candidate()

candidate ( str  candidate_string,
size_t  highlight_start,
size_t  highlight_end,
size_t  cursor_pos 
)

Records that the indicated candidate string has been highlighted. This is used to implement IME support for typing in international languages, especially Chinese/Japanese/Korean.

◆ focusLost() [1/2]

focusLost ( )

This should be called when the window focus is lost, so that we may miss upcoming button events (especially "up" events) for the next period of time. It generates keyboard and mouse "up" events for those buttons that we previously sent unpaired "down" events, so that the Panda application will believe all buttons are now released.

◆ focusLost() [2/2]

focusLost ( double  time)

This should be called when the window focus is lost, so that we may miss upcoming button events (especially "up" events) for the next period of time. It generates keyboard and mouse "up" events for those buttons that we previously sent unpaired "down" events, so that the Panda application will believe all buttons are now released.

◆ keystroke() [1/2]

keystroke ( int  keycode)

Records that the indicated keystroke has been generated.

◆ keystroke() [2/2]

keystroke ( int  keycode,
double  time 
)

Records that the indicated keystroke has been generated.

◆ rawButtonDown() [1/2]

rawButtonDown ( ButtonHandle  button)

Records that the indicated button has been depressed.

◆ rawButtonDown() [2/2]

rawButtonDown ( ButtonHandle  button,
double  time 
)

Records that the indicated button has been depressed.

◆ rawButtonUp() [1/2]

rawButtonUp ( ButtonHandle  button)

Records that the indicated button has been released.

◆ rawButtonUp() [2/2]

rawButtonUp ( ButtonHandle  button,
double  time 
)

Records that the indicated button has been released.

◆ setPointer()

setPointer ( bool  inwin,
double  x,
double  y,
double  time 
)

Records that a mouse movement has taken place.

◆ setPointerInWindow() [1/2]

setPointerInWindow ( double  x,
double  y 
)

To be called by a particular kind of GraphicsWindow to indicate that the pointer is within the window, at the given pixel coordinates.

◆ setPointerInWindow() [2/2]

setPointerInWindow ( double  x,
double  y,
double  time 
)

To be called by a particular kind of GraphicsWindow to indicate that the pointer is within the window, at the given pixel coordinates.

◆ setPointerOutOfWindow() [1/2]

setPointerOutOfWindow ( )

To be called by a particular kind of GraphicsWindow to indicate that the pointer is no longer within the window.

◆ setPointerOutOfWindow() [2/2]

setPointerOutOfWindow ( double  time)

To be called by a particular kind of GraphicsWindow to indicate that the pointer is no longer within the window.