#include "GuiTextUndoRedo.h"
#include "../GuiTextCommonInterface.h"
#include "../GuiDocumentViewer.h"
namespace
{
namespace
{
namespace
{
using
namespace
elements
;
using
namespace
elements
::
text
;
using
namespace
compositions
;
GuiGeneralUndoRedoProcessor
::
GuiGeneralUndoRedoProcessor
()
:firstFutureStep(
0
)
,savedStep(
0
)
,performingUndoRedo(
false
)
{
}
GuiGeneralUndoRedoProcessor
::
~
GuiGeneralUndoRedoProcessor
()
{
}
void
GuiGeneralUndoRedoProcessor
::
(
<
>
)
{
if
(!
)
{
if
(
<
)
{
=-
1
;
}
=
.
()-
;
if
(
count
>
0
)
{
.
(
,
count
);
}
.
(
);
=
.
();
);
);
}
}
bool
GuiGeneralUndoRedoProcessor
::
()
{
return
>
0
;
}
bool
GuiGeneralUndoRedoProcessor
::
()
{
return
.
()>
;
}
void
GuiGeneralUndoRedoProcessor
::
()
{
if
(!
)
{
.
();
=
0
;
=
0
;
}
}
bool
GuiGeneralUndoRedoProcessor
::
()
{
return
!=
;
}
void
GuiGeneralUndoRedoProcessor
::
()
{
if
(!
)
{
=
;
);
}
}
bool
GuiGeneralUndoRedoProcessor
::
()
{
if
(!
())
return
false
;
=
true
;
--;
]
();
=
false
;
);
);
return
true
;
}
bool
GuiGeneralUndoRedoProcessor
::
()
{
if
(!
())
return
false
;
=
true
;
++;
-
1
]
();
=
false
;
);
);
return
true
;
}
void
GuiTextBoxUndoRedoProcessor
::
::
()
{
GuiTextBoxCommonInterface
*
=
dynamic_cast
<
GuiTextBoxCommonInterface
*>(
->
->
());
if
(
ci
)
{
ci
->
(
.
,
.
);
ci
->
(
.
);
ci
->
(
.
,
.
);
}
}
void
GuiTextBoxUndoRedoProcessor
::
::
()
{
GuiTextBoxCommonInterface
*
=
dynamic_cast
<
GuiTextBoxCommonInterface
*>(
->
->
());
if
(
ci
)
{
ci
->
(
.
,
.
);
ci
->
(
.
);
ci
->
(
.
,
.
);
}
}
GuiTextBoxUndoRedoProcessor
::
GuiTextBoxUndoRedoProcessor
()
:ownerComposition(
0
)
{
}
GuiTextBoxUndoRedoProcessor
::
~
GuiTextBoxUndoRedoProcessor
()
{
}
void
GuiTextBoxUndoRedoProcessor
::
(
elements
::
*
,
&
,
compositions
::
*
,
)
{
=
;
}
void
GuiTextBoxUndoRedoProcessor
::
()
{
();
}
void
GuiTextBoxUndoRedoProcessor
::
(
&
)
{
}
void
GuiTextBoxUndoRedoProcessor
::
(
const
&
)
{
<
>
=
new
;
step
=
this
;
step
;
(
step
);
}
void
GuiTextBoxUndoRedoProcessor
::
(
const
&
)
{
}
void
GuiTextBoxUndoRedoProcessor
::
(
)
{
}
void
GuiDocumentUndoRedoProcessor
::
::
()
{
GuiDocumentCommonInterface
*
=
dynamic_cast
<
GuiDocumentCommonInterface
*>(
->
->
());
if
(
ci
)
{
ci
->
(
.
,
.
,
.
,
true
);
ci
->
(
.
,
.
);
}
}
void
GuiDocumentUndoRedoProcessor
::
::
()
{
GuiDocumentCommonInterface
*
=
dynamic_cast
<
GuiDocumentCommonInterface
*>(
->
->
());
if
(
ci
)
{
ci
->
(
.
,
.
,
.
,
true
);
ci
->
(
.
,
.
);
}
}
void
GuiDocumentUndoRedoProcessor
::
::
()
{
GuiDocumentCommonInterface
*
=
dynamic_cast
<
GuiDocumentCommonInterface
*>(
->
->
());
if
(
ci
)
{
ci
->
(
.
,
.
);
}
}
void
GuiDocumentUndoRedoProcessor
::
::
()
{
GuiDocumentCommonInterface
*
=
dynamic_cast
<
GuiDocumentCommonInterface
*>(
->
->
());
if
(
ci
)
{
ci
->
(
.
,
.
);
}
}
void
GuiDocumentUndoRedoProcessor
::
::
()
{
GuiDocumentCommonInterface
*
=
dynamic_cast
<
GuiDocumentCommonInterface
*>(
->
->
());
if
(
ci
)
{
ci
->
(
(
,
0
),
(
,
0
),
);
}
}
void
GuiDocumentUndoRedoProcessor
::
::
()
{
GuiDocumentCommonInterface
*
=
dynamic_cast
<
GuiDocumentCommonInterface
*>(
->
->
());
if
(
ci
)
{
ci
->
(
(
,
0
),
(
,
0
),
);
}
}
GuiDocumentUndoRedoProcessor
::
GuiDocumentUndoRedoProcessor
()
:element(
0
)
,ownerComposition(
0
)
{
}
GuiDocumentUndoRedoProcessor
::
~
GuiDocumentUndoRedoProcessor
()
{
}
void
GuiDocumentUndoRedoProcessor
::
(
elements
::
*
,
compositions
::
*
)
{
=
;
=
;
}
void
GuiDocumentUndoRedoProcessor
::
(
const
&
)
{
<
>
=
new
;
step
=
this
;
step
;
(
step
);
}
void
GuiDocumentUndoRedoProcessor
::
(
const
&
)
{
<
>
=
new
;
step
=
this
;
step
;
(
step
);
}
void
GuiDocumentUndoRedoProcessor
::
(
<
>
)
{
<
>
=
new
;
step
=
this
;
step
;
(
step
);
}
}
}
}