---
name: "Gtk_CList"
section: "3"
platform: "linux"
package: "libgtkmm-dev"
version: "1.0.3-1.1"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk_CList"
---

# Gtk\_CList(3)

## NAME - Gtk\_CList

Multi-column list widget designed to handle very much data without performance problems

## HEADER REQUIRED

**#include \<gtk--/clist.h&gt;\>**

## BASE CLASSES

[Gtk\_Container(3)](/Gtk_Container/3.md)

## DERIVED BY

[Gtk\_CTree(3)](/Gtk_CTree/3.md)

## PROPERTIES

- *flags*

  Type: guint16\

- *row\_mem\_chunk*

  Type: GMemChunk\*\

-

   mem chunks \

- *cell\_mem\_chunk*

  Type: GMemChunk\*\

- *freeze\_count*

  Type: guint\

- *internal\_allocation*

  Type: GdkRectangle\

-

   allocation rectangle after the conatiner\_border\_width \* and the width of the shadow border \

- *rows*

  Type: gint\

-

   rows \

- *row\_center\_offset*

  Type: gint\

- *row\_height*

  Type: gint\

- *row\_list*

  Type: GList\*\

- *row\_list\_end*

  Type: GList\*\

- *columns*

  Type: gint\

-

   columns \

- *column\_title\_area*

  Type: GdkRectangle\

- *title\_window*

  Type: GdkWindow\*\

- *column*

  Type: GtkCListColumn\*\

-

   dynamicly allocated array of column structures \

- *clist\_window*

  Type: GdkWindow\*\

-

   the scrolling window and it's height and width to \* make things a little speedier \

- *clist\_window\_width*

  Type: gint\

- *clist\_window\_height*

  Type: gint\

- *hoffset*

  Type: gint\

-

   offsets for scrolling \

- *voffset*

  Type: gint\

- *shadow\_type*

  Type: GtkShadowType\

-

   border shadow style \

- *selection\_mode*

  Type: GtkSelectionMode\

-

   the list's selection mode (gtkenums.h) \

- *selection*

  Type: GList\*\

-

   list of selected rows \

- *selection\_end*

  Type: GList\*\

- *undo\_selection*

  Type: GList\*\

- *undo\_unselection*

  Type: GList\*\

- *undo\_anchor*

  Type: gint\

- *button\_actions*

  -

   mouse buttons \

- *drag\_button*

  Type: guint8\

- *click\_cell*

  Type: GtkCListCellInfo\

-

   dnd \

- *hadjustment*

  Type: GtkAdjustment\*\

-

   scroll adjustments \

- *vadjustment*

  Type: GtkAdjustment\*\

- *xor\_gc*

  Type: GdkGC\*\

-

   xor GC for the vertical drag line \

- *fg\_gc*

  Type: GdkGC\*\

-

   gc for drawing unselected cells \

- *bg\_gc*

  Type: GdkGC\*\

- *cursor\_drag*

  Type: GdkCursor\*\

-

   cursor used to indicate dragging \

- *x\_drag*

  Type: gint\

-

   the current x-pixel location of the xor-drag line \

- *focus\_row*

  Type: gint\

-

   focus handling \

- *anchor*

  Type: gint\

-

   dragging the selection \

- *anchor\_state*

  Type: GtkStateType\

- *drag\_pos*

  Type: gint\

- *htimer*

  Type: gint\

- *vtimer*

  Type: gint\

- *sort\_type*

  Type: GtkSortType\

- *compare*

  Type: GtkCListCompareFunc\

- *sort\_column*

  Type: gint\

-

   .IP

## PUBLIC MEMBER INDEX

```
typedef G_List_Iterator  iterator;
  iterator for traversing over the rows
typedef G_IntList_Iterator  seliterator;
  iterator for traversing through selected items
Gtk_CList(int columns, const gchar * titles[] = 0);
Gtk_CList( const vector &titles );
Gtk_CList(GtkCList *castitem);
void  set_selection_mode(GtkSelectionMode mode);
  set the clist's selection mode
void  freeze();
  freeze all visual updates of the list
void  thaw();
  thaw the list (see freeze)
void  column_titles_show();
  show the column title buttons
void  column_titles_hide();
  hide the column title buttons
void  column_title_active(gint column);
  activate title
void  column_title_passive(gint column);
  set the column title to be passive where it acts as just a title
void  column_titles_active();
  set all column titles to be a active
void  column_titles_passive();
  set all column titles to be passive where they act as just a title
void  set_column_title(gint column, const string &title);
  set the title in the column title button
void  set_column_widget(gint column, Gtk_Widget &widget);
  set a widget instead of a title for the column title button
void  set_column_widget(gint column, const Gtk_ObjectHandle &widget);
  set a widget instead of a title for the column title button
void  set_column_justification(gint column, GtkJustification justification);
  set the justification on a column
void  set_column_width(gint column, gint width);
  set the pixel width of a column
void  set_row_height(gint height);
  change the height of one row
void  moveto(gint row, gint column, gfloat row_align, gfloat col_align);
  scroll the viewing area of the list
bool  row_is_visible(gint row) const;
  whether the row is visible
GtkCellType  get_cell_type(gint row, gint column) const;
  returns the cell type
void  set_text(gint row, gint column, const string &text);
  sets a given cell's text, replacing it's current contents
bool  get_text(gint row, gint column, _gtk_string *text) const;
  get cell's text
bool  get_text(gint row, gint column, string& text) const;
_gtk_string  get_text(gint row, gint column) const;
void  set_pixmap(gint row, gint column, const Gdk_Pixmap &pixmap, const Gdk_Bitmap &mask);
  sets a given cell's pixmap, replacing it's current contents
gint  get_pixmap(gint row, gint column, Gdk_Pixmap &pixmap, Gdk_Bitmap &mask) const;
  get cell's pixmap
void  set_pixtext(gint row, gint column, const string &text, guint8 spacing, const Gdk_Pixmap &pixmap, const Gdk_Bitmap &mask);
  sets a given cell's pixmap and text, replacing it's current contents
bool  get_pixtext(gint row, gint column, _gtk_string *text, guint8 *spacing, Gdk_Pixmap &pixmap, Gdk_Bitmap &mask) const;
bool  get_pixtext(gint row, gint column, string &text, guint8 *spacing, Gdk_Pixmap &pixmap, Gdk_Bitmap &mask) const;
void  set_foreground(gint row, const Gdk_Color &color);
void  set_background(gint row, const Gdk_Color &color);
void  set_shift(gint row, gint column, gint vertical, gint horizontal);
gint  append(const gchar* text[]);
gint  append(const vector text);
gint  prepend(const gchar *text[]);
gint  prepend(const vector text);
gint  insert_row(gint row, const gchar* text[]);
gint  insert_row(gint row, const vector &text);
void  remove_row(gint row);
iterator  begin();
iterator  end();
seliterator  selbegin() const;
seliterator  selend() const;
gint  drop_calibrate( gint y_in ) const;
void  set_row_data(gint row, gpointer data);
gpointer  get_row_data(gint row) const;
void  set_row_data_full(gint row, gpointer data, GtkDestroyNotify destroy);
gint  find_row_from_data(gpointer data) const;
void  cause_select_row(gint row, gint column);
void  cause_unselect_row(gint row, gint column);
gint  get_selection_info(gint x, gint y, gint *row, gint *column) const;
const Gtk_Adjustment*  get_hadjustment() const;
const Gtk_Adjustment*  get_vadjustment() const;
Gtk_Adjustment*  get_hadjustment();
Gtk_Adjustment*  get_vadjustment();
void  set_hadjustment(Gtk_Adjustment &adjustment);
void  set_vadjustment(Gtk_Adjustment &adjustment);
void  set_shadow_type(GtkShadowType type);
void  set_reorderable(bool reorderable);
void  set_use_drag_icons(bool use_icons);
void  set_button_actions(guint button, guint8 button_actions);
void  set_column_visibility(gint column, bool visible);
void  set_column_resizeable(gint column, bool resizeable);
void  set_column_auto_resize(gint column, bool auto_resize);
string  get_column_title(gint column) const;
gint  get_column_width( gint column ) const;
const Gtk_Widget*  get_column_widget(gint column) const;
gint  optimal_column_width(gint column) const;
void  clist_set_column_width(gint column, gint width);
void  set_column_min_width(gint column, gint min_width);
void  set_column_max_width(gint column, gint max_width);
void  set_cell_style(gint row, gint column, const Gtk_Style &style);
Gtk_ObjectHandle  get_cell_style(gint row, gint column) const;
void  set_row_style(gint row, const Gtk_Style &style);
Gtk_ObjectHandle  get_row_style(gint row) const;
void  set_selectable(gint row, bool selectable);
bool  get_selectable(gint row) const;
void  undo_selection();
void  swap_rows(gint row1, gint row2);
void  set_compare_func(GtkCListCompareFunc cmp_func);
void  set_sort_column(gint column);
void  set_sort_type(GtkSortType sort_type);
void  sort();
void  set_auto_sort(bool auto_sort);
gint  columns_autosize();
gint  rows();
gint  columns();
signal void  refresh(BaseObjectType);
signal void  resize_column(gint, gint);
signal void  toggle_focus_row(BaseObjectType);
signal void  select_all(BaseObjectType);
signal void  unselect_all(BaseObjectType);
signal void  start_selection(BaseObjectType);
signal void  end_selection(BaseObjectType);
signal void  extend_selection(GtkScrollType, gfloat, gboolean);
signal void  scroll_horizontal(GtkScrollType, gfloat);
signal void  scroll_vertical(GtkScrollType, gfloat);
signal void  toggle_add_mode(BaseObjectType);
signal void  abort_column_resize(BaseObjectType);
signal void  resync_selection(GdkEvent*);
signal void  clear(BaseObjectType);
signal void  fake_unselect_all(gint);
signal void  sort_list(BaseObjectType);
signal void  row_move(gint, gint);
signal void  select_row(gint, gint, GdkEvent*);
signal void  unselect_row(gint, gint, GdkEvent*);
signal void  click_column(gint);
GtkCList*  gtkobj();
const GtkCList*  gtkobj() const;
static bool  isGtkCList(Gtk_Object *checkcast);
```

## PROTECTED MEMBER INDEX

```
friend  CppClassType;
typedef GtkCList  BaseObjectType;
typedef GtkCListClass  BaseClassType;
virtual void * get_parent_class();
virtual void  refresh_impl();
virtual void  resize_column_impl(gint p1, gint p2);
virtual void  toggle_focus_row_impl();
virtual void  select_all_impl();
virtual void  unselect_all_impl();
virtual void  start_selection_impl();
virtual void  end_selection_impl();
virtual void  extend_selection_impl(GtkScrollType p1, gfloat p2, gboolean p3);
virtual void  scroll_horizontal_impl(GtkScrollType p1, gfloat p2);
virtual void  scroll_vertical_impl(GtkScrollType p1, gfloat p2);
virtual void  toggle_add_mode_impl();
virtual void  abort_column_resize_impl();
virtual void  resync_selection_impl(GdkEvent* p1);
virtual void  clear_impl();
virtual void  fake_unselect_all_impl(gint p1);
virtual void  sort_list_impl();
virtual void  remove_row_impl(gint p1);
virtual void  row_move_impl(gint p1, gint p2);
virtual void  select_row_impl(gint p1, gint p2, GdkEvent* p3);
virtual void  unselect_row_impl(gint p1, gint p2, GdkEvent* p3);
virtual void  click_column_impl(gint p1);
Gtk_Adjustment * vadjustment_, *hadjustment_;
```

## PRIVATE MEMBER INDEX

```
static CppClassType  clist_class;
GtkType  get_type();
virtual bool  check_seliterator_type() const;
```

## PUBLIC MEMBER DESCRIPTIONS

- void Gtk\_CList::**freeze** ();

  freeze all visual updates of the list.\
   and then thaw the list after you have made a number of changes and the updates wil occure in a more efficent manner than if you made them on a unfrozen list\

- void Gtk\_CList::**column\_title\_active** (*gint column*);

  activate title .\
   (responds to button presses, prelights, and grabs keyboard focus)\

- void Gtk\_CList::**column\_titles\_active** ();

  set all column titles to be a active .\
   (respond to button presses, prelight, and grab keyboard focus)\

- void Gtk\_CList::**set\_column\_justification** (*gint column, GtkJustification justification*);

  set the justification on a column.\
   valid choices are: GTK\_JUSTIFY\_LEFT, GTK\_JUSTIFY\_RIGHT, GTK\_JUSTIFY\_CENTER, GTK\_JUSTIFY\_FILL\

- void Gtk\_CList::**set\_column\_width** (*gint column, gint width*);

  set the pixel width of a column.\
   this is a necessary step in creating a CList because otherwise the column width is chozen from the width of the column title, which will never be right\

- void Gtk\_CList::**set\_row\_height** (*gint height*);

  change the height of one row.\
   the default is the hight of the current font\

- void Gtk\_CList::**moveto** (*gint row, gint column, gfloat row\_align, gfloat col\_align*);

  scroll the viewing area of the list.\
   to the given column and row; row\_align and col\_align are between 0-1 representing the location the row should appear on the screnn, 0.0 being top or left, 1.0 being bottom or right; if row or column is -1 then then there is no change\

- GtkCellType Gtk\_CList::**get\_cell\_type** (*gint row, gint column*) const;

  returns the cell type.\
   which is one of GTK\_CELL\_EMPTY, GTK\_CELL\_TEXT, GTK\_CELL\_PIXMAP, GTK\_CELL\_PIXTEXT,

  GTK\_CELL\_WIDGET\

- bool Gtk\_CList::**get\_text** (*gint row, gint column, \_gtk\_string \*text*) const;

  get cell's text.\
   returns true on success\

- gint Gtk\_CList::**get\_pixmap** (*gint row, gint column, Gdk\_Pixmap &pixmap, Gdk\_Bitmap &mask*) const;

  get cell's pixmap.\
   returns 1 on success any of the return pointer can be NULL if you are not interested\

## PROTECTED MEMBER DESCRIPTIONS

## PRIVATE MEMBER DESCRIPTIONS
