Re: Decorating scales
- From: Mathias Hasselmann <mathias hasselmann gmx de>
- To: Matthias Clasen <matthias clasen gmail com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Decorating scales
- Date: Tue, 06 Jan 2009 21:40:42 +0100
Am Dienstag, den 06.01.2009, 10:29 -0500 schrieb Matthias Clasen:
> On Tue, Jan 6, 2009 at 12:55 AM, Tristan Van Berkom <tvb gnome org> wrote:
> > On Tue, Jan 6, 2009 at 12:41 AM, Yu Feng <rainwoodman gmail com> wrote:
> >> Hi,
> >>
> >> If GtkRange were a gtk container perhaps using gtk_container_xxx with
> >> child_properties will be an alternative. GtkContainer also has bettern
> >> granularity - the programmers can modify/remove each marker
> >> individually.
> >>
> >> Unfortunately it isn't a Container.
> >
> > Oh yeah, time for those GContainer/GContainable interfaces, nudge nudge ;-)
>
> One way this _could_ be done is to restrict the GtkScale api to just
> add undecorated marks, and then have a special-purpose
> "DecoratedScale" container that would have one slot for a scale, and
> then allow to add other children to decorate the scale, using child
> properties for the position and the value. The container would then
> use the
> scale marks api to add the marks at the positions/values which its
> children request,
> and position the child widgets next to the marks.
>
> Not sure the minor benefits justify the effort, though...
Weren't the GtkCellRenderer/GtkCellLayout interfaces written exactly
for stuff like those marks?
So maybe gtk_scale_add_mark_text() and gtk_scale_add_mark_icon() should
be replaced by an implementation of the GtkCellLayout interface?
Ciao,
Mathias
--
Mathias Hasselmann <mathias hasselmann gmx de>
http://taschenorakel.de/mathias/
http://www.openismus.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]