ResPluginDisableF_t

A function you must write to disable the plugin

Synopsis:

typedef void ResPluginDisableF_t ( ResPluginHandle_t handle )

Description:

This function is exported in the ResPluginFullEditor_t structure

This function is called by PhAB to indicate that the resource editor should change it's appearance so that it looks disabled, or greyed out. The editor should keep a Cancel button active even when the content and other buttons are disabled, so that a user can dismiss the window. The content should be changed back to the active state when PhAB sends new data to the editor via a call to the set data function. If the PhAB exported create_window() function was used to create the editor's window, then the PhAB exported set_state() function should be used the the argument RESPLUGIN_STATE_DISABLED.

Arguments:

handle
The ResPluginHandle_t handle returned when the instance of the editor is created with a create ResPluginFullCreateF_t.

Examples:

This sample disable function for a full editor is from the complete plugin example at the end of this chapter.

static void plugin_full_disable( ResPluginHandle_t handle )
{
  PluginFullInstance_t *instance = ( PluginFullInstance_t * ) handle;
  PtArg_t args[3];
  instance->disabled = 1;
  PtSetArg( &args[0], Pt_ARG_FLAGS, Pt_GHOST|Pt_BLOCKED, Pt_GHOST|Pt_BLOCKED );
  PtSetArg( &args[1], Pt_ARG_CURSOR_TYPE, Ph_CURSOR_NOINPUT, 0 );
  PtSetArg( &args[2], Pt_ARG_CURSOR_OVERRIDE, 1, 0 );
  PtSetResources( instance->full, 3, args );
  PtSetResource( instance->full_widget, Pt_ARG_FLAGS, Pt_GHOST|Pt_BLOCKED,
                 Pt_GHOST|Pt_BLOCKED );
  instance->exp->set_state( instance->convenience_handle,
                                  RESPLUGIN_STATE_DISABLED );
}

Classification:

QNX Neutrino

See also:

ResPluginFullCreateF_t, ResPluginFullEditor_t.