Hot Door CORE 0.8.3
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
hdi::core::Notifier Class Reference

Acts as a receiver for specific notifications, passing them along to caller-supplied callbacks. More...

#include <hdicoreNotifier.h>

Public Member Functions

 Notifier ()
 Constructs an empty Notifier object.
 
 Notifier (const Notifier &n_)
 Constructs a new Notifier object from an existing Notifier object (copy constructor)
 
 Notifier (const NotifierType type_, const Callback &responder_)
 Constructs a Notifier object to fire a responder (target and action) when Illustrator sends a notification.
 
virtual ~Notifier ()
 Destructs a Notifier object, deactivating it first.
 
virtual Notifieroperator= (const Notifier &rhs_)
 Assigns one Notifier object to another.
 
virtual bool operator== (const Notifier &rhs_) const
 Tests whether a given Notifier object is the same as another.
 
virtual bool operator!= (const Notifier &rhs_) const
 Tests whether a given Notifier object is not the same as another.
 
virtual bool isEmpty () const
 Gets whether the target Notifier object is empty (constructed with the default ctor)
 
virtual NotifierType type () const
 Gets the type of the notifier.
 
virtual bool active () const
 Gets whether the notifier is active.
 
virtual void setActive (const bool active_)
 Sets whether the notifier is active.
 
virtual void activate () const
 Activates (enables) the notifier.
 
virtual void deactivate () const
 Deactivates (disables) the notifier.
 
virtual Callback *const callback () const
 Gets the registered callback for the notifier.
 
virtual void setCallback (const Callback &cb_)
 Sets the callback for the notifier.
 

Detailed Description

Acts as a receiver for specific notifications, passing them along to caller-supplied callbacks.

Constructor & Destructor Documentation

◆ Notifier() [1/3]

hdi::core::Notifier::Notifier ( )

Constructs an empty Notifier object.

Author
GW
Date
08/2013
Note
To test if a Notifier object is empty, call isEmpty() on it
Empty Notifier objects do not relate to any Illustrator notifier; they are designed to be "receivers" of some other Notifier object via the overloaded assignment operator. Empty Notifier objects are useless until such time (though it is safe to call any of their methods).

◆ Notifier() [2/3]

hdi::core::Notifier::Notifier ( const Notifier n_)

Constructs a new Notifier object from an existing Notifier object (copy constructor)

Author
GW
Date
08/2013
Parameters
n_Existing Notifier object

◆ Notifier() [3/3]

hdi::core::Notifier::Notifier ( const NotifierType  type_,
const Callback responder_ 
)

Constructs a Notifier object to fire a responder (target and action) when Illustrator sends a notification.

Author
GW
Date
08/2013
Parameters
type_Type of notifier
responder_Target and action to fire

◆ ~Notifier()

virtual hdi::core::Notifier::~Notifier ( )
virtual

Destructs a Notifier object, deactivating it first.

Author
GW
Date
08/2013

Member Function Documentation

◆ activate()

virtual void hdi::core::Notifier::activate ( ) const
virtual

Activates (enables) the notifier.

Author
GW
Date
08/2013

◆ active()

virtual bool hdi::core::Notifier::active ( ) const
virtual

Gets whether the notifier is active.

Author
GW
Date
08/2013
Returns
true if the notifier is enabled, false otherwise

◆ callback()

virtual Callback *const hdi::core::Notifier::callback ( ) const
virtual

Gets the registered callback for the notifier.

Author
GW
Date
08/2013
Returns
Currently registered notifier callback

◆ deactivate()

virtual void hdi::core::Notifier::deactivate ( ) const
virtual

Deactivates (disables) the notifier.

Author
GW
Date
08/2013

◆ isEmpty()

virtual bool hdi::core::Notifier::isEmpty ( ) const
virtual

Gets whether the target Notifier object is empty (constructed with the default ctor)

Author
GW
Date
08/2013
Returns
true if the target Notifier object is empty, false otherwise

◆ operator!=()

virtual bool hdi::core::Notifier::operator!= ( const Notifier rhs_) const
virtual

Tests whether a given Notifier object is not the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Notifier to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different notifiers, false otherwise

◆ operator=()

virtual Notifier & hdi::core::Notifier::operator= ( const Notifier rhs_)
virtual

Assigns one Notifier object to another.

Author
GW
Date
08/2013
Parameters
rhs_Existing Notifier object to copy values from
Returns
The target Notifier object, but with its values updated to match that of the rhs_ argument

◆ operator==()

virtual bool hdi::core::Notifier::operator== ( const Notifier rhs_) const
virtual

Tests whether a given Notifier object is the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Notifier to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same notifier, false otherwise

◆ setActive()

virtual void hdi::core::Notifier::setActive ( const bool  active_)
virtual

Sets whether the notifier is active.

Author
GW
Date
08/2013
Parameters
active_true to enable the notifier, false to disable
Note
This method simply calls activate() or deactivate() as appropriate

◆ setCallback()

virtual void hdi::core::Notifier::setCallback ( const Callback cb_)
virtual

Sets the callback for the notifier.

Author
GW
Date
08/2013
Parameters
cb_New callback to be performed when the notifier fires

◆ type()

virtual NotifierType hdi::core::Notifier::type ( ) const
virtual

Gets the type of the notifier.

Author
GW
Date
08/2013
Returns
Notifier type