/*
* Author:
* Gustav Broberg <broberg@kth.se>
* Jon A. Cruz <jon@joncruz.org>
*
* Copyright (c) 2014 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "util/signal-blocker.h"
#include "event-log.h"
#include <gtkmm/treemodel.h>
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
#include "desktop.h"
#include "inkscape.h"
#include "util/signal-blocker.h"
#include "util/ucompose.hpp"
#include "document.h"
#include "sp-object.h"
namespace
{
class DialogConnection
{
public:
DialogConnection(Gtk::TreeView *event_list_view, Inkscape::EventLog::CallbackMap *callback_connections) :
{
}
Glib::RefPtr<Gtk::TreeSelection> _event_list_selection; /// @todo remove this and use _event_list_view's call
};
class ConnectionMatcher
{
public:
{
}
{
}
};
void addBlocker(std::vector<boost::shared_ptr<SignalBlocker> > &blockers, sigc::connection *connection)
{
}
} // namespace
namespace Inkscape {
class EventLogPrivate
{
public:
EventLogPrivate() :
{
}
bool isConnected() const
{
return !_connections.empty();
}
{
if (std::find_if(_connections.begin(), _connections.end(), ConnectionMatcher(event_list_view, callback_connections)) != _connections.end()) {
// skipping
}
else
{
{
}
}
}
void removeDialogConnection(Gtk::TreeView *event_list_view, Inkscape::EventLog::CallbackMap *callback_connections)
{
std::vector<DialogConnection>::iterator it = std::find_if(_connections.begin(), _connections.end(), ConnectionMatcher(event_list_view, callback_connections));
}
}
{
for (std::vector<DialogConnection>::iterator it(_connections.begin()); it != _connections.end(); ++it)
{
}
for (std::vector<DialogConnection>::iterator it(_connections.begin()); it != _connections.end(); ++it)
{
}
}
{
for (std::vector<DialogConnection>::iterator it(_connections.begin()); it != _connections.end(); ++it)
{
}
for (std::vector<DialogConnection>::iterator it(_connections.begin()); it != _connections.end(); ++it)
{
}
}
{
if (eventListStore) {
for (std::vector<DialogConnection>::iterator it(_connections.begin()); it != _connections.end(); ++it)
{
}
eventListStore->clear();
}
}
};
_priv(new EventLogPrivate()),
_notifications_blocked (false)
{
// add initial pseudo event
}
// avoid crash by clearing entries here (see bug #1071082)
delete _priv;
_priv = 0;
}
void
{
if ( !_notifications_blocked ) {
// make sure the supplied event matches the next undoable event
// 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 (_priv->isConnected()) {
}
}
}
void
{
if ( !_notifications_blocked ) {
// make sure the supplied event matches the next redoable event
// 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
// ...and move to the next event at parent level
++_curr_event;
}
}
// update the view
if (_priv->isConnected()) {
}
}
}
void
{
_clearRedo();
// 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) {
}
}
// update the view
if (_priv->isConnected()) {
}
}
void
{
_clearUndo();
}
void
{
_clearRedo();
}
void EventLog::addDialogConnection(Gtk::TreeView *event_list_view, CallbackMap *callback_connections)
{
}
void EventLog::removeDialogConnection(Gtk::TreeView *event_list_view, CallbackMap *callback_connections)
{
}
void
{
if(_document) {
if(_getUndoEvent()) {
} else {
}
if(_getRedoEvent()) {
} else {
}
}
}
{
return undo_event;
}
{
if ( _curr_event != _last_event ) {
else {
++redo_event;
if ( redo_event->parent() &&
++redo_event;
}
}
}
return redo_event;
}
void
{
// TODO: Implement when needed
}
void
{
if ( _last_event != _curr_event ) {
} else {
++_last_event;
}
if (_last_event->parent()) {
}
++_last_event;
} else {
}
}
}
}
/* mark document as untouched if we reach a state where the document was previously saved */
void
if (_curr_event == _last_saved) {
_document->setModifiedSinceSave(false);
}
}
} // namespace Inkscape
/*
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 :