emacs-devel
[Top][All Lists]
Advanced

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

Re: Gtk tabs in emacs, new branch.


From: Jan Djärv
Subject: Re: Gtk tabs in emacs, new branch.
Date: Sat, 10 Apr 2010 21:14:12 +0200
User-agent: Thunderbird 2.0.0.24 (X11/20100317)

David De La Harpe Golden skrev:
Jan Djärv wrote:

I just tested it, you can have zero sized widgets in the tab. But there are borders the Gtk+ widget expects to draw around its children. This now comes at the top, A minor issue. I'll see if I can simplify my implementation with this approach.

    Jan D.

Should make interior tabs easier to implement too. hmm.

So, I was wondering just how firefox tabs did their thing given the quirks of a naive gtk notebook instance. People here are quite likely already aware of this:

Mozilla XUL's "native gtk" theme engine doesn't really use the
notebook widget directly at all for its "tabbox" (or other gtk widgets directly for most anything else...)!

It apparently makes an examplar singleton instance of each widget then borrows their (GtkStyle) style members to pass to gtk_(paint|draw|style)_* functions to handle drawing lookalikes more flexibly itself.

You can see the idea in the mozilla sources:
http://mxr.mozilla.org/seamonkey/source/widget/src/gtk2/gtk2drawing.c

It is a clever hack, but I don't fancy drawing tabs "manually", handling drag&drop, memory allocations and so on. It is a big job.


http://www.gtk.org/api/2.6/gtk/GtkStyle.html

Actually 2.6 is quite old, we even require 2.10 for Emacs.  2.20 is current.


This apparently includes scrollbars - maybe a way around gtk's scrollbar
quirks...

Though recasting "gtk" emacs to use the approach throughout might be ...a lot of work...

And kind of meaningless to use a toolkit in the first place. The widgets are supposed to simplify things after all.

        Jan D.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]