FX::FXFunctorTarget Class Reference

#include <FXFunctorTarget.h>

Inheritance diagram for FX::FXFunctorTarget:

FX::FXObject List of all members.

Detailed Description

A FOX messaging target which invokes a FX::Generic::Functor.

When writing generic code, it's a pain to create FX::FXObject derived classes as these require static data meaning you must labouriously write FXIMPLEMENT()'s. For the simple case of invoking some arbitrary code when a button is pressed for example, instantiate one of these with the required functor and set as the messaging target.

No filtering of the messages is performed. All messages sent to this target are sent to the functor.

You may also wish to investigate the TnFOX enhancements to FX::FXDataTarget including FX::FXDataTargetI.

Definition at line 53 of file FXFunctorTarget.h.

Public Types

typedef Generic::Functor<
Generic::TL::create< long,
FXObject *, FXSelector, void
* >::value > 
MsgHandlerSpec
 ID_LAST
enum  { ID_LAST }

Public Member Functions

virtual long handle (FX::FXObject *sender, FX::FXSelector sel, void *ptr)
virtual const FX::FXMetaClassgetMetaClass () const
 FXFunctorTarget ()
 FXFunctorTarget (MsgHandlerSpec functor)
const MsgHandlerSpecfunctor () const
void setFunctor (MsgHandlerSpec functor)
virtual long onDefault (FXObject *, FXSelector, void *)
const FXchargetClassName () const
bool isMemberOf (const FXMetaClass *metaclass) const
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
QTransString tr (const char *text, const char *hint=0)
virtual void * getPythonObject () const
virtual void decouplePythonObject () const

Static Public Member Functions

static FX::FXObjectmanufacture ()

Static Public Attributes

static const FX::FXMetaClass metaClass


The documentation for this class was generated from the following file:
(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:34:00 2009 for TnFOX by doxygen v1.4.7