PyGUI - class MessageHandler

# class `MessageHandler`

MessageHandler is an abstract base class for objects which participate in the message delivery hierarchy. The message delivery mechanism is used to handle events such as keystrokes and menu commands which are not directed at a particular point on the screen. See Event Handling for more information.

## Methods

`handle(msg_name, ...)`
  If there is a method with the same name as the message, calls it with the message arguments. Otherwise, passes the message to the next handler.

## Abstract Methods

> `setup_menus(menu_state)`
>   During the menu setup phase of menu command processing, this method is called for all handlers along the message path in reverse order, i.e. from the Application down to the current target. MessageHandlers should use this method to enable and otherwise configure any menu items that they respond to and which are currently valid. See Menu Setup for more information.
> `next_handler()`
>   Returns the object, if any, to which messages not handled by this object should be passed up.