OmaT_Ot_Progress_Proc
Abstract
Callback: Used to manage progress bars when OT files are being read.
Syntax
<progress_proc_name> (count_or_option)
| Argument | Type | Description |
|---|---|---|
count_or_option |
int |
Status of file read (see Details) |
Return Type
int
PRGC_TRUE if the file read should be aborted; PRGC_FALSE otherwise.
Header
oma_ot.h
Details
Progress procedures use the ETS "Progress Bar Sub-Package" on page 244 to manage the progress bars that are displayed when OT files are read (by either Oma_Ot_Reader_Table_Get() or Oma_Ot_Reader_Iterator_Table_Get()).
If a progress proc is registered using Oma_Ot_Progress_Proc_Set(), the proc will be called several times as the OT file read proceeds. The count_or_option argument indicates the status of the read, as follows:
- Initially,
count_or_optionis set to the number of tables that will be read. The progress proc should use this number to set up the progress bar. - Subsequently, as each table is read,
count_or_optionis set toOMAC_OT_PROGRESS_ADVANCE. This indicates that the progress proc should advance the progress bar by one file. If the user clicked the Cancel button in the progress bar, the proc should returnPRGC_TRUEto abort the read. - Finally, when the read is complete,
count_or_optionis set toOMAC_OT_PROGRESS_FINISH. This indicates that the progress proc should close the progress bar.
This callback function is registered by Oma_Ot_Progress_Proc_Set().