GTK+
The GIMP Toolkit

General
Introduction
Screenshots
Download
Mailing Lists
Language Bindings
Themes
Bug Tracker

Documentation
FAQ
Tutorial
API Reference
Published Books

Projects
Pango
Inti
GNOME
GTK+ for Win32
GtkFB (Framebuffer)
GTK+ on DirectFB
GTK+ for BeOS

Applications
GIMP
Abiword
Dia
Glade
GnuCash
Gnumeric

GNOME Software Map

11.2. Modes of operation

There are several attributes that can be used to alter the behaviour of a CList. First there is

void gtk_clist_set_selection_mode( GtkCList         *clist,
                                   GtkSelectionMode  mode );

which, as the name implies, sets the selection mode of the CList. The first argument is the CList widget, and the second specifies the cell selection mode (they are defined in gtkenums.h). At the time of this writing, the following modes are available to us:

  • GTK_SELECTION_SINGLE - The selection is either NULL or contains a GList pointer for a single selected item.

  • GTK_SELECTION_BROWSE - The selection is NULL if the list contains no widgets or insensitive ones only, otherwise it contains a GList pointer for one GList structure, and therefore exactly one list item.

  • GTK_SELECTION_MULTIPLE - The selection is NULL if no list items are selected or a GList pointer for the first selected item. That in turn points to a GList structure for the second selected item and so on. This is currently the default for the CList widget.

  • GTK_SELECTION_EXTENDED - The selection is always NULL.

Others might be added in later revisions of GTK.

We can also define what the border of the CList widget should look like. It is done through

void gtk_clist_set_shadow_type( GtkCList      *clist,
                                GtkShadowType  border );

The possible values for the second argument are

  GTK_SHADOW_NONE
  GTK_SHADOW_IN
  GTK_SHADOW_OUT
  GTK_SHADOW_ETCHED_IN
  GTK_SHADOW_ETCHED_OUT