Foxit PDF SDK

Instance Methods | List of all members
FSParagraphEditing Class Reference
Inheritance diagram for FSParagraphEditing:

## Instance Methods
(BOOL) | - activate
| Activate paragraph editing. More...
(BOOL) | - canCopy
| Check whether can copy text. More...
(BOOL) | - canCut
| Check whether can cut text. More...
(BOOL) | - canDelete
| Check whether can delete text. More...
(BOOL) | - canDeselectAll
| Check whether can deselect all text. More...
(BOOL) | - canPaste
| Check whether can paste text. More...
(BOOL) | - canSelectAll
| Check whether can select all text. More...
(BOOL) | - copySelected
| Copy the selected text. More...
(BOOL) | - cutSelected
| Cut the selected text. More...
(BOOL) | - deactivate
| Deactivate paragraph editing. More...
(void) | - dedent
| Decrease indent for text. More...
(BOOL) | - deleteSelected
| Delete the selected text. More...
(BOOL) | - deselectAll
| Deselect all text. More...
(void) | - exitEditing:
| Exit paragraph editing. More...
(void) | - indent
| Increase indent for text. More...
(id) | - initWithOther:
| Constructor, with another paragraph edit object. More...
(BOOL) | - insertText:
| Call this function when insert text into the page. More...
(BOOL) | - isEmpty
| Check whether current object is empty or not. More...
(BOOL) | - onChar:
| Call this function when a character code is being input. More...
(BOOL) | - onKeyDown:
| Call this function when key on the keyboard is down. More...
(BOOL) | - onKeyUp:
| Call this function when key on the keyboard is up. More...
(BOOL) | - onLButtonDoubleClick:point:
| Call this function when left mouse button is double clicked. More...
(BOOL) | - onLButtonDown:point:
| Call this function when left mouse button is down. More...
(BOOL) | - onLButtonUp:point:
| Call this function when left mouse button is up. More...
(BOOL) | - onMouseMove:point:
| Call this function when mouse moves. More...
(BOOL) | - onMouseWheel:point:delta:
| Call this function when scrolling the mouse wheel. More...
(BOOL) | - pasteSelected
| Paste the copied text. More...
(BOOL) | - render:renderer:
| Draw the current paragraph editing operation status on the rendering. More...
(BOOL) | - selectAll
| Select all text. More...
(void) | - setAlignment:
| Set text alignment for text. More...
(void) | - setBold:
| Set bold status for text. More...
(void) | - setBulletedList:
| Set bullet list for text. More...
(void) | - setCharHorizontalScale:
| Set char horizontal scale for text. More...
(void) | - setCharSpace:
| Set char space for text. More...
(void) | - setFontName:
| Set font name for text. More...
(void) | - setFontSize:
| Set the font size for text. More...
(void) | - setItalic:
| Set italic status for text. More...
(void) | - setLineSpace:
| Set line space for text. More...
(void) | - setNumberedList:
| Set the look of numbering for text. More...
(void) | - setParagraphSpacing:
| Set paragraph spacing for text. More...
(void) | - setStrikethrough:
| Set strikeout word style for text. More...
(void) | - setSubscript:
| Set the word property of subscript type for text. More...
(void) | - setSuperscript:
| Set the word property of superscript type for text. More...
(void) | - setTextColor:
| Set text color for text. More...
(void) | - setUnderline:
| Set underline for text. More...
(void) | - startEditing:start_point:end_point:
| Start paragraph editing. More...

## Detailed Description

This class represents a paragraph edit operation. Before use any methods of paragraph edit function, please ensure the function FSParagraphEditing::activate has been called. Please call the function FSParagraphEditing::deactivate to deactivate when no need to use any paragraph edit function.

## Method Documentation

## ◆ activate()

- (BOOL) activate |  |  |

Activate paragraph editing.

Returns
  YES means succeful, while NO means not.

## ◆ canCopy()

- (BOOL) canCopy |  |  |

Check whether can copy text.

Returns
  YES means current selected text object can be copied, while NO means not.

## ◆ canCut()

- (BOOL) canCut |  |  |

Check whether can cut text.

Returns
  YES means current selected text can be cut, while NO means not.

## ◆ canDelete()

- (BOOL) canDelete |  |  |

Check whether can delete text.

Returns
  YES means current selected text can be deleted, while NO means not.

## ◆ canDeselectAll()

- (BOOL) canDeselectAll |  |  |

Check whether can deselect all text.

Returns
  YES means current selected text can be deselected, while NO means not.

## ◆ canPaste()

- (BOOL) canPaste |  |  |

Check whether can paste text.

Returns
  YES means current selected text can be pasted, while NO means not.

## ◆ canSelectAll()

- (BOOL) canSelectAll |  |  |

Check whether can select all text.

Returns
  YES means current all text can be selected, while NO means not.

## ◆ copySelected()

- (BOOL) copySelected |  |  |

Copy the selected text.

Returns
  YES means success, while NO means failure.

## ◆ cutSelected()

- (BOOL) cutSelected |  |  |

Cut the selected text.

Returns
  YES means success, while NO means failure.

## ◆ deactivate()

- (BOOL) deactivate |  |  |

Deactivate paragraph editing.

Returns
  YES means success, while NO means failure.

## ◆ dedent()

- (void) dedent |  |  |

Decrease indent for text.

Returns
  None.

## ◆ deleteSelected()

- (BOOL) deleteSelected |  |  |

Delete the selected text.

Returns
  YES means success, while NO means failure.

## ◆ deselectAll()

- (BOOL) deselectAll |  |  |

Deselect all text.

Returns
  YES means success, while NO means failure.

## ◆ exitEditing:()

- (void) exitEditing: |  | (BOOL) | is_end_directly |

Exit paragraph editing.

Parameters

  [in] | is_end_directly | Whether to end editing directly.

Returns
  None.

## ◆ indent()

- (void) indent |  |  |

Increase indent for text.

Returns
  None.

## ◆ initWithOther:()

- (id) initWithOther: |  | (FSParagraphEditing*) | other |

Constructor, with another paragraph edit object.

Parameters

  [in] | other | Another paragraph edit object.

## ◆ insertText:()

- (BOOL) insertText: |  | (NSString *) | text |

Call this function when insert text into the page.

Parameters

  [in] | text | The text to be inserted.

Returns
  YES means success, while NO means failure.

## ◆ isEmpty()

- (BOOL) isEmpty |  |  |

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  YES means current object is empty, while NO means not.

## ◆ onChar:()

- (BOOL) onChar: |  | (unsigned int) | char_code |

Call this function when a character code is being input.

Parameters

  [in] | char_code | A character code, in UTF16-LE encoding.

Returns
  YES means success, while NO means failure.

## ◆ onKeyDown:()

- (BOOL) onKeyDown: |  | (unsigned int) | key_code |

Call this function when key on the keyboard is down.

Parameters

  [in] | key_code | The key code. Please refer to values starting from FSFillerVkeyUnknown and this should be one of these values.

Returns
  YES means success, while NO means failure.

## ◆ onKeyUp:()

- (BOOL) onKeyUp: |  | (unsigned int) | key_code |

Call this function when key on the keyboard is up.

Parameters

  [in] | key_code | The key code. Please refer to values starting from FSFillerVkeyUnknown and this should be one of these values.

Returns
  YES means success, while NO means failure.

## ◆ onLButtonDoubleClick:point:()

- (BOOL) onLButtonDoubleClick: |  | (int) | page_index
point: |  | (FSPointF*) | point

Call this function when left mouse button is double clicked.

Parameters

  [in] | page_index | The page index.
  [in] | point | A point where left mouse button is double-clicked in the page, in device coordinate system.

Returns
  YES means success, while NO means failure.

## ◆ onLButtonDown:point:()

- (BOOL) onLButtonDown: |  | (int) | page_index
point: |  | (FSPointF*) | point

Call this function when left mouse button is down.

Parameters

  [in] | page_index | The page index.
  [in] | point | A point where left mouse button is down in the page, in device coordinate system.

Returns
  YES means success, while NO means failure.

## ◆ onLButtonUp:point:()

- (BOOL) onLButtonUp: |  | (int) | page_index
point: |  | (FSPointF*) | point

Call this function when left mouse button is up.

Parameters

  [in] | page_index | The page index.
  [in] | point | A point where left mouse button is up in the page, in device coordinate system.

Returns
  YES means success, while NO means failure.

## ◆ onMouseMove:point:()

- (BOOL) onMouseMove: |  | (int) | page_index
point: |  | (FSPointF*) | point

Call this function when mouse moves.

Parameters

  [in] | page_index | The page index.
  [in] | point | A point where the mouse in the page, in device coordinate system.

Returns
  YES means success, while NO means failure.

## ◆ onMouseWheel:point:delta:()

- (BOOL) onMouseWheel: |  | (int) | page_index
point: |  | (FSPointF*) | point
delta: |  | (int) | delta

Call this function when scrolling the mouse wheel.

Parameters

  [in] | page_index | The page index.
  [in] | point | A point where the mouse in the page, in device coordinate system.
  [in] | delta | Indicates the amount the mouse wheel has been moved. A positive value means to be moved forward, and a negative value means to be moved backward.

Returns
  YES means success, while NO means failure.

## ◆ pasteSelected()

- (BOOL) pasteSelected |  |  |

Paste the copied text.

Returns
  YES means success, while NO means failure.

## ◆ render:renderer:()

- (BOOL) render: |  | (FSInt32Array*) | page_index_array
renderer: |  | (FSRenderer*) | renderer

Draw the current paragraph editing operation status on the rendering.

The matrix used in the rendering process is returned by ParagraphEditingProviderCallback::GetRenderMatrix.

Parameters

  [in] | page_index_array | The page index array to render.
  [in] | renderer | A valid renderer object for rendering.

Returns
  YES means success, while NO means failure.

## ◆ selectAll()

- (BOOL) selectAll |  |  |

Select all text.

Returns
  YES means success, while NO means failure.

## ◆ setAlignment:()

- (void) setAlignment: |  | (FSAlignment) | alignment |

Set text alignment for text.

Parameters

  [in] | alignment | Alignment value.Please refer to values starting from FSAlignmentLeft and this should be one of these values.

Returns
  None.

## ◆ setBold:()

- (void) setBold: |  | (BOOL) | is_bold |

Set bold status for text.

Parameters

  [in] | is_bold | Whether to set selected text as bold. YES means current selected text will be set as bold, while NO means not.

Returns
  None.

## ◆ setBulletedList:()

- (void) setBulletedList: |  | (FSParagraphEditingBulletType) | bullet_type |

Set bullet list for text.

Before setting a bullet list, ensure the "wingding.ttf" font has been installed.

Parameters

  [in] | bullet_type | The type of bullet. Please refer to values starting from and this should be one of these values.

Returns
  None.

## ◆ setCharHorizontalScale:()

- (void) setCharHorizontalScale: |  | (int) | scale |

Set char horizontal scale for text.

Parameters

  [in] | scale | The scale. It should be bigger than 0.

Returns
  None.

## ◆ setCharSpace:()

- (void) setCharSpace: |  | (float) | char_space |

Set char space for text.

Parameters

  [in] | char_space | The char space (unit is 1/72 inch).

Returns
  None.

## ◆ setFontName:()

- (void) setFontName: |  | (NSString *) | font_name |

Set font name for text.

Parameters

  [in] | font_name | The font name.

Returns
  None.

## ◆ setFontSize:()

- (void) setFontSize: |  | (float) | font_size |

Set the font size for text.

Parameters

  [in] | font_size | The font size.

Returns
  None.

## ◆ setItalic:()

- (void) setItalic: |  | (BOOL) | is_italic |

Set italic status for text.

Parameters

  [in] | is_italic | Whether to set selected text as italic. YES means current selected text will be set as italic, while NO means not.

Returns
  None.

## ◆ setLineSpace:()

- (void) setLineSpace: |  | (float) | line_space |

Set line space for text.

Parameters

  [in] | line_space | The line space (unit is 1/72 inch).

Returns
  None.

## ◆ setNumberedList:()

- (void) setNumberedList: |  | (FSParagraphEditingNumberingType) | numbering_type |

Set the look of numbering for text.

Parameters

  [in] | numbering_type | The type of numbering. Please refer to values starting from and this should be one of these values.

Returns
  None.

## ◆ setParagraphSpacing:()

- (void) setParagraphSpacing: |  | (float) | paragraph_space |

Set paragraph spacing for text.

Parameters

  [in] | paragraph_space | The paragraph spacing.

Returns
  None.

## ◆ setStrikethrough:()

- (void) setStrikethrough: |  | (BOOL) | is_striketrough |

Set strikeout word style for text.

Parameters

  [in] | is_striketrough | YES means to set the strikeout word style, while NO means not.

Returns
  None.

## ◆ setSubscript:()

- (void) setSubscript: |  | (BOOL) | is_subscript |

Set the word property of subscript type for text.

Returns
  None.

## ◆ setSuperscript:()

- (void) setSuperscript: |  | (BOOL) | is_superscript |

Set the word property of superscript type for text.

Returns
  None.

## ◆ setTextColor:()

- (void) setTextColor: |  | (unsigned int) | text_color |

Set text color for text.

Parameters

  [in] | text_color | The text color.

Returns
  None.

## ◆ setUnderline:()

- (void) setUnderline: |  | (BOOL) | is_underline |

Set underline for text.

Parameters

  [in] | is_underline | YES means to underline text, while NO means not.

Returns
  None.

## ◆ startEditing:start_point:end_point:()

- (void) startEditing: |  | (int) | page_index
start_point: |  | (FSPointF*) | start_point
end_point: |  | (FSPointF*) | end_point

Start paragraph editing.

Parameters

  [in] | page_index | The page index.
  [in] | start_point | A point to start editing on the page, in the device coordinate system.
  [in] | end_point | A point to end editing on the page, in the device coordinate system.

Returns
  None.