gtk_elementComboBox

gtk_elementComboBox — Defines a specialised GtkComboBox to choose VisuElement.

Synopsis

#define             ELEMENT_COMBOX_TYPE
#define             ELEMENT_COMBOX                      (obj)
#define             ELEMENT_COMBOX_CLASS                (klass)
#define             IS_ELEMENT_COMBOX                   (obj)
#define             IS_ELEMENT_COMBOX_CLASS             (klass)
#define             ELEMENT_COMBOX_GET_CLASS            (obj)
                    ElementComboBox;
                    ElementComboBoxClass;
GType               elementComboBox_get_type            (void);
GtkWidget*          elementComboBox_new                 (gboolean hasAllSelector,
                                                         gboolean hasNoneSelector,
                                                         const gchar *format);
GList*              elementComboBoxGet_selectedElement  (ElementComboBox *wd);
gboolean            elementComboBoxSet_selection        (ElementComboBox *wd,
                                                         const gchar *name);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkComboBox
                                       +----ElementComboBox

Implemented Interfaces

ElementComboBox implements AtkImplementorIface, GtkBuildable, GtkCellLayout and GtkCellEditable.

Signals

  "element-selected"                               : Run First / Action

Description

This widget looks like a GtkComboBox and it displays a list of VisuElement currently used by the displayed data.

Details

ELEMENT_COMBOX_TYPE

#define ELEMENT_COMBOX_TYPE         (elementComboBox_get_type ())

Return the associated GType to the ElementComboBox objects.

Since 3.6


ELEMENT_COMBOX()

#define ELEMENT_COMBOX(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELEMENT_COMBOX_TYPE, ElementComboBox))

Cast the given object to a ElementComboBox object.

obj :

the widget to cast.

Since 3.6


ELEMENT_COMBOX_CLASS()

#define ELEMENT_COMBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELEMENT_COMBOX_TYPE, ElementComboBoxClass))

Cast the given class to a ElementComboBox object.

klass :

the class to cast.

Since 3.6


IS_ELEMENT_COMBOX()

#define IS_ELEMENT_COMBOX(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELEMENT_COMBOX_TYPE))

Return if the given object is a valid ElementComboBox object.

obj :

the object to test.

Since 3.6


IS_ELEMENT_COMBOX_CLASS()

#define IS_ELEMENT_COMBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELEMENT_COMBOX_TYPE))

Return if the given class is a valid ElementComboBoxClass class.

klass :

the class to test.

Since 3.6


ELEMENT_COMBOX_GET_CLASS()

#define ELEMENT_COMBOX_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS(obj, ELEMENT_COMBOX_TYPE, ElementComboBoxClass))

Get the class of the given object.

obj :

the widget to get the class of.

Since 3.6


ElementComboBox

typedef struct _ElementComboBox ElementComboBox;

An opaque structure defining a ElementComboBox widget.

Since 3.6


ElementComboBoxClass

typedef struct _ElementComboBoxClass ElementComboBoxClass;

An opaque structure defining the class of a ElementComboBox widget.

Since 3.6


elementComboBox_get_type ()

GType               elementComboBox_get_type            (void);

Internal routine, retrieves the type of ElementComboBox objects. Use ELEMENT_COMBOX_TYPE macro instead.

Since 3.6


elementComboBox_new ()

GtkWidget*          elementComboBox_new                 (gboolean hasAllSelector,
                                                         gboolean hasNoneSelector,
                                                         const gchar *format);

Creates a GtkComboBox with a list of available VisuElement. This list can contain in addition a "all" value if hasAllSelector is TRUE, or a "None" value if hasNoneSelector is TRUE. The format parameter is used to specify the text for each row of the GtkComboBox. If formt is NULL, just the name of the element is printed.

hasAllSelector :

a boolean.

hasNoneSelector :

a boolean.

format :

a string (can be NULL).

Returns :

a newly created widget.

Since 3.6


elementComboBoxGet_selectedElement ()

GList*              elementComboBoxGet_selectedElement  (ElementComboBox *wd);

Provide a list of selected elements.

wd :

a ElementComboBox widget.

Returns :

a newly created list of VisuElement. It should be freed later with g_list_free().. transfer container.

Since 3.6


elementComboBoxSet_selection ()

gboolean            elementComboBoxSet_selection        (ElementComboBox *wd,
                                                         const gchar *name);

Select a VisuElement by providing its name.

wd :

a ElementComboBox widget.

name :

a string.

Returns :

TRUE if the given element exists.

Since 3.6

Signal Details

The "element-selected" signal

void                user_function                      (ElementComboBox *combo,
                                                        gpointer         element,
                                                        gpointer         user_data)      : Run First / Action

This signal is emitted when a new element is selected.

combo :

the ElementComboBox that emits the signal ;

element :

the newly selected VisuElement.

user_data :

user data set when the signal handler was connected.

Since 3.6