]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GTimeout.h
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / GTimeout.h
1 // -*- C++ -*-
2 /**
3  * \file gtk/GTimeout.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  * \author Huang Ying
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GTIMEOUT_H
14 #define GTIMEOUT_H
15
16 #include "frontends/Timeout.h"
17
18 #include <sigc++/sigc++.h>
19
20 namespace lyx {
21 namespace frontend {
22
23 /**
24  * This class executes the callback when the timeout expires
25  * using Gtk mechanisms
26  */
27 class GTimeout : public Timeout::Impl, public sigc::trackable {
28 public:
29         ///
30         GTimeout(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         /// 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 } // namespace frontend
49 } // namespace lyx
50
51 #endif