HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
OP_UndoBundle.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: OP_UndoBundle.h ( Operator Library, C++)
7
*
8
* COMMENTS:
9
* This is the Undo class that is responsible for undoing all
10
* changes to OP bundles. It even handles creation and deletion.
11
*/
12
13
#ifndef __OP_UndoBundle__
14
#define __OP_UndoBundle__
15
16
#include "
OP_API.h
"
17
#include <
UT/UT_Array.h
>
18
#include <
UT/UT_String.h
>
19
#include <
UT/UT_Undo.h
>
20
21
class
OP_Bundle
;
22
class
OP_BundleFilter
;
23
24
enum
OP_UndoBundleOperation
25
{
26
OP_UNDO_BUNDLE_CREATE
,
// Create a new bundle
27
OP_UNDO_BUNDLE_DELETE
,
// Delete a bundle
28
OP_UNDO_BUNDLE_MODIFY
,
// Add/Remove ops to a bundle
29
OP_UNDO_BUNDLE_FILTER
,
// Change bundle filter
30
OP_UNDO_BUNDLE_LOCK_FLAG
,
// Change flag
31
OP_UNDO_BUNDLE_NAME
,
// Name change
32
OP_UNDO_BUNDLE_PATTERN
// Smart bundle pattern change
33
};
34
35
class
OP_API
OP_UndoBundle
:
public
UT_Undo
36
{
37
public
:
38
OP_UndoBundle
(
OP_Bundle
*,
OP_UndoBundleOperation
);
39
OP_UndoBundle
(
OP_Bundle
*,
const
char
*oldname);
40
~
OP_UndoBundle
()
override
;
41
42
void
undo
()
override
;
43
void
redo
()
override
;
44
45
private
:
46
void
resetSize();
47
void
swap
(
OP_Bundle
*bundle);
48
void
swapFilter(
OP_Bundle
*bundle);
49
void
swapPattern(
OP_Bundle
*bundle);
50
void
swapName();
51
52
UT_String
myBundleName;
53
UT_String
myOldBundleName;
54
UT_String
* myPattern;
55
const
OP_BundleFilter
*myFilter;
56
int
myLockFlag:1;
57
int
myPatternNode;
58
UT_Array<int>
myNodeIds;
59
OP_UndoBundleOperation
myOperation;
60
};
61
#endif
62
OP_UNDO_BUNDLE_MODIFY
Definition:
OP_UndoBundle.h:28
UT_Undo::redo
virtual void redo()=0
OP_UNDO_BUNDLE_LOCK_FLAG
Definition:
OP_UndoBundle.h:30
UT_Undo
Definition:
UT_Undo.h:23
swap
void swap(T &lhs, T &rhs)
Definition:
pugixml.cpp:7172
OP_Bundle
Definition:
OP_Bundle.h:86
UT_Array.h
OP_API.h
UT_Array< int >
OP_UndoBundle
Definition:
OP_UndoBundle.h:35
OP_UNDO_BUNDLE_FILTER
Definition:
OP_UndoBundle.h:29
UT_String.h
OP_UndoBundleOperation
OP_UndoBundleOperation
Definition:
OP_UndoBundle.h:24
OP_UNDO_BUNDLE_CREATE
Definition:
OP_UndoBundle.h:26
UT_Undo::undo
virtual void undo()=0
OP_UNDO_BUNDLE_NAME
Definition:
OP_UndoBundle.h:31
UT_Undo.h
OP_BundleFilter
Definition:
OP_BundleFilter.h:21
OP_API
#define OP_API
Definition:
OP_API.h:10
OP_UNDO_BUNDLE_PATTERN
Definition:
OP_UndoBundle.h:32
OP_UNDO_BUNDLE_DELETE
Definition:
OP_UndoBundle.h:27
UT_String
Definition:
UT_String.h:73
OP
OP_UndoBundle.h
Generated on Tue Dec 17 2024 03:40:04 for HDK by
1.8.6