InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HidTxtCommands Class Reference

#include <HidTxtCommands.h>

Public Member Functions

 HidTxtCommands ()
 
virtual ~HidTxtCommands ()
 
virtual IHidTxtModelCreate (ITextModel *textModel, const TextIndex &anchorTextIndex) const
 
virtual IHidTxtModelQuery (ITextModel *textModel, const TextIndex &anchorTextIndex) const
 
virtual ErrorCode ModifyHiddenText (IHidTxtModel *hidTxtModel, const WideString &text) const
 
virtual ErrorCode ClearHiddenTextStyle (IHidTxtModel *hidTxtModel) const
 
virtual ErrorCode Delete (IHidTxtModel *hidTxtModel) const
 

Detailed Description

Utility class that processes commands for the manipulation of hidden text.

Constructor & Destructor Documentation

HidTxtCommands::HidTxtCommands ()

Constructor.

HidTxtCommands::~HidTxtCommands ()
virtual

Destructor.

Member Function Documentation

ErrorCode HidTxtCommands::ClearHiddenTextStyle (IHidTxtModelhidTxtModel) const
virtual

Apply the root paragraph style [No paragraph style] and root character style [No character style] to the hidden text. The text sub-system assumes all text in the text model has associated style information so this method is provided to apply such styles to hidden text.

Parameters
hidTxtModelrefers to the hidden text model to be changed.
Returns
kSuccess on success, kFailure otherwise.
IHidTxtModel * HidTxtCommands::Create (ITextModeltextModel,
const TextIndex & anchorTextIndex 
) const
virtual

Process kHidTxtModelCreateCmdBoss to create an empty hidden text model.

Parameters
textModelrefers to the text model in which the hidden text should be embedded.
anchorTextIndexgives the index in the text model where the hidden text should be anchored.
Returns
interface pointer to the created hidden text model, nil on failure.
ErrorCode HidTxtCommands::Delete (IHidTxtModelhidTxtModel) const
virtual

Delete hidden text by using ITextModelCmds::DeleteCmd to delete the character on which the hidden text is anchored. The text sub-system will call HidTxtMemento to remove the associated hidden text.

Parameters
hidTxtModelrefers to the hidden text model to be deleted.
Returns
kSuccess on success, kFailure otherwise.
ErrorCode HidTxtCommands::ModifyHiddenText (IHidTxtModelhidTxtModel,
const WideStringtext 
) const
virtual

Process kHidTxtModelModifyTextCmdBoss to update the stored hidden text.

Parameters
hidTxtModelrefers to the hidden text model to be changed.
textgives the string that should replace whatever is currently stored.
Returns
kSuccess on success, kFailure otherwise.
IHidTxtModel * HidTxtCommands::Query (ITextModeltextModel,
const TextIndex & anchorTextIndex 
) const
virtual

Return the hidden text model (IHidTxtModel) associated with the given anchorTextIndex or nil if there is no hidden text associated.

Parameters
textModelrefers to the text model to be examined.
anchorTextIndexrefers to the TextIndex to be examined to see if it has hidden text associated.
Returns
the hidden text model (IHidTxtModel) associated with the given anchorTextIndex or nil if there is no hidden text associated.