GtkScrollbar marker API discussion

Hi Gtk+ hackers,

today in the Gtk+ meeting we discussed the addition of a marker API to
GtkScrollbar, the idea is to add Google Chrome style markers to the
trough of the scrollbar to hint users on where to find multiple
matches on an area.

Right now the lack of access to details of the GtkRange's internal
structure that stores the trough and slider geometry blocks this API

The plan right now would be:
* Add an internal accessor to GtkRange's geometry structure (see #623711)[0]
* Override GtkRange's expose and paint the markers on top, repaint the
slider after that.
* Add support for different classes of markers, with a string id for
each class, and a colour map for each string.

The marker addition call would look something like this:

gtk_scrollbar_add_mark (GtkScrollbar *scrollbar, gdouble mark, gchar*

There would also be some stock markers with default colours.
mark_class can be null and the default highlight colour  will be used.

Again, how and where to set and extend the colour mapping is sort of a
blurry spot to me.

Suggestions and help are more than welcome!


Alberto Ruiz

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]