Class Index Cross Index Namespace Index

Class Gtk::CList

A multi-columned scrolling 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);
Cell cell(gint row, gint column);
const Cell cell(gint row, gint column) const;
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();
ColumnVector& columns();
const ColumnVector& columns() const;
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;
gint get_row_height() 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, nstring* text) const;
bool get_text(gint row, gint column, string& text) const;
nstring get_text(gint row, gint column) 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*);
SelectionList& selection();
const SelectionList& selection() const;
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:

The GtkCList widget is a very useful multi-columned scrolling list. It can display data in nicely aligned vertical columns, with titles at the top of the list.


Function Member Descriptions:

Gtk::CList::append_row - Append a row (see also 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);
The column responds to button presses, prelights, and grabs keyboard focus.

obsolete: Use clist.column(column).set_active().



Gtk::CList::column_title_passive - Set a column title to be passive.

void column_title_passive(gint column);
obsolete: Use clist.column(column).set_passive().


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

void column_titles_active();
The column titles will 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!) row that points to that data, or -1 if none.

gint find_row_from_data(gpointer data) const;
obsolete: Use clist.rows().find_data(data).


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

void freeze();
Thaw the list after you have made a number of changes and the updates will occur in a more efficient manner than if you made them on an 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.

GtkCellType get_cell_type(gint row, gint column) const;
GtkCellType is one of: GTK_CELL_EMPTY, GTK_CELL_TEXT, GTK_CELL_PIXMAP, GTK_CELL_PIXTEXT, or 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.column(column).get_title().


Gtk::CList::get_column_widget - Returns the column widget.

Widget* get_column_widget(gint column) const;
obsolete: Use clist.column(column).get_widget().


Gtk::CList::get_column_width - Returns the width in pixels of the column, returns -1 if the column doens't exist. Column numbers start with 0.

gint get_column_width(gint column) const;
obsolete: Use clist.column(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.row(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 to the given column and row.

void moveto(gint row, gint column, gfloat row_align=0.5, gfloat col_align=0.5);
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.column(column).get_optimal_width().


Gtk::CList::prepend_row - Prepend a row (see also 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.row(row1),clist.row(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 be allocated.

void set_background(gint row, const Gdk_Color& color);
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.column(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, orGTK_JUSTIFY_FILL.

obsolete: Use clist.column(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.column(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.column(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.column(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.column(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.column(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.column(column).set_widget(widgth).


Gtk::CList::set_column_width - Set the pixel width of a column.

void set_column_width(gint column, gint width);
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.

obsolete: Use clist.column(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 be allocated.

void set_foreground(gint row, const Gdk_Color& color);
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.row(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);
mode can be one of: GTK_SELECTION_SINGLE, GTK_SELECTION_BROWSE, or 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, or GTK_SHADOW_ETCHED_OUT.


Gtk::CList::set_shift - This sets a horizontal and vertical for drawing the contents of a cell.

void set_shift(gint row, gint column, gint vertical, gint horizontal);
The 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.row(row1),clist.row(row2)).


Gtk::CList::thaw - Thaw the list (see also freeze).

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().