#include <RhRdkContentUndo.h>
◆ ~IRhRdkContentUndo()
virtual IRhRdkContentUndo::~IRhRdkContentUndo |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ AddContent()
Call this after creating a new content but before attaching it to a document.
- Parameters
-
c | is the new content being added. |
pParent | is a pointer to the content that will become the parent of the new content, or null if the new content is being added at the top level (i.e., not a child). |
- Returns
- true if successful, else false.
Implemented in CRhRdkContentUndo.
◆ DeleteContent()
Call this before deleting one or more contents. This copies the content hierarchies into the undo object and is therefore somewhat inefficient. If all the contents are top-level, it is better to call DeleteTopLevelContent() instead.
- Parameters
-
aContent | is an array of pointers to the contents being deleted. |
Implemented in CRhRdkContentUndo.
◆ DeleteThis()
virtual void IRhRdkContentUndo::DeleteThis |
( |
void |
| ) |
|
|
pure virtual |
◆ DeleteTopLevelContent()
Call this before 'deleting' one or more top-level contents. This requires the caller to merely detach the contents from the document and pass ownership of them to this object. It eliminates the need to copy the contents and the need to actually delete them, thus saving time and memory. Because the contents are not actually deleted at all, the user still perceives them as deleted because they disappear from the UI when detached.
- Parameters
-
aContent | is an array of pointers to the contents being 'deleted'. If any one of these contents is a child, the function will fail. |
Implemented in CRhRdkContentUndo.
◆ EVF()
virtual void* IRhRdkContentUndo::EVF |
( |
const wchar_t * |
, |
|
|
void * |
|
|
) |
| |
|
pure virtual |
Call this before promoting a single content from reference to non-reference.
- Parameters
-
c | is the content being promoted. Emergency virtual function for future expansion. "PromoteContent" is supported. |
Implemented in CRhRdkContentUndo.
◆ ModifyContent()
virtual bool IRhRdkContentUndo::ModifyContent |
( |
const CRhRdkContent & |
c | ) |
|
|
pure virtual |
Call this before modifying a content in a significant way, for example changing a child.
- Note
- If you are just changing a simple parameter such as color, you should call TweakContent() instead.
- Parameters
-
c | is the content being modified. |
Implemented in CRhRdkContentUndo.
◆ TweakContent()
virtual bool IRhRdkContentUndo::TweakContent |
( |
const CRhRdkContent & |
c, |
|
|
const wchar_t * |
wszParamName, |
|
|
const class CRhRdkVariant & |
vValueOld |
|
) |
| |
|
pure virtual |
Call this before tweaking a single content parameter. It is more efficient than calling ModifyContent() because it only saves and restores the single changed parameter instead of the whole content hierarchy.
- Parameters
-
c | is the content being tweaked. |
wszParamName | is the name of the parameter being tweaked. |
vValueOld | is the value of the parameter before the tweak is applied. |
Implemented in CRhRdkContentUndo.