Subject: FVWM: FVWM PixmapButton patch

From: Kim Lassila <[email-masked]>
Date: Sat, 02 Mar 1996 15:28:10 +0200

It's totally awesome! And it works! 
Thank you Andrew Veliath!
But, there are some new features that must be added in order to make it
even better:

1) You should be able to specify different pixmaps for buttons of active
and inactive windows like this:
ButtonStyle 2 Pixmap activeUp.xpm activeDown.xpm inactiveUp.xpm
inactiveDown.xpm

2) You should be able to specify pixmaps for titlebar backgrounds. This
one may be a bit tougher to implement, but it would be worth it!
The expression could be something like this:
TitleStyle Pixmap activeTitlebg.xpm inactiveTitlebg.xpm

3) The height of the titlebar should optionally be able to be specified
in fvwm2rc. This would help fitting the pixmaps without changing the
title font.

-- 
  - ---- --------------------------------------------------- ---- -- -
 .       |\      _,,,---,,_       Kim Lassila    a.k.a   _/ .  _//    .
 . ZZZzz /,`.-'`'    -.  ;-;;,_ Juhannuskatu 18         (  )|\( />'   .
 :      |,4-  ) )-,_. ,\ (  `'-'  20300 Turku           _)/_'-\)(     :
 |     '---''(_/--'  `-'\_)        -FiNLAND-           '      '       |
 |     ...studying Computer Science at the University of Turku...     |
 `-----------------------> [email-masked] \/ [email-masked] <--'
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Ian Spielman <[email-masked]>
Date: Sat, 2 Mar 1996 07:46:35 -0600 (CST)

> in fvwm2rc. This would help fitting the pixmaps without changing the

Something that I want done, is the use of different pixmaps for different 
widows (rather like OS/2) so that Xterm can have a teeny-tiny little 
xterm icon. The way I propose to do this is write a scaling function that 
takes the defined icon for this window and puts it into the corner. I 
would be happy to write such a scaling function, but I don't have the 
time to merge it with FVWM once I have written it. So if there are any 
people who are interested in this I can provide a function that scales a 
nxm set of data to a ixj, while the other intersted party can put it in 
the FVWM sources. The trouble for me is that I don't have the time to 
learn the FVWM sources.

The way that I propse to implement this is make it a compile time option 
to make button #n's default action is to display the correct scaled icon. 
Naturaly this could be changed at run-time in the usual way. I suggect 
this so we don't have to add any more elements to any FVWM structs.

Any takers?

Ian

*************************************************************************
*Ian Spielman                                                           *
[email-masked]                                                   *
*http://129.15.140.27                                                   *
*************************************************************************

---

From: "Eric F. Kahler ([email-masked])" <[email-masked]>
Date: Sat, 02 Mar 1996 09:18:37 -0500

[email-masked] said:
> Something that I want done, is the use of different pixmaps for 
> different  widows (rather like OS/2) so that Xterm can have a 
> teeny-tiny little  xterm icon. The way I propose to do this is write 
> a scaling function that  takes the defined icon for this window and 
> puts it into the corner.

That is an EXCELLENT idea.  I've wanted to suggest that, but I don't like 
suggesting things that I can't help out  with in least way.  

Could you extend that to work with FVWM's menus?  That way Icons can be 
defined once, and they'd appear:  when the window is iconified, next to it's 
name in the menu, and in the window itself.  This would remove so much 
extraneous work when adding pixmaps to menus.

Thanks for considering it,
Eric.

---

From: Andrew Veliath <[email-masked]>
Date: Mon, 4 Mar 1996 22:47:26 -0500

Thanks for the feedback and fixes, as they speed things up ;-) !  Sorry for
the late response as well since I've had a busy spell lately ;-(.

 > ButtonStyle 2 Pixmap activeUp.xpm activeDown.xpm inactiveUp.xpm

This shouldn't be very difficult, I'll implement it in the next version.

 > TitleStyle Pixmap activeTitlebg.xpm inactiveTitlebg.xpm

This shouldn't be too bad to try; the only question is how to layout
the pixmap to account for any horizontal size.  My first guess would
be to just repeat the pixmap horizontally (which would,
however,facilitate the need of a "seamless" horizontal pixmap).  One
might opt alternatively to use a single centered pixmap.

I think the best way to handle the TitleStyle however would be to give
a modifier of /which/ type of window as you've mentioned, and to make
it simple something similar to one per line, such as:

TitleStyle <Active | Inactive | Sticky> <Simple | <Pixmap <Up Pixmap> [Down Pixmap] > >

I have break next week and will implement a test of this since for no
other reason than it seems neat.  Also, the title style declaration
could possibly include a text justification specifier.  A "down" title
pixmap should probably also be optionally specified in the same manner
as the button pixmap.

 > in fvwm2rc. This would help fitting the pixmaps without changing the

This is an interesting idea as well.  Ian also mentioned making the
button a reduced version of the currently assigned icon.  I think this
could just be an added button style, such as "ButtonStyle 1 UseIcon"
or something along those lines (?).  Someone mentioned they had code
to reduce pixmaps (hint, hint... ;) -- within the PixmapButton
framework it should be almost straitforward.  I was also thinking it
would be nice to be able to override the global button assignment from
the window Style declaration...  All of these things should naturally
be [preprocessor] optional.

I will make a web page available next week with some more
info and the latest implementation of the patch.  Again, thanks.

Sincerely,

Andrew Veliath <[email-masked]>
http://www.rpi.edu/~veliaa
Finger for PGP Key
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].