![]() |
![]() |
![]() |
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. |
#define VALUE_IO_TYPE #define VALUE_IO (obj) #define VALUE_IO_CLASS (klass) #define IS_VALUE_IO (obj) #define IS_VALUE_IO_CLASS (klass) ValueIO; ValueIOClass; GType valueIO_get_type (void
); GtkWidget* valueIONew (GtkWindow *parent
,const gchar *tipsOpen
,const gchar *tipsSave
,const gchar *tipsSaveAs
); gboolean (*ValueIOCallback) (const gchar *filename
,GError **error
); void valueIOConnect_open (ValueIO *valueio
,ValueIOCallback open
); void valueIOConnect_save (ValueIO *valueio
,ValueIOCallback save
); void valueIOSet_openSensitive (ValueIO *valueio
,gboolean status
); void valueIOSet_saveSensitive (ValueIO *valueio
,gboolean status
); gboolean valueIOSet_filename (ValueIO *valueio
,const gchar *filename
); gchar* valueIOGet_saveFilename (GtkWindow *parent
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----ValueIO
#define VALUE_IO_TYPE (valueIO_get_type ())
Get the associated GType to the ValueIO objects.
Since 3.5
#define VALUE_IO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALUE_IO_TYPE, ValueIO))
Cast the given object to a ValueIO object.
|
the widget to cast. |
Since 3.5
#define VALUE_IO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALUE_IO_TYPE, ValueIOClass))
Cast the given class to a ValueIOClass object.
|
the class to cast. |
Since 3.5
#define IS_VALUE_IO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALUE_IO_TYPE))
Get if the given object is a valid ValueIO object.
|
the object to test. |
Since 3.5
#define IS_VALUE_IO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALUE_IO_TYPE))
Get if the given class is a valid ValueIOClass class.
|
the class to test. |
Since 3.5
typedef struct _ValueIO ValueIO;
Private structure to store informations of a ValueIO object.
Since 3.5
typedef struct _ValueIOClass ValueIOClass;
Private structure to store informations of a ValueIOClass object.
Since 3.5
GType valueIO_get_type (void
);
GType are unique numbers to identify objects.
Since 3.5
GtkWidget* valueIONew (GtkWindow *parent
,const gchar *tipsOpen
,const gchar *tipsSave
,const gchar *tipsSaveAs
);
A ValueIO 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 ValueIO widget. |
Since 3.5
gboolean (*ValueIOCallback) (const gchar *filename
,GError **error
);
Prototypes of functions to be called when an IO file is saved or
opened, see valueIOConnect_open()
and valueIOConnect_save()
.
|
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. |
void valueIOConnect_open (ValueIO *valueio
,ValueIOCallback open
);
Set the function to call when the open button is clicked.
|
a ValueIO widget. |
|
a method. |
Since 3.5
void valueIOConnect_save (ValueIO *valueio
,ValueIOCallback save
);
Set the function to call when the save or save-as button is clicked.
|
a ValueIO widget. |
|
a method. |
Since 3.5
void valueIOSet_openSensitive (ValueIO *valueio
,gboolean status
);
Modify the sensitivity of the open button, depending on status
.
|
a ValueIO widget. |
|
a boolean. |
Since 3.5
void valueIOSet_saveSensitive (ValueIO *valueio
,gboolean status
);
Modify the sensitivity of the save button, depending on status
.
|
a ValueIO widget. |
|
a boolean. |
Since 3.5
gboolean valueIOSet_filename (ValueIO *valueio
,const gchar *filename
);
Call the open routine previously set by valueIOConnect_open()
on
filename
and update the buttons accordingly.
|
a ValueIO widget. |
|
a location on disk. |
Returns : |
TRUE on success of the open routine. |
Since 3.5
gchar* valueIOGet_saveFilename (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 ValueIO
widget using valueIOConnect_save()
.
|
a parent to display the dialog on. |
Returns : |
a filename taht should be freed later with g_free() by the caller.
|
Since 3.5