]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/Timeout_pimpl.h
better selection and scrolling behaviour
[lyx.git] / src / frontends / gnome / Timeout_pimpl.h
1 // -*- C++ -*-
2 /**
3  * \file gnome/Timeout_pimpl.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 TIMEOUTPIMPL_H
12 #define TIMEOUTPIMPL_H
13
14 #include "frontends/Timeout.h"
15 #include "glib.h" // for gint
16
17 #include <sigc++/sigc++.h>
18
19 #ifdef __GNUG__
20 #pragma interface
21 #endif
22
23 /**
24  * This class executes the callback when the timeout expires
25  * using Gnome mechanisms
26  */
27 struct Timeout::Pimpl : public SigC::Object {
28 public:
29         ///
30         Pimpl(Timeout * owner_);
31         /// start the timer
32         void start();
33         /// stop the timer
34         void stop();
35         /// reset
36         void reset();
37         /// Is the timer running?
38         bool running() const;
39
40
41 public:
42         /// The timeout signal, this gets called when the timeout passed.
43         bool timeoutEvent();
44 private:
45         /// the owning timer
46         Timeout * owner_;
47         /// Timer connection
48         SigC::Connection conn_;
49         /// Used for running as SigC::Connection::connected() isn't const
50         bool running_;
51 };
52
53 #endif