Re: gtkhruler in gtk3

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

 



On Sun, Feb 17, 2013 at 9:00 PM, salsaman <salsaman@xxxxxxxxx> wrote:
> Hi,
> has anybody created a gtk3 widget similar to the gtkhruler in gtk2 ?
> It could save me a lot of work.
>

The ruler was only removed in GTK+3 because it was judged to be
too specialized to have a place in the toolkit (not very many users
of that widget), not for any technical reason making it hard to
port.

If you take the ruler widget code from GTK+2, you should be
able to very easily use it compiling against GTK+3... You'll
need to change ->expose_event() and ->size_request()
appropriately (for ruler code, you should only need to
implement ->get_preferred_width()/->get_preferred_height()
since there's no complex height-for-width stuff to do
in there).

Perhaps, if you port the widget (as I mentioned it should
be quite easy), we could then add the ported version
to libegg, where people (if any) need it they can easily
copy it into their sources.

If you do this, one thing I would suggest is to make it
simply an EggRuler type that implements GtkOrientable,
instead of having separate H/V subclasses.

Cheers,
    -Tristan
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux