![]() | InDesign SDK 20.5 |
#include <TreeLazyNotificationData.h>

Classes | |
| struct | IgnoreItem |
Public Member Functions | |
| TreeLazyNotificationData () | |
| virtual | ~TreeLazyNotificationData () |
| virtual void | Add (const LazyNotificationData *other) |
| virtual LazyNotificationData * | Clone (bool16 undoData) const |
| virtual void | Validate (IDataBase *) |
| virtual void | MarkShouldRebuildAll () |
| virtual bool | ShouldRebuildAll () const |
| void | ItemAdded (const ItemType &item) |
| void | ItemDeleted (const ItemType &item) |
| void | ItemChanged (const ItemType &item) |
| void | ItemRebuilt (const ItemType &item) |
| template<typename TAdded , typename TDeleted , typename TChanged , typename TBuild > | |
| void | ProcessChanges (TAdded Added, TDeleted Deleted, TChanged Changed, TBuild Rebuilt) |
Public Member Functions inherited from LazyNotificationData | |
| virtual | ~LazyNotificationData () |
Protected Member Functions | |
| virtual TreeLazyNotificationData * | CreateNewCookie () const =0 |
| virtual bool16 | GetParent (const ItemType &item, ItemType &parent) const =0 |
This class is used to identify changes that happened to objects which are tree based. For list based objects please use
| inline |
Default constructor
| inlinevirtual |
Default destructor
| virtual |
Use this to add another cookie into this one This method will ensure that items added that already exist in this tree will get set to a "combined" state.
| other | - The tree to add |
Implements LazyNotificationData.
| virtual |
Use this to copy this tree and its state. You can ask the copy to be an exact copy or to have the proper state for undo (Adds and Deletes are swapped)
| undoData | - Whether to swap adds and deletes |
Implements LazyNotificationData.
| protectedpure virtual |
This method must be overridden by derived classes so that this class can clone itself without having to have knowledge about the actual class in question
| protectedpure virtual |
Get the parent of a given item. This method should be overridden by classes that derive from this class and the implementation should look at the model to determine what the appropriate parent is.
| item | - The item for which we want the parent |
| parent | - Will be filled in with a parent (unless there is none) |
| void TreeLazyNotificationData< ItemType >::ItemAdded | ( | const ItemType & | item | ) |
Notify the tree that an item was added in the model
| item | - The item that was added. |
| void TreeLazyNotificationData< ItemType >::ItemChanged | ( | const ItemType & | item | ) |
Notify the tree that an item was changed in the model
| item | - The item that was changed. |
| void TreeLazyNotificationData< ItemType >::ItemDeleted | ( | const ItemType & | item | ) |
Notify the tree that an item was deleted in the model
| item | - The item that was deleted. |
| void TreeLazyNotificationData< ItemType >::ItemRebuilt | ( | const ItemType & | item | ) |
Notify the tree that an item was rebuilt in the model When you mark an item as rebuilt it means that it and each of its descendants will be reconstructed
| item | - The item that needs rebuilt. |
| virtual |
Compress the tree to one root node that has kRebuild
Implements LazyNotificationData.
| void TreeLazyNotificationData< ItemType >::ProcessChanges | ( | TAdded | Added, |
| TDeleted | Deleted, | ||
| TChanged | Changed, | ||
| TBuild | Rebuilt | ||
| ) |
This method allows the client to handel adds, deletes, changes, and rebuilds of given nodes. These operations are handled via callbacks. To use this simply create your required function objects. Objects must take an item of ItemType.
| Added | - The method to be called when an item is added |
| Deleted | - The method to call when an item is deleted |
| Changed | - The method to call when an item is changed |
| Rebuilt | - The method to call when an item and its children need rebuilt |
| virtual |
Implements LazyNotificationData.
| inlinevirtual |
Validate the cookie against the model. This is only really used for UIDs. There are some problems with deleting objects twice which will cause the cookie to think that an item which never existed actually existed and was deleted. This call will verify that items which are currently marked for add (undo of a delete) exist in the database. NOTE: This call will not do anything in the release build
| db | - The database that is associated with this cookie |
Implements LazyNotificationData.