summaryrefslogtreecommitdiff
path: root/gtk/gtkscale.h
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2009-01-20 05:10:27 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2009-01-20 05:10:27 +0000
commit26490a2dd7224eb021bbbc7c2b6051a68ee5c247 (patch)
treeac93a899ee2bc1935fdbd05cc9c784572f6dc605 /gtk/gtkscale.h
parentb6b52376631e52542237b7f229bb67ab57332746 (diff)
downloadgtk+-26490a2dd7224eb021bbbc7c2b6051a68ee5c247.tar.gz
Bug 565656 – Add marks to scales
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
Diffstat (limited to 'gtk/gtkscale.h')
-rw-r--r--gtk/gtkscale.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtkscale.h b/gtk/gtkscale.h
index 34e690adac..4221dd281c 100644
--- a/gtk/gtkscale.h
+++ b/gtk/gtkscale.h
@@ -71,9 +71,9 @@ struct _GtkScaleClass
gint *y);
/* Padding for future expansion */
+ void (*_gtk_reserved1) (void);
void (*_gtk_reserved2) (void);
void (*_gtk_reserved3) (void);
- void (*_gtk_reserved4) (void);
};
GType gtk_scale_get_type (void) G_GNUC_CONST;
@@ -92,6 +92,12 @@ void gtk_scale_get_layout_offsets (GtkScale *scale,
gint *x,
gint *y);
+void gtk_scale_add_mark (GtkScale *scale,
+ gdouble value,
+ GtkPositionType position,
+ const gchar *markup);
+void gtk_scale_clear_marks (GtkScale *scale);
+
/* internal API */
void _gtk_scale_clear_layout (GtkScale *scale);
void _gtk_scale_get_value_size (GtkScale *scale,