From 26490a2dd7224eb021bbbc7c2b6051a68ee5c247 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 20 Jan 2009 05:10:27 +0000 Subject: =?UTF-8?q?Bug=20565656=20=E2=80=93=20Add=20marks=20to=20scales?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug 565656 – Add marks to scales * gtk/gtkrange.[hc]: Add internal api to define 'stop values' that have a little resistance when dragging the slider over it. * gtk/gtk.symbols: * gtk/gtkscale.[hc] (gtk_scale_add_mark): New function to add a 'mark' to a scale, which will draws a tick, plus optionally some text, and makes the value a stop value. (gtk_scale_clear_values): Removes all marks. * tests/testscale.c: Test for marks on scales * tests/Makefile.am: Integrate it svn path=/trunk/; revision=22149 --- gtk/gtkrange.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gtk/gtkrange.h') diff --git a/gtk/gtkrange.h b/gtk/gtkrange.h index 08860f8121..f7f3b96aa7 100644 --- a/gtk/gtkrange.h +++ b/gtk/gtkrange.h @@ -178,6 +178,12 @@ gdouble gtk_range_get_fill_level (GtkRange *range gdouble _gtk_range_get_wheel_delta (GtkRange *range, GdkScrollDirection direction); +void _gtk_range_set_stop_values (GtkRange *range, + gdouble *values, + gint n_values); +gint _gtk_range_get_stop_positions (GtkRange *range, + gint **values); + G_END_DECLS -- cgit v1.2.1