PsProgressControl class.
More...
#include <pdfix.h>
|
virtual bool | SetCancelProc (PdfCancelProc cancel_proc, void *cancel_data)=0 |
| Set the process cancel callback. More...
|
|
virtual bool | SetData (void *client_data)=0 |
| Set the process control client data. More...
|
|
virtual void * | GetData ()=0 |
| Get the process control client data. More...
|
|
virtual int | StartProcess (int steps)=0 |
| Start a new progress control by splitting the current progress to a number of sub-steps. More...
|
|
virtual bool | EndProcess (int process_id)=0 |
| End process by id. More...
|
|
virtual bool | Step (int process_id)=0 |
|
virtual bool | SetText (const wchar_t *text)=0 |
|
virtual int | GetText (wchar_t *buffer, int len) const =0 |
| Gets the text set for the progress control. More...
|
|
virtual float | GetState () const =0 |
| Get the current progress status. More...
|
|
virtual bool | Cancel () const =0 |
| Call and get the result of cancel proc if set. More...
|
|
PsProgressControl class.
A PsProgressControl class represents an object to control process running inside of the sdk or even in the program using the SDK. The class allows full control over the process. Cancelling, progress, adding sub-processes etc. //
◆ Cancel()
virtual bool PsProgressControl::Cancel |
( |
| ) |
const |
|
pure virtual |
Call and get the result of cancel proc if set.
- Returns
- the return value of cancel proc
◆ EndProcess()
virtual bool PsProgressControl::EndProcess |
( |
int |
process_id | ) |
|
|
pure virtual |
End process by id.
- Parameters
-
count | a number of steps of the new progress control |
- Returns
- true if the progress control was added successfully, false othewise
◆ GetData()
virtual void * PsProgressControl::GetData |
( |
| ) |
|
|
pure virtual |
Get the process control client data.
- Parameters
-
client_data | Pointer to client data. |
- Returns
- true if data was set successfully, false otherwise
◆ GetState()
virtual float PsProgressControl::GetState |
( |
| ) |
const |
|
pure virtual |
Get the current progress status.
- Returns
- the number between 0 and 1 representing the current progress state
◆ GetText()
virtual int PsProgressControl::GetText |
( |
wchar_t * |
buffer, |
|
|
int |
len |
|
) |
| const |
|
pure virtual |
Gets the text set for the progress control.
- Parameters
-
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
- Returns
- Number of characters written into buffer of required length.
- See also
- PsProgressControl::SetText
◆ SetCancelProc()
virtual bool PsProgressControl::SetCancelProc |
( |
PdfCancelProc |
cancel_proc, |
|
|
void * |
cancel_data |
|
) |
| |
|
pure virtual |
Set the process cancel callback.
- Parameters
-
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
- Returns
- true if data was set successfully, false otherwise
◆ SetData()
virtual bool PsProgressControl::SetData |
( |
void * |
client_data | ) |
|
|
pure virtual |
Set the process control client data.
- Parameters
-
client_data | Pointer to client data. |
- Returns
- true if data was set successfully, false otherwise
◆ SetText()
virtual bool PsProgressControl::SetText |
( |
const wchar_t * |
text | ) |
|
|
pure virtual |
Update the progress control text cancel data
- Parameters
-
text | The text to be referenced for this progress control |
- Returns
- true if the text was set successfully, false othewise
- See also
- PsProgressControl::GetText
◆ StartProcess()
virtual int PsProgressControl::StartProcess |
( |
int |
steps | ) |
|
|
pure virtual |
Start a new progress control by splitting the current progress to a number of sub-steps.
- Parameters
-
count | a number of steps of the new progress control |
- Returns
- the process id of the new process
◆ Step()
virtual bool PsProgressControl::Step |
( |
int |
process_id | ) |
|
|
pure virtual |
Make one step on the progress control. The new progress control shares the cancel proc and cancel data
- Parameters
-
overall | The overall state including all parent progress controls if true. The state of this individual control if false |
- Returns
- true if the step was made successfully, false othewise