# p.g.t.TMBOptionSelector(TMBContainer, planes.gui.OptionSelector) : class documentation

Part of planes.gui.tmb View In Hierarchy

    A TMBOptionSelector wraps an lmr.LMROptionList and an OK button over a TMB background, calling a callback when a selection is confirmed.

Method | __init__ | `Initialise the TMBOptionSelector.`

Inherited from TMBContainer:

Method | sub | `Resize the container, update the position of plane and add it as a subplane. This will also repaint TMBContainer.background.`
Method | redraw | `Redraw TMBContainer.image using TMBContainer.background. This also creates a new TMBContainer.rendersurface.`
Method | remove | `Remove the subplane, then reposition remaining subplanes and resize the container.`

Inherited from Container (via TMBContainer):

Method | remove_all | `Remove all subplanes and shrink accordingly.`

Inherited from Plane (via TMBContainer, Container):

Method | __getattr__ | `Access subplanes as attributes.`
Method | render | `Draw a composite surface of this plane and all subplanes, in order of their addition.`
Method | get_plane_at | `Return the (sub)plane and the succeeding parent coordinates at the given coordinates. Subplanes are tested in reverse order of their addition (i.e. latest first).`
Method | update | No summary
Method | clicked | `Called when there is a MOUSEDOWN event on this plane. If click callbacks are set, the appropriate one is called with this Plane as argument.`
Method | dropped_upon | `If a plane is dropped on top of this one, call dropped_upon_callback() and conditionally grab it.`
Method | destroy | `Remove this Plane from the parent plane, remove all subplanes and delete all pygame Surfaces.`
Method | sync | `Save the Plane given as master Plane and the position offset to that Plane for position synchronisation in Plane.update().`
Method | unsync | `Remove the position synchronisation to the sync master Plane.`
Method | mouseover_callback | `Callback function when the mouse cursor moves over this plane. The default implementation sets Plan.mouseover to True when Plane.highlight is set.`
Method | mouseout_callback | `Callback function when the mouse cursor has left this plane. The default implementation sets Plan.mouseover to False.`
Method | __repr__ | `Readable string representation.`

Inherited from OptionSelector:

Method | selection_made | `Button callback called when the user confirmed an option from the list. Calls OptionSelector.callback(self.option_list.selected) and destroys the OptionSelector.`

Inherited from Container (via OptionSelector):

Method | redraw | `Redraw Container.image from the dimensions in Containter.rect. This also creates a new Container.rendersurface.`
Method | sub | `Resize the container, update the position of plane and add it as a subplane.`
Method | remove | `Remove the subplane, then reposition remaining subplanes and resize the container.`
Method | remove_all | `Remove all subplanes and shrink accordingly.`

Inherited from Plane (via OptionSelector, Container):

Method | __getattr__ | `Access subplanes as attributes.`
Method | render | `Draw a composite surface of this plane and all subplanes, in order of their addition.`
Method | get_plane_at | `Return the (sub)plane and the succeeding parent coordinates at the given coordinates. Subplanes are tested in reverse order of their addition (i.e. latest first).`
Method | update | No summary
Method | clicked | `Called when there is a MOUSEDOWN event on this plane. If click callbacks are set, the appropriate one is called with this Plane as argument.`
Method | dropped_upon | `If a plane is dropped on top of this one, call dropped_upon_callback() and conditionally grab it.`
Method | destroy | `Remove this Plane from the parent plane, remove all subplanes and delete all pygame Surfaces.`
Method | sync | `Save the Plane given as master Plane and the position offset to that Plane for position synchronisation in Plane.update().`
Method | unsync | `Remove the position synchronisation to the sync master Plane.`
Method | mouseover_callback | `Callback function when the mouse cursor moves over this plane. The default implementation sets Plan.mouseover to True when Plane.highlight is set.`
Method | mouseout_callback | `Callback function when the mouse cursor has left this plane. The default implementation sets Plan.mouseover to False.`
Method | __repr__ | `Readable string representation.`

def __init__(self, name, option_list, callback, style=C_256_STYLE):
overrides planes.gui.tmb.TMBContainer.__init__

    Initialise the TMBOptionSelector.

    option_list is a list of strings to be displayed as options.

    callback is a function to be called with the selected Option instance
    as argument once the selection is made.

    style is an optional instance of TMBStyle. If no style is given, it
    defaults to C_256_STYLE.