#include <tcl.h>
#include <tk.h>
#include "tclsadie.h"
Go to the source code of this file.
Enumerations | |
enum | create_template_index { ADD_GUICMD, ADD_TITLE, max_add_index } |
Define command template slots for the meter creation command. | |
enum | update_template_index { UPD_GUICMD, UPD_GNUM, UPD_VALUE, max_upd_index } |
Define command template slots for the progress meter update command. | |
enum | destroy_template_index { DEL_GUICMD, DEL_GNUM, max_del_index } |
Define command template slots for the meter destruction command. | |
Functions | |
int | ProgMeter_Create (const char *title, void *data) |
Create a pop-up progress meter widget. | |
int | ProgMeter_Update (int gaugenum, double value, void *data) |
Modify the progress displayed by an existing progress meter. | |
int | ProgMeter_Destroy (int gaugenum, void *data) |
Destroy a pop-up progress meter widget. |
If compiled with support for callback functions, the SADIE library can display the progress of certain operations with a progress meter implemented by the application using it; here is tclSadie's implementation. The Tcl_EvalObjv
Tcl library function does most of the work of passing the necessary commands to the interpreter for each operation. We pass it temporary arrays of Tcl objects that are treated as command templates: sequences of slots with pre-defined roles that we fill with pointers to the objects.
Definition in file ProgMeter.c.
|
Create a pop-up progress meter widget. There should already be a Tcl/Tk command that will create the widget within the current GUI in its initial state (no progress yet). Here we invoke it, passing it a title string for the widget.
Definition at line 89 of file ProgMeter.c. Referenced by tclsadie_app_init(). |
|
Destroy a pop-up progress meter widget. There should already be a Tcl/Tk command that will destroy the widget within the current GUI, given its ID number, so we invoke it, returning any error status.
Definition at line 192 of file ProgMeter.c. Referenced by tclsadie_app_init(). |
|
Modify the progress displayed by an existing progress meter. The progress meter should already exist, and there should be a Tcl command that will update it, given an ID number and an indication of the current percentage progress. This invokes the command, and returns a value showing if the user clicked on a cancel button within the widget since the previous update.
Definition at line 138 of file ProgMeter.c. Referenced by tclsadie_app_init(). |