mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-06 23:09:58 +00:00
cd342f5630
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
34 lines
827 B
C++
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
|