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 Library 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 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library 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.
19 #ifndef __GTK_RANGE_H__
20 #define __GTK_RANGE_H__
24 #include <gtk/gtkadjustment.h>
25 #include <gtk/gtkwidget.h>
30 #endif /* __cplusplus */
33 #define GTK_TYPE_RANGE (gtk_range_get_type ())
34 #define GTK_RANGE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_RANGE, GtkRange))
35 #define GTK_RANGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_RANGE, GtkRangeClass))
36 #define GTK_IS_RANGE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_RANGE))
37 #define GTK_IS_RANGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RANGE))
40 typedef struct _GtkRange GtkRange;
41 typedef struct _GtkRangeClass GtkRangeClass;
58 guint scroll_type : 3;
60 guint click_child : 3;
70 GtkAdjustment *adjustment;
75 GtkWidgetClass parent_class;
79 gint stepper_slider_spacing;
87 void (* draw_background) (GtkRange *range);
88 void (* clear_background) (GtkRange *range);
89 void (* draw_trough) (GtkRange *range);
90 void (* draw_slider) (GtkRange *range);
91 void (* draw_step_forw) (GtkRange *range);
92 void (* draw_step_back) (GtkRange *range);
93 void (* slider_update) (GtkRange *range);
94 gint (* trough_click) (GtkRange *range,
98 gint (* trough_keys) (GtkRange *range,
100 GtkScrollType *scroll,
101 GtkTroughType *trough);
102 void (* motion) (GtkRange *range,
105 gint (* timer) (GtkRange *range);
109 GtkType gtk_range_get_type (void);
110 GtkAdjustment* gtk_range_get_adjustment (GtkRange *range);
111 void gtk_range_set_update_policy (GtkRange *range,
112 GtkUpdateType policy);
113 void gtk_range_set_adjustment (GtkRange *range,
114 GtkAdjustment *adjustment);
116 void gtk_range_draw_background (GtkRange *range);
117 void gtk_range_clear_background (GtkRange *range);
118 void gtk_range_draw_trough (GtkRange *range);
119 void gtk_range_draw_slider (GtkRange *range);
120 void gtk_range_draw_step_forw (GtkRange *range);
121 void gtk_range_draw_step_back (GtkRange *range);
122 void gtk_range_slider_update (GtkRange *range);
123 gint gtk_range_trough_click (GtkRange *range,
128 void gtk_range_default_hslider_update (GtkRange *range);
129 void gtk_range_default_vslider_update (GtkRange *range);
130 gint gtk_range_default_htrough_click (GtkRange *range,
134 gint gtk_range_default_vtrough_click (GtkRange *range,
138 void gtk_range_default_hmotion (GtkRange *range,
141 void gtk_range_default_vmotion (GtkRange *range,
148 #endif /* __cplusplus */
151 #endif /* __GTK_RANGE_H__ */