Re: GtkScale small feature
- From: Tim Janik <timj gtk org>
- To: gtk-devel-list redhat com
- Subject: Re: GtkScale small feature
- Date: Tue, 2 May 2000 19:01:37 +0200 (CEST)
On 1 May 2000, Owen Taylor wrote:
>
> Havoc Pennington <hp@redhat.com> writes:
>
> > Hi,
> >
> > If anyone wants a small useful GTK project, GtkScale could be hacked
> > so that a custom draw_value can be easily provided in a subclass; I
> > think this means you need to virtualize the get_value_width()
> > function, and then be sure there's a way for the implementor of a
> > custom draw_value() to determine the position where they should draw
> > the value.
>
> Note that this portion has been changed in the Pango branch of
> GTK+ - it is now get_value_size() not get_value_width().
>
> I think that the right way to do it is to have two
> virtual functions / signals. (They should be signals to allow
> easy overriding in C)
>
> - get_value_size(): (Argument a GtkRequisition, to be filled in)
shouldn't that be value_size_request to stick to the established
::size_request signal name?
> - draw_value(): Draw the value - the coordinates passed
> in are the upper left corner of the
> requisition returned by get_value_size().
you need to pass in an allocation here, not just the upper left and right,
to avoid extra complexity on the signal handler implementation side (i.e.
storing the last requisition).
> Regards,
> Owen
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]