Class Index Cross Index Namespace Index

Class Gtk::CList

Multicolumn list widget
Contained in: Gtk
Derived from: Gtk::Container
Derived by: Gtk::CTree

#include <gtk--/clist.h>


public function member index:

CList(int columns, const gchar* titles[] = 0);
CList(const SArray& titles);
signal void abort_column_resize();
gint append(const SArray& text);
gint append_row(const SArray& text);
const Cell cell(gint row, gint column) const;
Cell cell(gint row, gint column);
void clear();
emitable signal void click_column(gint);
Column column(int c);
const Column column(int c) const;
void column_title_active(gint column);
void column_title_passive(gint column);
void column_titles_active();
void column_titles_hide();
void column_titles_passive();
void column_titles_show();
const ColumnVector& columns() const;
ColumnVector& columns();
gint columns_autosize();
signal void end_selection();
signal void extend_selection(GtkScrollType, gfloat, gboolean);
gint find_row_from_data(gpointer data) const;
void freeze();
Style* get_cell_style(gint row, gint column) const;
GtkCellType get_cell_type(gint row, gint column) const;
string get_column_title(gint column) const;
Widget* get_column_widget(gint column) const;
gint get_column_width(gint column) const;
Adjustment* get_hadjustment() const;
gint get_pixmap(gint row, gint column, 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;
gpointer get_row_data(gint row) const;
Style* get_row_style(gint row) const;
gint get_rows() const;
bool get_selectable(gint row) const;
gint get_selection_info(gint x, gint y, gint* row, gint* column) const;
GtkSelectionMode get_selection_mode() const;
bool get_text(gint row, gint column, string& text) const;
nstring get_text(gint row, gint column) const;
bool get_text(gint row, gint column, nstring* text) const;
Adjustment* get_vadjustment() const;
GtkCList* gtkobj();
const GtkCList* gtkobj() const;
gint insert(gint row, const SArray& text);
gint insert_row(gint row, const SArray& text);
static bool isA(Object* object);
void moveto(gint row, gint column, gfloat row_align=0.5, gfloat col_align=0.5);
gint optimal_column_width(gint column) const;
gint prepend(const SArray& text);
gint prepend_row(const SArray& text);
void remove_row(gint row);
signal void resize_column(gint, gint);
Row row(int r);
const Row row(int r) const;
GtkVisibility row_is_visible(gint row) const;
emitable signal void row_move(gint, gint);
RowList& rows();
const RowList& rows() const;
signal void scroll_horizontal(GtkScrollType, gfloat);
signal void scroll_vertical(GtkScrollType, gfloat);
emitable signal void select_all();
signal void select_row(gint, gint, GdkEvent*);
const SelectionList& selection() const;
SelectionList& selection();
void set_auto_sort(bool auto_sort);
void set_background(gint row, const Gdk_Color& color);
void set_button_actions(guint button, guint8 button_actions);
void set_cell_style(gint row, gint column, Style& style);
void set_column_auto_resize(gint column, bool auto_resize);
void set_column_justification(gint column, GtkJustification justification);
void set_column_max_width(gint column, gint max_width);
void set_column_min_width(gint column, gint min_width);
void set_column_resizeable(gint column, bool resizeable);
void set_column_title(gint column, const string& title);
void set_column_visibility(gint column, bool visible);
void set_column_widget(gint column, Widget& widget);
void set_column_width(gint column, gint width);
void set_compare_func(GtkCListCompareFunc cmp_func);
void set_foreground(gint row, const Gdk_Color& color);
void set_hadjustment(Adjustment* adjustment=0);
void set_hadjustment(Adjustment& adjustment);
void set_pixmap(gint row, gint column, const Gdk_Pixmap& pixmap, const Gdk_Bitmap& mask);
void set_pixtext(gint row, gint column, const string& text, guint8 spacing, const Gdk_Pixmap& pixmap, const Gdk_Bitmap& mask);
void set_reorderable(bool reorderable);
void set_row_data(gint row, gpointer data);
void set_row_data_full(gint row, gpointer data, GtkDestroyNotify destroy);
void set_row_height(guint height);
void set_row_style(gint row, Style& style);
emitable signal void set_scroll_adjustments(Adjustment*, Adjustment*);
void set_selectable(gint row, bool selectable);
void set_selection_mode(GtkSelectionMode mode);
void set_shadow_type(GtkShadowType type);
void set_shift(gint row, gint column, gint vertical, gint horizontal);
void set_sort_column(gint column);
void set_sort_type(GtkSortType sort_type);
void set_text(gint row, gint column, const string& text);
void set_use_drag_icons(bool use_icons);
void set_vadjustment(Adjustment* adjustment=0);
void set_vadjustment(Adjustment& adjustment);
void sort();
signal void start_selection();
void swap_rows(gint row1, gint row2);
void thaw();
signal void toggle_add_mode();
signal void toggle_focus_row();
emitable signal void undo_selection();
emitable signal void unselect_all();
signal void unselect_row(gint, gint, GdkEvent*);
virtual ~CList();
 

protected function member index:

virtual void abort_column_resize_impl();
virtual void clear_impl();
virtual void click_column_impl(gint p0);
virtual void end_selection_impl();
virtual void extend_selection_impl(GtkScrollType p0, gfloat p1, gboolean p2);
virtual int insert_row_impl(gint row, gchar** p1);
virtual void remove_row_impl(gint row);
virtual void resize_column_impl(gint p0, gint p1);
virtual void row_move_impl(gint p0, gint p1);
virtual void scroll_horizontal_impl(GtkScrollType p0, gfloat p1);
virtual void scroll_vertical_impl(GtkScrollType p0, gfloat p1);
virtual void select_all_impl();
virtual void select_row_impl(gint p0, gint p1, GdkEvent* p2);
virtual void set_scroll_adjustments_impl(Adjustment* p0, Adjustment* p1);
virtual void sort_list_impl();
virtual void start_selection_impl();
virtual void toggle_add_mode_impl();
virtual void toggle_focus_row_impl();
virtual void undo_selection_impl();
virtual void unselect_all_impl();
virtual void unselect_row_impl(gint p0, gint p1, GdkEvent* p2);
 

private function member index:

virtual bool check_seliterator_type() const;
 

Description:



Function Member Descriptions:

Gtk::CList::append_row - Append a row (see insert_row)

gint append_row(const SArray& text);
(note: method is named append in gtk+) obsolete: use clist.rows().push_back(text);


Gtk::CList::clear - clear the entire list

void clear();
virtual void clear_impl();
faster than individual removal obsolete: use clist.rows().clear();


Gtk::CList::click_column - Represents a button click on a column title

emitable signal void click_column(gint);
virtual void click_column_impl(gint p0);

Gtk::CList::column_title_active - set a column title to be activate

void column_title_active(gint column);
(responds to button presses, prelights, and grabs keyboard focus) obsolete: use clist.columns[column].set_active();


Gtk::CList::column_title_passive - set a column title to be passive

void column_title_passive(gint column);
obsolete: use clist.columns[column].set_passive();


Gtk::CList::column_titles_active - set all column titles to be a active

void column_titles_active();
(respond to button presses, prelight, and grab keyboard focus)


Gtk::CList::column_titles_hide - hide the column title buttons

void column_titles_hide();

Gtk::CList::column_titles_passive - set all column titles to be passive

void column_titles_passive();
Passive titles act as just a title and do not respond to focus and button presses.


Gtk::CList::column_titles_show - show the column title buttons

void column_titles_show();

Gtk::CList::find_row_from_data - given a data pointer, find the first (and hopefully only!)

gint find_row_from_data(gpointer data) const;
row that points to that data, or -1 if none do obsolete: use clist.rows().find_data(data);


Gtk::CList::freeze - freeze all visual updates of the list

void freeze();
and then thaw the list after you have made a number of changes and the updates will occure in a more efficent manner than if you made them on a unfrozen list


Gtk::CList::get_cell_style - Get cell style

Style* get_cell_style(gint row, gint column) const;
obsolete: use clist.cell(row,column).get_style()


Gtk::CList::get_cell_type - returns the cell type which is one of

GtkCellType get_cell_type(gint row, gint column) const;
GTK_CELL_EMPTY, GTK_CELL_TEXT, GTK_CELL_PIXMAP, GTK_CELL_PIXTEXT, GTK_CELL_WIDGET obsolete: use clist.cell(row,column).get_type();


Gtk::CList::get_column_title - returns the title of column. Returns an empty string if title is not set

string get_column_title(gint column) const;
obsolete: use clist.columns[column].get_title();


Gtk::CList::get_column_widget - returns the column widget

Widget* get_column_widget(gint column) const;
obsolete: use clist.columns[column].get_widget();


Gtk::CList::get_column_width - returns the width in pixels of the column, returns -1 if the column

gint get_column_width(gint column) const;
doens't exist column is 0 based. obsolete: use clist.columns[column].get_width();


Gtk::CList::get_hadjustment - get adjustments of clist

Adjustment* get_hadjustment() const;

Gtk::CList::get_pixmap - get cell's pixmap

gint get_pixmap(gint row, gint column, Gdk_Pixmap& pixmap, Gdk_Bitmap& mask) const;
obsolete: use clist.cell(row,column).get_pixmap();


Gtk::CList::get_row_data - returns the data set for a row

gpointer get_row_data(gint row) const;
obsolete: use clist.row(row).set_data(data)


Gtk::CList::get_rows - Returns the number of rows

gint get_rows() const;
obsolete: use clist.rows().size();


Gtk::CList::get_selection_info - return the row column corresponding to the x and y coordinates

gint get_selection_info(gint x, gint y, gint* row, gint* column) const;
<P> reference and pointer style available


Gtk::CList::get_text - get cell's text

bool get_text(gint row, gint column, nstring* text) const;
returns true on success obsolete: use clist.cell(row,column).get_text();


Gtk::CList::gtkobj - Returns the underlaying gtk+ object.

GtkCList* gtkobj();

Gtk::CList::insert_row - inserts a row at index row

gint insert_row(gint row, const SArray& text);
virtual int insert_row_impl(gint row, gchar** p1);
(note: method is named insert in gtk+) obsolete: use clist.rows().insert(clist.rows[row],text);


Gtk::CList::isA - Returns true if object is this type.

static bool isA(Object* object);

Gtk::CList::moveto - scroll the viewing area of the list

void moveto(gint row, gint column, gfloat row_align=0.5, gfloat col_align=0.5);
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 obsolete: use clist.cell(row,column).moveto();


Gtk::CList::optimal_column_width - return the optimal column width, i.e. maximum of all cell widths

gint optimal_column_width(gint column) const;
obsolete: use clist.columns[column].get_optimal_width();


Gtk::CList::prepend_row - Prepend a row (see insert_row)

gint prepend_row(const SArray& text);
(note: method is named prepend in gtk+) obsolete: use clist.rows().push_front(text);


Gtk::CList::remove_row - removes row at index row

void remove_row(gint row);
virtual void remove_row_impl(gint row);
Note: this is gtk_clist_remove() in gtk, but renamed here to remove_row() obsolete: use clist.rows().remove(clist.row(row))


Gtk::CList::row_is_visible - whether the row is visible

GtkVisibility row_is_visible(gint row) const;
obsolete: use clist.row(row).is_visible()


Gtk::CList::row_move - move row from source_row position to dest_row position

emitable signal void row_move(gint, gint);
virtual void row_move_impl(gint p0, gint p1);
obsolete: use clist.rows().move(clist.rows[row1],clist.rows[row2]);


Gtk::CList::select_all - Select all rows

emitable signal void select_all();
virtual void select_all_impl();
This method only works in multi or extended mode. obsolete: use clist.selection().all();


Gtk::CList::select_row - Select a row

signal void select_row(gint, gint, GdkEvent*);
virtual void select_row_impl(gint p0, gint p1, GdkEvent* p2);
obsolete: use clist.row(row).select()


Gtk::CList::set_auto_sort - Automatically sort upon insertion

void set_auto_sort(bool auto_sort);

Gtk::CList::set_background - sets the background color of a row, the color must already

void set_background(gint row, const Gdk_Color& color);
be allocated obsolete: use clist.row(row).set_background(color)


Gtk::CList::set_cell_style - Set cell style

void set_cell_style(gint row, gint column, Style& style);
obsolete: use clist.cell(row,column).set_style(style)


Gtk::CList::set_column_auto_resize - resize column automatically to its optimal width

void set_column_auto_resize(gint column, bool auto_resize);
obsolete: use clist.columns[column].set_auto_resize(on);


Gtk::CList::set_column_justification - set the justification on a column

void set_column_justification(gint column, GtkJustification justification);
valid choices are: GTK_JUSTIFY_LEFT, GTK_JUSTIFY_RIGHT, GTK_JUSTIFY_CENTER, GTK_JUSTIFY_FILL obsolete: use clist.columns[column].set_justification(justify);


Gtk::CList::set_column_max_width - set column maximum width. max_width < 0 => no restriction

void set_column_max_width(gint column, gint max_width);
obsolete: use clist.columns[column].set_max_width(max);


Gtk::CList::set_column_min_width - set column minimum width. min_width < 0 => no restriction

void set_column_min_width(gint column, gint min_width);
obsolete: use clist.columns[column].set_min_width(min);


Gtk::CList::set_column_resizeable - enable/disable column resize operations by mouse

void set_column_resizeable(gint column, bool resizeable);
obsolete: use clist.columns[column].set_resizable(on);


Gtk::CList::set_column_title - set the title in the column title button

void set_column_title(gint column, const string& title);
obsolete: use clist.columns[column].set_title(title);


Gtk::CList::set_column_visibility - set visibility of a column

void set_column_visibility(gint column, bool visible);
obsolete: use clist.columns[column].set_visiblity(on);


Gtk::CList::set_column_widget - set a widget instead of a title for the column title button

void set_column_widget(gint column, Widget& widget);
obsolete: use clist.columns[column].set_widget(widgth);


Gtk::CList::set_column_width - set the pixel width of a column; this is a necessary step in

void set_column_width(gint column, gint width);
creating a CList because otherwise the column width is chozen from the width of the column title, which will never be right obsolete: use clist.columns[column].set_width(width);


Gtk::CList::set_compare_func - sets a compare function different to the default

void set_compare_func(GtkCListCompareFunc cmp_func);

Gtk::CList::set_foreground - sets the foreground color of a row, the color must already

void set_foreground(gint row, const Gdk_Color& color);
be allocated obsolete: use clist.row(row).set_foreground(color)


Gtk::CList::set_hadjustment - set adjustments of clist

void set_hadjustment(Adjustment* adjustment=0);

Gtk::CList::set_pixmap - sets a given cell's pixmap, replacing it's current contents

void set_pixmap(gint row, gint column, const Gdk_Pixmap& pixmap, const Gdk_Bitmap& mask);
obsolete: use clist.cell(row,column).set_pixmap(pixmap,mask);


Gtk::CList::set_pixtext - sets a given cell's pixmap and text, replacing it's current contents

void set_pixtext(gint row, gint column, const string& text, guint8 spacing, const Gdk_Pixmap& pixmap, const Gdk_Bitmap& mask);
obsolete: Full replacement of contents not needed use cell methods


Gtk::CList::set_reorderable - enable clists reorder ability

void set_reorderable(bool reorderable);

Gtk::CList::set_row_data - sets a arbitrary data pointer for a given row

void set_row_data(gint row, gpointer data);
obsolete: use clist.row(row).get_data()


Gtk::CList::set_row_data_full - sets a data pointer for a given row with destroy notification

void set_row_data_full(gint row, gpointer data, GtkDestroyNotify destroy);
obsolete: use clist.rows[row].set_data(data,destroy);


Gtk::CList::set_row_height - change the height of the rows

void set_row_height(guint height);
the default is the height of the current font


Gtk::CList::set_selectable - set selectable flag of a single row

void set_selectable(gint row, bool selectable);
obsolete: use clist.row(row).set_selectable(selectable)


Gtk::CList::set_selection_mode - set the clist's selection mode

void set_selection_mode(GtkSelectionMode mode);
GTK_SELECTION_SINGLE, GTK_SELECTION_BROWSE, GTK_SELECTION_MULTIPLE, GTK_SELECTION_EXTENDED


Gtk::CList::set_shadow_type - set the border style of the clist, valid choices are:

void set_shadow_type(GtkShadowType type);
GTK_SHADOW_NONE, GTK_SHADOW_IN, GTK_SHADOW_OUT, GTK_SHADOW_ETCHED_IN, GTK_SHADOW_ETCHED_OUT


Gtk::CList::set_shift - this sets a horizontal and vertical for drawing

void set_shift(gint row, gint column, gint vertical, gint horizontal);
the contents of a cell; it can be positive or negative; this is particulary useful for indenting items in a column obsolete: use clist.cell(row,column).set_shift(vertical,horizontal)


Gtk::CList::set_sort_column - the column to sort by

void set_sort_column(gint column);

Gtk::CList::set_sort_type - how to sort : ascending or descending

void set_sort_type(GtkSortType sort_type);

Gtk::CList::set_text - sets a given cell's text, replacing it's current contents

void set_text(gint row, gint column, const string& text);
obsolete: use clist.cell(row,column).set_text(text);


Gtk::CList::sort - sort the list with the current compare function

void sort();

Gtk::CList::swap_rows - swap the position of two rows

void swap_rows(gint row1, gint row2);
obsolete: use clist.rows().swap(clist.rows[row1],clist.rows[row2]);


Gtk::CList::thaw - thaw the list (see <A HREF="#freeze">freeze</A>)

void thaw();

Gtk::CList::undo_selection - undo the last select/unselect operation

emitable signal void undo_selection();
virtual void undo_selection_impl();
obsolete: use clist.selection().undo();


Gtk::CList::unselect_row - Unselect a row

signal void unselect_row(gint, gint, GdkEvent*);
virtual void unselect_row_impl(gint p0, gint p1, GdkEvent* p2);
obsolete: use clist.row(row).unselect()