3#ifndef PDFSDK_CXX_PROGRESS_MONITOR_H_INCLUDED_
4#define PDFSDK_CXX_PROGRESS_MONITOR_H_INCLUDED_
6#include <pdfsdk/cxx/callback.h>
24 void* userdata() {
return this; }
52 static PDErrCode PDFSDK_CALLCONV BeginOp(
void* clientData,
double progressMin,
double progressMax) {
60 static PDErrCode PDFSDK_CALLCONV EndOp(
void* clientData) {
62 ProgressMonitor* monitor =
static_cast<ProgressMonitor*
>(clientData);
63 monitor->EndOperation();
68 static PDErrCode PDFSDK_CALLCONV SetValue(
void* clientData,
double value) {
70 ProgressMonitor* monitor =
static_cast<ProgressMonitor*
>(clientData);
71 monitor->SetCurrentValue(value);
78 ProgressMonitor* monitor =
static_cast<ProgressMonitor*
>(clientData);
79 *pCanceled = monitor->IsCanceled();
86 &ProgressMonitor::BeginOp,
87 &ProgressMonitor::EndOp,
88 &ProgressMonitor::SetValue,
Progress monitor for tracking the progress of an operation.
Definition progress_monitor.h:14
virtual void BeginOperation(double start, double end)
Called when an operation begins.
Definition progress_monitor.h:32
virtual void EndOperation()
Called when an operation ends.
Definition progress_monitor.h:37
virtual bool IsCanceled() const
Check if the operation has been canceled.
Definition progress_monitor.h:49
virtual void SetCurrentValue(double value)
Called to set the current value of the progress.
Definition progress_monitor.h:43
@ kPDErrSuccess
Operation was successful.
Definition errors.h:18
int32_t PDErrCode
Definition errors.h:44
Definition progress_monitor.h:15