![]() | InDesign SDK 20.5 |
Public Member Functions | |
| ErrorCode | CreateStyleFromSelection (const InterfacePtr< ITextFocus > iTextFocus, IActiveContext *activeContext) |
| ErrorCode | ApplyStyle (ISnpRunnableContext *iSnpRunnableContext) |
| ErrorCode | UpdateParaStyle (const InterfacePtr< ITextFocus > textFocus, IActiveContext *activeContext) |
| ErrorCode | SetDefaultParaStyle (const InterfacePtr< ITextFocus > textFocus, IActiveContext *activeContext) |
| ErrorCode | DeleteStyle (ISnpRunnableContext *iSnpRunnableContext) |
| ErrorCode | ChooseStyle (ISnpRunnableContext *iSnpRunnableContext, UID &style, const char *action, PMIID *styleType=nil) |
Sample code snippet that shows how to create a new paragraph style, based on the text attributes of a text selection.
| ErrorCode SnpManipulateTextStyle::ApplyStyle | ( | ISnpRunnableContext * | iSnpRunnableContext | ) |
apply a style to the selection.
| activeContext | IN our active context |
| ErrorCode SnpManipulateTextStyle::ChooseStyle | ( | ISnpRunnableContext * | iSnpRunnableContext, |
| UID & | style, | ||
| const char * | action, | ||
| PMIID * | styleType = nil | ||
| ) |
Drives the UI that allows a user to pick a style
| iSnpRunnableContext | IN the active context |
| style | OUT the selected style |
| action | IN the verb that applies to this operation |
| styleType | IN if nil, allows user to choose between para or char style. If non-nil either identifies whether the user should only be asked to choose between char/para styles, or if set to kInvalidInterfaceID, will return the type of style chosen. |
| ErrorCode SnpManipulateTextStyle::CreateStyleFromSelection | ( | const InterfacePtr< ITextFocus > | iTextFocus, |
| IActiveContext * | activeContext | ||
| ) |
Creates a new paragraph or character style, based on the current selection.
| iTextFocus | IN the text focus used to create the new style. |
| activeContext | IN our current context. |
| ErrorCode SnpManipulateTextStyle::DeleteStyle | ( | ISnpRunnableContext * | iSnpRunnableContext | ) |
Delete a style.
| activeContext | IN our active context |
| ErrorCode SnpManipulateTextStyle::SetDefaultParaStyle | ( | const InterfacePtr< ITextFocus > | textFocus, |
| IActiveContext * | activeContext | ||
| ) |
Set the paragraph style of the current text selection as default.
| textFocus | describing text on which style is to be based |
| ErrorCode SnpManipulateTextStyle::UpdateParaStyle | ( | const InterfacePtr< ITextFocus > | textFocus, |
| IActiveContext * | activeContext | ||
| ) |
update a paragraph style based on the selection.
| textFocus | describing text on which style is to be based |