Hi to all of you,
first of all, I would like to apologies in advance. This mail reports
problems I have with the XEmacs20.4 (and older) and the Toolbar and
XEmacs and glyph. I think my problems are coming from XEmacs bugs but
it is quiet possible that I have missed many things and thus it is
quiet possible that I be wrong too.
*** 1: I think there is a bug in the design of the toolbar. To me (may be you
will explain to me why I'm wrong), the global X-window size of XEmacs should
be independent of the toolbars. I mean, enabling/disabling the toolbar should
not change the XEmacs X-window size. That's the main problem with the toolbar.
I think XEmacs toolbars should behaves as Netscape toolbars. With Netscape,
when you hide toolbar, the X-Window size does not change. I think, for that's
the good choice. This story of X-window sizes changing with the toolbar,
makes mostly impossible to use different toolbars in different buffers.
It is not possible to have a small toolbar (such as 3 pixels height
toolbar in a buffer) and a large toolbar (such as 30 pixels) in another
buffer because if you do this, your X-window will be reshaped each time
you active one buffer or this other!
*** 2: Because changing the toolbar size, changes the XEmacs X-window size,
one has to write code like:
(defun bee-shrink-frame-for-toolbar (delta)
(let* ((frame (selected-frame))
(fr-height (frame-pixel-height frame)))
(if (< delta 0)
(while (> (- (frame-pixel-height frame) fr-height) delta)
(set-frame-height frame (- (frame-height frame) 1)))
(while (< (- (frame-pixel-height frame) fr-height) delta)
(set-frame-height frame (+ (frame-height frame) 1))))))
This is really a pain (and this is rather incorrect).
*** 3: I have tried to use buffer specific toolbar. It works until toolbar have
different sizes. Try that code:
(let ((old-height (specifier-instance default-toolbar-height))
(new-height 3))
(set-specifier default-toolbar-height 3))
It works fine, it resizes every toolbar sizes.
it should be possible to use:
(let ((old-height (specifier-instance default-toolbar-height))
(new-height 3))
(set-specifier default-toolbar-height 3 (current-buffer)))
or
(let ((old-height (specifier-instance default-toolbar-height))
(new-height 3))
(set-specifier default-toolbar-height 3 (selected-window-buffer)))
This does not work. Why?
*** 4: I have had trouble while printing glyph inside regular text. It took
me some time to figure out that the problem was coming from the pixel
height of the glyph. I have the following code:
(defvar a-glyph
(make-glyph....))
(setq extent (make-extent 1 1 buffer))
(set-extent-face extent 'a-face)
(set-extent-begin-glyph extent a-glyph)
If the glyph's height is bigger than a value that depends on the font pixel
size, the extent won't appear on the screen. The trouble is
that there is no way to discover that something went wrong and that nothing
is printed.
*** 5: I would like to make a suggestion for the coming releases. Would it be
possible to print text with properties inside menus? For instance, I would
like to print in a different colors, the header of a menu and in a different
colors, the items of a submenu.
I hope these remarks will help. I you need more details, I will be happy
to help.
Sincerely,
--Manuel Serrano--