Listing Screen and Control Information 

Use

There are two functions for obtaining information on the screen that is associated with the current event:

Function

Description

ItEv_DumpEvent

Lists information on all the items in the event. This includes information on the screen, its menu, toolbar buttons, and the controls on the screen

This function displays the information on the standar output device (most likely the screen).

It_ListControls

Lists information only on the controls that are on the screen associated with the event.

Allows you to specify a print function in which you can control the format of the display of the information.

Using It_ListControls

  1. Write a C function to print the control information in the format you specify.
  2. Call It_SetDumpHook to point to your print function.
  3. Call the It_ListControls function to perform the printing.

Result

The It_ListControls function print the following five attributes of each of the controls:

Example

The following is a sample print function to be used later by the It_ListControls function:

int putt(char *ptr)

{

return printf("%s", ptr);

}

The following example prints the information on the controls:

int putt(char*);

/* provide the print function to be used when It_ListControls is called */

if (It_SetDumpHook(hndl, putt) == FALSE)

{

printf(" SetDumpHook Error while SetDumpHook!-- It_SetDumpHook\n");

// Handle error case;

}

/* print out the list of controls. This calls putt to print the controls */

if (It_ListControls(hndl) == FALSE)

{

printf(" List control error. Program aborted!\n");

// Handle error case;

}