From 83ad2c75e3da0305514dedcd22f67a9d2a516002 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Sun, 20 Feb 2000 17:52:35 +0000 Subject: added libetext.a and libeutil.a to test_shortcut_bar_LDADD, and got rid of 2000-02-20 Damon Chaplin * widgets/shortcut-bar/Makefile.am: added libetext.a and libeutil.a to test_shortcut_bar_LDADD, and got rid of e-icon-bar-text-item.[hc]. I'll delete these soon. * widgets/shortcut-bar/e-icon-bar.c: changed to be a subclass of ECanvas and to use EText instead of EIconBarTextItem. Also set "width_set" & "height_set" of the GnomeCanvasPixbuf items so they work in the "Small Icon" view. * widgets/shortcut-bar/e-vscrolled-bar.c: use map/unmap instead of show/hide for the up & down buttons to avoid queueing resizes. Otherwise the scrolling starts off a bit jerky. * widgets/shortcut-bar/test-shortcut-bar.c: output a message when the main label is resized, just for info. * widgets/shortcut-bar/*.[hc]: updated my email address. svn path=/trunk/; revision=1867 --- widgets/shortcut-bar/e-icon-bar.h | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'widgets/shortcut-bar/e-icon-bar.h') diff --git a/widgets/shortcut-bar/e-icon-bar.h b/widgets/shortcut-bar/e-icon-bar.h index 65ab69f23f..61c5f4dacc 100644 --- a/widgets/shortcut-bar/e-icon-bar.h +++ b/widgets/shortcut-bar/e-icon-bar.h @@ -2,7 +2,7 @@ /* * Author : - * Damon Chaplin + * Damon Chaplin * * Copyright 1999, Helix Code, Inc. * @@ -25,8 +25,8 @@ #define _E_ICON_BAR_H_ #include -#include #include +#include "../../e-util/e-canvas.h" #ifdef __cplusplus extern "C" { @@ -70,6 +70,18 @@ typedef enum } EIconBarViewType; +/* These index our colors array. */ +typedef enum +{ + E_ICON_BAR_COLOR_TEXT, + E_ICON_BAR_COLOR_EDITING_TEXT, + E_ICON_BAR_COLOR_EDITING_RECT, + E_ICON_BAR_COLOR_EDITING_RECT_OUTLINE, + + E_ICON_BAR_COLOR_LAST +} EIconBarColors; + + #define E_ICON_BAR(obj) GTK_CHECK_CAST (obj, e_icon_bar_get_type (), EIconBar) #define E_ICON_BAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_icon_bar_get_type (), EIconBarClass) #define E_IS_ICON_BAR(obj) GTK_CHECK_TYPE (obj, e_icon_bar_get_type ()) @@ -80,7 +92,7 @@ typedef struct _EIconBarClass EIconBarClass; struct _EIconBar { - GnomeCanvas canvas; + ECanvas canvas; /* This specifies if we are using large icons or small icons. */ EIconBarViewType view_type; @@ -105,6 +117,9 @@ struct _EIconBar /* This is the item that we are currently editing, or -1. */ gint editing_item_num; + /* This is a GnomeCanvasRect which is placed around the edited item. */ + GnomeCanvasItem *edit_rect_item; + /* This is the index of the item which is being dragged, or -1. If the drag results in a move it will be deleted. */ gint dragged_item_num; @@ -126,11 +141,14 @@ struct _EIconBar gint auto_scroll_timeout_id; gint auto_scroll_delay; gboolean scrolling_up; + + /* Colors for drawing. */ + GdkColor colors[E_ICON_BAR_COLOR_LAST]; }; struct _EIconBarClass { - GnomeCanvasClass parent_class; + ECanvasClass parent_class; void (*selected_item) (EIconBar *icon_bar, GdkEvent *event, -- cgit v1.2.3