lyx_mirror/src/frontends/gtk/GTimeout.h
Lars Gullik Bjønnes d86c6d46bb Move to gtk 2.4
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9011 a592a061-630c-0410-9148-cb99ea01b6c8
2004-09-26 16:48:30 +00:00

52 lines
1.0 KiB
C++

// -*- C++ -*-
/**
* \file gtk/GTimeout.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Baruch Even
* \author Huang Ying
*
* Full author contact details are available in file CREDITS.
*/
#ifndef GTIMEOUT_H
#define GTIMEOUT_H
#include "frontends/Timeout.h"
#include <sigc++/sigc++.h>
namespace lyx {
namespace frontend {
/**
* This class executes the callback when the timeout expires
* using Gtk mechanisms
*/
class GTimeout : public Timeout::Impl, public sigc::trackable {
public:
///
GTimeout(Timeout & owner_);
/// start the timer
void start();
/// stop the timer
void stop();
/// reset
void reset();
/// Is the timer running?
bool running() const;
/// The timeout signal, this gets called when the timeout passed.
bool timeoutEvent();
private:
/// Timer connection
sigc::connection conn_;
/// Used for running as sigc::connection::connected() isn't const
bool running_;
};
} // namespace frontend
} // namespace lyx
#endif