Notify


Description

Use this callback to manage the interaction between and custom display and Softimage. When there is a change to the selection, a value or the time, Softimage sends a notification that can be trapped by the corresponding notification object.

This callback takes the ViewContext object as input which you can use to get one of the View Notification objects:


Applies To

Custom Display Host


Syntax

void <custom_display_name>_Notify( CRef& in_context )
{ 
        ... 
}

<custom_display_name> is the name specified in the call to PluginRegistrar::RegisterCustomDisplay, with any spaces converted to underscores.


Parameters

Parameter Type Description
in_context CRef& A reference to a ViewContext object.

Examples

CStatus XSILoadPlugin( PluginRegistrar& in_reg  ) 
{
        // Set installation options 
        in_reg.PutVersion( 1, 0 );

        // ... (see PluginRegistrar for details)

        // Register your custom display (view)
        CStatus in_reg.RegisterCustomDisplay( L"MyCustomDisplayName" );
}

CStatus MyCustomDisplayName_Init( CRef& in_context )
{
// Get the Softimage parent window handle to use to create a child window
        ViewContext ctx( in_context );
        HWND hParent = ctx.GetParentWindowHandle();
// Create a new window as a child of the Softimage parent window
        HWND hChild = CreateDialog(  MyDllInstance, 
        MAKEINTRESOURCE(IDD_MYCUSTOMWINDOW), hParent, (DLGPROC)MyWindowProc );

        // ...
}

CStatus MyCustomDisplayName_Notify( CRef& in_context )
{
        // Get the notification data through the ViewContext object
        ViewContext ctx( in_context );
        siEventID in_eNotifcation;
        void* in_pData;
        ctx.GetNotificationData ( in_eNotifcation, &in_pData );

        // Notification handlers
        switch ( in_eNotifcation )
        {
                        case siOnSelectionChange: 
                        { 
                                // If selection changed... 
                        }
                        case siOnTimeChange: 
                        {
                                // If time changed... 
                        }
                        case siOnValueChange: 
                        { 
                                // If value changed... 
                        }
        }

        // ... 
}

See Also