wxThreadEvent Class Reference
[EventsThreading]

#include <wx/event.h>

Inheritance diagram for wxThreadEvent:
Inheritance graph
[legend]

Detailed Description

This class adds some simple functionalities to wxCommandEvent coinceived for inter-threads communications.

This event is not natively emitted by any control/class: this is just an helper class for the user. Its most important feature is the GetEventCategory() implementation which allows thread events to NOT be processed by wxEventLoopBase::YieldFor calls (unless the wxEVT_CATEGORY_THREAD is specified - which is never in wx code).

Library:  wxCore
Category:  Events, Threading
See also:
Multithreading Overview, wxEventLoopBase::YieldFor

Public Member Functions

 wxThreadEvent (wxEventType eventType=wxEVT_COMMAND_THREAD, int id=wxID_ANY)
 Constructor.
virtual wxEventClone () const
 Clones this event making sure that all internal members which use COW (only m_commandString for now; see Reference Counting) are unshared (see wxObject::UnShare).
virtual wxEventCategory GetEventCategory () const
 Returns wxEVT_CATEGORY_THREAD.

List of all members.


Constructor & Destructor Documentation

wxThreadEvent::wxThreadEvent ( wxEventType  eventType = wxEVT_COMMAND_THREAD,
int  id = wxID_ANY 
)

Constructor.


Member Function Documentation

virtual wxEvent* wxThreadEvent::Clone (  )  const [virtual]

Clones this event making sure that all internal members which use COW (only m_commandString for now; see Reference Counting) are unshared (see wxObject::UnShare).

Implements wxEvent.

virtual wxEventCategory wxThreadEvent::GetEventCategory (  )  const [virtual]

Returns wxEVT_CATEGORY_THREAD.

This is important to avoid unwanted processing of thread events when calling wxEventLoopBase::YieldFor().

Reimplemented from wxEvent.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



wxWidgets logo

[ top ]