Top | ![]() |
![]() |
![]() |
![]() |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkWindow ╰── GtkDialog ╰── VisuUiDumpDialog
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
visu_ui_dump_dialog_getFilename()
. 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 visu_ui_dump_dialog_start()
and the progress bar should be
updated accordingly (get it with
visu_ui_dump_dialog_getProgressBar()
).
The user interface propose also to change the size (see
visu_ui_dump_dialog_getHeight()
and visu_ui_dump_dialog_getWidth()
) and if
some options are associated to a file format, these options are
displayed.
GtkWidget * visu_ui_dump_dialog_new (VisuData *dataObj
,GtkWindow *parent
,const gchar *suggestedFilename
,gint suggestedWidth
,gint suggestedHeight
);
A VisuUiDumpDialog 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.
dataObj |
a VisuData object (can be NULL) ;. |
[allow-none] |
parent |
the parent window ;. |
[allow-none] |
suggestedFilename |
a string or NULL. |
[allow-none] |
suggestedWidth |
a positive suggested width for exportation or a negative value to get the default. |
|
suggestedHeight |
idem for height. |
gchar *
visu_ui_dump_dialog_getFilename (VisuUiDumpDialog *dialog
);
Retrieve the chosen filename.
VisuDump *
visu_ui_dump_dialog_getType (VisuUiDumpDialog *dialog
);
Retrieve the chosen VisuDump.
GtkProgressBar *
visu_ui_dump_dialog_getProgressBar (VisuUiDumpDialog *dialog
);
Retrieve interesting widget.
GtkButton *
visu_ui_dump_dialog_getCancelButton (VisuUiDumpDialog *dialog
);
Retrieve interesting widget.
gint
visu_ui_dump_dialog_getWidth (VisuUiDumpDialog *dialog
);
Retrieve request image size.
gint
visu_ui_dump_dialog_getHeight (VisuUiDumpDialog *dialog
);
Retrieve request image size.
void
visu_ui_dump_dialog_start (VisuUiDumpDialog *dialog
);
Make the file chooser part insensitive during dump, only the progress bar and the abort button are kept sensitive.
void
visu_ui_dump_dialog_stop (VisuUiDumpDialog *dialog
);
Return the filechooser to a sensitive state.
typedef struct _VisuUiDumpDialog VisuUiDumpDialog;
Private structure to store informations of a VisuUiDumpDialog object.
typedef struct _VisuUiDumpDialogClass VisuUiDumpDialogClass;
Private structure to store informations of a VisuUiDumpDialogClass object.