Subject: FvwmButtons app launcher

From: Dan Espen <[email-masked]>
Date: Mon, 10 Apr 2000 16:02:51 -0400

I'm not all that familiar with FvwmButtons.  Here's something that seems
to work, that I'd like to add to the FAQ for an "icon app launcher":

# FvwmButtons icon launcher:
DestroyFunc Launcher
AddToFunc Launcher
+ I DestroyModuleConfig $0Launch.*
+ I *$0Launch.Columns 1
+ I *$0Launch.(1x3, Icon $1, Action (Mouse 1) `Exec $2`)
+ I *$0Launch.Pixmap none
+ I *$0Launch.(Font 9x15bold, Fore White, Back DarkBlue, Title $0, Action (Mouse 1) `Exec $2`)
+ I Style $0Launch. HandleWidth 0, NoTitle
+ I Module FvwmButtons $3 $0Launch.
# Examples:
Launcher RXVT xterm.xpm "rxvt" "-g +0+0"
Launcher XV   xv.xpm    "xv"   "-g +0+100"

It seems to work, but I'm not sure I'm  using documented behavior with
the "Pixmap none" being overridden by the "(Back".

I'm also not sure about doing the icon as 1x3  to get the label placed
right.

Any comments?

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 11 Apr 2000 05:01:08 +0200

> Launcher XV   xv.xpm    "xv"   "-g +0+100"

That looks really nice :-)  Good old FvwmButtons always has a
surprise ready for you.

> the "Pixmap none" being overridden by the "(Back".

What you're doing is okay; but transparency isn't well documented.
Looking at the code I see that with transparency enabled:

 1) Reliefs and all parts not belonging to a button are transparent.
 2) Button icons are transparent where the icon itself is transparent.
 3) Button titles are *not* transparent.

(3) is a bit surprising.  From SetTransparentBackground() (FvwmButtons.c):

line 560 ff.

  /*
   * if button has an icon, draw a rect with the same size as the icon
   * (or the mask of the icon),
   * else draw a rect with the same size as the button.
   */
  if(b->flags&b_Icon)
  {
    ...
  }
  else
  {
    number=buttonNum(b);
    XFillRectangle(Dpy,pmap_mask,trans_gc,buttonXPos(b,number),
      buttonYPos(b,number),
      buttonWidth(b),buttonHeight(b));
  }

> I'm also not sure about doing the icon as 1x3  to get the label placed

1) Try using specific geometries for buttons and the whole window:

# FvwmButtons icon launcher:
DestroyFunc Launcher
AddToFunc Launcher
+ I DestroyModuleConfig $0Launch.*
+ I *$0Launch.Geometry 64x68
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ I *$0Launch.Columns 1
+ I *$0Launch.Rows    4
^^^^^^^^^^^^^^^^^^^^^^^
+ I *$0Launch.(1x3+0+0, Icon $1, Action (Mouse 1) `Exec $2`)
               ^^^^^^^
+ I *$0Launch.Pixmap none
+ I *$0Launch.(1x1+0+3, Font 9x15bold, Fore White, Back DarkBlue, Title $0, Action (Mouse 1) `Exec $2`)
               ^^^^^^^
+ I Style $0Launch. HandleWidth 0, NoTitle
+ I Module FvwmButtons $3 $0Launch.
# Examples:
Launcher rxvt xterm.xpm "rxvt" "-g +0+0"
Launcher xv   xv.xpm    "xv"   "-g +0+72"

2) Use a colour set instead of Back/Fore to get rid of this
   ugly border around the icon title, 

3) I'd not use a bold font for the icon titles.

4) We need an 'icon box' for windows (a 'window box' :-) ).
   This way these icons could easily be lined up without
   specifying a geometry.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Tue, 11 Apr 2000 20:51:58 -0400

> That looks really nice :-)  Good old FvwmButtons always has a

Thanks.  I still think its silly to launch an app from an icon,
but what can you do...

> (3) is a bit surprising.  From SetTransparentBackground() (FvwmButtons.c):

Actually   if you put  a  title on  the icon itself,  its placed quite
nicely but  the background is    transparent.  Thats why  I used   the
separate item.

> + I *$0Launch.Geometry 64x68

I  feel dumb, I missed the  part of the  man page  that explained that
these geometry units are in button units, not pixels.

>    ugly border around the icon title, 

Hmm, I  didn't   think the 3d  relief   was ugly,  it  looked  like an
improvement to me.

As long as Colorsets  sit in an optional module  they don't  seem like
core  functionality.  Anyone else think Colorsets  should be moved out
of module land before 2.4?

> 3) I'd not use a bold font for the icon titles.

I'm my own X environment, I use 100% bold fonts.

I'll experiment a little more.

>    This way these icons could easily be lined up without

The icon box code probably could be generalized to place classes of windows.

One could have  a Piperead driven shell  script that would read a list
of apps/icons to create launchers from and do  the arithmetic to place
them.

I   don't  know how  much   we should encourage    this, icons are for
minimized applications after all.

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 12 Apr 2000 05:00:17 +0300

> Thanks.  I still think its silly to launch an app from an icon,

I feel similarly, although seems interesting.

> Hmm, I  didn't   think the 3d  relief   was ugly,  it  looked  like an

While the background color is in the right limits, the 3d-border is nice,
but once it is more close to black or white... I wonder, is motif so ugly,
or the included algorithm uses "not-nice" constants?.. Maybe both. :)

> of module land before 2.4?

Probably not a very easy task to do now. Not that I am against.

> I'm my own X environment, I use 100% bold fonts.

How you "boldify" text in man pages or web pages then?
IMHO, there are enough nice fonts (in all variants, normal, bold, italic).

> of apps/icons to create launchers from and do  the arithmetic to place

Is not it better to have one transparent FvwmButtons bar with many icons?
Well, it is static, but a script may regenerate it if needed.

> minimized applications after all.

Yes.

> Dan Espen

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 12 Apr 2000 10:46:59 +0200

> Thanks.  I still think its silly to launch an app from an icon,

Me too.  These icons are always buried below a window when I
have to click them :-(

[snip]

> > > I'm also not sure about doing the icon as 1x3  to get the label placed

[snip]

> I'll experiment a little more.

Well, (2) and (3) are a matter of personal taste.  I don't like
thick lines like the 3d relief (I wouldn't bother if the line
was only one pixel) or bold fonts.  Of course this depends on
your display resolution too.  Perhaps the script should explicitly
set the relief width so that the user can easily change it (don't
ask me which setting).

> minimized applications after all.

I can think of a few situations where this would come in handy.
E.g. sometimes I have to start a number of similar shells on different
machines (e.g. windows just doing a ping).  Usually I have to spend
several minutes until all these windows are lined up nicely so that
I can see all their contents.

Well, perhaps this doesn't justify a 'window box' style.  In the end
this is only about initial placement.  You won't want the windows
rearranged when you switch pages.

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Wed, 12 Apr 2000 09:46:33 -0400

> Well, it is static, but a script may regenerate it if needed.

Perhaps.

I won't be offended if you replace the example I came up with with one
that uses one instance of FvwmButtons.

---

From: Olivier Chapuis <[email-masked]>
Date: Wed, 12 Apr 2000 21:19:16 +0200

> Probably not a very easy task to do now. Not that I am against.

Hello,
 
I think it is a good idea to move FvwmTheme into fvwm since
the "good way" to use colors in fvwm is to use FvwmTheme.
If there is a volunteer for doing that I think he may try
to convince Mikhael to remove his negative vote.

But most important from my point of view is that we may try
to do so that FvwmTheme is fully functional for fvwm before 2.4:
currently only fg, bg, hi and sh is used in Title and Border.
If nobody plan to do this I'm ready if there is two votes for
that and no vote against.

Olivier

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 12 Apr 2000 23:37:32 +0300

> to convince Mikhael to remove his negative vote.

No, I said, that I am *not* against. I don't want to vote on this one.

> that and no vote against.

If 2.4 is compatible with 2.2 (is it?), {Title,Button,Border}Style should
be supported; on the other hand they should be dropped after 2.4.
Do you want to redesign and reimplement title/button/border logic now? :)

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 13 Apr 2000 08:53:37 +0200

> of module land before 2.4?

Personally I'm quite happy with a module.  I can't see any
advantage in having this in the main module other than speed -
and speed is currently no critical factor in FvwmTheme.

> to convince Mikhael to remove his negative vote.

See above.

> that and no vote against.

FvwmTheme *is* fully functional.  Fvwm can't handle the
pixmaps provided by FvwmTheme everywhere.  We can't simply put
a pixmap from FvwmTheme on window borders/titles because

 1) Gradients would have to be drawn manually each time the
    title is updated.  This is too slow with the way that
    FvwmTheme (or a reimplementation in the main module) works.
    It will require a major redesign/enhancement of FvwmTheme
    to achieve an acceptable speed.
 2) ...Style can't use stacked pixmaps with FvwmTheme.

I'm absolutely against starting this now.  We really need to
focus on fixing the many bugs in the current cvs.  I promise to
provide an updated to-do list for 2.4 (containing all the bugs
that have queued up in my mail) until the end of the week.

Bye

Dominik ^_^