batgrl.gadgets.behaviors#

Inheritable gadget behaviors.

A Behavior is an inheritable class that modifies a gadget.

It should be inherited before the base gadget, e.g.,:

class MovableImage(Movable, Image): ...

Where Movable is a Behavior and Image is the base gadget. In this case, MovableImage is now an Image that can be moved around the terminal by clicking and dragging.

Module Attributes

Behavior

A Behavior is an inheritable class that modifies a gadget.

batgrl.gadgets.behaviors.Behavior#

A Behavior is an inheritable class that modifies a gadget.

It should be inherited before the base gadget, e.g.,:

class MovableImage(Movable, Image): ...

Where Movable is a Behavior and Image is the base gadget. In this case, MovableImage is now an Image that can be moved around the terminal by clicking and dragging.

Modules

button_behavior

Button behavior for a gadget.

focusable

Focus behavior for a gadget.

grabbable

Grabbable behavior for a gadget.

movable

Movable behavior for a gadget.

movable_children

Movable children behavior for a gadget.

themable

Themable behavior for gadgets.

toggle_button_behavior

Toggle button behavior for a gadget.