|
| | SnpManipulateTextModel () |
| |
| virtual | ~SnpManipulateTextModel () |
| |
| ErrorCode | InsertText (ITextModel *textModel, const TextIndex position, const WideString &text) |
| |
| ErrorCode | DeleteText (ITextModel *textModel, const TextIndex position, const int32 length) |
| |
| ErrorCode | ReplaceText (ITextModel *textModel, const TextIndex position, const int32 length, const WideString &data) |
| |
| ErrorCode | ApplyOverrides (ITextModel *textModel, const TextIndex position, const int32 length) |
| |
| ErrorCode | ClearOverrides (ITextModel *textModel, const TextIndex position, const int32 length) |
| |
| ITextFocus * | QueryTextFocus (ITextFrameColumn *textFrameColumn) |
| |
| ITextFocus * | QueryParcelTextFocus (ITextModel *textModel, const RangeData range) |
| |
| ErrorCode | SelectText (ISelectionManager *selectionManager, ITextFocus *textFocus) |
| |
| ErrorCode | ProcessCopyStoryRangeCmd (const UIDRef &sourceStory, TextIndex sourceStart, int32 sourceLength, const UIDRef &destStory, TextIndex destStart, int32 destLength) |
| |
| ErrorCode | CopyAll (const UIDRef &sourceStory, const UIDRef &destStory) |
| |
| ErrorCode | CopyInlines (const UIDRef &sourceStory, const UIDRef &destStory) |
| |
| ErrorCode | CopyTables (const UIDRef &sourceStory, const UIDRef &destStory) |
| |
| UIDRef | CreateTextFrame (const UIDRef &fromGraphicFrameUIDRef, UIDRef &storyUIDRef) |
| |
| ErrorCode | CopyOwnedItem (const UIDRef &sourceStory, const UIDRef &destStory, const ClassID &ownedItemType) |
| |
The following 2.x code snippets have been consolidated into this snippet:
- SnipCopyStory.cpp
- SnipTextModel.cpp
- See Also
- ITextModel
- ITextModelCmds
- kCopyStoryRangeCmdBoss
- ITextUtils
| SnpManipulateTextModel::SnpManipulateTextModel | ( | | ) | |
| inline |
| virtual SnpManipulateTextModel::~SnpManipulateTextModel | ( | | ) | |
| inlinevirtual |
| ErrorCode SnpManipulateTextModel::ApplyOverrides | ( | ITextModel * | textModel, |
| | const TextIndex | position, |
| | const int32 | length |
| ) | | |
Apply paragraph alignment, the point size, leading and underline overrides using ITextModelCmds::ApplyCmd.
- Parameters
| textModel | of story to be changed. |
| position | index of first character to be formatted. |
| length | number of characters to be formatted. |
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpManipulateTextModel::ClearOverrides | ( | ITextModel * | textModel, |
| | const TextIndex | position, |
| | const int32 | length |
| ) | | |
Clear paragraph alignment, character point size, leading and underline overrides using ITextModelCmds::ApplyCmd.
- Parameters
| textModel | of story to be changed. |
| position | index of first character to be formatted. |
| length | number of characters to be formatted. |
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpManipulateTextModel::CopyAll | ( | const UIDRef & | sourceStory, |
| | const UIDRef & | destStory |
| ) | | |
Copy all of the source story content to the destination story.
- Parameters
| sourceStory | UIDRef of story from which to copy content. |
| destStory | UIDRef of story to which content is to be copied. |
- Returns
- kSuccess on success, some other ErrorCode otherwise.
| ErrorCode SnpManipulateTextModel::CopyInlines | ( | const UIDRef & | sourceStory, |
| | const UIDRef & | destStory |
| ) | | |
Copy each inline graphic in the source story to the destination story.
- Parameters
| sourceStory | UIDRef of story from which to copy content. |
| destStory | UIDRef of story to which content is to be copied. |
- Returns
- kSuccess on success, some other ErrorCode otherwise.
| ErrorCode SnpManipulateTextModel::CopyOwnedItem | ( | const UIDRef & | sourceStory, |
| | const UIDRef & | destStory, |
| | const ClassID & | ownedItemType |
| ) | | |
Collects and copies owned items.
- Parameters
| sourceStory | UIDRef of story from which to copy content. |
| destStory | UIDRef of story to which content is to be copied. |
| ownedItemType | kInlineBoss for inlines |
- Returns
- kSuccess on success, some other ErrorCode otherwise.
| ErrorCode SnpManipulateTextModel::CopyTables | ( | const UIDRef & | sourceStory, |
| | const UIDRef & | destStory |
| ) | | |
Copy each table in the source story to the destination story.
- Parameters
| sourceStory | UIDRef of story from which to copy content. |
| destStory | UIDRef of story to which content is to be copied. |
- Returns
- kSuccess on success, some other ErrorCode otherwise.
| UIDRef SnpManipulateTextModel::CreateTextFrame | ( | const UIDRef & | fromGraphicFrameUIDRef, |
| | UIDRef & | storyUIDRef |
| ) | | |
Create a text frame alongside the given frame.
- Parameters
| fromGraphicFrameUIDRef | IN references the spline the frame is to be created alongside. |
| storyUIDRef | OUT the story associated with the newly created text frame. |
- Returns
- reference to the new text frame's kSplineItemBoss object on success, UIDRef::gNull otherwise.
| ErrorCode SnpManipulateTextModel::DeleteText | ( | ITextModel * | textModel, |
| | const TextIndex | position, |
| | const int32 | length |
| ) | | |
Delete text from a story using SnpTextModelHelper::DeleteCmd.
- Parameters
| textModel | of story to be changed. |
| position | index first character to be deleted. |
| length | number of characters to be deleted. |
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpManipulateTextModel::InsertText | ( | ITextModel * | textModel, |
| | const TextIndex | position, |
| | const WideString & | text |
| ) | | |
Insert text into a story using SnpTextModelHelper::InsertCmd.
- Parameters
| textModel | of story to be changed. |
| position | index at which insertion to be made. |
| text | to be inserted. |
- Returns
- kSuccess on success, other ErrorCode otherwise.
| ErrorCode SnpManipulateTextModel::ProcessCopyStoryRangeCmd | ( | const UIDRef & | sourceStory, |
| | TextIndex | sourceStart, |
| | int32 | sourceLength, |
| | const UIDRef & | destStory, |
| | TextIndex | destStart, |
| | int32 | destLength |
| ) | | |
Return text focus describing the whole range of characters in a parcel which contains the start of a text range
- Parameters
| textModel | that contains the text focus |
| range | is the selected text range, the start of the range will be used to determined which parcel will be the focus frame/parcel |
- Returns
- text focus describing the range of characters displayed in the parcel.
Return text focus describing the range of characters displayed in the given frame.
- Parameters
- Returns
- text focus describing the range of characters displayed in the frame.
| ErrorCode SnpManipulateTextModel::ReplaceText | ( | ITextModel * | textModel, |
| | const TextIndex | position, |
| | const int32 | length, |
| | const WideString & | data |
| ) | | |
Replace text in a story using SnpTextModelHelper::ReplaceCmd.
- Parameters
| textModel | of story to be changed. |
| position | index first character to be replaced. |
| length | number of characters to be replaced. |
| data | text to be inserted. |
- Returns
- kSuccess on success, other ErrorCode otherwise.
Set a text selection.
- Parameters
| selectionManager | in which items are to be selected. |
| textFocus | describing the text to be selected. |
- Returns
- kSuccess on success, other ErrorCode otherwise.