item-bar.h 1.11 KB
Newer Older
1 2 3 4 5 6 7
#ifndef ITEM_BAR_H
#define ITEM_BAR_H

#define ITEM_BAR(obj)          (GTK_CHECK_CAST((obj), item_bar_get_type (), ItemBar))
#define ITEM_BAR_CLASS(k)      (GTK_CHECK_CLASS_CAST ((k), item_bar_get_type ()))
#define IS_ITEM_BAR(o)         (GTK_CHECK_TYPE((o), item_bar_get_type ()))

Arturo Espinosa's avatar
Arturo Espinosa committed
8 9
#define ITEM_BAR_RESIZING(x) (ITEM_BAR(x)->resize_pos != -1)

10 11 12 13 14 15 16 17
typedef struct {
	GnomeCanvasItem canvas_item;
	Sheet           *sheet;
	int             first_element;
	GtkOrientation  orientation;	/* horizontal, vertical */
	GdkGC           *gc;		/* Draw gc */
	GdkCursor       *normal_cursor;
	GdkCursor       *change_cursor;
Arturo Espinosa's avatar
Arturo Espinosa committed
18 19 20 21 22

	int             resize_pos;
	int 	        resize_width;
	int             resize_start_pos;
	GtkObject       *resize_guide;
23 24

	int             dragging : 1;
25
	int             start_selection;
26 27
} ItemBar;

28 29
#define ITEM_BAR_IS_SELECTING(ib) ((ib)->start_selection != -1)

30 31 32 33
GtkType item_bar_get_type (void);

typedef struct {
	GnomeCanvasItemClass parent_class;
Arturo Espinosa's avatar
Arturo Espinosa committed
34 35 36 37

	/* Signals emited */
	void (* selection_changed) (ItemBar *, int column);
	void (* size_changed)      (ItemBar *, int column, int new_width);
38 39 40
} ItemBarClass;

#endif