diff --git a/src/event-log.h b/src/event-log.h
index 16ecfd5558c4d77b66627d6ed92ea624e546c033..a618f0467e0a1b7e84fce9dba1c08231b0649075 100644 (file)
--- a/src/event-log.h
+++ b/src/event-log.h
* Author:
* Gustav Broberg <broberg@kth.se>
*
- * Copyright (c) 2006 Authors
+ * Copyright (c) 2006, 2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
typedef Gtk::TreeModel::iterator iterator;
typedef Gtk::TreeModel::const_iterator const_iterator;
- EventLog();
+ EventLog(SPDocument* document);
~EventLog();
/**
struct EventModelColumns : public Gtk::TreeModelColumnRecord
{
+ Gtk::TreeModelColumn<Event *> event;
Gtk::TreeModelColumn<unsigned int> type;
Gtk::TreeModelColumn<Glib::ustring> description;
Gtk::TreeModelColumn<int> child_count;
EventModelColumns()
{
- add(type); add(description); add(child_count);
+ add(event); add(type); add(description); add(child_count);
}
};
void notifyUndoEvent(Event *log);
void notifyRedoEvent(Event *log);
void notifyUndoCommitEvent(Event *log);
+ void notifyClearUndoEvent();
+ void notifyClearRedoEvent();
/**
* Accessor functions
void setCurrEventParent(iterator event) { _curr_event_parent = event; }
void blockNotifications(bool status=true) { _notifications_blocked = status; }
- void setDocument(SPDocument *document);
-
/*
* Callback types for TreeView changes.
*/
const EventModelColumns _columns;
- /**
- * Helper functions for initialization
- */
-
Glib::RefPtr<Gtk::TreeStore> _event_list_store;
Glib::RefPtr<Gtk::TreeSelection> _event_list_selection;
Gtk::TreeView *_event_list_view;
// Map of connections used to temporary block/unblock callbacks in a TreeView
CallbackMap *_callback_connections;
+ /**
+ * Helper functions
+ */
+
const_iterator _getUndoEvent() const; //< returns the current undoable event or NULL if none
const_iterator _getRedoEvent() const; //< returns the current redoable event or NULL if none
+ void _clearUndo(); //< erase all previously commited events
+ void _clearRedo(); //< erase all previously undone events
+
// noncopyable, nonassignable
EventLog(EventLog const &other);
EventLog& operator=(EventLog const &other);