phoenix_title wx.lib.floatcanvas.FCObjects.Group

A group of other FloatCanvas Objects

Not all DrawObject methods may apply here.

Note that if an object is in more than one group, it will get drawn more than once.


class_hierarchy Class Hierarchy

Inheritance diagram for class Group:

method_summary Methods Summary

__init__

Default class constructor.

AddObject

Add an object to the group.

AddObjects

Add objects to the group.

Bind

Bind an event to the Group object

CalcBoundingBox

Calculate the bounding box.

Move

Moves the object by delta, where delta is a (dx, dy) pair.

SetColor

Set the Color

SetFillColor

Set the FillColor

SetFillStyle

Set the FillStyle

SetLineColor

Set the LineColor

SetLineStyle

Set the LineStyle

SetLineWidth

Set the LineWidth


api Class API

class Group(DrawObject)

A group of other FloatCanvas Objects

Not all DrawObject methods may apply here.

Note that if an object is in more than one group, it will get drawn more than once.


Methods

__init__(self, ObjectList=[], InForeground=False, IsVisible=True)

Default class constructor.

Parameters
  • ObjectList (list) – a list of DrawObject to be grouped

  • InForeground (boolean) – keep in foreground

  • IsVisible (boolean) – keep it visible



AddObject(self, obj)

Add an object to the group.

Parameters

obj (DrawObject) – object to add



AddObjects(self, Objects)

Add objects to the group.

Parameters

Objects (list) – a list of DrawObject to be grouped



Bind(self, Event, CallBackFun)

Bind an event to the Group object

Parameters
  • Event – see below for supported event types

    • EVT_FC_LEFT_DOWN

    • EVT_FC_LEFT_UP

    • EVT_FC_LEFT_DCLICK

    • EVT_FC_MIDDLE_DOWN

    • EVT_FC_MIDDLE_UP

    • EVT_FC_MIDDLE_DCLICK

    • EVT_FC_RIGHT_DOWN

    • EVT_FC_RIGHT_UP

    • EVT_FC_RIGHT_DCLICK

    • EVT_FC_ENTER_OBJECT

    • EVT_FC_LEAVE_OBJECT

  • CallBackFun – the call back function for the event



CalcBoundingBox(self)

Calculate the bounding box.



Move(self, Delta)

Moves the object by delta, where delta is a (dx, dy) pair.

Parameters

Delta – is a (dx, dy) pair ideally a NumPy array of shape (2, )



SetColor(self, Color)

Set the Color

Parameters

Color – see SetColor for valid values



SetFillColor(self, Color)

Set the FillColor

Parameters

FillColor – see SetColor for valid values



SetFillStyle(self, FillStyle)

Set the FillStyle

Parameters

FillStyle – see SetFillStyle for valid values



SetLineColor(self, Color)

Set the LineColor

Parameters

LineColor – see SetColor for valid values



SetLineStyle(self, LineStyle)

Set the LineStyle

Parameters

LineStyle – see SetLineStyle for valid values



SetLineWidth(self, LineWidth)

Set the LineWidth

Parameters

LineWidth (integer) – line width in pixels