p.g.l.LMROption(LMRWidget, planes.gui.Option) : class documentation

Part of planes.gui.lmr View In Hierarchy

A planes.gui.Option with LMR background.

Additional attributes:

LMROption.original_background
    The original background Surface.
Method __init__ Initialise the Label.
Method redraw Unconditionally redraw the LMROption.
Method clicked Highlight this option with a different LMR background and register as parent.selected.

Inherited from Label (via Option):

Method update Renew the text on the label, then call the base class method.

Inherited from Plane (via Option, Label):

Method sub Remove the Plane given from its current parent and add it as a subplane of this Plane.
Method remove Remove subplane by name or Plane instance.
Method remove_all Convenience method to call Plane.remove() for all subplanes.
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 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, text, width, style):
Initialise the Label.

text is the text to be written on the Label. If text is None, it is
replaced by an empty string.

width is the total widget width in pixels.

style is an instance of LMRStyle.
def redraw(self):
Unconditionally redraw the LMROption.
        
def clicked(self, button_name):
Highlight this option with a different LMR background and register as parent.selected.

The Surface used for the highlight is
LMROption.parent.highlighted_background. This only works if this
LMROption is a subsurface of an LMROptionList.
API Documentation for planes, generated by pydoctor at 2013-03-05 14:16:20.