index
gtk-- homepage



Description:
Gtk_CList

#include <gtk--/clist.h>
Base classes: Gtk_Container
Derived by: Gtk_CTree

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



Properties:

NameTypeGetSetDescription
flags guint16      
row_mem_chunk GMemChunk*     mem chunks
cell_mem_chunk GMemChunk*      
freeze_count guint      
internal_allocation GdkRectangle     allocation rectangle after the conatiner_border_width * and the width of the shadow border
rows gint     rows
row_center_offset gint      
row_height gint      
row_list GList*      
row_list_end GList*      
columns gint     columns
column_title_area GdkRectangle      
title_window GdkWindow*      
column GtkCListColumn*     dynamicly allocated array of column structures
clist_window GdkWindow*     the scrolling window and it's height and width to * make things a little speedier
clist_window_width gint      
clist_window_height gint      
hoffset gint     offsets for scrolling
voffset gint      
shadow_type GtkShadowType     border shadow style
selection_mode GtkSelectionMode     the list's selection mode (gtkenums.h)
selection GList*     list of selected rows
selection_end GList*      
undo_selection GList*      
undo_unselection GList*      
undo_anchor gint      
button_actions       mouse buttons
drag_button guint8      
click_cell GtkCListCellInfo     dnd
hadjustment GtkAdjustment*     scroll adjustments
vadjustment GtkAdjustment*      
xor_gc GdkGC*     xor GC for the vertical drag line
fg_gc GdkGC*     gc for drawing unselected cells
bg_gc GdkGC*      
cursor_drag GdkCursor*     cursor used to indicate dragging
x_drag gint     the current x-pixel location of the xor-drag line
focus_row gint     focus handling
anchor gint     dragging the selection
anchor_state GtkStateType      
drag_pos gint      
htimer gint      
vtimer gint      
sort_type GtkSortType      
compare GtkCListCompareFunc      
sort_column gint    



Public member index:


iterator for traversing over the rows

iterator for traversing through selected items

Gtk_CList(int columns,const gchar *titles[]=0);
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 <Gtk_Widget > &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

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;
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 <string > text);
gint prepend(const gchar *text[]);
gint prepend(const vector <string > text);
gint insert_row(gint row,const gchar *text[]);
gint insert_row(gint row,const vector <string > &text);
void remove_row(gint row);
iterator begin();
iterator end();
seliterator selbegin()const;
seliterator selend()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;
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 <Gtk_Style > get_cell_style(gint row,gint column)const;
void set_row_style(gint row,const Gtk_Style &style);
Gtk_ObjectHandle <Gtk_Style > 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:


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);
Private member index:


GtkType get_type();
virtual bool check_seliterator_type()const;

Public member details:


freeze
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


column_title_active
void Gtk_CList::column_title_active(gint column);

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


column_titles_active
void Gtk_CList::column_titles_active();

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


set_column_justification
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


set_column_width
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


set_row_height
void Gtk_CList::set_row_height(gint height);

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


moveto
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


get_cell_type
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


get_text
bool Gtk_CList::get_text(gint row,gint column,_gtk_string *text)const;

get cell's text
returns true on success


get_pixmap
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 details:



Private member details:



Examples:





(pages generated by PERCEPS -script.)