2001-06-13 14:33:31 +00:00
|
|
|
|
// -*- C++ -*-
|
2001-02-07 16:44:49 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file Timeout_pimpl.h
|
|
|
|
|
* Copyright 2001 LyX Team
|
|
|
|
|
* Read COPYING
|
|
|
|
|
*
|
2002-03-11 17:00:41 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes, larsbj@lyx.org
|
|
|
|
|
* \author John Levon, moz@compsoc.man.ac.uk
|
2001-02-07 16:44:49 +00:00
|
|
|
|
*/
|
|
|
|
|
#ifndef TIMEOUTPIMPL_H
|
|
|
|
|
#define TIMEOUTPIMPL_H
|
|
|
|
|
|
|
|
|
|
#include "frontends/Timeout.h"
|
|
|
|
|
|
|
|
|
|
#include <sigc++/signal_system.h>
|
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-02-07 16:44:49 +00:00
|
|
|
|
/**
|
|
|
|
|
* This class executes the callback when the timeout expires
|
|
|
|
|
* using XForms mechanisms
|
|
|
|
|
*/
|
|
|
|
|
struct Timeout::Pimpl {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
Pimpl(Timeout * owner_);
|
2002-02-18 19:13:48 +00:00
|
|
|
|
/// Is the timer running?
|
|
|
|
|
bool running() const;
|
2001-02-07 16:44:49 +00:00
|
|
|
|
/// start the timer
|
|
|
|
|
void start();
|
|
|
|
|
/// stop the timer
|
|
|
|
|
void stop();
|
|
|
|
|
/// reset
|
|
|
|
|
void reset();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/// the owning timer
|
|
|
|
|
Timeout * owner_;
|
|
|
|
|
/// xforms id
|
|
|
|
|
int timeout_id;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|