event-log.cpp revision a47064cba1aa106a9e8a3b979220f3ff3f730e6b
/*
* Author:
* Gustav Broberg <broberg@kth.se>
*
* Copyright (c) 2006 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "desktop.h"
#include "event-log.h"
#include "inkscape.h"
#include "util/ucompose.hpp"
namespace Inkscape {
_connected (false),
_notifications_blocked (false),
{
// add initial pseudo event
}
void
{
if ( !_notifications_blocked ) {
// if we're on the first child event...
if ( _curr_event->parent() &&
{
// ...back up to the parent
} else {
// if we're about to leave a branch, collapse it
}
--_curr_event;
// if we're entering a branch, move to the end of it
--_curr_event;
}
}
// update the view
if (_connected) {
}
}
}
void
{
if ( !_notifications_blocked ) {
// if we're on a parent event...
// ...move to its first child
} else {
++_curr_event;
// if we are about to leave a branch...
if ( _curr_event->parent() &&
{
// ...collapse it
if (_connected) {
}
// ...and move to the next event at parent level
++_curr_event;
}
}
// update the view
if (_connected) {
}
}
}
void
{
// If we're not at the last event in list then erase the previously undone events
if ( _last_event != _curr_event ) {
} else {
++_last_event;
}
if (_last_event->parent()) {
}
++_last_event;
} else {
}
}
}
// if the new event is of the same type as the previous then create a new branch
if ( !_curr_event_parent ) {
}
} else {
// collapse if we're leaving a branch
if (_curr_event_parent && _connected) {
}
}
// update the view
if (_connected) {
}
}
void
{
}
void
{
_connected = true;
}
void
{
if(_document) {
if(_getUndoEvent()) {
} else {
}
if(_getRedoEvent()) {
} else {
}
}
}
EventLog::_getUndoEvent() const
{
return undo_event;
}
EventLog::_getRedoEvent() const
{
if ( _curr_event != _last_event ) {
else {
++redo_event;
if ( redo_event->parent() &&
++redo_event;
}
}
}
return redo_event;
}
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :