![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
gtk_valueIOWidgetgtk_valueIOWidget — Defines a specialised GtkHBox with three button to open, save and save as XML value files. |
VisuUiValueIo; gboolean (*VisuUiValueIoCallback) (const gchar *filename
,GError **error
); VisuUiValueIoClass; void visu_ui_value_io_connectOnOpen (VisuUiValueIo *valueio
,VisuUiValueIoCallback open
); void visu_ui_value_io_connectOnSave (VisuUiValueIo *valueio
,VisuUiValueIoCallback save
); gchar * visu_ui_value_io_getFilename (GtkWindow *parent
); GtkWidget * visu_ui_value_io_new (GtkWindow *parent
,const gchar *tipsOpen
,const gchar *tipsSave
,const gchar *tipsSaveAs
); gboolean visu_ui_value_io_setFilename (VisuUiValueIo *valueio
,const gchar *filename
); void visu_ui_value_io_setSensitiveOpen (VisuUiValueIo *valueio
,gboolean status
); void visu_ui_value_io_setSensitiveSave (VisuUiValueIo *valueio
,gboolean status
);
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----VisuUiValueIo
VisuUiValueIo implements AtkImplementorIface, GtkBuildable and GtkOrientable.
typedef struct _VisuUiValueIo VisuUiValueIo;
Private structure to store informations of a VisuUiValueIo object.
Since 3.5
gboolean (*VisuUiValueIoCallback) (const gchar *filename
,GError **error
);
Prototypes of functions to be called when an IO file is saved or
opened, see visu_ui_value_io_connectOnOpen()
and visu_ui_value_io_connectOnSave()
.
|
the name of the file to be saved or opened ; |
|
a location to store a possible error. |
Returns : |
should return TRUE if the action of the callback succeed. |
typedef struct _VisuUiValueIoClass VisuUiValueIoClass;
Private structure to store informations of a VisuUiValueIoClass object.
Since 3.5
void visu_ui_value_io_connectOnOpen (VisuUiValueIo *valueio
,VisuUiValueIoCallback open
);
Set the function to call when the open button is clicked.
|
a VisuUiValueIo widget. |
|
a method. |
Since 3.5
void visu_ui_value_io_connectOnSave (VisuUiValueIo *valueio
,VisuUiValueIoCallback save
);
Set the function to call when the save or save-as button is clicked.
|
a VisuUiValueIo widget. |
|
a method. |
Since 3.5
gchar * visu_ui_value_io_getFilename (GtkWindow *parent
);
Open a save dialog window with XML filter to choose the name of a
file. This is the default action that can be connect to a VisuUiValueIo
widget using visu_ui_value_io_connectOnSave()
.
|
a parent to display the dialog on. |
Returns : |
a filename that should be freed later with g_free() by the caller. |
Since 3.5
GtkWidget * visu_ui_value_io_new (GtkWindow *parent
,const gchar *tipsOpen
,const gchar *tipsSave
,const gchar *tipsSaveAs
);
A VisuUiValueIo widget is like a GtkComboBox widget, but it is already filled with predefined line patterns (call stipple). Using this widget is a convienient way to share stipples between all part of V_Sim and to give a consistent look of all stipple selection.
|
the parent used to show the file dialog. |
|
a tooltip to show on open button. |
|
a tooltip to show on save button. |
|
a tooltip to show on save-as button. |
Returns : |
a newly created VisuUiValueIo widget. [transfer full] |
Since 3.5
gboolean visu_ui_value_io_setFilename (VisuUiValueIo *valueio
,const gchar *filename
);
Call the open routine previously set by visu_ui_value_io_connectOnOpen()
on
filename
and update the buttons accordingly.
|
a VisuUiValueIo widget. |
|
a location on disk. |
Returns : |
TRUE on success of the open routine. |
Since 3.5
void visu_ui_value_io_setSensitiveOpen (VisuUiValueIo *valueio
,gboolean status
);
Modify the sensitivity of the open button, depending on status
.
|
a VisuUiValueIo widget. |
|
a boolean. |
Since 3.5
void visu_ui_value_io_setSensitiveSave (VisuUiValueIo *valueio
,gboolean status
);
Modify the sensitivity of the save button, depending on status
.
|
a VisuUiValueIo widget. |
|
a boolean. |
Since 3.5