forked from aseprite/aseprite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocuments_observer.h
More file actions
33 lines (27 loc) · 804 Bytes
/
documents_observer.h
File metadata and controls
33 lines (27 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Aseprite Document Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef DOC_DOCUMENTS_OBSERVER_H_INCLUDED
#define DOC_DOCUMENTS_OBSERVER_H_INCLUDED
#pragma once
namespace doc {
class Document;
class CreateDocumentArgs {
public:
CreateDocumentArgs() : m_doc(nullptr) { }
Document* document() { return m_doc; }
void setDocument(Document* doc) { m_doc = doc; }
private:
Document* m_doc;
};
class DocumentsObserver {
public:
virtual ~DocumentsObserver() { }
virtual void onCreateDocument(CreateDocumentArgs* args) { }
virtual void onAddDocument(Document* doc) { }
virtual void onRemoveDocument(Document* doc) { }
};
} // namespace doc
#endif