evtloop.h

Clase wxEventLoopActivator

Activa temporalmente un bucle de eventos.

Esta clase se utiliza para hacer que el bucle de eventos se active durante su tiempo de vida, por ejemplo:

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

Funciones miembro

wxEventLoopActivator()

wxEventLoopActivator::wxEventLoopActivator(wxEventLoopBase * loop)

Activa el bucle pasado como parámetro.

Esto guarda el valor de retorno actual de wxEventLoopBase::GetActive() y luego llama a wxEventLoopBase::SetActive() con el bucle dado.

~wxEventLoopActivator()

wxEventLoopActivator::~wxEventLoopActivator()

Restaura el bucle de eventos previamente activo almacenado por el constructor.