1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #ifndef __GTK_RANGE_H__
28 #define __GTK_RANGE_H__
32 #include <gtk/gtkadjustment.h>
33 #include <gtk/gtkwidget.h>
38 #endif /* __cplusplus */
41 #define GTK_TYPE_RANGE (gtk_range_get_type ())
42 #define GTK_RANGE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_RANGE, GtkRange))
43 #define GTK_RANGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_RANGE, GtkRangeClass))
44 #define GTK_IS_RANGE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_RANGE))
45 #define GTK_IS_RANGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RANGE))
46 #define GTK_RANGE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_RANGE, GtkRangeClass))
49 typedef struct _GtkRange GtkRange;
50 typedef struct _GtkRangeClass GtkRangeClass;
67 guint scroll_type : 3;
69 guint click_child : 3;
79 GtkAdjustment *adjustment;
84 GtkWidgetClass parent_class;
88 gint stepper_slider_spacing;
96 void (* draw_background) (GtkRange *range);
97 void (* clear_background) (GtkRange *range);
98 void (* draw_trough) (GtkRange *range);
99 void (* draw_slider) (GtkRange *range);
100 void (* draw_step_forw) (GtkRange *range);
101 void (* draw_step_back) (GtkRange *range);
102 void (* slider_update) (GtkRange *range);
103 gint (* trough_click) (GtkRange *range,
107 gint (* trough_keys) (GtkRange *range,
109 GtkScrollType *scroll,
110 GtkTroughType *trough);
111 void (* motion) (GtkRange *range,
114 gint (* timer) (GtkRange *range);
118 GtkType gtk_range_get_type (void) G_GNUC_CONST;
119 GtkAdjustment* gtk_range_get_adjustment (GtkRange *range);
120 void gtk_range_set_update_policy (GtkRange *range,
121 GtkUpdateType policy);
122 void gtk_range_set_adjustment (GtkRange *range,
123 GtkAdjustment *adjustment);
125 void gtk_range_draw_background (GtkRange *range);
126 void gtk_range_clear_background (GtkRange *range);
127 void gtk_range_draw_trough (GtkRange *range);
128 void gtk_range_draw_slider (GtkRange *range);
129 void gtk_range_draw_step_forw (GtkRange *range);
130 void gtk_range_draw_step_back (GtkRange *range);
131 void gtk_range_slider_update (GtkRange *range);
132 gint gtk_range_trough_click (GtkRange *range,
137 void gtk_range_default_hslider_update (GtkRange *range);
138 void gtk_range_default_vslider_update (GtkRange *range);
139 gint gtk_range_default_htrough_click (GtkRange *range,
143 gint gtk_range_default_vtrough_click (GtkRange *range,
147 void gtk_range_default_hmotion (GtkRange *range,
150 void gtk_range_default_vmotion (GtkRange *range,
157 #endif /* __cplusplus */
160 #endif /* __GTK_RANGE_H__ */