GnuCash  5.6-150-g038405b370+
dialog-progress.h
Go to the documentation of this file.
1 /********************************************************************\
2  * dialog-progress.h -- public GnuCash progress dialog functions *
3  * Copyright (C) 2000 Dave Peticolas *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA gnu@gnu.org *
21  * *
22 \********************************************************************/
23 
48 #ifndef DIALOG_PROGRESS_H
49 #define DIALOG_PROGRESS_H
50 
51 #include <glib.h>
52 
53 
54 typedef struct _GNCProgressDialog GNCProgressDialog;
55 
56 typedef gboolean (*GNCProgressCancelFunc) (gpointer user_data);
57 
58 
75 GNCProgressDialog * gnc_progress_dialog_new(GtkWidget *parent,
76  gboolean use_ok_button);
77 
97 GNCProgressDialog * gnc_progress_dialog_custom(GtkLabel *primary,
98  GtkLabel *secondary,
99  GtkProgressBar *bar,
100  GtkLabel *suboperation,
101  GtkTextView *log);
102 
109 void gnc_progress_dialog_set_title(GNCProgressDialog *progress,
110  const char *title);
111 
119 void gnc_progress_dialog_set_primary(GNCProgressDialog *progress,
120  const gchar *str);
121 
131 void gnc_progress_dialog_set_heading(GNCProgressDialog *progress,
132  const char *heading);
133 
141 void gnc_progress_dialog_set_secondary(GNCProgressDialog *progress,
142  const gchar *str);
143 
151 void gnc_progress_dialog_set_sub(GNCProgressDialog *progress,
152  const gchar *str);
153 
159 void gnc_progress_dialog_reset_log(GNCProgressDialog *progress);
160 
166 void gnc_progress_dialog_append_log(GNCProgressDialog *progress,
167  const gchar *str);
168 
174 void gnc_progress_dialog_pause(GNCProgressDialog *progress);
175 
181 void gnc_progress_dialog_resume(GNCProgressDialog *progress);
182 
192 void gnc_progress_dialog_set_cancel_func(GNCProgressDialog *progress,
193  GNCProgressCancelFunc cancel_func,
194  gpointer user_data);
195 
205 void gnc_progress_dialog_set_cancel_scm_func(GNCProgressDialog *progress,
206  SCM cancel_scm_func);
207 
214 void gnc_progress_dialog_set_value(GNCProgressDialog *progress, gdouble value);
215 
239 guint gnc_progress_dialog_push(GNCProgressDialog *progress, gdouble weight);
240 
248 guint gnc_progress_dialog_pop(GNCProgressDialog *progress);
249 
255 guint gnc_progress_dialog_pop_full(GNCProgressDialog *progress);
256 
260 void gnc_progress_dialog_reset_value(GNCProgressDialog *progress);
261 
267 void gnc_progress_dialog_update(GNCProgressDialog *progress);
268 
274 void gnc_progress_dialog_finish(GNCProgressDialog *progress);
275 
281 void gnc_progress_dialog_destroy(GNCProgressDialog *progress);
282 
283 #endif
284 
void gnc_progress_dialog_set_heading(GNCProgressDialog *progress, const char *heading)
Set the primary text of the progress dialog.
void gnc_progress_dialog_set_secondary(GNCProgressDialog *progress, const gchar *str)
Set the secondary text of the progress dialog.
void gnc_progress_dialog_append_log(GNCProgressDialog *progress, const gchar *str)
Append str to the progress log.
void gnc_progress_dialog_destroy(GNCProgressDialog *progress)
Destroy the dialog.
void gnc_progress_dialog_set_value(GNCProgressDialog *progress, gdouble value)
Set the fraction of the progress bar to fill, where 0 is empty and 1 is full.
void gnc_progress_dialog_reset_value(GNCProgressDialog *progress)
Pop up to the top level and clear the progress bar.
void gnc_progress_dialog_set_cancel_func(GNCProgressDialog *progress, GNCProgressCancelFunc cancel_func, gpointer user_data)
Show a Cancel button and set the C function which will be called when it is pressed by the user...
GNCProgressDialog * gnc_progress_dialog_custom(GtkLabel *primary, GtkLabel *secondary, GtkProgressBar *bar, GtkLabel *suboperation, GtkTextView *log)
Creates a dialog for displaying the progress of an activity using existing widgets.
GNCProgressDialog * gnc_progress_dialog_new(GtkWidget *parent, gboolean use_ok_button)
Displays a pop-up dialog for showing the progress of a long-running activity.
void gnc_progress_dialog_set_sub(GNCProgressDialog *progress, const gchar *str)
Set the suboperation text of the progress dialog.
void gnc_progress_dialog_finish(GNCProgressDialog *progress)
Set the progress meter to fully complete, change the heading, if any, to "Complete", enable the &#39;OK&#39; button, and make the dialog non-modal.
void gnc_progress_dialog_pause(GNCProgressDialog *progress)
Show that progress has been paused by appending "(paused)" to the suboperation text, the window title, or the primary text.
void gnc_progress_dialog_reset_log(GNCProgressDialog *progress)
Show the progress log and delete any existing text.
void gnc_progress_dialog_set_primary(GNCProgressDialog *progress, const gchar *str)
Set the primary text of the progress dialog.
void gnc_progress_dialog_resume(GNCProgressDialog *progress)
Remove any indication that progress has paused by removing any existing "(paused)" suffix from the su...
guint gnc_progress_dialog_pop_full(GNCProgressDialog *progress)
Fills the current progress bar, then calls gnc_progress_dialog_pop().
guint gnc_progress_dialog_pop(GNCProgressDialog *progress)
Moves up one level in the stack of virtual bars.
void gnc_progress_dialog_update(GNCProgressDialog *progress)
Update the GUI of the progress dialog, and call any pending cancel callbacks.
guint gnc_progress_dialog_push(GNCProgressDialog *progress, gdouble weight)
Create a new "virtual" progress bar that, as it becomes full, will fill the current bar by the fracti...
void gnc_progress_dialog_set_title(GNCProgressDialog *progress, const char *title)
Set the title of a pop-up progress dialog.
void gnc_progress_dialog_set_cancel_scm_func(GNCProgressDialog *progress, SCM cancel_scm_func)
Show a Cancel button and set the Guile procedure that will be called when it is pressed by the user...