![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
DumpDialog; GtkWidget* dumpDialog_new (VisuData *dataObj, GtkWindow *parent, const gchar *suggestedFilename); gchar* dumpDialogGet_fileName (DumpDialog *dialog); FileFormat* dumpDialogGet_fileFormat (DumpDialog *dialog); DumpType* dumpDialogGet_dumpType (DumpDialog *dialog); GtkButton* dumpDialogGet_cancelButton (DumpDialog *dialog); GtkProgressBar* dumpDialogGet_progressBar (DumpDialog *dialog); gint dumpDialogGet_widthValue (DumpDialog *dialog); gint dumpDialogGet_heightValue (DumpDialog *dialog); void dumpDialogStart (DumpDialog *dialog); void dumpDialogStop (DumpDialog *dialog);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----DumpDialog
This widget is based on the GtkFileChooser in the save mode. It proposes the user to choose a file to save to. In addition, it automatically build a list of filters, corresponding to the available export routines in V_Sim. By default, the filter is set on 'auto', which means that the filter method is selected with the file extension. The dialog also has a progress bar.
This widget is also a dialog, and should be used with
gtk_dialog_run()
. After the response GTK_RESPONSE_ACCEPT has been
recieved, one can grep the selected filename with
dumpDialogGet_fileName()
. The dialog does not call the exporting
routine by itself, the calling method should take care of
that. When doing it, the filechoosing part should be made
insensitive, using dumpDialogStart()
and the progress bar should be
updated accordingly (get it with
dumpDialogGet_progressBar()
).
The user interface propose also to change the size (see
dumpDialogGet_heightValue()
and dumpDialogGet_widthValue()
) and if
some options are associated to a file format, these options are
displayed.
typedef struct _DumpDialog DumpDialog;
Private structure to store informations of a DumpDialog object.
GtkWidget* dumpDialog_new (VisuData *dataObj, GtkWindow *parent, const gchar *suggestedFilename);
A DumpDialog widget is complete dialog window widget, but it is already
prepared for dumping, proposing known file formats. It is usefull to get
an filename to export to. It has also a progress bar that can illustrate
the process. The given dataObj
argument is used to initialize some
values related to the data to be dumped (such as the default size).
|
a VisuData object (can be NULL) ; |
|
the parent window ; |
|
a string or NULL. |
Returns : |
a newly created DumpDialog widget. |
gchar* dumpDialogGet_fileName (DumpDialog *dialog);
Retrieve the chosen filename.
|
a DumpDialog object. |
Returns : |
a read-only string. |
FileFormat* dumpDialogGet_fileFormat (DumpDialog *dialog);
Retrieve the chosen fileFormat.
|
a DumpDialog object. |
Returns : |
the selected format, only FileFormat. |
DumpType* dumpDialogGet_dumpType (DumpDialog *dialog);
Retrieve the chosen DumpType.
|
a DumpDialog object. |
Returns : |
the selected format (FileFormat and write method). |
GtkButton* dumpDialogGet_cancelButton (DumpDialog *dialog);
Retrieve interesting widget.
|
a DumpDialog object. |
Returns : |
a pointer to the cancel button. |
GtkProgressBar* dumpDialogGet_progressBar (DumpDialog *dialog);
Retrieve interesting widget.
|
a DumpDialog object. |
Returns : |
a pointer to the progress bar. |
gint dumpDialogGet_widthValue (DumpDialog *dialog);
Retrieve request image size.
|
a DumpDialog object. |
Returns : |
the width value. |
gint dumpDialogGet_heightValue (DumpDialog *dialog);
Retrieve request image size.
|
a DumpDialog object. |
Returns : |
the height value. |
void dumpDialogStart (DumpDialog *dialog);
Make the file chooser part insensitive during dump, only the progress bar and the abort button are kept sensitive.
|
a DumpDialog object. |
void dumpDialogStop (DumpDialog *dialog);
Return the filechooser to a sensitive state.
|
a DumpDialog object. |