Subject: Re: Emacs for Windows 95

From: Andrew Innes <[email-masked]>
Date: Fri, 22 Nov 1996 12:29:06 GMT

On Thu, 21 Nov 1996 18:14:57 -0800 (PST), Geoff Voelker <[email-masked]> said:
>Josef,
>
>I am not sure whether this is possible.  Andrew, do you know if you
>can place icons in a Windows menu button (regardless of whether Emacs
>currently has a mechanism for doing so)?

Yes, it is quite easy to use icons in menu items, either by using
owner-draw items or simple bitmap items - both options are described in
the SDK documentation (see InsertMenu).

You can also provide bitmaps for the checked and unchecked menu states
(separate to the text or whatever is drawn for the item itself), which
might be an easier way to get small graphics next to normal text.  See
SetMenuItemBitmaps for details.

In this case, I would try SetMenuItemBitmaps first - if you just want to
use small bitmaps containing math symbols, say, this would be a good way
to do it.

To do this in Emacs would I guess require inventing some method for
attaching graphics object to the menu tree as represented in lisp.  I'm
not that familiar with the menu code in Emacs, but looking at some
examples, a menu entry typically looks like this (taken from
menu-bar-tools-menu):

  (epatch "Apply Patch" (nil) . menu-bar-epatch-menu)

A more complicated example looks like this:

  (ps-print-buffer "Postscript Print Buffer" ([3 112] . "  (C-c p)") .
     nt-ps-print-buffer)

I would guess that the best thing would be to put a 'bitmap property on
either the first or last symbol in the list, and make the menu update
code in w32menu.c use that property to locate a bitmap resource somehow.

AndrewI

>Kerschbaummayr Josef writes:
>>Hello!
>>
>>I am using Emacs for Windows 95 version 19.34. In our project
>>we want to use Emacs for writing LateX code, especially mathematical
>>texts. Therefore we would like to put small graphics into the
>>menus (like the icons in the task-bar), which will show the printed
>>representation of LateX commands.
>>
>>Can you imagine to this with Emacs for Windows 95?
>>Where should we begin to solve this problem?
>>
>>Yours, Josef.
>>
>>----
>>
>>Josef Kerschbaummayr
>>student of computer science
>>University of Linz (Austria)
>>
>>email: [email-masked]
>