gsch2pcb: support quoting in schematics option
[geda-gaf.git] / gattrib / include / gtksheet_2_2.h
blob5b90b39e4388eb01cec74fc6c8367dd450a71749
1 /* GtkSheet widget for Gtk+.
2 * Copyright (C) 1999-2001 Adrian E. Feiguin <adrian@ifir.ifir.edu.ar>
4 * Based on GtkClist widget by Jay Painter, but major changes.
5 * Memory allocation routines inspired on SC (Spreadsheet Calculator)
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301 USA
23 #ifndef __GTK_SHEET_H__
24 #define __GTK_SHEET_H__
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
32 typedef enum
34 GTK_SHEET_FOREGROUND,
35 GTK_SHEET_BACKGROUND,
36 GTK_SHEET_FONT,
37 GTK_SHEET_JUSTIFICATION,
38 GTK_SHEET_BORDER,
39 GTK_SHEET_BORDER_COLOR,
40 GTK_SHEET_IS_EDITABLE,
41 GTK_SHEET_IS_VISIBLE
42 } GtkSheetAttrType;
44 /* sheet->state */
46 enum
48 GTK_SHEET_NORMAL,
49 GTK_SHEET_ROW_SELECTED,
50 GTK_SHEET_COLUMN_SELECTED,
51 GTK_SHEET_RANGE_SELECTED
54 enum
56 GTK_SHEET_LEFT_BORDER = 1 << 0,
57 GTK_SHEET_RIGHT_BORDER = 1 << 1,
58 GTK_SHEET_TOP_BORDER = 1 << 2,
59 GTK_SHEET_BOTTOM_BORDER = 1 << 3
60 };
62 #define GTK_TYPE_SHEET_RANGE (gtk_sheet_range_get_type ())
63 #define GTK_TYPE_SHEET (gtk_sheet_get_type ())
65 #define GTK_SHEET(obj) GTK_CHECK_CAST (obj, gtk_sheet_get_type (), GtkSheet)
66 #define GTK_SHEET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_sheet_get_type (), GtkSheetClass)
67 #define GTK_IS_SHEET(obj) GTK_CHECK_TYPE (obj, gtk_sheet_get_type ())
69 /* Public flags, for compatibility */
71 #define GTK_SHEET_IS_LOCKED(sheet) gtk_sheet_locked(sheet)
72 #define GTK_SHEET_ROW_FROZEN(sheet) !gtk_sheet_rows_resizable(sheet)
73 #define GTK_SHEET_COLUMN_FROZEN(sheet) !gtk_sheet_columns_resizable(sheet)
74 #define GTK_SHEET_AUTORESIZE(sheet) gtk_sheet_autoresize(sheet)
75 #define GTK_SHEET_CLIP_TEXT(sheet) gtk_sheet_clip_text(sheet)
76 #define GTK_SHEET_ROW_TITLES_VISIBLE(sheet) gtk_sheet_row_titles_visible(sheet)
77 #define GTK_SHEET_COL_TITLES_VISIBLE(sheet) gtk_sheet_column_titles_visible(sheet)
78 #define GTK_SHEET_AUTO_SCROLL(sheet) gtk_sheet_autoscroll(sheet)
79 #define GTK_SHEET_JUSTIFY_ENTRY(sheet) gtk_sheet_justify_entry(sheet)
81 typedef struct _GtkSheet GtkSheet;
82 typedef struct _GtkSheetClass GtkSheetClass;
83 typedef struct _GtkSheetChild GtkSheetChild;
84 typedef struct _GtkSheetRow GtkSheetRow;
85 typedef struct _GtkSheetColumn GtkSheetColumn;
86 typedef struct _GtkSheetCell GtkSheetCell;
87 typedef struct _GtkSheetRange GtkSheetRange;
88 typedef struct _GtkSheetButton GtkSheetButton;
89 typedef struct _GtkSheetCellAttr GtkSheetCellAttr;
90 typedef struct _GtkSheetCellBorder GtkSheetCellBorder;
92 struct _GtkSheetChild
94 GtkWidget *widget;
95 gint x,y ;
96 gboolean attached_to_cell;
97 gboolean floating;
98 gint row, col;
99 guint16 xpadding;
100 guint16 ypadding;
101 gboolean xexpand;
102 gboolean yexpand;
103 gboolean xshrink;
104 gboolean yshrink;
105 gboolean xfill;
106 gboolean yfill;
109 struct _GtkSheetButton
111 GtkStateType state;
112 gchar *label;
114 gboolean label_visible;
115 GtkSheetChild *child;
117 GtkJustification justification;
120 struct _GtkSheetCellBorder
122 gint8 mask;
123 guint width;
124 GdkLineStyle line_style;
125 GdkCapStyle cap_style;
126 GdkJoinStyle join_style;
127 GdkColor color;
130 struct _GtkSheetCellAttr
132 GtkJustification justification;
133 GdkFont *font;
134 PangoFontDescription *font_desc;
135 GdkColor foreground;
136 GdkColor background;
137 GtkSheetCellBorder border;
138 gboolean is_editable;
139 gboolean is_visible;
142 struct _GtkSheetCell
144 GdkRectangle area;
145 gint row;
146 gint col;
148 GtkSheetCellAttr *attributes;
150 gchar *text;
151 gpointer link;
154 struct _GtkSheetRange
156 gint row0,col0; /* upper-left cell */
157 gint rowi,coli; /* lower-right cell */
161 struct _GtkSheetRow
163 gchar *name;
164 gint height;
165 gint top_ypixel;
166 guint16 requisition;
168 GtkSheetButton button;
169 gboolean is_sensitive;
170 gboolean is_visible;
173 struct _GtkSheetColumn
175 gchar *name;
176 gint width;
177 gint left_xpixel;
178 guint16 requisition;
180 GtkSheetButton button;
182 gint left_text_column; /* min left column displaying text on this column */
183 gint right_text_column; /* max right column displaying text on this column */
185 GtkJustification justification;
186 gboolean is_sensitive;
187 gboolean is_visible;
191 struct _GtkSheet{
192 GtkContainer container;
194 guint16 flags;
196 GtkSelectionMode selection_mode;
197 gboolean autoresize;
198 gboolean autoscroll;
199 gboolean clip_text;
200 gboolean justify_entry;
201 gboolean locked;
203 guint freeze_count;
205 /* Background colors */
206 GdkColor bg_color;
207 GdkColor grid_color;
208 gboolean show_grid;
210 /* sheet children */
211 GList *children;
213 /* allocation rectangle after the container_border_width
214 and the width of the shadow border */
215 GdkRectangle internal_allocation;
217 gchar *name;
219 GtkSheetRow *row;
220 GtkSheetColumn *column;
222 gboolean rows_resizable;
223 gboolean columns_resizable;
225 /* max number of diplayed cells */
226 gint maxrow;
227 gint maxcol;
229 /* Displayed range */
231 GtkSheetRange view;
233 /* sheet data: dynamically allocated array of cell pointers */
234 GtkSheetCell ***data;
236 /* max number of allocated cells */
237 gint maxallocrow;
238 gint maxalloccol;
240 /* active cell */
241 GtkSheetCell active_cell;
242 GtkWidget *sheet_entry;
244 GtkType entry_type;
246 /* expanding selection */
247 GtkSheetCell selection_cell;
249 /* timer for automatic scroll during selection */
250 gint32 timer;
251 /* timer for flashing clipped range */
252 gint32 clip_timer;
253 gint interval;
255 /* global selection button */
256 GtkWidget *button;
258 /* sheet state */
259 gint state;
261 /* selected range */
262 GtkSheetRange range;
264 /*the scrolling window and it's height and width to
265 * make things a little speedier */
266 GdkWindow *sheet_window;
267 guint sheet_window_width;
268 guint sheet_window_height;
270 /* sheet backing pixmap */
271 GdkWindow *pixmap;
273 /* offsets for scrolling */
274 gint hoffset;
275 gint voffset;
276 gfloat old_hadjustment;
277 gfloat old_vadjustment;
279 /* border shadow style */
280 GtkShadowType shadow_type;
282 /* Column Titles */
283 GdkRectangle column_title_area;
284 GdkWindow *column_title_window;
285 gboolean column_titles_visible;
287 /* Row Titles */
288 GdkRectangle row_title_area;
289 GdkWindow *row_title_window;
290 gboolean row_titles_visible;
292 /*scrollbars*/
293 GtkAdjustment *hadjustment;
294 GtkAdjustment *vadjustment;
296 /* xor GC for the verticle drag line */
297 GdkGC *xor_gc;
299 /* gc for drawing unselected cells */
300 GdkGC *fg_gc;
301 GdkGC *bg_gc;
303 /* cursor used to indicate dragging */
304 GdkCursor *cursor_drag;
306 /* the current x-pixel location of the xor-drag vline */
307 gint x_drag;
309 /* the current y-pixel location of the xor-drag hline */
310 gint y_drag;
312 /* current cell being dragged */
313 GtkSheetCell drag_cell;
314 /* current range being dragged */
315 GtkSheetRange drag_range;
317 /* clipped range */
318 GtkSheetRange clip_range;
321 struct _GtkSheetClass
323 GtkContainerClass parent_class;
325 void (*set_scroll_adjustments) (GtkSheet *sheet,
326 GtkAdjustment *hadjustment,
327 GtkAdjustment *vadjustment);
329 void (*select_row) (GtkSheet *sheet, gint row);
331 void (*select_column) (GtkSheet *sheet, gint column);
333 void (*select_range) (GtkSheet *sheet, GtkSheetRange *range);
335 void (*clip_range) (GtkSheet *sheet, GtkSheetRange *clip_range);
337 void (*resize_range) (GtkSheet *sheet,
338 GtkSheetRange *old_range,
339 GtkSheetRange *new_range);
341 void (*move_range) (GtkSheet *sheet,
342 GtkSheetRange *old_range,
343 GtkSheetRange *new_range);
345 gboolean (*traverse) (GtkSheet *sheet,
346 gint row, gint column,
347 gint *new_row, gint *new_column);
349 gboolean (*deactivate) (GtkSheet *sheet,
350 gint row, gint column);
352 gboolean (*activate) (GtkSheet *sheet,
353 gint row, gint column);
355 void (*set_cell) (GtkSheet *sheet,
356 gint row, gint column);
358 void (*clear_cell) (GtkSheet *sheet,
359 gint row, gint column);
361 void (*changed) (GtkSheet *sheet,
362 gint row, gint column);
364 void (*new_column_width) (GtkSheet *sheet,
365 gint col,
366 guint width);
368 void (*new_row_height) (GtkSheet *sheet,
369 gint row,
370 guint height);
374 GType gtk_sheet_get_type (void);
375 GtkType gtk_sheet_range_get_type (void);
377 /* create a new sheet */
378 GtkWidget *
379 gtk_sheet_new (guint rows, guint columns, const gchar *title);
381 void
382 gtk_sheet_construct (GtkSheet *sheet,
383 guint rows, guint columns, const gchar *title);
385 /* create a new browser sheet. It cells can not be edited */
386 GtkWidget *
387 gtk_sheet_new_browser (guint rows, guint columns, const gchar *title);
389 void
390 gtk_sheet_construct_browser (GtkSheet *sheet,
391 guint rows, guint columns, const gchar *title);
393 /* create a new sheet with custom entry */
394 GtkWidget *
395 gtk_sheet_new_with_custom_entry (guint rows, guint columns,
396 const gchar *title,
397 GtkType entry_type);
398 void
399 gtk_sheet_construct_with_custom_entry (GtkSheet *sheet,
400 guint rows, guint columns,
401 const gchar *title,
402 GtkType entry_type);
403 /* change scroll adjustments */
404 void
405 gtk_sheet_set_hadjustment (GtkSheet *sheet,
406 GtkAdjustment *adjustment);
407 void
408 gtk_sheet_set_vadjustment (GtkSheet *sheet,
409 GtkAdjustment *adjustment);
410 /* Change entry */
411 void
412 gtk_sheet_change_entry (GtkSheet *sheet, GtkType entry_type);
414 /* Returns sheet's entry widget */
415 GtkWidget *
416 gtk_sheet_get_entry (GtkSheet *sheet);
417 GtkWidget *
418 gtk_sheet_get_entry_widget (GtkSheet *sheet);
420 /* Returns sheet->state
421 * Added by Steven Rostedt <steven.rostedt@lmco.com> */
422 gint
423 gtk_sheet_get_state (GtkSheet *sheet);
425 /* Returns sheet's ranges
426 * Added by Murray Cumming */
427 guint
428 gtk_sheet_get_columns_count (GtkSheet *sheet);
430 guint
431 gtk_sheet_get_rows_count (GtkSheet *sheet);
433 void
434 gtk_sheet_get_visible_range (GtkSheet *sheet,
435 GtkSheetRange *range);
436 void
437 gtk_sheet_set_selection_mode (GtkSheet *sheet, gint mode);
439 void
440 gtk_sheet_set_autoresize (GtkSheet *sheet, gboolean autoresize);
442 gboolean
443 gtk_sheet_autoresize (GtkSheet *sheet);
445 void
446 gtk_sheet_set_autoscroll (GtkSheet *sheet, gboolean autoscroll);
448 gboolean
449 gtk_sheet_autoscroll (GtkSheet *sheet);
451 void
452 gtk_sheet_set_clip_text (GtkSheet *sheet, gboolean clip_text);
454 gboolean
455 gtk_sheet_clip_text (GtkSheet *sheet);
457 void
458 gtk_sheet_set_justify_entry (GtkSheet *sheet, gboolean justify);
460 gboolean
461 gtk_sheet_justify_entry (GtkSheet *sheet);
463 void
464 gtk_sheet_set_locked (GtkSheet *sheet, gboolean lock);
466 gboolean
467 gtk_sheet_locked (GtkSheet *sheet);
469 /* set sheet title */
470 void
471 gtk_sheet_set_title (GtkSheet *sheet, const gchar *title);
473 /* freeze all visual updates of the sheet.
474 * Then thaw the sheet after you have made a number of changes.
475 * The updates will occure in a more efficent way than if
476 * you made them on a unfrozen sheet */
477 void
478 gtk_sheet_freeze (GtkSheet *sheet);
479 void
480 gtk_sheet_thaw (GtkSheet *sheet);
481 /* Background colors */
482 void
483 gtk_sheet_set_background (GtkSheet *sheet,
484 GdkColor *bg_color);
485 void
486 gtk_sheet_set_grid (GtkSheet *sheet,
487 GdkColor *grid_color);
488 void
489 gtk_sheet_show_grid (GtkSheet *sheet,
490 gboolean show);
491 gboolean
492 gtk_sheet_grid_visible (GtkSheet *sheet);
494 /* set/get column title */
495 void
496 gtk_sheet_set_column_title (GtkSheet * sheet,
497 gint column,
498 const gchar * title);
500 const gchar *
501 gtk_sheet_get_column_title (GtkSheet * sheet,
502 gint column);
504 /* set/get row title */
505 void
506 gtk_sheet_set_row_title (GtkSheet * sheet,
507 gint row,
508 const gchar * title);
509 const gchar *
510 gtk_sheet_get_row_title (GtkSheet * sheet,
511 gint row);
513 /* set/get button label */
514 void
515 gtk_sheet_row_button_add_label (GtkSheet *sheet,
516 gint row, const gchar *label);
517 void
518 gtk_sheet_column_button_add_label (GtkSheet *sheet,
519 gint column, const gchar *label);
520 const gchar *
521 gtk_sheet_row_button_get_label (GtkSheet *sheet,
522 gint row);
523 const gchar *
524 gtk_sheet_column_button_get_label (GtkSheet *sheet,
525 gint column);
526 void
527 gtk_sheet_row_button_justify (GtkSheet *sheet,
528 gint row, GtkJustification justification);
529 void
530 gtk_sheet_column_button_justify (GtkSheet *sheet,
531 gint column, GtkJustification justification);
533 /* scroll the viewing area of the sheet to the given column
534 * and row; row_align and col_align are between 0-1 representing the
535 * location the row should appear on the screnn, 0.0 being top or left,
536 * 1.0 being bottom or right; if row or column is negative then there
537 * is no change */
538 void
539 gtk_sheet_moveto (GtkSheet * sheet,
540 gint row,
541 gint column,
542 gfloat row_align,
543 gfloat col_align);
545 /* resize column/row titles window */
546 void
547 gtk_sheet_set_row_titles_width(GtkSheet *sheet, guint width);
548 void
549 gtk_sheet_set_column_titles_height(GtkSheet *sheet, guint height);
551 /* show/hide column/row titles window */
552 void
553 gtk_sheet_show_column_titles (GtkSheet *sheet);
554 void
555 gtk_sheet_show_row_titles (GtkSheet *sheet);
556 void
557 gtk_sheet_hide_column_titles (GtkSheet *sheet);
558 void
559 gtk_sheet_hide_row_titles (GtkSheet *sheet);
560 gboolean
561 gtk_sheet_column_titles_visible (GtkSheet *sheet);
562 gboolean
563 gtk_sheet_row_titles_visible (GtkSheet *sheet);
565 /* set column button sensitivity. If sensitivity is TRUE it can be toggled,
566 * otherwise it acts as a title */
567 void
568 gtk_sheet_column_set_sensitivity (GtkSheet *sheet,
569 gint column, gboolean sensitive);
571 /* set sensitivity for all column buttons */
572 void
573 gtk_sheet_columns_set_sensitivity (GtkSheet *sheet, gboolean sensitive);
574 void
575 gtk_sheet_columns_set_resizable (GtkSheet *sheet, gboolean resizable);
576 gboolean
577 gtk_sheet_columns_resizable (GtkSheet *sheet);
579 /* set row button sensitivity. If sensitivity is TRUE can be toggled,
580 * otherwise it acts as a title */
581 void
582 gtk_sheet_row_set_sensitivity (GtkSheet *sheet,
583 gint row, gboolean sensitive);
585 /* set sensitivity for all row buttons */
586 void
587 gtk_sheet_rows_set_sensitivity (GtkSheet *sheet, gboolean sensitive);
588 void
589 gtk_sheet_rows_set_resizable (GtkSheet *sheet, gboolean resizable);
590 gboolean
591 gtk_sheet_rows_resizable (GtkSheet *sheet);
593 /* set column visibility. The default value is TRUE. If FALSE, the
594 * column is hidden */
595 void
596 gtk_sheet_column_set_visibility (GtkSheet *sheet,
597 gint column, gboolean visible);
598 void
599 gtk_sheet_column_label_set_visibility (GtkSheet *sheet,
600 gint column, gboolean visible);
601 void
602 gtk_sheet_columns_labels_set_visibility (GtkSheet *sheet, gboolean visible);
604 /* set row visibility. The default value is TRUE. If FALSE, the
605 * row is hidden */
606 void
607 gtk_sheet_row_set_visibility (GtkSheet *sheet,
608 gint row, gboolean visible);
609 void
610 gtk_sheet_row_label_set_visibility (GtkSheet *sheet,
611 gint row, gboolean visible);
612 void
613 gtk_sheet_rows_labels_set_visibility (GtkSheet *sheet, gboolean visible);
616 /* select the row. The range is then highlighted, and the bounds are stored
617 * in sheet->range */
618 void
619 gtk_sheet_select_row (GtkSheet * sheet,
620 gint row);
622 /* select the column. The range is then highlighted, and the bounds are stored
623 * in sheet->range */
624 void
625 gtk_sheet_select_column (GtkSheet * sheet,
626 gint column);
628 /* save selected range to "clipboard" */
629 void
630 gtk_sheet_clip_range (GtkSheet *sheet, const GtkSheetRange *range);
631 /* free clipboard */
632 void
633 gtk_sheet_unclip_range (GtkSheet *sheet);
635 gboolean
636 gtk_sheet_in_clip (GtkSheet *sheet);
638 /* get scrollbars adjustment */
639 GtkAdjustment *
640 gtk_sheet_get_vadjustment (GtkSheet * sheet);
641 GtkAdjustment *
642 gtk_sheet_get_hadjustment (GtkSheet * sheet);
644 /* highlight the selected range and store bounds in sheet->range */
645 void gtk_sheet_select_range (GtkSheet *sheet,
646 const GtkSheetRange *range);
648 /* obvious */
649 void gtk_sheet_unselect_range (GtkSheet *sheet);
651 /* set active cell where the entry will be displayed
652 * returns FALSE if current cell can't be deactivated or
653 * requested cell can't be activated */
654 gboolean
655 gtk_sheet_set_active_cell (GtkSheet *sheet,
656 gint row, gint column);
657 void
658 gtk_sheet_get_active_cell (GtkSheet *sheet,
659 gint *row, gint *column);
661 /* set cell contents and allocate memory if needed */
662 void
663 gtk_sheet_set_cell (GtkSheet *sheet,
664 gint row, gint col,
665 GtkJustification justification,
666 const gchar *text);
667 void
668 gtk_sheet_set_cell_text (GtkSheet *sheet,
669 gint row, gint col,
670 const gchar *text);
672 /* get cell contents */
673 gchar *
674 gtk_sheet_cell_get_text (GtkSheet *sheet, gint row, gint col);
677 /* clear cell contents */
678 void
679 gtk_sheet_cell_clear (GtkSheet *sheet, gint row, gint col);
680 /* clear cell contents and remove links */
681 void
682 gtk_sheet_cell_delete (GtkSheet *sheet, gint row, gint col);
684 /* clear range contents. If range==NULL the whole sheet will be cleared */
685 void
686 gtk_sheet_range_clear (GtkSheet *sheet,
687 const GtkSheetRange *range);
688 /* clear range contents and remove links */
689 void
690 gtk_sheet_range_delete (GtkSheet *sheet,
691 const GtkSheetRange *range);
693 /* get cell state: GTK_STATE_NORMAL, GTK_STATE_SELECTED */
694 GtkStateType
695 gtk_sheet_cell_get_state (GtkSheet *sheet, gint row, gint col);
697 /* Handles cell links */
698 void
699 gtk_sheet_link_cell (GtkSheet *sheet, gint row, gint col,
700 gpointer link);
702 gpointer
703 gtk_sheet_get_link (GtkSheet *sheet, gint row, gint col);
704 void
705 gtk_sheet_remove_link (GtkSheet *sheet, gint row, gint col);
707 /* get row and column correspondig to the given position in the screen */
708 gboolean
709 gtk_sheet_get_pixel_info (GtkSheet * sheet,
710 gint x,
711 gint y,
712 gint * row,
713 gint * column);
715 /* get area of a given cell */
716 gboolean
717 gtk_sheet_get_cell_area (GtkSheet *sheet,
718 gint row,
719 gint column,
720 GdkRectangle *area);
722 /* set column width */
723 void
724 gtk_sheet_set_column_width (GtkSheet * sheet,
725 gint column,
726 guint width);
728 /* set row height */
729 void
730 gtk_sheet_set_row_height (GtkSheet * sheet,
731 gint row,
732 guint height);
734 /* append ncols columns to the end of the sheet */
735 void
736 gtk_sheet_add_column (GtkSheet *sheet, guint ncols);
738 /* append nrows row to the end of the sheet */
739 void
740 gtk_sheet_add_row (GtkSheet *sheet, guint nrows);
742 /* insert nrows rows before the given row and pull right */
743 void
744 gtk_sheet_insert_rows (GtkSheet *sheet, guint row, guint nrows);
746 /* insert ncols columns before the given col and pull down */
747 void
748 gtk_sheet_insert_columns (GtkSheet *sheet, guint col, guint ncols);
750 /* delete nrows rows starting in row */
751 void
752 gtk_sheet_delete_rows (GtkSheet *sheet, guint row, guint nrows);
754 /* delete ncols columns starting in col */
755 void
756 gtk_sheet_delete_columns (GtkSheet *sheet, guint col, guint ncols);
758 /* set abckground color of the given range */
759 void
760 gtk_sheet_range_set_background (GtkSheet *sheet,
761 const GtkSheetRange *range,
762 const GdkColor *color);
764 /* set foreground color (text color) of the given range */
765 void
766 gtk_sheet_range_set_foreground (GtkSheet *sheet,
767 const GtkSheetRange *range,
768 const GdkColor *color);
770 /* set text justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER) of the given range.
771 * The default value is GTK_JUSTIFY_LEFT. If autoformat is on, the
772 * default justification for numbers is GTK_JUSTIFY_RIGHT */
773 void
774 gtk_sheet_range_set_justification (GtkSheet *sheet,
775 const GtkSheetRange *range,
776 GtkJustification justification);
777 void
778 gtk_sheet_column_set_justification (GtkSheet *sheet,
779 gint column,
780 GtkJustification justification);
781 /* set if cell contents can be edited or not in the given range:
782 * accepted values are TRUE or FALSE. */
783 void
784 gtk_sheet_range_set_editable (GtkSheet *sheet,
785 const GtkSheetRange *range,
786 gint editable);
788 /* set if cell contents are visible or not in the given range:
789 * accepted values are TRUE or FALSE.*/
790 void
791 gtk_sheet_range_set_visible (GtkSheet *sheet,
792 const GtkSheetRange *range,
793 gboolean visible);
795 /* set cell border style in the given range.
796 * mask values are CELL_LEFT_BORDER, CELL_RIGHT_BORDER, CELL_TOP_BORDER,
797 * CELL_BOTTOM_BORDER
798 * width is the width of the border line in pixels
799 * line_style is the line_style for the border line */
800 void
801 gtk_sheet_range_set_border (GtkSheet *sheet,
802 const GtkSheetRange *range,
803 gint mask,
804 guint width,
805 gint line_style);
807 /* set border color for the given range */
808 void
809 gtk_sheet_range_set_border_color (GtkSheet *sheet,
810 const GtkSheetRange *range,
811 const GdkColor *color);
813 /* set font for the given range */
814 void
815 gtk_sheet_range_set_font (GtkSheet *sheet,
816 const GtkSheetRange *range,
817 PangoFontDescription *font);
819 /* get cell attributes of the given cell */
820 /* TRUE means that the cell is currently allocated */
821 gboolean
822 gtk_sheet_get_attributes (GtkSheet *sheet,
823 gint row, gint col,
824 GtkSheetCellAttr *attributes);
827 GtkSheetChild *
828 gtk_sheet_put (GtkSheet *sheet,
829 GtkWidget *widget,
830 gint x, gint y);
831 void
832 gtk_sheet_attach_floating (GtkSheet *sheet,
833 GtkWidget *widget,
834 gint row, gint col);
835 void
836 gtk_sheet_attach_default (GtkSheet *sheet,
837 GtkWidget *widget,
838 gint row, gint col);
839 void
840 gtk_sheet_attach (GtkSheet *sheet,
841 GtkWidget *widget,
842 gint row, gint col,
843 gint xoptions,
844 gint yoptions,
845 gint xpadding,
846 gint ypadding);
849 void
850 gtk_sheet_move_child (GtkSheet *sheet,
851 GtkWidget *widget,
852 gint x, gint y);
854 GtkSheetChild *
855 gtk_sheet_get_child_at (GtkSheet *sheet,
856 gint row, gint col);
858 void
859 gtk_sheet_button_attach (GtkSheet *sheet,
860 GtkWidget *widget,
861 gint row, gint col);
864 #ifdef __cplusplus
866 #endif /* __cplusplus */
869 #endif /* __GTK_SHEET_H__ */