gtk_stippleComboBoxWidget

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

Synopsis

#define             STIPPLE_COMBOX_TYPE
#define             STIPPLE_COMBOX                      (obj)
#define             STIPPLE_COMBOX_CLASS                (klass)
#define             IS_STIPPLE_COMBOX                   (obj)
#define             IS_STIPPLE_COMBOX_CLASS             (klass)
                    StippleComboBox;
                    StippleComboBoxClass;
GType               stippleComboBox_get_type            (void);
GtkWidget*          stippleComboBox_new                 ();
gboolean            stippleComboBoxSet_selectionByStipple
                                                        (StippleComboBox *stippleComboBox,
                                                         guint16 stipple);
guint16             stippleComboBoxGet_selectedStipple  (StippleComboBox *stippleComboBox);
GdkPixbuf*          stippleComboBoxGet_pixbufFromStipple
                                                        (StippleComboBox *stippleComboBox,
                                                         guint16 stipple);
GdkPixbuf*          stippleComboBoxBuild_stippleStamp   (guint16 stipple);
void                stippleComboBoxAdd_pattern          (StippleComboBox *stippleComboBox,
                                                         guint16 stipple);

Object Hierarchy

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

Implemented Interfaces

StippleComboBox implements AtkImplementorIface, GtkBuildable, GtkCellLayout and GtkCellEditable.

Signals

  "stipple-selected"                               : Run First / 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

STIPPLE_COMBOX_TYPE

#define STIPPLE_COMBOX_TYPE         (stippleComboBox_get_type ())

Get the associated GType to the StippleComboBox objects.

Since 3.4


STIPPLE_COMBOX()

#define STIPPLE_COMBOX(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), STIPPLE_COMBOX_TYPE, StippleComboBox))

Cast the given object to a StippleComboBox object.

obj :

the widget to cast.

Since 3.4


STIPPLE_COMBOX_CLASS()

#define STIPPLE_COMBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), STIPPLE_COMBOX_TYPE, StippleComboBoxClass))

Cast the given class to a StippleComboBoxClass object.

klass :

the class to cast.

Since 3.4


IS_STIPPLE_COMBOX()

#define IS_STIPPLE_COMBOX(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STIPPLE_COMBOX_TYPE))

Get if the given object is a valid StippleComboBox object.

obj :

the object to test.

Since 3.4


IS_STIPPLE_COMBOX_CLASS()

#define IS_STIPPLE_COMBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STIPPLE_COMBOX_TYPE))

Get if the given class is a valid StippleComboBoxClass class.

klass :

the class to test.

Since 3.4


StippleComboBox

typedef struct _StippleComboBox StippleComboBox;

Private structure to store informations of a StippleComboBox object.

Since 3.4


StippleComboBoxClass

typedef struct _StippleComboBoxClass StippleComboBoxClass;

Private structure to store informations of a StippleComboBoxClass object.

Since 3.4


stippleComboBox_get_type ()

GType               stippleComboBox_get_type            (void);

GType are unique numbers to identify objects.

Returns :

the GType associated with StippleComboBox objects.

Since 3.4


stippleComboBox_new ()

GtkWidget*          stippleComboBox_new                 ();

A StippleComboBox 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 StippleComboBox widget.

Since 3.4


stippleComboBoxSet_selectionByStipple ()

gboolean            stippleComboBoxSet_selectionByStipple
                                                        (StippleComboBox *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 StippleComboBox widget ;

stipple :

a pattern value.

Returns :

TRUE if the stipple already exists in the model.

Since 3.4


stippleComboBoxGet_selectedStipple ()

guint16             stippleComboBoxGet_selectedStipple  (StippleComboBox *stippleComboBox);

The user can access to the selected Stipple object using this method.

stippleComboBox :

a StippleComboBox widget.

Returns :

a pattern value (or 65535).

Since 3.4


stippleComboBoxGet_pixbufFromStipple ()

GdkPixbuf*          stippleComboBoxGet_pixbufFromStipple
                                                        (StippleComboBox *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 StippleComboBox widget ;

stipple :

a pattern value.

Returns :

a pixbuf pointer corresponding to the little image shown on the stippleComboBox.

Since 3.4


stippleComboBoxBuild_stippleStamp ()

GdkPixbuf*          stippleComboBoxBuild_stippleStamp   (guint16 stipple);

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

stipple :

a pattern value.

Returns :

a pixbuf pointer.

Since 3.4


stippleComboBoxAdd_pattern ()

void                stippleComboBoxAdd_pattern          (StippleComboBox *stippleComboBox,
                                                         guint16 stipple);

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

stippleComboBox :

a StippleComboBox widget ;

stipple :

a pattern value.

Since 3.4

Signal Details

The "stipple-selected" signal

void                user_function                      (StippleComboBox *combo,
                                                        guint            stipple,
                                                        gpointer         user_data)      : Run First / Action

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

combo :

the StippleComboBox 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

ShadeComboBox