Public Types | Public Member Functions
PPGEventContext Class Reference

Detailed Description

This object is provided as the context object in the PPGEvent callback for a Plugin-based CustomProperty object (see PluginRegistrar::RegisterProperty).

Using the information provided by this object, it is possible to implement PPG logic code using the C++ API. For information about implementing logic with scripting see PPGLayout::PutLogic and PPG.

The PPGEventContext::GetEventID function returns information about the specific event that occurred. If the event is PPGEventContext::siOnInit or PPGEventContext::siOnClosed then Context::GetSource returns the CustomProperty object that is being inspected. If the event is PPGEventContext::siParameterChange then Context::GetSource returns the Parameter that changed. If the event is PPGEventContext::siButtonClicked then call Context::GetAttribute to get the attribute "Button", which will return a CString with the script name of the Button that was clicked. If the event is PPGEventContext::siTabChange then call Context::GetAttribute to get the attribute "Tab", which will return a CString with the label of the Tab that was clicked.

To force the user interface to be redrawn, call Context::PutAttribute to set the attribute "Refresh" to true. This is useful if the context code changes the underlying PPGLayout during its execution. Similarly, it is possible to close the Property Page by setting the attribute "Close". For the equivalent functionality in scripting see PPG.Refresh and PPG.Close.

The OnChange callback for parameters is only invoked when a user is currently inspecting the property page. However, it may be either the user who changed the value on the inspected page or a change initiated through scripting (excluding a change originating from a callback function, of course). For example, if Parameter X is changed, and the callback code sets Parameter Y to the same value as X, then the PPGEvent is not invoked a second time.

To get the objects inspected by a property page, use the Context::GetSource function.
See also:
PPG.Inspected (object model equivalent of using PPGEventContext::GetSource)

#include <xsi_ppgeventcontext.h>

Inheritance diagram for PPGEventContext:
Inheritance graph

List of all members.

Public Types

enum   PPGEvent {
  siUndefined = 0,
  siOnInit = 1,
  siOnClosed = 2,
  siParameterChange = 3,
  siButtonClicked = 4,
  siTabChange = 5

Public Member Functions

  PPGEventContext ()
  ~PPGEventContext ()
  PPGEventContext (const CRef &in_ref)
  PPGEventContext (const PPGEventContext &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
PPGEventContext operator= (const PPGEventContext &in_obj)
PPGEventContext operator= (const CRef &in_ref)
PPGEvent  GetEventID () const
CRefArray  GetInspectedObjects () const

Member Enumeration Documentation

enum PPGEvent

Defines the possible actions that result in the callback function being called.


Unknown event


PPG has just been drawn


PPG has just been closed


Value of a Parameter has changed


The user clicked a button


User changed tabs on a multi-tab PPG

Constructor & Destructor Documentation

Default constructor.

Default destructor.

PPGEventContext ( const CRef in_ref )


in_ref constant reference object.
PPGEventContext ( const PPGEventContext in_obj )

Copy constructor.

in_obj constant class object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID ) const [virtual]

Returns true if a given class type is compatible with this API class.

in_ClassID class type.
true if the class is compatible, false otherwise.

Reimplemented from Context.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

The class type.

Reimplemented from Context.

PPGEventContext& operator= ( const PPGEventContext in_obj )

Creates an object from another object.

in_obj constant class object.
The new PPGEventContext object.
PPGEventContext& operator= ( const CRef in_ref )

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

in_ref constant class object.
The new PPGEventContext object.

Reimplemented from Context.

PPGEvent GetEventID ( ) const

Returns information about what specific occurence in the user interface provoked the callback. For additional information use Context::GetSource and Context::GetAttribute.

Identifier of the most latest fired PPG event.
CRefArray GetInspectedObjects ( ) const

Returns an array containing the CustomProperty objects being inspected by a Property Page. The only case where the array will contain more than one object is if the Property Page is in Multi-edit mode. This should not be confused with the case where a single Property Page frame is inspecting multiple objects at the same time, one above the other.

Array of referendces to CustomProperty objects.
8.0 (2010)

The documentation for this class was generated from the following file: