diplomat.wx_gui.point_edit.ColoredShape

class diplomat.wx_gui.point_edit.ColoredShape(*args: Any, **kwargs: Any)[source]

Bases: Control

Represents a static, colored circle. Used by the ColoredRadioButton for displaying colors.

__init__(parent, color: wx.Colour, shape: str, w_id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.BORDER_NONE, validator=wx.DefaultValidator, name='ColoredCircle')[source]

Construct a new ColoredCircle.

Parameters:
  • parent – The parent wx.Window.

  • color – A wx.Colour, the color of the circle.

  • shape – A string, the type of shape to draw. (circle, square, triangle, star, etc.)

  • w_id – The wx ID.

  • pos – The position of the widget.

  • size – The size of the widget.

  • style – The style of the widget.

  • validator – The widgets validator.

  • name – The name of the widget.

Methods

__init__(parent, color, shape[, w_id, pos, ...])

Construct a new ColoredCircle.

get_color()

Get the color of the circle.

get_shape()

Get the shape of this colored shape...

on_draw(dc)

Draws the circle.

on_paint(event)

Executed on a paint event, redrawing the circle.

set_color(value)

Set the color of the circle.

set_shape(value)

Set the shape to have this colored shape widget draw.

get_color() wx.Colour[source]

Get the color of the circle.

Returns:

A wx.Colour, being the color of the circle.

get_shape() str[source]

Get the shape of this colored shape…

Returns:

A string, the type of shape this colored shape is drawing…

on_draw(dc: wx.DC)[source]

Draws the circle.

Parameters:

dc – The wx.DC to draw with.

on_paint(event)[source]

Executed on a paint event, redrawing the circle.

set_color(value: wx.Colour)[source]

Set the color of the circle.

Parameters:

value – A wx.Colour, which the color of the circle will be set to.

set_shape(value: str)[source]

Set the shape to have this colored shape widget draw.

Parameters:

value – A string, the type of shape to draw.