Code

removed lm_initialize calls and supporting infrastructure; loudmouth 1.1.1 does not...
[inkscape.git] / src / jabber_whiteboard / undo-stack-observer.h
1 /**
2  * Undo / redo / undo log commit listener
3  *
4  * Authors:
5  * David Yip <yipdw@rose-hulman.edu>
6  *
7  * Copyright (c) 2005 Authors
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
12 #ifndef __WHITEBOARD_UNDO_COMMIT_OBSERVER_H__
13 #define __WHITEBOARD_UNDO_COMMIT_OBSERVER_H__
15 #include <glibmm.h>
16 #include "../undo-stack-observer.h"
17 #include "jabber_whiteboard/typedefs.h"
19 namespace Inkscape {
21 namespace Whiteboard {
23 class SessionManager;
25 /**
26  * Inkboard implementation of Inkscape::UndoStackObserver.
27  */
28 class UndoStackObserver : public Inkscape::UndoStackObserver {
29 public:
30         enum ObserverType {
31                 UNDO_EVENT,
32                 REDO_EVENT,
33                 UNDO_COMMIT_EVENT
34         };
36         UndoStackObserver(SessionManager* sm);
37         ~UndoStackObserver();
38         void notifyUndoEvent(XML::Event* log);
39         void notifyRedoEvent(XML::Event* log);
40         void notifyUndoCommitEvent(XML::Event* log);
42         void lockObserverFromSending(ObserverType type);
43         void unlockObserverFromSending(ObserverType type);
45 private:
46         SessionManager* _sm;
48         // common action handler
49         void _doAction(XML::Event* log);
51         // noncopyable, nonassignable
52         UndoStackObserver(UndoStackObserver const& other);
53         UndoStackObserver& operator=(UndoStackObserver const& other);
55         unsigned int _undoSendEventLocks;
56         unsigned int _redoSendEventLocks;
57         unsigned int _undoCommitSendEventLocks;
58 };
60 }
62 }
64 #endif
66 /*
67   Local Variables:
68   mode:c++
69   c-file-style:"stroustrup"
70   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
71   indent-tabs-mode:nil
72   fill-column:99
73   End:
74 */
75 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :