InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PstLstNewDataCmd Class Reference
Inheritance diagram for PstLstNewDataCmd:
CommandICommandIPMUnknown

Public Member Functions

 PstLstNewDataCmd (IPMUnknown *boss)
 
virtual ~PstLstNewDataCmd ()
 
bool16 LowMemIsOK () const
 
- Public Member Functions inherited from Command
 Command (IPMUnknown *boss)
 
virtual void GetName (PMString *name) const
 
virtual void SetName (const PMString &newName)
 
virtual bool16 IsNameRequired () const
 
virtual const UIDListGetItemList () const
 
virtual const UIDListGetItemListReference () const
 
virtual void SetItemList (const UIDList &newItemList)
 
virtual void DoImmediate (bool16 isDynamic=kFalse)
 
virtual void LWDoImmediate ()
 
virtual void DoDynamic ()
 
virtual CommandState GetCommandState () const
 
virtual bool16 IsDone () const
 
virtual bool16 CanJoin (const ICommand *pNewCmd) const
 
virtual void SetCreatorID (int32 creatorID)
 
virtual int32 GetCreatorID () const
 
virtual const TargetGetTarget () const
 
virtual Undoability GetUndoability () const
 
virtual void SetUndoability (Undoability newUndoability)
 
virtual void SetActive (bool16 isActive)
 
virtual bool16 IsActive () const
 
virtual bool8 IsLWProcessed () const
 

Protected Member Functions

void Do ()
 
void DoNotify ()
 
PMStringCreateName ()
 
- Protected Member Functions inherited from Command
virtual void SetCommandState (CommandState state)
 
virtual void SetUpTarget ()
 
virtual void PreVerify (CommandState state)
 
virtual void PostVerify (CommandState state)
 
void SetTarget (const Target &newTarget)
 
void SetTarget (PredefinedTarget newTarget)
 
void SetTarget (IDataBase *db)
 

Additional Inherited Members

- Public Types inherited from Command
enum  CommandDummyArg { kItemList = 1 }
 
- Protected Types inherited from Command
enum  PredefinedTarget { kSessionWorkspaceTarget, kSessionTarget }
 
- Protected Attributes inherited from Command
UIDList fItemList
 

Detailed Description

PstLstNewDataCmd will create a new IPstLstData object and add its UID to the IPstLstUIDList of the page item of interest (the current selection from the popup menu). Note the page item to be added the new data object is passed in the fItemList; a data member fNewObjectList is used to store the newly created IPstLstData objects' UIDs.

Note this implementation actually handles more than just one page item, although in this sample, we only operate on one page item at a time, that is the selected item from the popup menu. so the command's item list should have only one item.

PstLstNewDataCmd implements ICommand based on the partial implementation Command.

Constructor & Destructor Documentation

Binds the C implementation class onto its ImplementationID making the C code callable by the application * PstLstNewDataCmd::PstLstNewDataCmd (IPMUnknownboss)

Constructor, we initialize all the private members and pass the boss pointer to the parent class (Command).

PstLstNewDataCmd::~PstLstNewDataCmd ()
virtual

Destructor

Member Function Documentation

PMString * PstLstNewDataCmd::CreateName (void )
protectedvirtual

Gives the name that shows up under the Edit menu and allows the user to undo or redo the command.

Returns
pointer to a PMString allocated using the new operator. Deleted by caller.

Reimplemented from Command.

void PstLstNewDataCmd::Do (void )
protectedvirtual

The Do method is where we create a new IPstLstData in the page item's database, and add its UID to the IPstLstUIDList of the page item. Since there may be multiple items selected, we have to repeat this process thru all the page items passed in the fItemList.

Implements Command.

void PstLstNewDataCmd::DoNotify (void )
protectedvirtual

Notify all the document observers that a change to the page item's IPstLstData has happened.

Reimplemented from Command.

bool16 PstLstNewDataCmd::LowMemIsOK (void ) const
inlinevirtual

Don't execute this command if the memory is low.

Reimplemented from Command.