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
CH_UndoGroup.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: CH_UndoGroup.h ( OP Library, C++)
7
*
8
* COMMENTS: This class handles the undoing of channel group
9
* operations (from JIVE applications).
10
*
11
* This class handles the updating of internal data
12
* when a channel group operation is undone/redone.
13
*/
14
15
#ifndef __CH_UndoGroup__
16
#define __CH_UndoGroup__
17
18
#include "
CH_API.h
"
19
#include <
UT/UT_Undo.h
>
20
#include "
CH_ChannelRef.h
"
21
22
class
CH_Group
;
23
class
CH_Manager
;
24
25
class
CH_API
CH_UndoGroup
:
public
UT_Undo
26
{
27
public
:
28
CH_UndoGroup
(
const
CH_Group
*chg,
bool
reverse
);
29
~
CH_UndoGroup
()
override
;
30
31
void
undo
()
override
;
32
void
redo
()
override
;
33
34
protected
:
35
virtual
void
swap
();
36
CH_Group
*getGroup()
const
;
37
38
UT_String
myPath
;
39
bool
myReverse
;
40
};
41
42
class
CH_API
CH_UndoGroupCreateDelete
:
public
CH_UndoGroup
43
{
44
public
:
45
CH_UndoGroupCreateDelete
(
const
CH_Group
*chg,
bool
reverse
);
46
47
private
:
48
void
swap
()
override
;
49
};
50
51
class
CH_API
CH_UndoGroupRename
:
public
CH_UndoGroup
52
{
53
public
:
54
CH_UndoGroupRename
(
55
const
CH_Group
*chg,
56
const
char
*old_name,
const
char
*new_name );
57
private
:
58
void
swap
()
override
;
59
60
private
:
61
UT_String
myOldName;
62
UT_String
myNewName;
63
};
64
65
class
CH_API
CH_UndoGroupLoadClear
:
public
CH_UndoGroup
66
{
67
public
:
68
CH_UndoGroupLoadClear
(
const
CH_Group
*chg,
bool
reverse
);
69
~
CH_UndoGroupLoadClear
()
override
;
70
71
private
:
72
void
swap
()
override
;
73
74
private
:
75
void
saveChannels();
76
77
char
*myBuffer;
78
size_t
myBufSize;
79
};
80
81
class
CH_API
CH_UndoGroupAddRemoveChannel
:
public
CH_UndoGroup
82
{
83
public
:
84
CH_UndoGroupAddRemoveChannel
(
85
const
CH_Group
*chg,
bool
reverse
,
86
const
CH_ChannelRef
&chref );
87
private
:
88
void
swap
()
override
;
89
90
private
:
91
CH_ChannelRef
myChanRef;
92
};
93
94
class
CH_API
CH_UndoGroupMove
:
public
CH_UndoGroup
95
{
96
public
:
97
CH_UndoGroupMove
(
98
const
CH_Group
*chgsp,
CH_Group
*chgtp,
99
const
char
*old_name,
const
char
*new_name);
100
private
:
101
void
swap
()
override
;
102
103
private
:
104
UT_String
myOldName;
105
UT_String
myNewName;
106
UT_String
myTargetParentPath;
107
};
108
109
class
CH_API
CH_UndoGroupChangeIndex
:
public
CH_UndoGroup
110
{
111
public
:
112
CH_UndoGroupChangeIndex
(
const
CH_Group
*chg,
int
old_index,
int
new_index);
113
114
private
:
115
void
swap
()
override
;
116
117
private
:
118
int
myOldIndex;
119
int
myNewIndex;
120
};
121
#endif
122
UT_Undo::redo
virtual void redo()=0
CH_UndoGroupChangeIndex
Definition:
CH_UndoGroup.h:109
CH_UndoGroupAddRemoveChannel
Definition:
CH_UndoGroup.h:81
CH_UndoGroupLoadClear
Definition:
CH_UndoGroup.h:65
UT_Undo
Definition:
UT_Undo.h:23
reverse
void reverse(I begin, I end)
Definition:
pugixml.cpp:7190
swap
void swap(T &lhs, T &rhs)
Definition:
pugixml.cpp:7172
CH_UndoGroup::myReverse
bool myReverse
Definition:
CH_UndoGroup.h:39
CH_Group
Definition:
CH_Group.h:63
UT_Undo::undo
virtual void undo()=0
CH_UndoGroupCreateDelete
Definition:
CH_UndoGroup.h:42
CH_UndoGroup::swap
virtual void swap()
CH_API.h
UT_Undo.h
CH_UndoGroupMove
Definition:
CH_UndoGroup.h:94
CH_UndoGroup::myPath
UT_String myPath
Definition:
CH_UndoGroup.h:38
CH_API
#define CH_API
Definition:
CH_API.h:10
UT_String
Definition:
UT_String.h:73
CH_ChannelRef
Definition:
CH_ChannelRef.h:25
CH_UndoGroupRename
Definition:
CH_UndoGroup.h:51
CH_ChannelRef.h
CH_Manager
Definition:
CH_Manager.h:490
CH_UndoGroup
Definition:
CH_UndoGroup.h:25
CH
CH_UndoGroup.h
Generated on Sat Dec 21 2024 02:46:34 for HDK by
1.8.6