# eric7.QScintilla.Exporters.ExporterRTF

Module implementing an exporter for RTF.

### Global Attributes

None

### Classes

ExporterRTF | Class implementing an exporter for RTF.

### Functions

createExporter | Function to instantiate an exporter object.

## ExporterRTF

Class implementing an exporter for RTF.

### Derived from

ExporterBase

### Class Attributes

RTF_BODYCLOSE
RTF_BODYOPEN
RTF_BOLD_OFF
RTF_BOLD_ON
RTF_COLOR
RTF_COLORDEF
RTF_COLORDEFCLOSE
RTF_COLORDEFOPEN
RTF_COMMENT
RTF_CREATED
RTF_EOLN
RTF_FONTDEF
RTF_FONTDEFCLOSE
RTF_FONTDEFOPEN
RTF_HEADERCLOSE
RTF_HEADEROPEN
RTF_INFOCLOSE
RTF_INFOOPEN
RTF_ITALIC_OFF
RTF_ITALIC_ON
RTF_SETBACKGROUND
RTF_SETCOLOR
RTF_SETFONTFACE
RTF_SETFONTSIZE
RTF_TAB

### Class Methods

None

### Methods

ExporterRTF | Constructor
__GetRTFNextControl | Private method to extract the next RTF control word from style.
__GetRTFStyleChange | Private method to extract control words that are different between two styles.
__prepareStyles | Private method to generate and store the different styles.
exportSource | Public method performing the export.

### Static Methods

None

#### ExporterRTF (Constructor)

ExporterRTF(editor, parent=None)

Constructor

editor (QScintilla.Editor.Editor)
  reference to the editor object
parent (QObject)
  parent object of the exporter

#### ExporterRTF.__GetRTFNextControl

__GetRTFNextControl(pos, style)

Private method to extract the next RTF control word from style.

pos (int)
  position to start search
style (str)
  style definition to search in

Return:
  tuple of new start position and control word found

Return Type:
  tuple of (int, str)

#### ExporterRTF.__GetRTFStyleChange

__GetRTFStyleChange(last, current)

Private method to extract control words that are different between two styles.

last (str)
  least recently used style
current (str)
  current style

Return:
  string containing the delta between these styles

Return Type:
  str

#### ExporterRTF.__prepareStyles

__prepareStyles(f)

Private method to generate and store the different styles.

f (object)
  filepointer to the open RTF

Return:
  styles, fontsize

Return Type:
  dict, int

#### ExporterRTF.exportSource

exportSource()

Public method performing the export.

Up

## createExporter

createExporter(editor, parent=None)

Function to instantiate an exporter object.

editor (QScintilla.Editor.Editor)
  reference to the editor object
parent (QObject (optional))
  parent object of the exporter (defaults to None)

Return:
  exporter object

Return Type:
  ExporterRTF

Up