gtk_elementComboBox

gtk_elementComboBox — Defines a specialised GtkComboBox to choose VisuElement.

Functions

Properties

VisuElement * element Read / Write
VisuNodeArray * nodes Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkComboBox
                        ╰── VisuUiElementCombobox

Implemented Interfaces

VisuUiElementCombobox implements AtkImplementorIface, GtkBuildable, GtkCellLayout and GtkCellEditable.

Description

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

Functions

visu_ui_element_combobox_new ()

GtkWidget *
visu_ui_element_combobox_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.

Parameters

hasAllSelector

a boolean.

 

hasNoneSelector

a boolean.

 

format

a string (can be NULL).

[allow-none]

Returns

a newly created widget.

[transfer full]

Since: 3.6


visu_ui_element_combobox_setModel ()

gboolean
visu_ui_element_combobox_setModel (VisuUiElementCombobox *combo,
                                   VisuNodeArray *nodes);

Binds nodes to combo , so the list is always displaying the VisuElement used by nodes .

Parameters

combo

a VisuUiElementCombobox object.

 

nodes

a VisuNodeArray object.

 

Returns

TRUE if model is actually changed.

Since: 3.8


visu_ui_element_combobox_getSelection ()

GList *
visu_ui_element_combobox_getSelection (VisuUiElementCombobox *wd);

Provide a list of selected elements.

Parameters

wd

a VisuUiElementCombobox widget.

 

Returns

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

[transfer container][element-type VisuElement*]

Since: 3.6


visu_ui_element_combobox_setSelection ()

gboolean
visu_ui_element_combobox_setSelection (VisuUiElementCombobox *wd,
                                       const gchar *name);

Select a VisuElement by providing its name.

Parameters

wd

a VisuUiElementCombobox widget.

 

name

a string.

 

Returns

TRUE if the given element exists.

Since: 3.6


visu_ui_element_combobox_setElement ()

gboolean
visu_ui_element_combobox_setElement (VisuUiElementCombobox *wd,
                                     const VisuElement *element);

Select a VisuElement.

Parameters

wd

a VisuUiElementCombobox widget.

 

element

a VisuElement object.

 

Returns

TRUE if the given element exists.

Since: 3.8


visu_ui_element_combobox_setUnphysicalStatus ()

void
visu_ui_element_combobox_setUnphysicalStatus
                               (VisuUiElementCombobox *wd,
                                gboolean status);

If status is TRUE, the combobox will also show elements that are tagged unphysical, see visu_element_getPhysical().

Parameters

wd

a VisuUiElementCombobox object ;

 

status

a boolean

 

Since: 3.7

Types and Values

VisuUiElementCombobox

typedef struct _VisuUiElementCombobox VisuUiElementCombobox;

An opaque structure defining a VisuUiElementCombobox widget.

Since: 3.6


VisuUiElementComboboxClass

typedef struct _VisuUiElementComboboxClass VisuUiElementComboboxClass;

An opaque structure defining the class of a VisuUiElementCombobox widget.

Since: 3.6

Property Details

The “element” property

  “element”                  VisuElement *

currently selected element.

Flags: Read / Write


The “nodes” property

  “nodes”                    VisuNodeArray *

storing nodes used as filter model.

Flags: Read / Write

Signal Details

The “element-selected” signal

void
user_function (VisuUiElementCombobox *combo,
               gpointer               element,
               gpointer               user_data)

This signal is emitted when a new element is selected.

Parameters

combo

the VisuUiElementCombobox that emits the signal ;

 

element

the newly selected VisuElement.

 

user_data

user data set when the signal handler was connected.

 

Flags: Action

Since: 3.6