aseprite/src/app/doc_undo_observer.h
David Capello cd342f5630 [lua] Add events handling with Sprite.events & App.events
Added a new Events object with :on() and :off() methods to start or
stop listening to a specific event respectively. This also allows to
add several callbacks for the same event.

Replaced the temporal Site.onChange & Sprite.onChange implementations.

Related to several issues (enable more possibilities for): #138, #1403, #1949, #2965, #2980
2021-10-07 18:56:39 -03:00

34 lines
827 B
C++

// Aseprite
// Copyright (C) 2021 Igara Studio S.A.
// Copyright (C) 2015-2018 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
#ifndef APP_DOCUMENT_UNDO_OBSERVER_H_INCLUDED
#define APP_DOCUMENT_UNDO_OBSERVER_H_INCLUDED
#pragma once
namespace undo {
class UndoState;
}
namespace app {
class DocUndo;
class DocUndoObserver {
public:
virtual ~DocUndoObserver() { }
virtual void onAddUndoState(DocUndo* history) { }
virtual void onDeleteUndoState(DocUndo* history,
undo::UndoState* state) { }
virtual void onCurrentUndoStateChange(DocUndo* history) { }
virtual void onClearRedo(DocUndo* history) { }
virtual void onTotalUndoSizeChange(DocUndo* history) { }
};
} // namespace app
#endif