GnuCash c935c2f+
Loading...
Searching...
No Matches
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
54typedef struct _GNCProgressDialog GNCProgressDialog;
55
56typedef gboolean (*GNCProgressCancelFunc) (gpointer user_data);
57
58
75GNCProgressDialog * gnc_progress_dialog_new(GtkWidget *parent,
76 gboolean use_ok_button);
77
97GNCProgressDialog * gnc_progress_dialog_custom(GtkLabel *primary,
98 GtkLabel *secondary,
99 GtkProgressBar *bar,
100 GtkLabel *suboperation,
101 GtkTextView *log);
102
109void gnc_progress_dialog_set_title(GNCProgressDialog *progress,
110 const char *title);
111
119void gnc_progress_dialog_set_primary(GNCProgressDialog *progress,
120 const gchar *str);
121
131void gnc_progress_dialog_set_heading(GNCProgressDialog *progress,
132 const char *heading);
133
141void gnc_progress_dialog_set_secondary(GNCProgressDialog *progress,
142 const gchar *str);
143
151void gnc_progress_dialog_set_sub(GNCProgressDialog *progress,
152 const gchar *str);
153
159void gnc_progress_dialog_reset_log(GNCProgressDialog *progress);
160
166void gnc_progress_dialog_append_log(GNCProgressDialog *progress,
167 const gchar *str);
168
174void gnc_progress_dialog_pause(GNCProgressDialog *progress);
175
181void gnc_progress_dialog_resume(GNCProgressDialog *progress);
182
192void gnc_progress_dialog_set_cancel_func(GNCProgressDialog *progress,
193 GNCProgressCancelFunc cancel_func,
194 gpointer user_data);
195
205void gnc_progress_dialog_set_cancel_scm_func(GNCProgressDialog *progress,
206 SCM cancel_scm_func);
207
214void gnc_progress_dialog_set_value(GNCProgressDialog *progress, gdouble value);
215
239guint gnc_progress_dialog_push(GNCProgressDialog *progress, gdouble weight);
240
248guint gnc_progress_dialog_pop(GNCProgressDialog *progress);
249
255guint gnc_progress_dialog_pop_full(GNCProgressDialog *progress);
256
260void gnc_progress_dialog_reset_value(GNCProgressDialog *progress);
261
267void gnc_progress_dialog_update(GNCProgressDialog *progress);
268
274void gnc_progress_dialog_finish(GNCProgressDialog *progress);
275
281void gnc_progress_dialog_destroy(GNCProgressDialog *progress);
282
283#endif
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.
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.
guint gnc_progress_dialog_pop_full(GNCProgressDialog *progress)
Fills the current progress bar, then calls gnc_progress_dialog_pop().
void gnc_progress_dialog_pause(GNCProgressDialog *progress)
Show that progress has been paused by appending "(paused)" to the suboperation text,...
void gnc_progress_dialog_set_sub(GNCProgressDialog *progress, const gchar *str)
Set the suboperation text of the progress dialog.
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_heading(GNCProgressDialog *progress, const char *heading)
Set the primary text of the progress dialog.
void gnc_progress_dialog_destroy(GNCProgressDialog *progress)
Destroy the dialog.
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.
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_value(GNCProgressDialog *progress, gdouble value)
Set the fraction of the progress bar to fill, where 0 is empty and 1 is full.
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_finish(GNCProgressDialog *progress)
Set the progress meter to fully complete, change the heading, if any, to "Complete",...
void gnc_progress_dialog_reset_log(GNCProgressDialog *progress)
Show the progress log and delete any existing text.
void gnc_progress_dialog_set_secondary(GNCProgressDialog *progress, const gchar *str)
Set the secondary text of the progress dialog.
guint gnc_progress_dialog_pop(GNCProgressDialog *progress)
Moves up one level in the stack of virtual bars.
void gnc_progress_dialog_set_primary(GNCProgressDialog *progress, const gchar *str)
Set the primary text of the progress dialog.
void gnc_progress_dialog_update(GNCProgressDialog *progress)
Update the GUI of the progress dialog, and call any pending cancel callbacks.
void gnc_progress_dialog_reset_value(GNCProgressDialog *progress)
Pop up to the top level and clear the progress bar.
void gnc_progress_dialog_append_log(GNCProgressDialog *progress, const gchar *str)
Append str to the progress log.
void gnc_progress_dialog_resume(GNCProgressDialog *progress)
Remove any indication that progress has paused by removing any existing "(paused)" suffix from the su...