]> git.lyx.org Git - lyx.git/blob - src/support/SignalSlot.h
add onoff support for "inset-modify changetype xxx" in include inset
[lyx.git] / src / support / SignalSlot.h
1 // -*- C++ -*-
2 /**
3  * \file SignalSlot.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef SIGNALSLOT_H
13 #define SIGNALSLOT_H
14
15 namespace lyx {
16
17 class Slot;
18 class SlotImpl;
19 class SignalImpl;
20
21 class Signal
22 {
23 public:
24         Signal();
25         ~Signal();
26         void fire();
27 private:
28         Signal(Signal const &);
29         void operator=(Signal const &);
30         SignalImpl * impl;
31         friend void connect(Signal & sig, Slot & slot);
32 };
33
34 class Slot
35 {
36 public:
37         Slot();
38         virtual ~Slot();
39         virtual void called() {}
40 private:
41         Slot(Slot const &);
42         void operator=(Slot const &);
43         SlotImpl * impl;
44         friend void connect(Signal & sig, Slot & slot);
45 };
46
47 void connect(Signal & sig, Slot & slot);
48
49 } // namespace lyx
50
51 #endif