![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
#define DUMP_DIALOG_TYPE #define DUMP_DIALOG (obj) #define DUMP_DIALOG_CLASS (klass) #define IS_DUMP_DIALOG (obj) #define IS_DUMP_DIALOG_CLASS (klass) #define DUMP_DIALOG_GET_CLASS (obj) DumpDialog; DumpDialogClass; GType dumpDialog_get_type (void
); GtkWidget* dumpDialog_new (VisuData *dataObj
,GtkWindow *parent
,const gchar *suggestedFilename
); gchar* dumpDialogGet_fileName (DumpDialog *dialog
); VisuDump* dumpDialogGet_dumpType (DumpDialog *dialog
); ToolFileFormat* dumpDialogGet_fileFormat (DumpDialog *dialog
); GtkProgressBar* dumpDialogGet_progressBar (DumpDialog *dialog
); GtkButton* dumpDialogGet_cancelButton (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.
#define DUMP_DIALOG_TYPE (dumpDialog_get_type ())
Return the associated GType to the DumpDialog objects.
#define DUMP_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMP_DIALOG_TYPE, DumpDialog))
Cast the given object to a DumpDialog object.
|
the widget to cast. |
#define DUMP_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DUMP_DIALOG_TYPE, DumpDialogClass))
Cast the given class to a DumpDialogClass object.
|
the class to cast. |
#define IS_DUMP_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DUMP_DIALOG_TYPE))
Return if the given object is a valid DumpDialog object.
|
the object to test. |
#define IS_DUMP_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DUMP_DIALOG_TYPE))
Return if the given class is a valid DumpDialogClass class.
|
the class to test. |
#define DUMP_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, DUMP_DIALOG_TYPE, DumpDialogClass))
Get the class of the given object.
|
the widget to get the class of. |
typedef struct _DumpDialog DumpDialog;
Private structure to store informations of a DumpDialog object.
typedef struct _DumpDialogClass DumpDialogClass;
Private structure to store informations of a DumpDialogClass object.
GType dumpDialog_get_type (void
);
GType are unique numbers to identify objects.
Returns : |
the GType associated with DumpDialog objects. |
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. |
VisuDump* dumpDialogGet_dumpType (DumpDialog *dialog
);
Retrieve the chosen VisuDump.
|
a DumpDialog object. |
Returns : |
the selected format (ToolFileFormat and write method). |
ToolFileFormat* dumpDialogGet_fileFormat (DumpDialog *dialog
);
Retrieve the chosen fileFormat.
|
a DumpDialog object. |
Returns : |
the selected format, only ToolFileFormat. |
GtkProgressBar* dumpDialogGet_progressBar (DumpDialog *dialog
);
Retrieve interesting widget.
|
a DumpDialog object. |
Returns : |
a pointer to the progress bar. |
GtkButton* dumpDialogGet_cancelButton (DumpDialog *dialog
);
Retrieve interesting widget.
|
a DumpDialog object. |
Returns : |
a pointer to the cancel button. |
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. |