gtk_dumpDialogWidget

gtk_dumpDialogWidget — Defines a widget to export into different file formats.

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkWindow
                        ╰── GtkDialog
                            ╰── VisuUiDumpDialog

Implemented Interfaces

VisuUiDumpDialog implements AtkImplementorIface and GtkBuildable.

Description

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.

Functions

visu_ui_dump_dialog_new ()

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.

Parameters

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.

 

Returns

a newly created VisuUiDumpDialog widget.


visu_ui_dump_dialog_getFilename ()

gchar *
visu_ui_dump_dialog_getFilename (VisuUiDumpDialog *dialog);

Retrieve the chosen filename.

Parameters

dialog

a VisuUiDumpDialog object.

 

Returns

a read-only string.


visu_ui_dump_dialog_getType ()

VisuDump *
visu_ui_dump_dialog_getType (VisuUiDumpDialog *dialog);

Retrieve the chosen VisuDump.

Parameters

dialog

a VisuUiDumpDialog object.

 

Returns

the selected format (ToolFileFormat and write method).

[transfer none]


visu_ui_dump_dialog_getProgressBar ()

GtkProgressBar *
visu_ui_dump_dialog_getProgressBar (VisuUiDumpDialog *dialog);

Retrieve interesting widget.

Parameters

dialog

a VisuUiDumpDialog object.

 

Returns

a pointer to the progress bar.

[transfer none]


visu_ui_dump_dialog_getCancelButton ()

GtkButton *
visu_ui_dump_dialog_getCancelButton (VisuUiDumpDialog *dialog);

Retrieve interesting widget.

Parameters

dialog

a VisuUiDumpDialog object.

 

Returns

a pointer to the cancel button.

[transfer none]


visu_ui_dump_dialog_getWidth ()

gint
visu_ui_dump_dialog_getWidth (VisuUiDumpDialog *dialog);

Retrieve request image size.

Parameters

dialog

a VisuUiDumpDialog object.

 

Returns

the width value.


visu_ui_dump_dialog_getHeight ()

gint
visu_ui_dump_dialog_getHeight (VisuUiDumpDialog *dialog);

Retrieve request image size.

Parameters

dialog

a VisuUiDumpDialog object.

 

Returns

the height value.


visu_ui_dump_dialog_start ()

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.

Parameters

dialog

a VisuUiDumpDialog object.

 

visu_ui_dump_dialog_stop ()

void
visu_ui_dump_dialog_stop (VisuUiDumpDialog *dialog);

Return the filechooser to a sensitive state.

Parameters

dialog

a VisuUiDumpDialog object.

 

Types and Values

VisuUiDumpDialog

typedef struct _VisuUiDumpDialog VisuUiDumpDialog;

Private structure to store informations of a VisuUiDumpDialog object.


VisuUiDumpDialogClass

typedef struct _VisuUiDumpDialogClass VisuUiDumpDialogClass;

Private structure to store informations of a VisuUiDumpDialogClass object.