/[pspp]/psppire/gtk_sheet/gtksheet.h
ViewVC logotype

Diff of /psppire/gtk_sheet/gtksheet.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jmd, Fri Nov 4 01:08:25 2005 UTC revision 1.3 by jmd, Sat Nov 12 07:52:06 2005 UTC
# Line 147  struct _GtkSheetCell Line 147  struct _GtkSheetCell
147    
148    GtkSheetCellAttr *attributes;    GtkSheetCellAttr *attributes;
149    
150    gchar *text;    GValue value;
151    
152    gpointer link;    gpointer link;
153  };  };
154    
# Line 188  struct _GtkSheetColumn Line 189  struct _GtkSheetColumn
189  };  };
190    
191    
192    /* A user supplied function which converts TEXT into the value DEST,
193       appropriate for the cell at ROW, COL */
194    typedef void (*GtkSheetEncodeFunc)(gint row, gint col, const gchar *text, GValue *dest);
195    
196    /* A user supplied function which converts the value SRC for into TEXT for
197       display at ROW, COL */
198    typedef const gchar* (*GtkSheetDecodeFunc)(gint row, gint col, const GValue *src);
199    
200    
201  struct _GtkSheet{  struct _GtkSheet{
202    GtkContainer container;    GtkContainer container;
203    
# Line 316  struct _GtkSheet{ Line 326  struct _GtkSheet{
326    
327    /* clipped range */    /* clipped range */
328    GtkSheetRange clip_range;    GtkSheetRange clip_range;
329    
330      /* formatting/deformatting */
331      GtkSheetEncodeFunc encode_func;
332      GtkSheetDecodeFunc decode_func;
333      gpointer coding_data;
334    
335  };  };
336    
337  struct _GtkSheetClass  struct _GtkSheetClass
# Line 400  gtk_sheet_construct_with_custom_entry  (G Line 416  gtk_sheet_construct_with_custom_entry  (G
416                                           guint rows, guint columns,                                           guint rows, guint columns,
417                                           const gchar *title,                                           const gchar *title,
418                                           GtkType entry_type);                                           GtkType entry_type);
419    
420    /* Set the GValue type for the given range.
421       Any cells in the range are already of this type, then these cells will
422       be unaffected.  Otherwise their values are cleared, and the type is set.
423    */
424    void
425    gtk_sheet_range_set_type                (GtkSheet *sheet,
426                                             const GtkSheetRange *urange,
427                                             GType type);
428    
429    /* Set the text transformation functions.
430       It is the programmer's responisibility to ensure that they
431       agree with the cell type
432    */
433    void
434    gtk_sheet_set_coding(GtkSheet *sheet, GtkSheetEncodeFunc encode,
435                         GtkSheetDecodeFunc decode,
436                         gpointer data);
437    
438    
439    
440  /* change scroll adjustments */  /* change scroll adjustments */
441  void  void
442  gtk_sheet_set_hadjustment               (GtkSheet *sheet,  gtk_sheet_set_hadjustment               (GtkSheet *sheet,
# Line 664  gtk_sheet_set_cell                     (GtkSheet *sheet, Line 701  gtk_sheet_set_cell                     (GtkSheet *sheet,
701                                          gint row, gint col,                                          gint row, gint col,
702                                          GtkJustification justification,                                          GtkJustification justification,
703                                          const gchar *text);                                          const gchar *text);
704    
705  void  void
706  gtk_sheet_set_cell_text                 (GtkSheet *sheet,  gtk_sheet_set_cell_text                 (GtkSheet *sheet,
707                                          gint row, gint col,                                          gint row, gint col,
708                                          const gchar *text);                                          const gchar *text);
709    
710    /* Set the value of the cell at ROW, COL to be VALUE.
711       VALUE is copied by the function and will not be owned or modified.
712    */
713    void
714    gtk_sheet_set_cell_value                (GtkSheet *sheet,
715                                             gint row, gint col,
716                                             const GValue *value);
717    
718    
719    /* Return the GValue of the cell at ROW, COL into VALUE.
720       VALUE must be uninitialised (zero filled), and will be
721       initilized by this function.
722       It is the caller's responsibility to uninitialise it when
723       no longer required.
724     */
725    void
726    gtk_sheet_get_cell_value                (GtkSheet *sheet,
727                                             gint row, gint col,
728                                             GValue *value);
729    
730    
731    
732    
733  /* get cell contents */  /* get cell contents */
734  gchar *      const gchar *    
735  gtk_sheet_cell_get_text                 (GtkSheet *sheet, gint row, gint col);  gtk_sheet_cell_get_text                 (GtkSheet *sheet, gint row, gint col);
736    
737    
# Line 755  gtk_sheet_delete_rows                  (GtkSheet *sheet Line 816  gtk_sheet_delete_rows                  (GtkSheet *sheet
816  void  void
817  gtk_sheet_delete_columns                (GtkSheet *sheet, guint col, guint ncols);  gtk_sheet_delete_columns                (GtkSheet *sheet, guint col, guint ncols);
818    
819  /* set abckground color of the given range */  
820    /* set background color of the given range */
821  void  void
822  gtk_sheet_range_set_background          (GtkSheet *sheet,  gtk_sheet_range_set_background          (GtkSheet *sheet,
823                                          const GtkSheetRange *range,                                          const GtkSheetRange *range,

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26