Files
evolution/widgets/misc/e-cursors.h
Federico Mena Quintero 510e8547bb Renamed the move modes to MODE_MOVE and MOVE_MODE_DRAGGING.
1999-11-02  Federico Mena Quintero  <federico@redhat.com>

	* src/print-preview.c (PreviewMode): Renamed the move modes to
	MODE_MOVE and MOVE_MODE_DRAGGING.
	(preview_canvas_button_press): Split the event handling code
	between several functions.  Rationale:  we will want drag-zoom and
	we need different modes for this, and the code in a single
	function would get unwieldy.  In addition, grab the pointer and
	use GDK_POINTER_MOTION_HINT_MASK for better behavior.
	(PrintPreview): Added fields for drag anchor and drag offset.
	(drag_to): New function to drag/scroll.
	(create_preview_canvas): Connect to the different event handlers.
	(do_zoom): We do not need to re-render the page; just set the zoom
	factor.  Also, use exponential zooming for better behavior.

	* src/cursors.h: Moved the cursor #defines to an enum.  This way
	we can check for a max value in cursor_get().  Moved the cursor
	array to the .c file and made it private.

	* src/cursors.c (cursors_init): Added sanity check so that all
	cursors are defined.
	(cursor_get): New function to get a cursor based on its type.
	(cursors): Added hand cursors.

	* src/pixmaps/cursor_hand_{open,closed}.xpm: Added hand cursors.

svn path=/trunk/; revision=1365
1999-11-02 21:48:52 +00:00

39 lines
957 B
C

#ifndef GNUMERIC_CURSORS_H
#define GNUMERIC_CURSORS_H
typedef enum {
GNUMERIC_CURSOR_FAT_CROSS,
GNUMERIC_CURSOR_THIN_CROSS,
GNUMERIC_CURSOR_ARROW,
GNUMERIC_CURSOR_MOVE,
GNUMERIC_CURSOR_ZOOM_IN,
GNUMERIC_CURSOR_ZOOM_OUT,
GNUMERIC_CURSOR_SIZE_X,
GNUMERIC_CURSOR_SIZE_Y,
GNUMERIC_CURSOR_SIZE_TL,
GNUMERIC_CURSOR_SIZE_TR,
GNUMERIC_CURSOR_PRESS,
GNUMERIC_CURSOR_HAND_OPEN,
GNUMERIC_CURSOR_HAND_CLOSED,
GNUMERIC_CURSOR_NUM_CURSORS
} CursorType;
void cursors_init (void);
void cursors_shutdown (void);
#define cursor_set(win, c) \
G_STMT_START { \
if (win) \
gdk_window_set_cursor (win, cursor_get (c)); \
} G_STMT_END
#define cursor_set_widget(w, c) \
G_STMT_START { \
if (GTK_WIDGET (w)->window) \
gdk_window_set_cursor (GTK_WIDGET (w)->window, cursor_get (c)); \
} G_STMT_END
GdkCursor *cursor_get (CursorType type);
#endif /* GNUMERIC_CURSORS_H */