]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/gnomeTimeout.h
Minipage is no more (long live the box inset)
[lyx.git] / src / frontends / gnome / gnomeTimeout.h
1 // -*- C++ -*-
2 /**
3  * \file gnomeTimeout.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Baruch Even
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11 #ifndef GNOMETIMEOUT_H
12 #define GNOMETIMEOUT_H
13
14 #include "frontends/Timeout.h"
15 #include "glib.h" // for gint
16
17 #include <sigc++/sigc++.h>
18
19
20 /**
21  * This class executes the callback when the timeout expires
22  * using Gnome mechanisms
23  */
24 struct gnomeTimeout : public SigC::Object, public Timeout::Impl {
25 public:
26         ///
27         gnomeTimeout(Timeout * owner_);
28         /// start the timer
29         void start();
30         /// stop the timer
31         void stop();
32         /// reset
33         void reset();
34         /// Is the timer running?
35         bool running() const;
36
37
38 public:
39         /// The timeout signal, this gets called when the timeout passed.
40         bool timeoutEvent();
41 private:
42         /// Timer connection
43         SigC::Connection conn_;
44         /// Used for running as SigC::Connection::connected() isn't const
45         bool running_;
46 };
47
48 #endif // GNOMETIMEOUT