wxWidgets: wxEventLoopActivator Class Reference

| Version: 3.0.5

Public Member Functions | List of all members
wxEventLoopActivator Class Reference
Class List by Category » Application and Process Management

`#include </home/Hamish/wxwidgets/wxWidgets3.0-3.0.5.1-1.src/wxWidgets3.0-3.0.5.1-1.i686/src/wxWidgets-3.0.5.1/interface/wx/evtloop.h>`

## Detailed Description

Makes an event loop temporarily active.

This class is used to make the event loop active during its life-time, e.g.:

class MyEventLoop : public wxEventLoopBase { ... };
void RunMyLoop()
{
MyEventLoop loop;
wxEventLoopActivator activate(&loop);
...
} // the previously active event loop restored here

##

Library: wxBase

<>< =''>:</>&;&;< =''>\ </></>

See also
  wxEventLoopBase

## Public Member Functions
| wxEventLoopActivator (wxEventLoopBase *loop)
| Makes the loop passed as the parameter currently active. More...
| ~wxEventLoopActivator ()
| Restores the previously active event loop stored by the constructor. More...

## Constructor & Destructor Documentation

## ◆ wxEventLoopActivator()

wxEventLoopActivator::wxEventLoopActivator | ( | wxEventLoopBase * | loop | ) |

Makes the loop passed as the parameter currently active.

This saves the current return value of wxEventLoopBase::GetActive() and then calls wxEventLoopBase::SetActive() with the given loop.

## ◆ ~wxEventLoopActivator()

wxEventLoopActivator::~wxEventLoopActivator | ( |  | ) |

Restores the previously active event loop stored by the constructor.

wxEventLoopBase
Base class for all event loop implementations.
Definition: evtloop.h:44
wxEventLoopActivator
Makes an event loop temporarily active.
Definition: evtloop.h:309