InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Facade::ITextStylesFacade Class Referenceabstract
Inheritance diagram for Facade::ITextStylesFacade:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITEXTSTYLESFACADE }
 

Public Member Functions

virtual ErrorCode CreateNewParagraphStyle (const AttributeBossList *attributeBossList, IWorkspace *ws, const PMString &newStyleName, UID basedOnUID, UID parent, UID *newStyleUID)=0
 
virtual ErrorCode CreateNewParagraphStyle (const AttributeBossList *attributeBossList, IWorkspace *ws, const PMString &newStyleName, UID basedOnUID, UID nextStyle, bool16 useDefaultsAttributes, bool16 isImported, const VirtualKey virtualKey, const int16 modifier, UID parent, UID *newStyleUID=nil, const int32 position=-1)=0
 
virtual ErrorCode CreateNewCharacterStyle (const AttributeBossList *attributeBossList, IWorkspace *ws, const PMString &newStyleName, UID basedOnUID, UID parent, UID *newStyleUID)=0
 
virtual ErrorCode CreateNewCharacterStyle (const AttributeBossList *attributeBossList, IWorkspace *ws, const PMString &newStyleName, UID basedOnUID, bool16 useDefaultsAttributes, bool16 isImported, const VirtualKey virtualKey, const int16 modifier, UID parent, UID *newStyleUID=nil, const int32 position=-1)=0
 
virtual ErrorCode CreateNewParagraphStyleGroup (IWorkspace *ws, const PMString newStyleGroupName, UID parent, UID *newStyleGroupUID=nil, const int32 position=-1)=0
 
virtual ErrorCode CreateNewCharacterStyleGroup (IWorkspace *ws, const PMString newStyleGroupName, UID parent, UID *newStyleGroupUID=nil, const int32 position=-1)=0
 
virtual ErrorCode RenameTextStyle (IWorkspace *ws, UID style, const PMString &newName)=0
 
virtual ErrorCode RenameTextStyleGroup (IWorkspace *ws, UID styleGroup, const PMString &newName)=0
 
virtual ErrorCode DeleteParagraphStyle (IWorkspace *ws, UID styleToDelete, UID styleToReplaceWith=kInvalidUID, bool16 preserveFormatting=kTrue)=0
 
virtual ErrorCode DeleteCharacterStyle (IWorkspace *ws, UID styleToDelete, UID styleToReplaceWith=kInvalidUID, bool16 preserveFormatting=kTrue)=0
 
virtual ErrorCode DeleteParagraphStyleGroups (IWorkspace *ws, const K2Vector< UID > &styleGroups, const RemappingList &remaplist)=0
 
virtual ErrorCode DeleteCharacterStyleGroups (IWorkspace *ws, const K2Vector< UID > &styleGroups, const RemappingList &remaplist)=0
 
virtual ErrorCode MoveTextStyles (IWorkspace *ws, const K2Vector< UID > &styles, UID newParent, const int32 position, const RemappingList &remapList, const IStyleRemapData::ConflictFlagEnum conflictFlag)=0
 
virtual ErrorCode MoveTextStyleGroups (IWorkspace *ws, const K2Vector< UID > &styleGroups, UID newParent, const int32 position, const RemappingList &remapList, const IStyleRemapData::ConflictFlagEnum conflictFlag)=0
 
virtual ErrorCode EditTextStyle (const AttributeBossList *newAtributeBossList, const IStyleInfo *newStyleInfo, const IWorkspace *ws, UID styleToEdit, const bool16 bNotify=kTrue)=0
 
virtual ErrorCode SortParagraphStyles (IWorkspace *ws, IStyleGroupHierarchy::SortFlag sortFlag=IStyleGroupHierarchy::kSortAscendingHierarchy)=0
 
virtual ErrorCode SortCharacterStyles (IWorkspace *ws, IStyleGroupHierarchy::SortFlag sortFlag=IStyleGroupHierarchy::kSortAscendingHierarchy)=0
 
virtual ErrorCode ChangeDefaultParagraphStyle (IWorkspace *ws, UID newDefaultStyleUID)=0
 
virtual ErrorCode ChangeDefaultCharacterStyle (IWorkspace *ws, UID newDefaultStyleUID)=0
 
virtual ErrorCode DuplicateTextStyles (IWorkspace *ws, const K2Vector< UID > &stylesToDuplicate)=0
 
virtual ErrorCode DuplicateTextStyleGroups (IWorkspace *ws, const K2Vector< UID > &styleGroupsToDuplicate)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual ErrorCode Facade::ITextStylesFacade::ChangeDefaultCharacterStyle (IWorkspacews,
UID newDefaultStyleUID 
)
pure virtual

Changes the default character style

Parameters
ws[IN] The workspace that contains the character styles.
newDefaultStyleUID[IN] The new default character style UID.
virtual ErrorCode Facade::ITextStylesFacade::ChangeDefaultParagraphStyle (IWorkspacews,
UID newDefaultStyleUID 
)
pure virtual

Changes the default paragraph style

Parameters
ws[IN] The workspace that contains the paragraph styles.
newDefaultStyleUID[IN] The new default paragraph style UID.
virtual ErrorCode Facade::ITextStylesFacade::CreateNewCharacterStyle (const AttributeBossListattributeBossList,
IWorkspacews,
const PMStringnewStyleName,
UID basedOnUID,
UID parent,
UIDnewStyleUID 
)
pure virtual

Creates a new character style on the workspace provided with the name and other parameters passed.

Parameters
attributeBossList[IN] The attributes for the new style to be created.
ws[IN] Workspace where to create the character style.
newStyleName[IN] The name of the new style.
basedOnUID[IN] The UID this style is based on.
parent[IN] UID of the parent style group where the style is to be created, kInvalidUID to create a root level
newStyleUID[OUT] If passed pointer is non nil and the command is successful, it will contain the UID of newly created style.
Note
The default value assumed for parameter not specified here are following. useDefaultsAttribute : kFalse isImported : kFalse virtualKey : 0 modifier : 0 position : -1, style will be added at the end of the parent specified
virtual ErrorCode Facade::ITextStylesFacade::CreateNewCharacterStyle (const AttributeBossListattributeBossList,
IWorkspacews,
const PMStringnewStyleName,
UID basedOnUID,
bool16 useDefaultsAttributes,
bool16 isImported,
const VirtualKey virtualKey,
const int16 modifier,
UID parent,
UIDnewStyleUID = nil,
const int32 position = -1 
)
pure virtual

Creates a new character style on the workspace provided with the name and other parameters passed.

Parameters
attributeBossList[IN] The attributes for the new style to be created.
ws[IN] Workspace where to create the character style.
newStyleName[IN] The name of the new style.
basedOnUID[IN] The UID this style is based on.
useDefaultsAttributes[IN] Apply defaults attribute to this newly created style.
isImported[IN] Pass kTrue if the style is imported from some other document.
virtualKey[IN] The virtualKey for KBSC.
modifier[IN] The modifier for KBSC.
parent[IN] The UID of the parent, kInvalidUID to create at root level.
newStyleUID[OUT] If passed pointer is non nil and the command is successful, it will contain the UID of newly created style.
position[IN] Position at which the new UID to be created, -1 to create at the end.
virtual ErrorCode Facade::ITextStylesFacade::CreateNewCharacterStyleGroup (IWorkspacews,
const PMString newStyleGroupName,
UID parent,
UIDnewStyleGroupUID = nil,
const int32 position = -1 
)
pure virtual

Creates a new character style group.

Parameters
ws[IN] Workspace where to create the group.
newStyleGroupName[IN] New style group name.
parent[IN] UID of parent to create new group. kInvalidUID for root level
position[IN] Postion to create new style, pass -1 for last
newStyleGroupUID[OUT] UID of newly created style group.
virtual ErrorCode Facade::ITextStylesFacade::CreateNewParagraphStyle (const AttributeBossListattributeBossList,
IWorkspacews,
const PMStringnewStyleName,
UID basedOnUID,
UID parent,
UIDnewStyleUID 
)
pure virtual

Creates a new paragraph style on the workspace provided with the name and other parameters passed.

Parameters
attributeBossList[IN] The attributes for the new style to be created.
ws[IN] Workspace where to create the paragraph style.
newStyleName[IN] The name of the new style.
basedOnUID[IN] The UID this style is based on.
parent[IN] UID of the parent style group where the style is to be created, kInvalidUID to create a root level
newStyleUID[OUT] If passed pointer is non nil and the command is successful, it will contain the UID of newly created style.
Note
The default value assumed for parameter not specified here are following. nextStyle : Self style useDefaultsAttribute : kFalse isImported : kFalse virtualKey : 0 modifier : 0 position : -1, style will be added at the end of the parent specified
virtual ErrorCode Facade::ITextStylesFacade::CreateNewParagraphStyle (const AttributeBossListattributeBossList,
IWorkspacews,
const PMStringnewStyleName,
UID basedOnUID,
UID nextStyle,
bool16 useDefaultsAttributes,
bool16 isImported,
const VirtualKey virtualKey,
const int16 modifier,
UID parent,
UIDnewStyleUID = nil,
const int32 position = -1 
)
pure virtual

Creates a new paragraph style on the workspace provided with the name and other parameters passed.

Parameters
attributeBossList[IN] The attributes for the new style to be created.
ws[IN] Workspace where to create the paragraph style.
newStyleName[IN] The name of the new style.
basedOnUID[IN] The UID this style is based on.
nextStyle[IN] The UID of next style. if kInvalidUID then self style is assumed to be next style.
useDefaultsAttributes[IN] Apply defaults attribute to this newly created style.
isImported[IN] Pass kTrue if the style is imported from some other document.
virtualKey[IN] The virtualKey for KBSC.
modifier[IN] The modifier for KBSC.
parent[IN] The UID of the parent, kInvalidUID to create at root level.
newStyleUID[OUT] If passed pointer is non nil and the command is successful, it will contain the UID of newly created style.
position[IN] Position at which the new UID to be created, -1 to create at the end.
virtual ErrorCode Facade::ITextStylesFacade::CreateNewParagraphStyleGroup (IWorkspacews,
const PMString newStyleGroupName,
UID parent,
UIDnewStyleGroupUID = nil,
const int32 position = -1 
)
pure virtual

Creates a new paragraph style group.

Parameters
ws[IN] Workspace where to create the group.
newStyleGroupName[IN] New style group name.
parent[IN] UID of parent to create new group. kInvalidUID for root level
position[IN] Postion to create new style, pass -1 for last
newStyleGroupUID[OUT] UID of newly created style group.
virtual ErrorCode Facade::ITextStylesFacade::DeleteCharacterStyle (IWorkspacews,
UID styleToDelete,
UID styleToReplaceWith = kInvalidUID,
bool16 preserveFormatting = kTrue 
)
pure virtual

Deletes a character style.

Parameters
ws[IN] The workspace that contains the character styles.
styleToDelete[IN] Style to delete.
styleToReplaceWith[IN] Style to be replaced with. if kInvalidUID is passed then root style is used for replacement.
preserveFormatting[IN] If replacing with root style then formatting should be preserved or not.
virtual ErrorCode Facade::ITextStylesFacade::DeleteCharacterStyleGroups (IWorkspacews,
const K2Vector< UID > & styleGroups,
const RemappingListremaplist 
)
pure virtual

Deletes a list of character style groups.

Parameters
ws[IN] The workspace that contains the character style groups.
styleGroups[IN] List of character style groups to be deleted.
remaplist[IN] Remapping for the style inside the groups being deleted.
virtual ErrorCode Facade::ITextStylesFacade::DeleteParagraphStyle (IWorkspacews,
UID styleToDelete,
UID styleToReplaceWith = kInvalidUID,
bool16 preserveFormatting = kTrue 
)
pure virtual

Deletes a paragraph style.

Parameters
ws[IN] The workspace that contains the paragraph styles.
styleToDelete[IN] Style to delete.
styleToReplaceWith[IN] Style to be replaced with. if kInvalidUID is passed then root style is used for replacement.
preserveFormatting[IN] If replacing with root style then formatting should be preserved or not.
virtual ErrorCode Facade::ITextStylesFacade::DeleteParagraphStyleGroups (IWorkspacews,
const K2Vector< UID > & styleGroups,
const RemappingListremaplist 
)
pure virtual

Deletes a list of paragraph style groups.

Parameters
ws[IN] The workspace that contains the paragraph style groups.
styleGroups[IN] List of paragraph style groups to be deleted.
remaplist[IN] Remapping for the style inside the groups being deleted.
virtual ErrorCode Facade::ITextStylesFacade::DuplicateTextStyleGroups (IWorkspacews,
const K2Vector< UID > & styleGroupsToDuplicate 
)
pure virtual

Duplicates a list of text styles groups (para and char style groups).

Parameters
ws[IN] The workspace that contains the style groups.
styleGroupsToDuplicate[IN] List of style groups to duplicate.
virtual ErrorCode Facade::ITextStylesFacade::DuplicateTextStyles (IWorkspacews,
const K2Vector< UID > & stylesToDuplicate 
)
pure virtual

Duplicates a list of text styles (para and char styles).

Parameters
ws[IN] The workspace that contains the styles.
stylesToDuplicate[IN] List of styles to duplicate.
virtual ErrorCode Facade::ITextStylesFacade::EditTextStyle (const AttributeBossListnewAtributeBossList,
const IStyleInfonewStyleInfo,
const IWorkspacews,
UID styleToEdit,
const bool16 bNotify = kTrue 
)
pure virtual

Changes the data of a Text style to reflect what was passed in

Parameters
newAtributeBossList[IN] New attributes.
newStyleInfo[IN] The new style info for the style
ws[IN] The workspace containing the text styles.
styleToEdit[IN] UID of the style to edit.
bNotify[IN] If we should notify the ref index notifier. We should notify most of the time.
virtual ErrorCode Facade::ITextStylesFacade::MoveTextStyleGroups (IWorkspacews,
const K2Vector< UID > & styleGroups,
UID newParent,
const int32 position,
const RemappingListremapList,
const IStyleRemapData::ConflictFlagEnum conflictFlag 
)
pure virtual

Moves a list of style groups to new parent and position.

Parameters
ws[IN] The workspace that contains the style groups.
styleGroups[IN] List of style groups to be moved.
newParent[IN] UID of the new parent.
position[IN] New position.
remapList[IN] Remapping in case a style is being overwritten due to move.
conflictFlag[IN] What to do incase of conflict.
virtual ErrorCode Facade::ITextStylesFacade::MoveTextStyles (IWorkspacews,
const K2Vector< UID > & styles,
UID newParent,
const int32 position,
const RemappingListremapList,
const IStyleRemapData::ConflictFlagEnum conflictFlag 
)
pure virtual

Moves a list of styles to new parent and position.

Parameters
ws[IN] The workspace that contains the styles.
styles[IN] List of styles to be moved.
newParent[IN] UID of the new parent.
position[IN] New position.
remapList[IN] Remapping in case a style is being overwritten due to move.
conflictFlag[IN] What to do incase of conflict.
virtual ErrorCode Facade::ITextStylesFacade::RenameTextStyle (IWorkspacews,
UID style,
const PMStringnewName 
)
pure virtual

Renames a text style (Para and Char style) to a new name.

Parameters
ws[IN] The workspace that contains the styles.
style[IN] Style UID which is to be renamed.
newName[IN] New name of the style.
virtual ErrorCode Facade::ITextStylesFacade::RenameTextStyleGroup (IWorkspacews,
UID styleGroup,
const PMStringnewName 
)
pure virtual

Renames a text style group (Para and Char style group) to a new name.

Parameters
ws[IN] The workspace that contains the style groups.
styleGroup[IN] Style group which is to be renamed.
newName[IN] New name of the style group.
virtual ErrorCode Facade::ITextStylesFacade::SortCharacterStyles (IWorkspacews,
IStyleGroupHierarchy::SortFlag sortFlag = IStyleGroupHierarchy::kSortAscendingHierarchy 
)
pure virtual

Sorts the character styles.

Parameters
ws[IN] The workspace that contains the character styles.
sortFlag[IN] How to sort.
See Also
IStyleGroupHierarchy::SortFlag for more flags.
virtual ErrorCode Facade::ITextStylesFacade::SortParagraphStyles (IWorkspacews,
IStyleGroupHierarchy::SortFlag sortFlag = IStyleGroupHierarchy::kSortAscendingHierarchy 
)
pure virtual

Sorts the paragraph styles.

Parameters
ws[IN] The workspace that contains the paragraphs styles.
sortFlag[IN] How to sort.
See Also
IStyleGroupHierarchy::SortFlag for more flags.