diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 2000-01-06 13:48:27 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 2000-01-06 13:48:27 +0800 |
commit | ed4e8afecd5a7f9fab04715ca26a67b2917d78f3 (patch) | |
tree | fb33e24ef2eb7c01b225e094d69228c395b1afb4 /widgets/shortcut-bar/e-vscrolled-bar.h | |
parent | 36e5e42d31a56499b1b2534fdf9f6a720b3813e0 (diff) | |
download | gsoc2013-evolution-ed4e8afecd5a7f9fab04715ca26a67b2917d78f3.tar gsoc2013-evolution-ed4e8afecd5a7f9fab04715ca26a67b2917d78f3.tar.gz gsoc2013-evolution-ed4e8afecd5a7f9fab04715ca26a67b2917d78f3.tar.bz2 gsoc2013-evolution-ed4e8afecd5a7f9fab04715ca26a67b2917d78f3.tar.lz gsoc2013-evolution-ed4e8afecd5a7f9fab04715ca26a67b2917d78f3.tar.xz gsoc2013-evolution-ed4e8afecd5a7f9fab04715ca26a67b2917d78f3.tar.zst gsoc2013-evolution-ed4e8afecd5a7f9fab04715ca26a67b2917d78f3.zip |
Lots of reorganization to get the Evolution shell to begin its life. It
Lots of reorganization to get the Evolution shell to begin its life.
It also includes a new evolution widget from Damon.
Miguel.
svn path=/trunk/; revision=1536
Diffstat (limited to 'widgets/shortcut-bar/e-vscrolled-bar.h')
-rw-r--r-- | widgets/shortcut-bar/e-vscrolled-bar.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/widgets/shortcut-bar/e-vscrolled-bar.h b/widgets/shortcut-bar/e-vscrolled-bar.h new file mode 100644 index 0000000000..d3273e6685 --- /dev/null +++ b/widgets/shortcut-bar/e-vscrolled-bar.h @@ -0,0 +1,97 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +/* + * Author : + * Damon Chaplin <damon@gtk.org> + * + * Copyright 1999, Helix Code, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ +#ifndef _E_VSCROLLED_BAR_H_ +#define _E_VSCROLLED_BAR_H_ + +#include <gtk/gtkbin.h> +#include <gtk/gtkadjustment.h> + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * EVScrolledBar is like GtkScrolledWindow but only scrolls the child widget + * vertically. It is intended for scrolling narrow vertical bars. + */ + + +#define E_VSCROLLED_BAR(obj) GTK_CHECK_CAST (obj, e_vscrolled_bar_get_type (), EVScrolledBar) +#define E_VSCROLLED_BAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_vscrolled_bar_get_type (), EVScrolledBarClass) +#define E_IS_VSCROLLED_BAR(obj) GTK_CHECK_TYPE (obj, e_vscrolled_bar_get_type ()) + + +typedef struct _EVScrolledBar EVScrolledBar; +typedef struct _EVScrolledBarClass EVScrolledBarClass; + +struct _EVScrolledBar +{ + GtkBin bin; + + GtkWidget *up_button; + GtkWidget *down_button; + + GtkAdjustment *adjustment; + + gint up_button_width; + gint up_button_height; + gint down_button_width; + gint down_button_height; + + /* The GTK+ event source ID of our timeout handler. */ + gint timeout_id; + + /* TRUE if we are scrolling up, FALSE if scrolling down. */ + gboolean scrolling_up; + + /* The minimum distance left to scroll. If the user just clicks a + button we scroll a minimum amount. This is reduced after each + scroll. */ + gfloat min_distance; + + /* TRUE if the button is still pressed. When the up/down button is + released, this gets set to FALSE, and we scroll until the minimum + distance falls below 0. */ + gboolean button_pressed; +}; + +struct _EVScrolledBarClass +{ + GtkBinClass parent_class; +}; + + +GtkType e_vscrolled_bar_get_type (void); +GtkWidget* e_vscrolled_bar_new (GtkAdjustment *adjustment); + +GtkAdjustment* e_vscrolled_bar_get_adjustment (EVScrolledBar *vscrolled_bar); +void e_vscrolled_bar_set_adjustment (EVScrolledBar *vscrolled_bar, + GtkAdjustment *adjustment); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _E_VSCROLLED_BAR_H_ */ |