phoenix_title wx.richtext.RichTextImage

This class implements a graphic object.


class_hierarchy Class Hierarchy

Inheritance diagram for class RichTextImage:

method_summary Methods Summary

__init__

Default constructor.

CanEditProperties

Returns True if we can edit the object’s properties via a GUI.

Clone

Clones the image object.

Copy

Copies the image object.

Draw

Draw the item, within the given range.

EditProperties

Edits the object’s properties via a GUI.

GetImageBlock

Returns the image block containing the raw data.

GetImageCache

Returns the image cache (a scaled bitmap).

GetNaturalSize

Returns the ‘natural’ size for this object - the image size.

GetOriginalImageSize

Gets the original image size.

GetPropertiesMenuLabel

Returns the label to be used for the properties context menu item.

GetRangeSize

Returns the object size for the given range.

GetXMLNodeName

Returns the XML node name of this object.

ImportFromXML

Imports this object from XML.

IsEmpty

Returns True if the object is empty.

IsFloatable

Returns True if this class of object is floatable.

Layout

Lay the item out at the specified position with the given size constraint.

LoadImageCache

Creates a cached image at the required size.

ResetImageCache

Resets the image cache.

SetImageCache

Sets the image cache.

SetOriginalImageSize

Sets the original image size.

UsesParagraphAttributes

Returns True if this object takes note of paragraph attributes (text and image objects don’t).


property_summary Properties Summary

ImageBlock

See GetImageBlock

ImageCache

See GetImageCache and SetImageCache

NaturalSize

See GetNaturalSize

OriginalImageSize

See GetOriginalImageSize and SetOriginalImageSize

PropertiesMenuLabel

See GetPropertiesMenuLabel

XMLNodeName

See GetXMLNodeName


api Class API

class wx.richtext.RichTextImage(RichTextObject)

Possible constructors:

RichTextImage(parent=None)

RichTextImage(image, parent=None, charStyle=None)

RichTextImage(imageBlock, parent=None, charStyle=None)

RichTextImage(obj)

This class implements a graphic object.

__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self, parent=None)

Default constructor.

Parameters

parent (wx.richtext.RichTextObject) –



__init__ (self, image, parent=None, charStyle=None)

Creates a wx.richtext.RichTextImage from a wx.Image.

Parameters



__init__ (self, imageBlock, parent=None, charStyle=None)

Creates a wx.richtext.RichTextImage from an image block.

Parameters



__init__ (self, obj)

Copy constructor.

Parameters

obj (wx.richtext.RichTextImage) –



CanEditProperties(self)

Returns True if we can edit the object’s properties via a GUI.

Return type

bool

Clone(self)

Clones the image object.

Return type

wx.richtext.RichTextObject

Copy(self, obj)

Copies the image object.

Parameters

obj (wx.richtext.RichTextImage) –

Draw(self, dc, context, range, selection, rect, descent, style)

Draw the item, within the given range.

Some objects may ignore the range (for example paragraphs) while others must obey it (lines, to implement wrapping)

Parameters
Return type

bool

EditProperties(self, parent, buffer)

Edits the object’s properties via a GUI.

Parameters
Return type

bool

GetImageBlock(self)

Returns the image block containing the raw data.

Return type

wx.richtext.RichTextImageBlock

GetImageCache(self)

Returns the image cache (a scaled bitmap).

Return type

Bitmap

GetNaturalSize(self)

Returns the ‘natural’ size for this object - the image size.

Return type

wx.richtext.TextAttrSize

GetOriginalImageSize(self)

Gets the original image size.

Return type

Size

GetPropertiesMenuLabel(self)

Returns the label to be used for the properties context menu item.

Return type

string

GetRangeSize(self, range, size, descent, dc, context, flags, position=Point(0, 0), parentSize=DefaultSize, partialExtents=None)

Returns the object size for the given range.

Returns False if the range is invalid for this object.

Parameters
Return type

bool

GetXMLNodeName(self)

Returns the XML node name of this object.

This must be overridden for XmlNode-base XML export to work.

Return type

string

ImportFromXML(self, buffer, node, handler, recurse)

Imports this object from XML.

Parameters
Return type

bool

IsEmpty(self)

Returns True if the object is empty.

Return type

bool

IsFloatable(self)

Returns True if this class of object is floatable.

Return type

bool

Layout(self, dc, context, rect, parentRect, style)

Lay the item out at the specified position with the given size constraint.

Layout must set the cached size. rect is the available space for the object, and parentRect is the container that is used to determine a relative size or position (for example if a text box must be 50% of the parent text box).

Parameters
Return type

bool

LoadImageCache(self, dc, resetCache=False, parentSize=DefaultSize)

Creates a cached image at the required size.

Parameters
  • dc (wx.DC) –

  • resetCache (bool) –

  • parentSize (wx.Size) –

Return type

bool

ResetImageCache(self)

Resets the image cache.

SetImageCache(self, bitmap)

Sets the image cache.

Parameters

bitmap (wx.Bitmap) –

SetOriginalImageSize(self, sz)

Sets the original image size.

Parameters

sz (wx.Size) –

UsesParagraphAttributes(self)

Returns True if this object takes note of paragraph attributes (text and image objects don’t).

Return type

bool

ImageBlock

See GetImageBlock

ImageCache

See GetImageCache and SetImageCache

NaturalSize

See GetNaturalSize

OriginalImageSize

See GetOriginalImageSize and SetOriginalImageSize

PropertiesMenuLabel

See GetPropertiesMenuLabel

XMLNodeName

See GetXMLNodeName