mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 02:49:46 +00:00
0507b8600d
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5345 a592a061-630c-0410-9148-cb99ea01b6c8
54 lines
1.0 KiB
C++
54 lines
1.0 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file gnome/Timeout_pimpl.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Baruch Even
|
|
*
|
|
* Full author contact details are available in file CREDITS
|
|
*/
|
|
#ifndef TIMEOUTPIMPL_H
|
|
#define TIMEOUTPIMPL_H
|
|
|
|
#include "frontends/Timeout.h"
|
|
#include "glib.h" // for gint
|
|
|
|
#include <sigc++/sigc++.h>
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface
|
|
#endif
|
|
|
|
/**
|
|
* This class executes the callback when the timeout expires
|
|
* using Gnome mechanisms
|
|
*/
|
|
struct Timeout::Pimpl : public SigC::Object {
|
|
public:
|
|
///
|
|
Pimpl(Timeout * owner_);
|
|
/// start the timer
|
|
void start();
|
|
/// stop the timer
|
|
void stop();
|
|
/// reset
|
|
void reset();
|
|
/// Is the timer running?
|
|
bool running() const;
|
|
|
|
|
|
public:
|
|
/// The timeout signal, this gets called when the timeout passed.
|
|
bool timeoutEvent();
|
|
private:
|
|
/// the owning timer
|
|
Timeout * owner_;
|
|
/// Timer connection
|
|
SigC::Connection conn_;
|
|
/// Used for running as SigC::Connection::connected() isn't const
|
|
bool running_;
|
|
};
|
|
|
|
#endif
|