batgrl.gadgets.behaviors.movable_children#
Movable children behavior for a gadget.
Translate movable’s children by dragging them.
Classes
  | 
Movable children behavior for a gadget.  | 
- class batgrl.gadgets.behaviors.movable_children.MovableChildren(*, allow_child_oob=True, ptf_child_on_grab=False, is_grabbable: bool = True, ptf_on_grab: bool = False, mouse_button: Literal['left', 'middle', 'no_button', 'right', 'any'] = 'left', **kwargs)#
 Bases:
GrabbableMovable children behavior for a gadget.
Translate a gadget’s child by clicking and dragging it.
- Parameters:
 - allow_child_oobbool, default: True
 Whether child gadgets can be dragged out of parent’s bounding box.
- ptf_child_on_grabbool, default: False
 Whether child gadgets are pulled-to-front when clicked.
- is_grabbablebool, default: True
 Whether grabbable behavior is enabled.
- ptf_on_grabbool, default: False
 Whether the gadget will be pulled to front when grabbed.
- mouse_buttonMouseButton | Literal[“any”], default: “left”
 Mouse button used for grabbing.
- Attributes:
 - allow_child_oobbool
 Whether child gadgets can be dragged out of parent’s bounding box.
- ptf_child_on_grabbool
 Whether child gadgets are pulled-to-front when clicked.
- is_grabbablebool
 Whether grabbable behavior is enabled.
- ptf_on_grabbool
 Whether the gadget will be pulled to front when grabbed.
- mouse_buttonMouseButton | Literal[“any”]
 Mouse button used for grabbing.
is_grabbedboolWhether gadget is grabbed.
Methods
grab(mouse_event)
Grab the gadget.
ungrab(mouse_event)
Ungrab the gadget.
grab_update(mouse_event)
Update gadget with incoming mouse events while grabbed.
- allow_child_oob: bool#
 Whether child gadgets can be dragged out of parent’s bounding box.
- grab(mouse_event) None#
 Grab the gadget.
- grab_update(mouse_event) None#
 Update gadget with incoming mouse events while grabbed.
- property is_grabbed: bool#
 Whether gadget is grabbed.
- on_mouse(mouse_event) bool | None#
 Determine if mouse event grabs or ungrabs gadget.
- ptf_child_on_grab: bool#
 Whether child gadgets are pulled-to-front when clicked.
- ungrab(mouse_event) None#
 Ungrab the gadget.