GtkSheet Structures

Why are these useful?
Because the gtk-sheet functions do not cover everything and sometimes you need to modify
structure elements by yourself.


struct _GtkSheetChild
{
  GtkWidget *widget;
  GdkWindow *window;
  gint x,y ;
  gboolean attached_to_cell;
  gint row, col;
  gfloat x_align, y_align;
};
     
struct _GtkSheetButton
{
GtkStateType state;
gchar *label;
gboolean label_visible; GtkSheetChild *child;
GtkJustification justification; };
struct _GtkSheetCellBorder
{
gint8 mask;
guint width;
GdkLineStyle line_style;
GdkCapStyle cap_style;
GdkJoinStyle join_style;
GdkColor color;
};
struct _GtkSheetCellAttr
{
GtkJustification justification;
GdkFont *font;
GdkColor foreground;
GdkColor background;
GtkSheetCellBorder border;
gboolean is_editable;
gboolean is_visible;
};
struct _GtkSheetCell
{
GdkRectangle area;
gint row;
gint col;
  GtkSheetCellAttr *attributes;
  gchar *text;
         gpointer link;
         };
  struct _GtkSheetRange
         {
         gint row0,col0; /* upper-left cell */
         gint rowi,coli; /* lower-right cell */
         };
       
struct _GtkSheetRow
{
gchar *name;
gint height;
gint top_ypixel;
 GtkSheetButton button;
         gboolean is_sensitive;
         gboolean is_visible;
         };
 struct _GtkSheetColumn
         {
         gchar *name;
         gint width;
         gint left_xpixel;
 GtkSheetButton button;
 gint left_text_column; /* min left column displaying text on this column          */
         gint right_text_column; /* max right column displaying text on this column          */
 GtkJustification justification;
         gboolean is_sensitive;
         gboolean is_visible;
         };
       
struct _GtkSheetRange
{
       gint row0,col0; /* upper-left cell */
       gint rowi,coli; /* lower-right cell */
       };
     
struct _GtkSheetRow
{
   gchar *name;
   gint height;
   gint top_ypixel;        
   GtkSheetButton button;
   gboolean is_sensitive;
   gboolean is_visible;
};
       
struct _GtkSheetColumn
{
   gchar *name;
   gint width;
   gint left_xpixel;        
   GtkSheetButton button;
   gint left_text_column; /* min left column displaying text on this column          */
   gint right_text_column; /* max right column displaying text on this column          */
   GtkJustification justification;
   gboolean is_sensitive;
   gboolean is_visible;
};
       
struct _GtkSheet
GtkContainer container;
 guint16 flags;
 GtkSelectionMode selection_mode;
 guint freeze_count;
 /* Background colors */
         GdkColor bg_color;
         GdkColor grid_color;
         gboolean show_grid;
 /* sheet children */
         GList *children;
 /* allocation rectangle after the container_border_width
         and the width of the shadow border */
         GdkRectangle internal_allocation;
 gchar *name;
 GtkSheetRow *row;
         GtkSheetColumn *column;
 /* max number of diplayed cells */
         gint maxrow;
         gint maxcol;
 /* Displayed range */
 GtkSheetRange view; 
 /* sheet data: dynamically allocated array of cell pointers */
         GtkSheetCell ***data;
 /* max number of allocated cells */
         gint maxallocrow;
         gint maxalloccol;
 /* active cell */
         GtkSheetCell active_cell;
         GtkWidget *sheet_entry;
         GdkWindow *sheet_entry_window; /* for NO_WINDOW entry widgets(ala GtkLayout)          */
 GtkType entry_type;
 /* expanding selection */
         GtkSheetCell selection_cell;
 /* timer for automatic scroll during selection */ 
         gint32 timer;
         /* timer for flashing clipped range */
         gint32 clip_timer;
         gint interval;
 /* global selection button */
         GtkWidget *button;
 /* sheet state */
         gint state;
 /* selected range */
         GtkSheetRange range;
 /*the scrolling window and it's height and width to
         * make things a little speedier */
         GdkWindow *sheet_window;
         guint sheet_window_width;
         guint sheet_window_height;
 /* sheet backing pixmap */ 
         GdkWindow *pixmap; 
 /* offsets for scrolling */
         gint hoffset;
         gint voffset;
         gfloat old_hadjustment;
         gfloat old_vadjustment;
         
         /* border shadow style */
         GtkShadowType shadow_type;
         
         /* Column Titles */
         GdkRectangle column_title_area;
         GdkWindow *column_title_window;
 /* Row Titles */
         GdkRectangle row_title_area;
         GdkWindow *row_title_window;
 /*scrollbars*/
         GtkAdjustment *hadjustment;
         GtkAdjustment *vadjustment;
 /* xor GC for the verticle drag line */
         GdkGC *xor_gc;
 /* gc for drawing unselected cells */
         GdkGC *fg_gc;
         GdkGC *bg_gc;
 /* cursor used to indicate dragging */
         GdkCursor *cursor_drag;
 /* the current x-pixel location of the xor-drag vline */
         gint x_drag;
 /* the current y-pixel location of the xor-drag hline */
         gint y_drag;
 /* current cell being dragged */
         GtkSheetCell drag_cell;
         /* current range being dragged */
         GtkSheetRange drag_range;
 /* clipped range */
         GtkSheetRange clip_range;
         };
       
/* sheet->state */
enum {GTK_SHEET_NORMAL,
GTK_SHEET_ROW_SELECTED,
GTK_SHEET_COLUMN_SELECTED,
GTK_SHEET_RANGE_SELECTED};
 
enum
{
GTK_SHEET_LEFT_BORDER = 1 << 0,
GTK_SHEET_RIGHT_BORDER = 1 << 1,
GTK_SHEET_TOP_BORDER = 1 << 2,
GTK_SHEET_BOTTOM_BORDER = 1 << 3
};
GtkSheetAttrType
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
}
/* sheet flags */
enum 
       {
       GTK_SHEET_IS_LOCKED = 1 << 0,
       GTK_SHEET_IS_FROZEN = 1 << 1, 
       GTK_SHEET_IN_XDRAG = 1 << 2, 
       GTK_SHEET_IN_YDRAG = 1 << 3, 
       GTK_SHEET_IN_DRAG = 1 << 4, 
       GTK_SHEET_IN_SELECTION = 1 << 5,
       GTK_SHEET_IN_RESIZE = 1 << 6,
       GTK_SHEET_IN_CLIP = 1 << 7,
       GTK_SHEET_ROW_FROZEN = 1 << 8, /* set rows to be resizeable */
       GTK_SHEET_COLUMN_FROZEN = 1 << 9, /* set cols to be resizeable */
       GTK_SHEET_AUTORESIZE = 1 << 10, /* resize column if text width is  great than column width */
       GTK_SHEET_CLIP_TEXT = 1 << 11, /* clip text to cell */
       GTK_SHEET_ROW_TITLES_VISIBLE = 1 << 12,
       GTK_SHEET_COL_TITLES_VISIBLE = 1 << 13,
       GTK_SHEET_AUTO_SCROLL = 1 << 14,
       GTK_SHEET_JUSTIFY_ENTRY = 1 << 15
       };