MouseWatcherRegion

from panda3d.core import MouseWatcherRegion
class MouseWatcherRegion

Bases: TypedWritableReferenceCount, Namable

This is the class that defines a rectangular region on the screen for the MouseWatcher.

Inheritance diagram

Inheritance diagram of MouseWatcherRegion

SFAnyButton = 3
SFMouseButton = 1
SFMousePosition = 4
SFOtherButton = 2
SF_any_button = 3
SF_mouse_button = 1
SF_mouse_position = 4
SF_other_button = 2
__init__(*args, **kwargs)
active
area
frame
getActive()

C++ Interface: get_active(MouseWatcherRegion self)

/**
  • Returns whether the region is active or not. See set_active().

*/

getArea()

C++ Interface: get_area(MouseWatcherRegion self)

/**
  • Returns the area of the rectangular region.

*/

getClassType()

C++ Interface: get_class_type()

getFrame()

C++ Interface: get_frame(MouseWatcherRegion self)

/**

*/

getKeyboard()

C++ Interface: get_keyboard(MouseWatcherRegion self)

/**
  • Returns whether the region is interested in global keyboard events; see

  • set_keyboard().

*/

getSort()

C++ Interface: get_sort(MouseWatcherRegion self)

/**
  • Returns the current sorting order of this region. See set_sort().

*/

getSuppressFlags()

C++ Interface: get_suppress_flags(MouseWatcherRegion self)

/**
  • Returns the current suppress_flags. See set_suppress_flags().

*/

get_active()

C++ Interface: get_active(MouseWatcherRegion self)

/**
  • Returns whether the region is active or not. See set_active().

*/

get_area()

C++ Interface: get_area(MouseWatcherRegion self)

/**
  • Returns the area of the rectangular region.

*/

get_class_type()

C++ Interface: get_class_type()

get_frame()

C++ Interface: get_frame(MouseWatcherRegion self)

/**

*/

get_keyboard()

C++ Interface: get_keyboard(MouseWatcherRegion self)

/**
  • Returns whether the region is interested in global keyboard events; see

  • set_keyboard().

*/

get_sort()

C++ Interface: get_sort(MouseWatcherRegion self)

/**
  • Returns the current sorting order of this region. See set_sort().

*/

get_suppress_flags()

C++ Interface: get_suppress_flags(MouseWatcherRegion self)

/**
  • Returns the current suppress_flags. See set_suppress_flags().

*/

keyboard
output()

C++ Interface: output(MouseWatcherRegion self, ostream out)

/**

*/

setActive()

C++ Interface: set_active(const MouseWatcherRegion self, bool active)

/**
  • Sets whether the region is active or not. If it is not active, the

  • MouseWatcher will never consider the mouse to be over the region. The

  • region might still receive keypress events if its set_keyboard() flag is

  • true.

*/

setFrame()

C++ Interface: set_frame(const MouseWatcherRegion self, const LVecBase4f frame) set_frame(const MouseWatcherRegion self, float left, float right, float bottom, float top)

/**

*/

/**

*/

setKeyboard()

C++ Interface: set_keyboard(const MouseWatcherRegion self, bool keyboard)

/**
  • Sets whether the region is interested in global keyboard events. If this

  • is true, then any keyboard button events will be passed to press() and

  • release() regardless of the position of the mouse onscreen; otherwise,

  • these events will only be passed if the mouse is over the region.

*/

setSort()

C++ Interface: set_sort(const MouseWatcherRegion self, int sort)

/**
  • Changes the sorting order of this particular region. The sorting order is

  • used to resolve conflicts in the case of overlapping region; the region

  • with the highest sort value will be preferred, and between regions of the

  • same sort value, the smallest region will be preferred. The default

  • sorting order, if none is explicitly specified, is 0.

*/

setSuppressFlags()

C++ Interface: set_suppress_flags(const MouseWatcherRegion self, int suppress_flags)

/**
  • Sets which events are suppressed when the mouse is over the region. This

  • is the union of zero or more various SF_* values. Normally, this is 0,

  • indicating that no events are suppressed.

  • If you set this to a non-zero value, for instance SF_mouse_position, then

  • the mouse position will not be sent along the data graph when the mouse is

  • over this particular region.

*/

set_active()

C++ Interface: set_active(const MouseWatcherRegion self, bool active)

/**
  • Sets whether the region is active or not. If it is not active, the

  • MouseWatcher will never consider the mouse to be over the region. The

  • region might still receive keypress events if its set_keyboard() flag is

  • true.

*/

set_frame()

C++ Interface: set_frame(const MouseWatcherRegion self, const LVecBase4f frame) set_frame(const MouseWatcherRegion self, float left, float right, float bottom, float top)

/**

*/

/**

*/

set_keyboard()

C++ Interface: set_keyboard(const MouseWatcherRegion self, bool keyboard)

/**
  • Sets whether the region is interested in global keyboard events. If this

  • is true, then any keyboard button events will be passed to press() and

  • release() regardless of the position of the mouse onscreen; otherwise,

  • these events will only be passed if the mouse is over the region.

*/

set_sort()

C++ Interface: set_sort(const MouseWatcherRegion self, int sort)

/**
  • Changes the sorting order of this particular region. The sorting order is

  • used to resolve conflicts in the case of overlapping region; the region

  • with the highest sort value will be preferred, and between regions of the

  • same sort value, the smallest region will be preferred. The default

  • sorting order, if none is explicitly specified, is 0.

*/

set_suppress_flags()

C++ Interface: set_suppress_flags(const MouseWatcherRegion self, int suppress_flags)

/**
  • Sets which events are suppressed when the mouse is over the region. This

  • is the union of zero or more various SF_* values. Normally, this is 0,

  • indicating that no events are suppressed.

  • If you set this to a non-zero value, for instance SF_mouse_position, then

  • the mouse position will not be sent along the data graph when the mouse is

  • over this particular region.

*/

sort
suppress_flags
upcastToNamable()

C++ Interface: upcast_to_Namable(const MouseWatcherRegion self)

upcast from MouseWatcherRegion to Namable

upcastToTypedWritableReferenceCount()

C++ Interface: upcast_to_TypedWritableReferenceCount(const MouseWatcherRegion self)

upcast from MouseWatcherRegion to TypedWritableReferenceCount

upcast_to_Namable()

C++ Interface: upcast_to_Namable(const MouseWatcherRegion self)

upcast from MouseWatcherRegion to Namable

upcast_to_TypedWritableReferenceCount()

C++ Interface: upcast_to_TypedWritableReferenceCount(const MouseWatcherRegion self)

upcast from MouseWatcherRegion to TypedWritableReferenceCount

write()

C++ Interface: write(MouseWatcherRegion self, ostream out, int indent_level)

/**

*/