gtk_stippleComboBoxWidget

gtk_stippleComboBoxWidget — Defines a specialised GtkComboBox to choose patterns for lines.

Synopsis

                    VisuUiStippleCombobox;
                    VisuUiStippleComboboxClass;
void                visu_ui_stipple_combobox_add        (VisuUiStippleCombobox *stippleComboBox,
                                                         guint16 stipple);
GdkPixbuf *         visu_ui_stipple_combobox_class_buildStamp
                                                        (guint16 stipple);
guint16             visu_ui_stipple_combobox_getSelection
                                                        (VisuUiStippleCombobox *stippleComboBox);
GdkPixbuf *         visu_ui_stipple_combobox_getStamp   (VisuUiStippleCombobox *stippleComboBox,
                                                         guint16 stipple);
GtkWidget *         visu_ui_stipple_combobox_new        ();
gboolean            visu_ui_stipple_combobox_setSelection
                                                        (VisuUiStippleCombobox *stippleComboBox,
                                                         guint16 stipple);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkBin
                           +----GtkComboBox
                                 +----VisuUiStippleCombobox

Implemented Interfaces

VisuUiStippleCombobox implements AtkImplementorIface, GtkBuildable, GtkCellLayout and GtkCellEditable.

Signals

  "stipple-selected"                               : Action

Description

This widget looks like a GtkComboBox and it displays a list of preset patterns for line. These patterns are defined by a guint16 value that is given to OpenGL for line stipple.

This widget can emit a "stipple-selected" signal that is a wrapper around the "changed" signal, but it is emitted only when a stipple is selected and this stipple is passed to the call back.

Details

VisuUiStippleCombobox

typedef struct _VisuUiStippleCombobox VisuUiStippleCombobox;

Private structure to store informations of a VisuUiStippleCombobox object.

Since 3.4


VisuUiStippleComboboxClass

typedef struct _VisuUiStippleComboboxClass VisuUiStippleComboboxClass;

Private structure to store informations of a VisuUiStippleComboboxClass object.

Since 3.4


visu_ui_stipple_combobox_add ()

void                visu_ui_stipple_combobox_add        (VisuUiStippleCombobox *stippleComboBox,
                                                         guint16 stipple);

Create an entry in the ComboBox for the given stipple pattern if it does not already exist.

stippleComboBox :

a VisuUiStippleCombobox widget ;

stipple :

a pattern value.

Since 3.4


visu_ui_stipple_combobox_class_buildStamp ()

GdkPixbuf *         visu_ui_stipple_combobox_class_buildStamp
                                                        (guint16 stipple);

This method is used to create pixbuf representing stipples.A new pixbuf is created.

stipple :

a pattern value.

Returns :

a pixbuf pointer. [transfer full]

Since 3.4


visu_ui_stipple_combobox_getSelection ()

guint16             visu_ui_stipple_combobox_getSelection
                                                        (VisuUiStippleCombobox *stippleComboBox);

The user can access to the selected stipple pattern using this method.

stippleComboBox :

a VisuUiStippleCombobox widget.

Returns :

a pattern value (or 65535).

Since 3.4


visu_ui_stipple_combobox_getStamp ()

GdkPixbuf *         visu_ui_stipple_combobox_getStamp   (VisuUiStippleCombobox *stippleComboBox,
                                                         guint16 stipple);

The stippleComboBox has little pixbufs to represent the stipple. User methods can use these pixbufs but should considered them read-only.

stippleComboBox :

a VisuUiStippleCombobox widget ;

stipple :

a pattern value.

Returns :

a pixbuf pointer corresponding to the little image shown on the stippleComboBox. [transfer none]

Since 3.4


visu_ui_stipple_combobox_new ()

GtkWidget *         visu_ui_stipple_combobox_new        ();

A VisuUiStippleCombobox 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.

Returns :

a newly created VisuUiStippleCombobox widget. [transfer full]

Since 3.4


visu_ui_stipple_combobox_setSelection ()

gboolean            visu_ui_stipple_combobox_setSelection
                                                        (VisuUiStippleCombobox *stippleComboBox,
                                                         guint16 stipple);

Use this method to set the ComboBox on the given stipple. This emits a 'stipple-channel' signal if the stipple is changed, which means, a previous stipple has been modified, or a new stipple is selected.

stippleComboBox :

a VisuUiStippleCombobox widget ;

stipple :

a pattern value.

Returns :

TRUE if the stipple already exists in the model.

Since 3.4

Signal Details

The "stipple-selected" signal

void                user_function                      (VisuUiStippleCombobox *combo,
                                                        guint                  stipple,
                                                        gpointer               user_data)      : Action

This signal is emitted when a new valid line pattern is selected.

combo :

the VisuUiStippleCombobox that emits the signal ;

stipple :

the value of the newly selected line patter.

user_data :

user data set when the signal handler was connected.

Since 3.4

See Also

VisuUiShadeCombobox