event-log.h revision a4030d5ca449e7e384bc699cd249ee704faaeab0
/**
* Inkscape::EventLog
*
* A simple log for maintaining a history of commited, undone and redone events along with their
* type. It implements the UndoStackObserver and should be registered with a
* CompositeUndoStackObserver for each document. The event log is then notified on all commit, undo
* and redo events and will store a representation of them in an internal Gtk::TreeStore.
*
* Consecutive events of the same type are grouped with the first event as a parent and following
* as its children.
*
* If a Gtk::TreeView is connected to the event log, the TreeView's selection and its nodes
* this happens, the event log will block the TreeView's callbacks to prevent circular updates.
*
* Author:
* Gustav Broberg <broberg@kth.se>
*
* Copyright (c) 2006, 2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifndef INKSCAPE_EVENT_LOG_H
#define INKSCAPE_EVENT_LOG_H
#include <gtkmm/treestore.h>
#include <gtkmm/treeselection.h>
#include <gtkmm/treeview.h>
#include "undo-stack-observer.h"
#include "event.h"
/**
*
*/
/**
* Event datatype
*/
{
{
}
};
/**
* Implementation of Inkscape::UndoStackObserver methods
* \brief Modifies the log's entries and the view's selection when triggered
*/
void notifyClearUndoEvent();
void notifyClearRedoEvent();
/**
* Accessor functions
*/
/*
* Callback types for TreeView changes.
*/
enum CallbackTypes {
};
/**
* Connect with a TreeView.
*/
/*
* Updates the sensitivity and names of SP_VERB_EDIT_UNDO and SP_VERB_EDIT_REDO to reflect the
* current state.
*/
void updateUndoVerbs();
bool _connected; //< connected with dialog
const EventModelColumns _columns;
bool _notifications_blocked; //< if notifications should be handled
/**
* Helper functions
*/
void _clearUndo(); //< erase all previously commited events
void _clearRedo(); //< erase all previously undone events
void checkForVirginity(); //< marks the document as untouched if undo/redo reaches a previously saved state
// noncopyable, nonassignable
};
} // namespace Inkscape
#endif // INKSCAPE_EVENT_LOG_H
/*
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:fileencoding=utf-8:textwidth=99 :