GtkSheet

GtkSheet — A spreadsheet widget for Gtk+

Synopsis


#include <gtkextra.h>

                    GtkSheet;
                    GtkSheetChild;
                    GtkSheetRow;
                    GtkSheetCell;
                    GtkSheetRange;
                    GtkSheetButton;
                    GtkSheetCellAttr;
                    GtkSheetCellBorder;
enum                GtkSheetAttrType;
enum                GtkSheetState;
enum                GtkSheetEntryType;
enum                GtkSheetVerticalJustification;
GtkWidget *         gtk_sheet_new                       (guint rows,
                                                         guint columns,
                                                         const gchar *title);
void                gtk_sheet_construct                 (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title);
GtkWidget *         gtk_sheet_new_browser               (guint rows,
                                                         guint columns,
                                                         const gchar *title);
void                gtk_sheet_construct_browser         (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title);
GtkWidget *         gtk_sheet_new_with_custom_entry     (guint rows,
                                                         guint columns,
                                                         const gchar *title,
                                                         GType entry_type);
void                gtk_sheet_construct_with_custom_entry
                                                        (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title,
                                                         GType entry_type);
void                gtk_sheet_change_entry              (GtkSheet *sheet,
                                                         const GType entry_type);
GType               gtk_sheet_get_entry_type            (GtkSheet *sheet);
GtkWidget *         gtk_sheet_get_entry                 (GtkSheet *sheet);
GtkWidget *         gtk_sheet_get_entry_widget          (GtkSheet *sheet);
gchar *             gtk_sheet_get_entry_text            (GtkSheet *sheet);
void                gtk_sheet_set_entry_text            (GtkSheet *sheet,
                                                         const gchar *text);
void                gtk_sheet_set_entry_editable        (GtkSheet *sheet,
                                                         const gboolean editable);
gulong              gtk_sheet_entry_signal_connect_changed
                                                        (GtkSheet *sheet,
                                                         GCallback handler);
void                gtk_sheet_entry_signal_disconnect_by_func
                                                        (GtkSheet *sheet,
                                                         GCallback handler);
void                gtk_sheet_entry_select_region       (GtkSheet *sheet,
                                                         gint start_pos,
                                                         gint end_pos);
GtkSheetState       gtk_sheet_get_state                 (GtkSheet *sheet);
gboolean            gtk_sheet_get_attributes            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         GtkSheetCellAttr *attributes);
guint               gtk_sheet_get_rows_count            (GtkSheet *sheet);
void                gtk_sheet_get_visible_range         (GtkSheet *sheet,
                                                         GtkSheetRange *range);
void                gtk_sheet_set_selection_mode        (GtkSheet *sheet,
                                                         GtkSelectionMode mode);
gboolean            gtk_sheet_autoresize                (GtkSheet *sheet);
gboolean            gtk_sheet_autoresize_columns        (GtkSheet *sheet);
void                gtk_sheet_set_autoresize_columns    (GtkSheet *sheet,
                                                         gboolean autoresize);
gboolean            gtk_sheet_autoresize_rows           (GtkSheet *sheet);
void                gtk_sheet_set_autoresize_rows       (GtkSheet *sheet,
                                                         gboolean autoresize);
void                gtk_sheet_set_autoresize            (GtkSheet *sheet,
                                                         gboolean autoresize);
gboolean            gtk_sheet_autoscroll                (GtkSheet *sheet);
void                gtk_sheet_set_autoscroll            (GtkSheet *sheet,
                                                         gboolean autoscroll);
gboolean            gtk_sheet_clip_text                 (GtkSheet *sheet);
void                gtk_sheet_set_clip_text             (GtkSheet *sheet,
                                                         gboolean clip_text);
gboolean            gtk_sheet_justify_entry             (GtkSheet *sheet);
void                gtk_sheet_set_justify_entry         (GtkSheet *sheet,
                                                         gboolean justify);
GtkSheetVerticalJustification  gtk_sheet_get_vjustification
                                                        (GtkSheet *sheet);
void                gtk_sheet_set_vjustification        (GtkSheet *sheet,
                                                         GtkSheetVerticalJustification vjust);
gboolean            gtk_sheet_locked                    (GtkSheet *sheet);
void                gtk_sheet_set_locked                (GtkSheet *sheet,
                                                         gboolean locked);
void                gtk_sheet_set_title                 (GtkSheet *sheet,
                                                         const gchar *title);
const gchar *       gtk_sheet_get_description           (GtkSheet *sheet,
                                                         const gchar *description);
void                gtk_sheet_set_description           (GtkSheet *sheet,
                                                         const gchar *description);
gboolean            gtk_sheet_is_frozen                 (GtkSheet *sheet);
void                gtk_sheet_freeze                    (GtkSheet *sheet);
void                gtk_sheet_thaw                      (GtkSheet *sheet);
void                gtk_sheet_moveto                    (GtkSheet *sheet,
                                                         gint row,
                                                         gint column,
                                                         gfloat row_align,
                                                         gfloat col_align);
void                gtk_sheet_set_background            (GtkSheet *sheet,
                                                         GdkColor *color);
void                gtk_sheet_set_grid                  (GtkSheet *sheet,
                                                         GdkColor *color);
gboolean            gtk_sheet_grid_visible              (GtkSheet *sheet);
void                gtk_sheet_show_grid                 (GtkSheet *sheet,
                                                         gboolean show);
GtkAdjustment *     gtk_sheet_get_hadjustment           (GtkSheet *sheet);
void                gtk_sheet_set_hadjustment           (GtkSheet *sheet,
                                                         GtkAdjustment *adjustment);
GtkAdjustment *     gtk_sheet_get_vadjustment           (GtkSheet *sheet);
void                gtk_sheet_set_vadjustment           (GtkSheet *sheet,
                                                         GtkAdjustment *adjustment);
gboolean            gtk_sheet_in_clip                   (GtkSheet *sheet);
void                gtk_sheet_clip_range                (GtkSheet *sheet,
                                                         const GtkSheetRange *clip_range);
void                gtk_sheet_unclip_range              (GtkSheet *sheet);
void                gtk_sheet_get_active_cell           (GtkSheet *sheet,
                                                         gint *row,
                                                         gint *column);
gboolean            gtk_sheet_set_active_cell           (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);
void                gtk_sheet_set_tab_direction         (GtkSheet *sheet,
                                                         GtkDirectionType dir);
gboolean            gtk_sheet_get_selection             (GtkSheet *sheet,
                                                         GtkSheetState *state,
                                                         GtkSheetRange *range);
void                gtk_sheet_select_row                (GtkSheet *sheet,
                                                         gint row);
void                gtk_sheet_select_range              (GtkSheet *sheet,
                                                         const GtkSheetRange *range);
void                gtk_sheet_unselect_range            (GtkSheet *sheet);
gchar *             gtk_sheet_get_tooltip_markup        (GtkSheet *sheet);
void                gtk_sheet_set_tooltip_markup        (GtkSheet *sheet,
                                                         const gchar *markup);
gchar *             gtk_sheet_get_tooltip_text          (GtkSheet *sheet);
void                gtk_sheet_set_tooltip_text          (GtkSheet *sheet,
                                                         const gchar *text);
void                gtk_sheet_add_row                   (GtkSheet *sheet,
                                                         guint nrows);
void                gtk_sheet_insert_rows               (GtkSheet *sheet,
                                                         guint row,
                                                         guint nrows);
void                gtk_sheet_delete_rows               (GtkSheet *sheet,
                                                         guint row,
                                                         guint nrows);
gboolean            gtk_sheet_row_titles_visible        (GtkSheet *sheet);
void                gtk_sheet_show_row_titles           (GtkSheet *sheet);
void                gtk_sheet_hide_row_titles           (GtkSheet *sheet);
const gchar *       gtk_sheet_get_row_title             (GtkSheet *sheet,
                                                         gint row);
void                gtk_sheet_set_row_title             (GtkSheet *sheet,
                                                         gint row,
                                                         const gchar *title);
void                gtk_sheet_set_row_titles_width      (GtkSheet *sheet,
                                                         guint width);
void                gtk_sheet_set_row_height            (GtkSheet *sheet,
                                                         gint row,
                                                         guint height);
const gchar *       gtk_sheet_row_button_get_label      (GtkSheet *sheet,
                                                         gint row);
void                gtk_sheet_row_button_add_label      (GtkSheet *sheet,
                                                         gint row,
                                                         const gchar *label);
void                gtk_sheet_row_button_justify        (GtkSheet *sheet,
                                                         gint row,
                                                         GtkJustification justification);
gboolean            gtk_sheet_row_sensitive             (GtkSheet *sheet,
                                                         gint row);
void                gtk_sheet_row_set_sensitivity       (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean sensitive);
void                gtk_sheet_rows_set_sensitivity      (GtkSheet *sheet,
                                                         gboolean sensitive);
gboolean            gtk_sheet_rows_resizable            (GtkSheet *sheet);
void                gtk_sheet_rows_set_resizable        (GtkSheet *sheet,
                                                         gboolean resizable);
gboolean            gtk_sheet_row_visible               (GtkSheet *sheet,
                                                         gint row);
void                gtk_sheet_row_set_visibility        (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean visible);
void                gtk_sheet_row_label_set_visibility  (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean visible);
void                gtk_sheet_rows_labels_set_visibility
                                                        (GtkSheet *sheet,
                                                         gboolean visible);
gchar *             gtk_sheet_row_get_tooltip_markup    (GtkSheet *sheet,
                                                         const gint row);
void                gtk_sheet_row_set_tooltip_markup    (GtkSheet *sheet,
                                                         const gint row,
                                                         const gchar *markup);
gchar *             gtk_sheet_row_get_tooltip_text      (GtkSheet *sheet,
                                                         const gint row);
void                gtk_sheet_row_set_tooltip_text      (GtkSheet *sheet,
                                                         const gint row,
                                                         const gchar *text);
void                gtk_sheet_set_cell                  (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         GtkJustification justification,
                                                         const gchar *text);
void                gtk_sheet_set_cell_text             (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         const gchar *text);
gchar *             gtk_sheet_cell_get_text             (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_cell_clear                (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);
void                gtk_sheet_cell_delete               (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);
GtkStateType        gtk_sheet_cell_get_state            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);
gchar *             gtk_sheet_cell_get_tooltip_markup   (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col);
void                gtk_sheet_cell_set_tooltip_markup   (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col,
                                                         const gchar *markup);
gchar *             gtk_sheet_cell_get_tooltip_text     (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col);
void                gtk_sheet_cell_set_tooltip_text     (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col,
                                                         const gchar *text);
gboolean            gtk_sheet_get_cell_area             (GtkSheet *sheet,
                                                         gint row,
                                                         gint column,
                                                         GdkRectangle *area);
gboolean            gtk_sheet_get_pixel_info            (GtkSheet *sheet,
                                                         GdkWindow *window,
                                                         gint x,
                                                         gint y,
                                                         gint *row,
                                                         gint *column);
gpointer            gtk_sheet_get_link                  (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_link_cell                 (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         gpointer link);
void                gtk_sheet_remove_link               (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_range_clear               (GtkSheet *sheet,
                                                         const GtkSheetRange *range);
void                gtk_sheet_range_delete              (GtkSheet *sheet,
                                                         const GtkSheetRange *range);
void                gtk_sheet_range_set_background      (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);
void                gtk_sheet_range_set_foreground      (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);
void                gtk_sheet_range_set_justification   (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         GtkJustification just);
void                gtk_sheet_range_set_editable        (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gint editable);
void                gtk_sheet_range_set_visible         (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gboolean visible);
void                gtk_sheet_range_set_border          (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gint mask,
                                                         guint width,
                                                         gint line_style);
void                gtk_sheet_range_set_border_color    (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);
void                gtk_sheet_range_set_font            (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         PangoFontDescription *font_desc);
GtkSheetChild *     gtk_sheet_put                       (GtkSheet *sheet,
                                                         GtkWidget *child,
                                                         gint x,
                                                         gint y);
void                gtk_sheet_attach                    (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col,
                                                         gint xoptions,
                                                         gint yoptions,
                                                         gint xpadding,
                                                         gint ypadding);
void                gtk_sheet_attach_floating           (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_attach_default            (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_move_child                (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint x,
                                                         gint y);
const GtkSheetChild * gtk_sheet_get_child_at            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_button_attach             (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkSheet

Implemented Interfaces

GtkSheet implements AtkImplementorIface and GtkBuildable.

Properties

  "autoresize"               gboolean              : Read / Write
  "autoresize-cols"          gboolean              : Read / Write
  "autoresize-rows"          gboolean              : Read / Write
  "autoscroll"               gboolean              : Read / Write
  "bgcolor"                  GdkColor*             : Read / Write
  "clip-text"                gboolean              : Read / Write
  "col-titles-height"        guint                 : Read / Write
  "col-titles-visible"       gboolean              : Read / Write
  "columns-resizable"        gboolean              : Read / Write
  "description"              gchar*                : Read / Write
  "entry-type"               GtkSheetEntryType     : Read / Write
  "grid-color"               GdkColor*             : Read / Write
  "grid-visible"             gboolean              : Read / Write
  "justify-entry"            gboolean              : Read / Write
  "locked"                   gboolean              : Read / Write
  "n-rows"                   gint                  : Read / Write
  "row-titles-visible"       gboolean              : Read / Write
  "row-titles-width"         guint                 : Read / Write
  "rows-resizable"           gboolean              : Read / Write
  "selection-mode"           GtkSelectionMode      : Read / Write
  "title"                    gchar*                : Read / Write
  "vjust"                    GtkSheetVerticalJustification  : Read / Write

Signals

  "activate"                                       : Run Last
  "changed"                                        : Run Last
  "clear-cell"                                     : Run Last
  "clip-range"                                     : Run Last
  "deactivate"                                     : Run Last
  "enter-pressed"                                  : Run Last
  "entry-focus-in"                                 : Run Last
  "entry-focus-out"                                : Run Last
  "move-cursor"                                    : Run Last / Action
  "move-range"                                     : Run Last
  "new-column-width"                               : Run Last
  "new-row-height"                                 : Run Last
  "populate-popup"                                 : Run Last
  "resize-range"                                   : Run Last
  "select-column"                                  : Run Last
  "select-range"                                   : Run Last
  "select-row"                                     : Run Last
  "set-cell"                                       : Run Last
  "set-scroll-adjustments"                         : Run Last
  "traverse"                                       : Run Last

Description

GtkSheet is a matrix widget for GTK+. It consists of an scrollable grid of cells where you can put text or other GtkWidget's in. Cells are organized in rows (GtkSheetRow) and columns (GtkSheetColumn). Cell contents can be edited interactively through a specially designed entry (GtkItemEntry). A GtkSheet is also a container subclass, allowing you to display buttons, curves, pixmaps and any other widget in it. You can also set many attributes as: border, foreground and background color, text justification, and more. The testgtksheet program shows how easy is to create a spreadsheet-like GUI using this widget set.

Details

GtkSheet

typedef struct _GtkSheet GtkSheet;

The GtkSheet struct contains only private data. It should only be accessed through the functions described below.


GtkSheetChild

typedef struct {
} GtkSheetChild;

The GtkSheetChild struct contains only private data. It should only be accessed through the functions described below.


GtkSheetRow

typedef struct {
} GtkSheetRow;

The GtkSheetRow struct contains only private data. It should only be accessed through the functions described below.


GtkSheetCell

typedef struct {
} GtkSheetCell;

The GtkSheetCell struct contains only private data. It should only be accessed through the functions described below.


GtkSheetRange

typedef struct {
    gint row0,col0; /* upper-left cell */
    gint rowi,coli; /* lower-right cell */
} GtkSheetRange;

Defines a rectangular range of cells.

gint row0;

upper left cell

gint col0;

upper left cell

gint rowi;

lower right cell

gint coli;

lower right cell

GtkSheetButton

typedef struct {
} GtkSheetButton;

The GtkSheetButton struct contains only private data. It should only be accessed through the functions described below.


GtkSheetCellAttr

typedef struct {
} GtkSheetCellAttr;

The GtkSheetCellAttr struct contains only private data. It should only be accessed through the functions described below.


GtkSheetCellBorder

typedef struct {
} GtkSheetCellBorder;

The GtkSheetCellBorder struct contains only private data. It should only be accessed through the functions described below.


enum GtkSheetAttrType

typedef enum
{
    GTK_SHEET_FOREGROUND,
    GTK_SHEET_BACKGROUND,
    GTK_SHEET_FONT,
    GTK_SHEET_JUSTIFICATION,
    GTK_SHEET_BORDER,
    GTK_SHEET_BORDER_COLOR,
    GTK_SHEET_IS_EDITABLE,
    GTK_SHEET_IS_VISIBLE
}
GtkSheetAttrType;


enum GtkSheetState

typedef enum
{
    GTK_SHEET_NORMAL,
    GTK_SHEET_ROW_SELECTED,
    GTK_SHEET_COLUMN_SELECTED,
    GTK_SHEET_RANGE_SELECTED
} GtkSheetState;

Selection state of the GtkSheet

GTK_SHEET_NORMAL

nothing selected

GTK_SHEET_ROW_SELECTED

one row selected

GTK_SHEET_COLUMN_SELECTED

one column selected

GTK_SHEET_RANGE_SELECTED

rectangular area of cells selected

enum GtkSheetEntryType

typedef enum
{
    GTK_SHEET_ENTRY_TYPE_DEFAULT,
    GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY,
    GTK_SHEET_ENTRY_TYPE_GTK_ENTRY,
    GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW,
    GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW,
    GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON,
    GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX,
    GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY,
    GTK_SHEET_ENTRY_TYPE_GTK_COMBO,
} GtkSheetEntryType;

Subset of GtkEditable Widgets to allow selecting a widget from glade-3

GTK_SHEET_ENTRY_TYPE_DEFAULT

default, applicat. controlled

GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY

GtkItemEntry

GTK_SHEET_ENTRY_TYPE_GTK_ENTRY

GtkEntry

GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW

GtkTextView

GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW

GtkDataTextView

GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON

GtkSpinButton

GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX

GtkComboBox

GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY

GtkComboBoxEntry

GTK_SHEET_ENTRY_TYPE_GTK_COMBO

GtkCombo, Deprecated

enum GtkSheetVerticalJustification

typedef enum
{
    GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT,
    GTK_SHEET_VERTICAL_JUSTIFICATION_TOP,
    GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE,
    GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM,
} GtkSheetVerticalJustification;

Vertical text alignment.

GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT

default

GTK_SHEET_VERTICAL_JUSTIFICATION_TOP

top aligned

GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE

middle aligned

GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM

bottom aligned

gtk_sheet_new ()

GtkWidget *         gtk_sheet_new                       (guint rows,
                                                         guint columns,
                                                         const gchar *title);

Creates a new sheet widget with the given number of rows and columns.

rows :

initial number of rows

columns :

initial number of columns

title :

sheet title

Returns :

the new sheet GtkSheet

gtk_sheet_construct ()

void                gtk_sheet_construct                 (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title);

Initializes an existent GtkSheet with the given number of rows and columns.

sheet :

a GtkSheet

rows :

number of rows

columns :

number of columns

title :

sheet title

gtk_sheet_new_browser ()

GtkWidget *         gtk_sheet_new_browser               (guint rows,
                                                         guint columns,
                                                         const gchar *title);

Creates a new browser sheet. Its cells cannot be edited(read-only).

rows :

initial number of rows

columns :

initial number of columns

title :

sheet title

Returns :

the new read-only GtkSheet

gtk_sheet_construct_browser ()

void                gtk_sheet_construct_browser         (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title);

Initializes an existent read-only GtkSheet with the given number of rows and columns.

sheet :

a GtkSheet

rows :

number of rows

columns :

number of columns

title :

sheet title

gtk_sheet_new_with_custom_entry ()

GtkWidget *         gtk_sheet_new_with_custom_entry     (guint rows,
                                                         guint columns,
                                                         const gchar *title,
                                                         GType entry_type);

Creates a new sheet widget with the given number of rows and columns and a custome entry type.

rows :

initial number of rows

columns :

initial number of columns

title :

sheet title

entry_type :

a GType

Returns :

the new sheet GtkSheet

gtk_sheet_construct_with_custom_entry ()

void                gtk_sheet_construct_with_custom_entry
                                                        (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title,
                                                         GType entry_type);

Initializes an existent read-only GtkSheet with the given number of rows and columns and a custom entry.

sheet :

a GtkSheet

rows :

number of rows

columns :

number of columns

title :

sheet title

entry_type :

a GType

gtk_sheet_change_entry ()

void                gtk_sheet_change_entry              (GtkSheet *sheet,
                                                         const GType entry_type);

Changes the current entry of the cell in GtkSheet. The old sheet entry widget gets dropped and a new entry widget is created. Beware: You will have to reconnect all your signal handlers after changing an entry.

sheet :

a GtkSheet

entry_type :

a GType

gtk_sheet_get_entry_type ()

GType               gtk_sheet_get_entry_type            (GtkSheet *sheet);

Get sheets entry type, if known

sheet :

a GtkSheet

Returns :

a GtkSheetEntryType or GTK_SHEET_ENTRY_TYPE_DEFAULT

gtk_sheet_get_entry ()

GtkWidget *         gtk_sheet_get_entry                 (GtkSheet *sheet);

Get sheet's entry widget. If the entry widget is a container, the direct childs of the container are searched for a valid entry widget. If you want the container itself to be returned, you should use #gtk_sheet_get_entry_widget() instead.

sheet :

a GtkSheet

Returns :

(transfer none) a GtkWidget or NULL

gtk_sheet_get_entry_widget ()

GtkWidget *         gtk_sheet_get_entry_widget          (GtkSheet *sheet);

Get sheet's entry widget. If the entry widget is a container, the container widget is returned. In order to get the entry in the container child, you might want to use #gtk_sheet_get_entry() instead.

sheet :

a GtkSheet

Returns :

(transfer none) a GtkWidget or NULL

gtk_sheet_get_entry_text ()

gchar *             gtk_sheet_get_entry_text            (GtkSheet *sheet);

Get the text out of the sheet_entry. This function is mainly used to synchronize the text of a second entry with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

Returns :

a copy of the sheet_entry text or NULL. This function returns an allocated string, so g_free() it after usage!

gtk_sheet_set_entry_text ()

void                gtk_sheet_set_entry_text            (GtkSheet *sheet,
                                                         const gchar *text);

Set the text in the sheet_entry (and active cell). This function is mainly used to synchronize the text of a second entry with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

text :

the text to be set or NULL

gtk_sheet_set_entry_editable ()

void                gtk_sheet_set_entry_editable        (GtkSheet *sheet,
                                                         const gboolean editable);

Set the editable flag in the sheet_entry This function is mainly used to synchronize the editable flag of a second entry with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

editable :

editable flag

gtk_sheet_entry_signal_connect_changed ()

gulong              gtk_sheet_entry_signal_connect_changed
                                                        (GtkSheet *sheet,
                                                         GCallback handler);

Connect a handler to the sheet_entry "changed" signal. The user_data argument of the handler will be filled with the GtkSheet. This function is mainly used to synchronize a second entry widget with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

handler :

(scope notified) the signal handler

Returns :

the handler id

gtk_sheet_entry_signal_disconnect_by_func ()

void                gtk_sheet_entry_signal_disconnect_by_func
                                                        (GtkSheet *sheet,
                                                         GCallback handler);

Disconnect a handler from the sheet_entry "changed" signal This function is mainly used to synchronize a second entry widget with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

handler :

(scope call) the signal handler

gtk_sheet_entry_select_region ()

void                gtk_sheet_entry_select_region       (GtkSheet *sheet,
                                                         gint start_pos,
                                                         gint end_pos);

Selects a region of text. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

start_pos :

start of region

end_pos :

end of region

gtk_sheet_get_state ()

GtkSheetState       gtk_sheet_get_state                 (GtkSheet *sheet);

Get the selection state of the sheet (GtkSheetState).

sheet :

a GtkSheet

Returns :

GTK_SHEET_NORMAL,GTK_SHEET_ROW_SELECTED,GTK_SHEET_COLUMN_SELECTED,GTK_SHEET_RANGE_SELECTED

gtk_sheet_get_attributes ()

gboolean            gtk_sheet_get_attributes            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         GtkSheetCellAttr *attributes);

Gett cell attributes of the given cell.

sheet :

a GtkSheet.

row :

row number

col :

column number

attributes :

GtkSheetCellAttr of the given range

Returns :

TRUE means that the cell is currently allocated.

gtk_sheet_get_rows_count ()

guint               gtk_sheet_get_rows_count            (GtkSheet *sheet);

Get the number of the rows of the GtkSheet.

sheet :

a GtkSheet

Returns :

number of rows.

gtk_sheet_get_visible_range ()

void                gtk_sheet_get_visible_range         (GtkSheet *sheet,
                                                         GtkSheetRange *range);

Get sheet's ranges in a GkSheetRange structure.

sheet :

a GtkSheet.

range :

a selected GtkSheetRange struct _GtkSheetRange { gint row0,col0; // upper-left cell gint rowi,coli; // lower-right cell };

gtk_sheet_set_selection_mode ()

void                gtk_sheet_set_selection_mode        (GtkSheet *sheet,
                                                         GtkSelectionMode mode);

Sets the selection mode of the cells in a GtkSheet.

sheet :

a GtkSheet

mode :

GTK_SELECTION_SINGLE or GTK_SELECTION_BROWSE

gtk_sheet_autoresize ()

gboolean            gtk_sheet_autoresize                (GtkSheet *sheet);

Gets the autoresize mode of GtkSheet.

sheet :

a GtkSheet

Returns :

TRUE if autoresize_columns or autoresize_rows was set, or FALSE if none

gtk_sheet_autoresize_columns ()

gboolean            gtk_sheet_autoresize_columns        (GtkSheet *sheet);

Gets the autoresize mode for GtkSheet columns.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_autoresize_columns ()

void                gtk_sheet_set_autoresize_columns    (GtkSheet *sheet,
                                                         gboolean autoresize);

Controls wether columns will be autoresized upon deactivation, as you type text or set a cell_text value. If you want the cells to be autoresized when you pack widgets look at gtk_sheet_attach_*().

sheet :

a GtkSheet

autoresize :

TRUE or FALSE

gtk_sheet_autoresize_rows ()

gboolean            gtk_sheet_autoresize_rows           (GtkSheet *sheet);

Gets the autoresize mode for GtkSheet rows.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_autoresize_rows ()

void                gtk_sheet_set_autoresize_rows       (GtkSheet *sheet,
                                                         gboolean autoresize);

Controls wether rows will be autoresized upon deactivation, as you type text or set a cell_text value. If you want the cells to be autoresized when you pack widgets look at gtk_sheet_attach_*().

sheet :

a GtkSheet

autoresize :

TRUE or FALSE

gtk_sheet_set_autoresize ()

void                gtk_sheet_set_autoresize            (GtkSheet *sheet,
                                                         gboolean autoresize);

Controls wether cells will be autoresized upon deactivation, as you type text or set a cell_text value. If you want the cells to be autoresized when you pack widgets look at gtk_sheet_attach_*(). This function sets both: autoresize_columns and autoresize_cells.

sheet :

a GtkSheet

autoresize :

TRUE or FALSE

gtk_sheet_autoscroll ()

gboolean            gtk_sheet_autoscroll                (GtkSheet *sheet);

Get the autoscroll mode of GtkSheet.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_autoscroll ()

void                gtk_sheet_set_autoscroll            (GtkSheet *sheet,
                                                         gboolean autoscroll);

The sheet will be automatically scrolled when you move beyond the last row/col in GtkSheet.

sheet :

a GtkSheet

autoscroll :

TRUE or FALSE

gtk_sheet_clip_text ()

gboolean            gtk_sheet_clip_text                 (GtkSheet *sheet);

Get clip text mode in GtkSheet. When clip text mode is turned off, cell text is written over neighbour columns, as long as their contents are empty.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_clip_text ()

void                gtk_sheet_set_clip_text             (GtkSheet *sheet,
                                                         gboolean clip_text);

Clip text in cell. When clip text mode is turned off, cell text is written over neighbour columns, as long as their contents are empty.

sheet :

a GtkSheet

clip_text :

TRUE or FALSE

gtk_sheet_justify_entry ()

gboolean            gtk_sheet_justify_entry             (GtkSheet *sheet);

Get the cell entry editor justification setting from GtkSheet.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_justify_entry ()

void                gtk_sheet_set_justify_entry         (GtkSheet *sheet,
                                                         gboolean justify);

Justify cell entry editor in GtkSheet.

sheet :

a GtkSheet

justify :

TRUE or FALSE

gtk_sheet_get_vjustification ()

GtkSheetVerticalJustification  gtk_sheet_get_vjustification
                                                        (GtkSheet *sheet);

Get the default vertical cell text justification from GtkSheet.

sheet :

a GtkSheet

Returns :

the default GtkSheetVerticalJustification

gtk_sheet_set_vjustification ()

void                gtk_sheet_set_vjustification        (GtkSheet *sheet,
                                                         GtkSheetVerticalJustification vjust);

Set the default vertical cell text justification for GtkSheet.

sheet :

a GtkSheet

vjust :

a GtkSheetVerticalJustification

gtk_sheet_locked ()

gboolean            gtk_sheet_locked                    (GtkSheet *sheet);

Get the lock status of GtkSheet, locked means the sheet is not editable, cell contents cannot be modified by the user.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_locked ()

void                gtk_sheet_set_locked                (GtkSheet *sheet,
                                                         gboolean locked);

Lock the GtkSheet, which means it is no longer editable, cell contents cannot be modified by the user.

sheet :

a GtkSheet

locked :

TRUE or FALSE

gtk_sheet_set_title ()

void                gtk_sheet_set_title                 (GtkSheet *sheet,
                                                         const gchar *title);

Set GtkSheet title. The widget will keep a copy of the string.

sheet :

a GtkSheet

title :

GtkSheet title

gtk_sheet_get_description ()

const gchar *       gtk_sheet_get_description           (GtkSheet *sheet,
                                                         const gchar *description);

Get sheet description.

sheet :

a GtkSheet

description :

GtkSheet description

Returns :

sheet description or NULL, do not modify or free it

gtk_sheet_set_description ()

void                gtk_sheet_set_description           (GtkSheet *sheet,
                                                         const gchar *description);

Set GtkSheet description for application use.

sheet :

a GtkSheet

description :

GtkSheet description

gtk_sheet_is_frozen ()

gboolean            gtk_sheet_is_frozen                 (GtkSheet *sheet);

Get freeze status.

sheet :

the GtkSheet

Returns :

TRUE or FALSE wether the sheet is frozen

gtk_sheet_freeze ()

void                gtk_sheet_freeze                    (GtkSheet *sheet);

Freeze all visual updates of the GtkSheet. The updates will occure in a more efficient way than if you made them on a unfrozen GtkSheet .

sheet :

a GtkSheet

gtk_sheet_thaw ()

void                gtk_sheet_thaw                      (GtkSheet *sheet);

Thaw the sheet after you have made a number of changes on a frozen sheet. The updates will occure in a more efficient way than if you made them on a unfrozen sheet .

sheet :

a GtkSheet

gtk_sheet_moveto ()

void                gtk_sheet_moveto                    (GtkSheet *sheet,
                                                         gint row,
                                                         gint column,
                                                         gfloat row_align,
                                                         gfloat col_align);

Scroll the viewing area of the sheet 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. passing row_align/col_align of -1.0 will suppress movement in that direction. if row or column is negative then there is no change

sheet :

a GtkSheet.

row :

row number

column :

column number

row_align :

row alignment

col_align :

column alignment

gtk_sheet_set_background ()

void                gtk_sheet_set_background            (GtkSheet *sheet,
                                                         GdkColor *color);

Sets the background color of the GtkSheet. If pass NULL, the sheet will be reset to the default color.

sheet :

a GtkSheet

color :

a GdkColor structure

gtk_sheet_set_grid ()

void                gtk_sheet_set_grid                  (GtkSheet *sheet,
                                                         GdkColor *color);

Set the grid color. If pass NULL, the grid will be reset to the default color.

sheet :

a GtkSheet

color :

a GdkColor structure

gtk_sheet_grid_visible ()

gboolean            gtk_sheet_grid_visible              (GtkSheet *sheet);

Gets the visibility of grid in GtkSheet.

sheet :

a GtkSheet

Returns :

TRUE(grid visible) or FALSE(grid invisible)

gtk_sheet_show_grid ()

void                gtk_sheet_show_grid                 (GtkSheet *sheet,
                                                         gboolean show);

Sets the visibility of grid in GtkSheet.

sheet :

a GtkSheet

show :

TRUE(grid visible) or FALSE(grid invisible)

gtk_sheet_get_hadjustment ()

GtkAdjustment *     gtk_sheet_get_hadjustment           (GtkSheet *sheet);

Get horizontal scroll adjustments.

sheet :

a GtkSheet.

Returns :

(transfer none) a GtkAdjustment

gtk_sheet_set_hadjustment ()

void                gtk_sheet_set_hadjustment           (GtkSheet *sheet,
                                                         GtkAdjustment *adjustment);

Change horizontal scroll adjustments.

sheet :

a GtkSheet.

adjustment :

a GtkAdjustment

gtk_sheet_get_vadjustment ()

GtkAdjustment *     gtk_sheet_get_vadjustment           (GtkSheet *sheet);

Get vertical scroll adjustments.

sheet :

a GtkSheet.

Returns :

(transfer none) a GtkAdjustment

gtk_sheet_set_vadjustment ()

void                gtk_sheet_set_vadjustment           (GtkSheet *sheet,
                                                         GtkAdjustment *adjustment);

Change vertical scroll adjustments.

sheet :

a GtkSheet.

adjustment :

a GtkAdjustment

gtk_sheet_in_clip ()

gboolean            gtk_sheet_in_clip                   (GtkSheet *sheet);

Get the clip status of GtkSheet.

sheet :

a GtkSheet.

Returns :

TRUE or FALSE

gtk_sheet_clip_range ()

void                gtk_sheet_clip_range                (GtkSheet *sheet,
                                                         const GtkSheetRange *clip_range);

Save selected range to "clipboard".

sheet :

a GtkSheet.

clip_range :

GtkSheetRange to be saved

gtk_sheet_unclip_range ()

void                gtk_sheet_unclip_range              (GtkSheet *sheet);

Free clipboard.

sheet :

a GtkSheet.

gtk_sheet_get_active_cell ()

void                gtk_sheet_get_active_cell           (GtkSheet *sheet,
                                                         gint *row,
                                                         gint *column);

Store the coordinates of the active cell in row,col. If (row<0 || col<0) then there was no active cell in the sheet.

sheet :

a GtkSheet

row :

row number

column :

column number

gtk_sheet_set_active_cell ()

gboolean            gtk_sheet_set_active_cell           (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);

Set active cell where the cell entry will be displayed. Use (row,col) = (-1,-1) to deactivate active cell.

sheet :

a GtkSheet

row :

row number

column :

column number

Returns :

FALSE if current cell can't be deactivated or requested cell can't be activated

gtk_sheet_set_tab_direction ()

void                gtk_sheet_set_tab_direction         (GtkSheet *sheet,
                                                         GtkDirectionType dir);

Sets a primary movement direction to the Tab, Return and Enter keys, and assigns the opposite direction to the same keys with GDK_SHIFT_MASK. Transposed movement direction can be accessed with GTK_SHEET_MOD_MASK|GDK_CONTROL_MASK and GTK_SHEET_MOD_MASK|GDK_CONTROL_MASK|GDK_SHIFT_MASK. All bindings are defined for the GtkSheetClass, so all sheet instances use the same movement directions. Default: GTK_DIR_TAB_FORWARD.

sheet :

a GtkSheet

dir :

the primary tab direction

Since 3.0.2


gtk_sheet_get_selection ()

gboolean            gtk_sheet_get_selection             (GtkSheet *sheet,
                                                         GtkSheetState *state,
                                                         GtkSheetRange *range);

Inquire current cell selection state and range.

sheet :

a GtkSheet

state :

where to store the GtkSheetState, may be NULL

range :

where to store the GtkSheetRange

Returns :

TRUE: there is a selection, FALSE: no selection or error

gtk_sheet_select_row ()

void                gtk_sheet_select_row                (GtkSheet *sheet,
                                                         gint row);

Select the row. The range is then highlighted, and the bounds are stored in sheet->range.

sheet :

a GtkSheet.

row :

row number

gtk_sheet_select_range ()

void                gtk_sheet_select_range              (GtkSheet *sheet,
                                                         const GtkSheetRange *range);

Highlight the selected range and store bounds in sheet->range

sheet :

a GtkSheet

range :

a GtkSheetRange

gtk_sheet_unselect_range ()

void                gtk_sheet_unselect_range            (GtkSheet *sheet);

Unselect the current selected range and clears the bounds in sheet->range.

sheet :

a GtkSheet

gtk_sheet_get_tooltip_markup ()

gchar *             gtk_sheet_get_tooltip_markup        (GtkSheet *sheet);

Gets the contents of the tooltip (markup) for sheet

sheet :

a GtkSheet.

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_set_tooltip_markup ()

void                gtk_sheet_set_tooltip_markup        (GtkSheet *sheet,
                                                         const gchar *markup);

Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language.

sheet :

a GtkSheet.

markup :

the contents of the tooltip for widget, or NULL.

gtk_sheet_get_tooltip_text ()

gchar *             gtk_sheet_get_tooltip_text          (GtkSheet *sheet);

Gets the contents of the tooltip for the GtkSheet

sheet :

a GtkSheet.

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_set_tooltip_text ()

void                gtk_sheet_set_tooltip_text          (GtkSheet *sheet,
                                                         const gchar *text);

Sets text as the contents of the tooltip.

sheet :

a GtkSheet.

text :

the contents of the tooltip for widget

gtk_sheet_add_row ()

void                gtk_sheet_add_row                   (GtkSheet *sheet,
                                                         guint nrows);

Append nrows rows to the end of the sheet.

sheet :

a GtkSheet.

nrows :

number of rows to be appended.

gtk_sheet_insert_rows ()

void                gtk_sheet_insert_rows               (GtkSheet *sheet,
                                                         guint row,
                                                         guint nrows);

Insert nrows rows before the given row and pull right.

sheet :

a GtkSheet.

row :

row number.

nrows :

number of rows to be inserted.

gtk_sheet_delete_rows ()

void                gtk_sheet_delete_rows               (GtkSheet *sheet,
                                                         guint row,
                                                         guint nrows);

Delete nrows rows starting from row.

sheet :

a GtkSheet.

row :

row number.

nrows :

number of rows to be deleted.

gtk_sheet_row_titles_visible ()

gboolean            gtk_sheet_row_titles_visible        (GtkSheet *sheet);

Get the visibility of row column titles .

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_show_row_titles ()

void                gtk_sheet_show_row_titles           (GtkSheet *sheet);

Show row titles .

sheet :

a GtkSheet

gtk_sheet_hide_row_titles ()

void                gtk_sheet_hide_row_titles           (GtkSheet *sheet);

Hide row titles .

sheet :

a GtkSheet

gtk_sheet_get_row_title ()

const gchar *       gtk_sheet_get_row_title             (GtkSheet *sheet,
                                                         gint row);

Get row title.

sheet :

a GtkSheet

row :

row number

Returns :

a pointer to the row title or NULL. Do not modify or free it.

gtk_sheet_set_row_title ()

void                gtk_sheet_set_row_title             (GtkSheet *sheet,
                                                         gint row,
                                                         const gchar *title);

Set row title.

sheet :

a GtkSheet

row :

row number

title :

row title

gtk_sheet_set_row_titles_width ()

void                gtk_sheet_set_row_titles_width      (GtkSheet *sheet,
                                                         guint width);

Resize row titles area.

sheet :

a GtkSheet

width :

row titles width.

gtk_sheet_set_row_height ()

void                gtk_sheet_set_row_height            (GtkSheet *sheet,
                                                         gint row,
                                                         guint height);

Set row height.

sheet :

a GtkSheet.

row :

row number.

height :

row height(in pixels).

gtk_sheet_row_button_get_label ()

const gchar *       gtk_sheet_row_button_get_label      (GtkSheet *sheet,
                                                         gint row);

Get a row button label.

sheet :

a GtkSheet

row :

row number

Returns :

In case of succes , a pointer to label text.Otherwise NULL

gtk_sheet_row_button_add_label ()

void                gtk_sheet_row_button_add_label      (GtkSheet *sheet,
                                                         gint row,
                                                         const gchar *label);

Set button label.It is used to set a row title.

sheet :

a GtkSheet

row :

row number

label :

text label

gtk_sheet_row_button_justify ()

void                gtk_sheet_row_button_justify        (GtkSheet *sheet,
                                                         gint row,
                                                         GtkJustification justification);

Set the justification(alignment) of the row buttons.

sheet :

a GtkSheet.

row :

row number

justification :

a GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER

gtk_sheet_row_sensitive ()

gboolean            gtk_sheet_row_sensitive             (GtkSheet *sheet,
                                                         gint row);

Get row button sensitivity.

sheet :

a GtkSheet.

row :

row number

Returns :

TRUE - is sensitive, FALSE - insensitive or not existant

gtk_sheet_row_set_sensitivity ()

void                gtk_sheet_row_set_sensitivity       (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean sensitive);

Set row button sensitivity. If sensitivity is TRUE can be toggled, otherwise it acts as a title .

sheet :

a GtkSheet.

row :

row number

sensitive :

TRUE or FALSE

gtk_sheet_rows_set_sensitivity ()

void                gtk_sheet_rows_set_sensitivity      (GtkSheet *sheet,
                                                         gboolean sensitive);

Set rows buttons sensitivity. If sensitivity is TRUE button can be toggled, otherwise act as titles. The sheet itself has no such property, it is a convenience function to set the property for all existing rows.

sheet :

a GtkSheet.

sensitive :

TRUE or FALSE

gtk_sheet_rows_resizable ()

gboolean            gtk_sheet_rows_resizable            (GtkSheet *sheet);

Get rows resizable status.

sheet :

a GtkSheet.

Returns :

TRUE or FALSE

gtk_sheet_rows_set_resizable ()

void                gtk_sheet_rows_set_resizable        (GtkSheet *sheet,
                                                         gboolean resizable);

Set rows resizable status.

sheet :

a GtkSheet.

resizable :

TRUE or FALSE

gtk_sheet_row_visible ()

gboolean            gtk_sheet_row_visible               (GtkSheet *sheet,
                                                         gint row);

Get row visibility.

sheet :

a GtkSheet.

row :

row number

Returns :

TRUE - is visible FALSE - invisible or not existant

gtk_sheet_row_set_visibility ()

void                gtk_sheet_row_set_visibility        (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean visible);

Set row visibility. The default value is TRUE. If FALSE, the row is hidden.

sheet :

a GtkSheet.

row :

row number

visible :

TRUE or FALSE

gtk_sheet_row_label_set_visibility ()

void                gtk_sheet_row_label_set_visibility  (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean visible);

Set row label visibility.

sheet :

a GtkSheet

row :

row number

visible :

TRUE or FALSE

gtk_sheet_rows_labels_set_visibility ()

void                gtk_sheet_rows_labels_set_visibility
                                                        (GtkSheet *sheet,
                                                         gboolean visible);

Set all rows label visibility. The sheet itself has no such property, this is a convenience function to set the property for all existing rows.

sheet :

a GtkSheet

visible :

TRUE or FALSE

gtk_sheet_row_get_tooltip_markup ()

gchar *             gtk_sheet_row_get_tooltip_markup    (GtkSheet *sheet,
                                                         const gint row);

Gets the contents of the tooltip (markup) for the column

sheet :

a GtkSheet.

row :

row index

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_row_set_tooltip_markup ()

void                gtk_sheet_row_set_tooltip_markup    (GtkSheet *sheet,
                                                         const gint row,
                                                         const gchar *markup);

Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language.

sheet :

a GtkSheet.

row :

row index

markup :

the contents of the tooltip for widget, or NULL.

gtk_sheet_row_get_tooltip_text ()

gchar *             gtk_sheet_row_get_tooltip_text      (GtkSheet *sheet,
                                                         const gint row);

Gets the contents of the tooltip for the column

sheet :

a GtkSheet.

row :

row index

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_row_set_tooltip_text ()

void                gtk_sheet_row_set_tooltip_text      (GtkSheet *sheet,
                                                         const gint row,
                                                         const gchar *text);

Sets text as the contents of the tooltip.

sheet :

a GtkSheet.

row :

row index

text :

the contents of the tooltip for widget

gtk_sheet_set_cell ()

void                gtk_sheet_set_cell                  (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         GtkJustification justification,
                                                         const gchar *text);

Set cell contents and allocate memory if needed.

sheet :

a GtkSheet.

row :

row_number

col :

column number

justification :

a GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER

text :

cell text

gtk_sheet_set_cell_text ()

void                gtk_sheet_set_cell_text             (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         const gchar *text);

Set cell contents and allocate memory if needed. No justifcation is made. attributes and links remain unchanged.

sheet :

a GtkSheet.

row :

row_number

col :

column number

text :

cell text

gtk_sheet_cell_get_text ()

gchar *             gtk_sheet_cell_get_text             (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);

Get cell text.

sheet :

a GtkSheet

row :

row number

col :

column number

Returns :

a pointer to the cell text, or NULL. Do not modify or free it.

gtk_sheet_cell_clear ()

void                gtk_sheet_cell_clear                (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);

Clear cell contents.

sheet :

a GtkSheet.

row :

row_number

column :

column number

gtk_sheet_cell_delete ()

void                gtk_sheet_cell_delete               (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);

Clear cell contents and remove links.

sheet :

a GtkSheet.

row :

row_number

column :

column number

gtk_sheet_cell_get_state ()

GtkStateType        gtk_sheet_cell_get_state            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);

Get status of a cell.

sheet :

a GtkSheet

row :

row number

col :

column number

Returns :

a "" GTK_SHEET_NORMAL,GTK_SHEET_ROW_SELECTED,GTK_SHEET_COLUMN_SELECTED,GTK_SHEET_RANGE_SELECTED

gtk_sheet_cell_get_tooltip_markup ()

gchar *             gtk_sheet_cell_get_tooltip_markup   (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col);

Gets the contents of the tooltip (markup) for the column

sheet :

a GtkSheet.

row :

row index

col :

column index

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_cell_set_tooltip_markup ()

void                gtk_sheet_cell_set_tooltip_markup   (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col,
                                                         const gchar *markup);

Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language.

sheet :

a GtkSheet.

row :

row index

col :

column index

markup :

the contents of the tooltip for widget, or NULL.

gtk_sheet_cell_get_tooltip_text ()

gchar *             gtk_sheet_cell_get_tooltip_text     (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col);

Gets the contents of the tooltip for the column

sheet :

a GtkSheet.

row :

row index

col :

column index

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_cell_set_tooltip_text ()

void                gtk_sheet_cell_set_tooltip_text     (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col,
                                                         const gchar *text);

Sets text as the contents of the tooltip.

sheet :

a GtkSheet.

row :

row index

col :

column index

text :

the contents of the tooltip for widget

gtk_sheet_get_cell_area ()

gboolean            gtk_sheet_get_cell_area             (GtkSheet *sheet,
                                                         gint row,
                                                         gint column,
                                                         GdkRectangle *area);

Get area of a given cell.

sheet :

a GtkSheet

row :

row number

column :

column number

area :

a GdkRectangle area of the cell

Returns :

TRUE(success) or FALSE(failure)

gtk_sheet_get_pixel_info ()

gboolean            gtk_sheet_get_pixel_info            (GtkSheet *sheet,
                                                         GdkWindow *window,
                                                         gint x,
                                                         gint y,
                                                         gint *row,
                                                         gint *column);

Get row and column correspondig to the given position within the sheet. In order to decode clicks into to title area correctly, pass the GdkWindow from the button event. Omitting the window (NULL) defaults to the sheet window. row and column may return values in the range [-1 .. max+1] depending on wether the position lies within the title area, the sheet cell area or beyond the outermost row/column. All 9 sheet areas can be reliably determined by evaluating the returned row/column values (title area/cell area/outside).

sheet :

a GtkSheet

window :

base window for coordinates (null)

x :

x coordinate

y :

y coordinate

row :

cell row number

column :

cell column number

Returns :

TRUE if the position lies within the sheet cell area or FALSE when outside (title area f.e.)

gtk_sheet_get_link ()

gpointer            gtk_sheet_get_link                  (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);

Get link pointer from a cell.

sheet :

a GtkSheet

row :

row number

col :

column number

Returns :

(transfer none) pointer linked to the cell

gtk_sheet_link_cell ()

void                gtk_sheet_link_cell                 (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         gpointer link);

Link pointer to a cell.

sheet :

a GtkSheet

row :

row number

col :

column number

link :

pointer linked to the cell

gtk_sheet_remove_link ()

void                gtk_sheet_remove_link               (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);

Remove link pointer from a cell.

sheet :

a GtkSheet

row :

row number

col :

column number

gtk_sheet_range_clear ()

void                gtk_sheet_range_clear               (GtkSheet *sheet,
                                                         const GtkSheetRange *range);

Clear range contents. If range==NULL the whole sheet will be cleared.

sheet :

a GtkSheet.

range :

a GtkSheetRange

gtk_sheet_range_delete ()

void                gtk_sheet_range_delete              (GtkSheet *sheet,
                                                         const GtkSheetRange *range);

Clear range contents and remove links. FIXME:: if range==NULL whole sheet is deleted?

sheet :

a GtkSheet.

range :

a GtkSheetRange

gtk_sheet_range_set_background ()

void                gtk_sheet_range_set_background      (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);

Set background color of the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange.

color :

a GdkColor.

gtk_sheet_range_set_foreground ()

void                gtk_sheet_range_set_foreground      (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);

Set foreground color of the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange.

color :

a GdkColor.

gtk_sheet_range_set_justification ()

void                gtk_sheet_range_set_justification   (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         GtkJustification just);

Set text justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER) of the given range. The default value is GTK_JUSTIFY_LEFT. If autoformat is on, the default justification for numbers is GTK_JUSTIFY_RIGHT.

sheet :

a GtkSheet.

urange :

a GtkSheetRange.

just :

a GtkJustification : GTK_JUSTIFY_LEFT, RIGHT, CENTER.

gtk_sheet_range_set_editable ()

void                gtk_sheet_range_set_editable        (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gint editable);

Set if cell contents can be edited or not in the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange

editable :

TRUE or FALSE

gtk_sheet_range_set_visible ()

void                gtk_sheet_range_set_visible         (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gboolean visible);

Set if cell contents are visible or not in the given range: accepted values are TRUE or FALSE.

sheet :

a GtkSheet.

urange :

a GtkSheetRange.

visible :

TRUE or FALSE.

gtk_sheet_range_set_border ()

void                gtk_sheet_range_set_border          (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gint mask,
                                                         guint width,
                                                         gint line_style);

Set cell border style in the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange where we set border style.

mask :

CELL_LEFT_BORDER, CELL_RIGHT_BORDER, CELL_TOP_BORDER,CELL_BOTTOM_BORDER

width :

width of the border line in pixels

line_style :

GdkLineStyle for the border line

gtk_sheet_range_set_border_color ()

void                gtk_sheet_range_set_border_color    (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);

Set border color for the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange where we set border color.

color :

a GdkColor.

gtk_sheet_range_set_font ()

void                gtk_sheet_range_set_font            (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         PangoFontDescription *font_desc);

Set font_desc for the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange where we set font_desc.

font_desc :

(transfer none) a PangoFontDescription.

gtk_sheet_put ()

GtkSheetChild *     gtk_sheet_put                       (GtkSheet *sheet,
                                                         GtkWidget *child,
                                                         gint x,
                                                         gint y);

Add widgets to the sheet. The widget is floating in one given position (x,y) regardless of the configurations of rows/columns. This means that cells do not resize depending on the widgets' size. You can resize it yourself or use gtk_sheet_attach_*() You may remove it with gtk_container_remove(GTK_CONTAINER(sheet), GtkWidget *child);

sheet :

a GtkSheet.

child :

GtkWidget to be put

x :

x coordinate where we put the widget

y :

y coordinate where we put the widget

Returns :

(transfer none) TRUE means that the cell is currently allocated.

gtk_sheet_attach ()

void                gtk_sheet_attach                    (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col,
                                                         gint xoptions,
                                                         gint yoptions,
                                                         gint xpadding,
                                                         gint ypadding);

Attaches a child widget to the given cell with the given alignments. Works basically like gtk_table_attach, with the same options, the widget is confined in the cell, and whether it fills the cell, expands with it, or shrinks with it, depending on the options , if GTK_EXPAND is set. The child is reallocated each time the column or row changes, keeping attached to the same cell.

sheet :

a GtkSheet.

widget :

GtkWidget to be put

row :

row number

col :

column number

xoptions :

if set GTK_EXPAND cell will expand/shrink on x direction

yoptions :

if set GTK_EXPAND cell will expand/shrink on y direction

xpadding :

x coordinate of the alignment

ypadding :

y coordinate of the alignment

gtk_sheet_attach_floating ()

void                gtk_sheet_attach_floating           (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);

The widget is attached to the top-left corner of a cell (row,column) and moves with it when you change width, height, or you delete of add row/columns

sheet :

a GtkSheet.

widget :

GtkWidget to be put

row :

row number

col :

column number

gtk_sheet_attach_default ()

void                gtk_sheet_attach_default            (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);

Attaches a child widget to the given cell with the 0,0 alignments. Works basically like gtk_table_attach, with the same options, the widget is confined in the cell, and whether it fills the cell, expands with it, or shrinks with it, depending on the options. The child is reallocated each time the column or row changes, keeping attached to the same cell. It's in fact gtk_sheet_attach() with GTK_EXPAND set.

sheet :

a GtkSheet.

widget :

GtkWidget to be put

row :

row number

col :

column number

gtk_sheet_move_child ()

void                gtk_sheet_move_child                (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint x,
                                                         gint y);

Move widgets added with gtk_sheet_put() in the sheet.

sheet :

a GtkSheet.

widget :

GtkWidget to be put.

x :

x coord at which we move the widget.

y :

y coord at which we move the widget.

gtk_sheet_get_child_at ()

const GtkSheetChild * gtk_sheet_get_child_at            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);

Get the child attached at row,col.

sheet :

a GtkSheet.

row :

row number

col :

column number

Returns :

the GtkSheetChild attached to row,col or NULL

gtk_sheet_button_attach ()

void                gtk_sheet_button_attach             (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);

Button attach works like cell attach but for the buttons.

sheet :

a GtkSheet.

widget :

GtkWidget to be put

row :

row number

col :

column number

Property Details

The "autoresize" property

  "autoresize"               gboolean              : Read / Write

Autoreisize cells while typing (rows and columns)

Default value: FALSE


The "autoresize-cols" property

  "autoresize-cols"          gboolean              : Read / Write

Autoreisize columns while typing

Default value: FALSE


The "autoresize-rows" property

  "autoresize-rows"          gboolean              : Read / Write

Autoreisize rows while typing

Default value: FALSE


The "autoscroll" property

  "autoscroll"               gboolean              : Read / Write

The sheet will be automatically scrolled when you move beyond the last visible row/column

Default value: TRUE


The "bgcolor" property

  "bgcolor"                  GdkColor*             : Read / Write

Background color of the sheet


The "clip-text" property

  "clip-text"                gboolean              : Read / Write

Clip text in cells

Default value: FALSE


The "col-titles-height" property

  "col-titles-height"        guint                 : Read / Write

Height of the column titles

Allowed values: <= 1024

Default value: 24


The "col-titles-visible" property

  "col-titles-visible"       gboolean              : Read / Write

Visibility of the column titles

Default value: TRUE


The "columns-resizable" property

  "columns-resizable"        gboolean              : Read / Write

Columns resizable

Default value: TRUE


The "description" property

  "description"              gchar*                : Read / Write

The sheets description, a place to store further information for application use

Default value: ""


The "entry-type" property

  "entry-type"               GtkSheetEntryType     : Read / Write

Sheet cell entry widget type

Default value: GTK_SHEET_ENTRY_TYPE_DEFAULT


The "grid-color" property

  "grid-color"               GdkColor*             : Read / Write

Color of the grid


The "grid-visible" property

  "grid-visible"             gboolean              : Read / Write

Sets the visibility of grid

Default value: TRUE


The "justify-entry" property

  "justify-entry"            gboolean              : Read / Write

Adapt cell entry editor to the cell justification.

Default value: TRUE


The "locked" property

  "locked"                   gboolean              : Read / Write

If the sheet ist locked, it is not editable, cell contents cannot be modified by the user.

Default value: FALSE


The "n-rows" property

  "n-rows"                   gint                  : Read / Write

Number of rows in the sheet

Allowed values: [0,1000000]

Default value: 0


The "row-titles-visible" property

  "row-titles-visible"       gboolean              : Read / Write

Row titles visible

Default value: TRUE


The "row-titles-width" property

  "row-titles-width"         guint                 : Read / Write

Width of the row title area

Allowed values: <= 2048

Default value: 80


The "rows-resizable" property

  "rows-resizable"           gboolean              : Read / Write

Rows resizable

Default value: TRUE


The "selection-mode" property

  "selection-mode"           GtkSelectionMode      : Read / Write

Sets the selection mode of the cells in a GtkSheet

Default value: GTK_SELECTION_BROWSE


The "title" property

  "title"                    gchar*                : Read / Write

The sheets title string

Default value: "GtkSheet"


The "vjust" property

  "vjust"                    GtkSheetVerticalJustification  : Read / Write

Default vertical cell text justification

Default value: GTK_SHEET_VERTICAL_JUSTIFICATION_TOP

Signal Details

The "activate" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  user_data)      : Run Last

Emmited whenever a cell is activated(you click on it). FIXME:: The return value is ignored (not yet implemented).

sheet :

the sheet widget that emitted the signal

row :

row number of activated cell.

column :

column number of activated cell.

user_data :

user data set when the signal handler was connected.

The "changed" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  user_data)      : Run Last

"Emited when typing into the active cell, changing its content. It is emitted after each key press in cell and after deactivating cell.

sheet :

the sheet widget that emitted the signal

row :

row number of changed cell.

column :

column number of changed cell.

user_data :

user data set when the signal handler was connected.

The "clear-cell" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  user_data)      : Run Last

Emited when when the content of the cell is erased.

sheet :

the sheet widget that emitted the signal

row :

row number of cleared cell.

column :

column number of cleared cell.

user_data :

user data set when the signal handler was connected.

The "clip-range" signal

void                user_function                      (GtkSheet      *sheet,
                                                        GtkSheetRange *clip_range,
                                                        gpointer       user_data)       : Run Last

Emmited when a GtkSheetRange is clipping.

sheet :

the sheet widget that emitted the signal

clip_range :

the newly selected GtkSheetRange

user_data :

user data set when the signal handler was connected.

The "deactivate" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  user_data)      : Run Last

Emmited whenever a cell is deactivated(you click on other cell or start a new selection). The signal handler must return TRUE in order to allow deactivation, FALSE to deny deactivation.

sheet :

the sheet widget that emitted the signal

row :

row number of deactivated cell.

column :

column number of deactivated cell.

user_data :

user data set when the signal handler was connected.

The "enter-pressed" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        GdkEvent *event,
                                                        gpointer  user_data)      : Run Last

This signal intercepts RETURN and ENTER key-press-events before they are processed by the sheet-entry editor. Any modifier combinations on these keys may trigger the signal. The default behaviour of the sheet-entry editor is to move the active cell, which might not be appropriate for the type of application.

sheet :

the sheet widget that emitted the signal

event :

the GdkEventKey which triggered this signal.. type Gdk.EventKey.

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to block the sheet-entry from processing the event. FALSE to propagate the event to the sheet-entry.

The "entry-focus-in" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        GdkEvent *event,
                                                        gpointer  user_data)      : Run Last

The ::entry-focus-in signal will be emitted when the keyboard focus enters the sheet_entry editor.

sheet :

the sheet widget that emitted the signal

event :

the GdkEventFocus which triggered this signal

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

Since 3.0.1


The "entry-focus-out" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        GdkEvent *event,
                                                        gpointer  user_data)      : Run Last

The ::entry-focus-out signal will be emitted when the keyboard focus leaves the sheet_entry editor.

sheet :

the sheet widget that emitted the signal

event :

the GdkEventFocus which triggered this signal

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

Since 3.0.1


The "move-cursor" signal

void                user_function                      (GtkSheet       *sheet,
                                                        GtkMovementStep step,
                                                        gint            count,
                                                        gboolean        extend_selection,
                                                        gpointer        user_data)             : Run Last / Action

The ::move-cursor signal is a keybinding signal which gets emitted when the user initiates a cursor movement. Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically.

sheet :

the sheet widget that emitted the signal

step :

the granularity of the move, as a GtkMovementStep

count :

the number of step units to move

extend_selection :

TRUE if the move should extend the selection

user_data :

user data set when the signal handler was connected.

Since 3.0.2


The "move-range" signal

void                user_function                      (GtkSheet      *sheet,
                                                        GtkSheetRange *old_range,
                                                        GtkSheetRange *new_range,
                                                        gpointer       user_data)      : Run Last

Emmited when a GtkSheetRange is moved.

sheet :

the sheet widget that emitted the signal.

old_range :

the previous selected GtkSheetRange.

new_range :

the newly selected GtkSheetRange.

user_data :

user data set when the signal handler was connected.

The "new-column-width" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      col,
                                                        gint      width,
                                                        gpointer  user_data)      : Run Last

Emited when the width of a column is modified.

sheet :

the sheet widget that emitted the signal

col :

modified column number.

width :

new column width

user_data :

user data set when the signal handler was connected.

The "new-row-height" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      height,
                                                        gpointer  user_data)      : Run Last

Emited when the height of a row is modified.

sheet :

the sheet widget that emitted the signal

row :

modified row number.

height :

new row height.

user_data :

user data set when the signal handler was connected.

The "populate-popup" signal

void                user_function                      (GtkSheet *sheet,
                                                        GtkMenu  *menu,
                                                        gpointer  user_data)      : Run Last

The ::populate-popup signal will be emitted when the user activates the popup menu of the sheet_entry editor. The emission of this signal is only supported for GtkEntry, GtkDataEntry, GtkItemEntry and GtkTextView.

sheet :

the sheet widget that emitted the signal

menu :

the menu that ist being populated

user_data :

user data set when the signal handler was connected.

Since 3.0.1


The "resize-range" signal

void                user_function                      (GtkSheet      *sheet,
                                                        GtkSheetRange *old_range,
                                                        GtkSheetRange *new_range,
                                                        gpointer       user_data)      : Run Last

Emmited when a GtkSheetRange is resized.

sheet :

the sheet widget that emitted the signal

old_range :

the previous selected GtkSheetRange.

new_range :

the newly selected GtkSheetRange.

user_data :

user data set when the signal handler was connected.

The "select-column" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      select_column,
                                                        gpointer  user_data)          : Run Last

Emmited when a column has been selected.

sheet :

the sheet widget that emitted the signal

select_column :

the newly selected column index

user_data :

user data set when the signal handler was connected.

The "select-range" signal

void                user_function                      (GtkSheet      *sheet,
                                                        GtkSheetRange *select_range,
                                                        gpointer       user_data)         : Run Last

Emmited when a GtkSheetRange has been selected.

sheet :

the sheet widget that emitted the signal

select_range :

the newly selected GtkSheetRange

user_data :

user data set when the signal handler was connected.

The "select-row" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gpointer  user_data)      : Run Last

Emmited when a row has been selected.

sheet :

the sheet widget that emitted the signal

row :

the newly selected row index

user_data :

user data set when the signal handler was connected.

The "set-cell" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  user_data)      : Run Last

Emited when clicking on a non-empty cell.

sheet :

the sheet widget that emitted the signal

row :

row number of activated cell.

column :

column number of activated cell.

user_data :

user data set when the signal handler was connected.

The "set-scroll-adjustments" signal

void                user_function                      (GtkSheet      *sheet,
                                                        GtkAdjustment *hadjustment,
                                                        GtkAdjustment *vadjustment,
                                                        gpointer       user_data)        : Run Last

Emited when scroll adjustments are set.

sheet :

the sheet widget that emitted the signal

hadjustment :

horizontal GtkAdjustment.

vadjustment :

vertical GtkAdkjustment.

user_data :

user data set when the signal handler was connected.

The "traverse" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  *new_row,
                                                        gpointer  *new_column,
                                                        gpointer  user_data)        : Run Last

The "traverse" is emited before "deactivate" and allows to veto the movement. In such case, the entry will remain in the site and the other signals will not be emited. The signal handler must return TRUE to allow the movement, FALSE to veto the movement.

sheet :

the sheet widget that emitted the signal.

row :

row number of old cell

column :

column number of old cell

*new_row :

row number of target cell, changeable

*new_column :

column number of target cell, changeable

user_data :

user data set when the signal handler was connected.