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