Subject: Re: ButtonStyle Vector enhancements

From: "Dmitry Yu. Bolkhovityanov" <[email-masked]>
Date: Thu, 2 Aug 2001 12:47:30 +0700

On  1 Aug 01 at 15:34, [email-masked] wrote:

> I have applied a small patch that adds 2 more colors to button vectors.
> There is a thread with this feature request and some discussion:
>
>   http://www.hpc.uh.edu/fvwm/archive/0105/msg00294.html
>
> There are now 4 colors from a colorset, 0 to 3: shadow, hilight, bg, fg.
> So something like this is possible:
>
> ButtonStyle 8 Vector 10 45x65@2 45x75@3 20x75@3 20x50@3 35x50@3 35x65@1 \
>         35x25@1 75x25@1 75x65@0 35x65@0
> ButtonStyle 0 Vector 10 45x65@2 45x75@0 20x75@0 20x50@1 45x50@1 45x65@0 \
>         75x65@3 75x25@3 35x25@3 35x47@3
>
> The first color in Vector is not used, so it is good to be always 2 (bg).
>
> As I mentioned in the linked thread, lines are more suitable for a relief
> shadow drawing, to draw using fg and bg colors shapes are more suitable.
> Probably later it makes sense to have pseudocommands: MoveToPoint,
> LineToPoint, RectangleToPoint, CircleOfRadius and so on. Currently there
> is only a LineToPoint functionality. Any suggestions are welcome.
> This may be done (or not) after we open the next branch for beta features.

    This would be a very useful feature.  I don't know the reasons of the
guy in referred thread, but the case when it is useful is buttons in Win9x
style -- those should grow with title font size, and pixmap buttons are
absolute unsuitable here.

    Just two notes.

    First, in addition to lines/rects/circles a filled polygon is needed (to
draw all those [X] and alikes).

    Second, IMHO, names of the commands should be as short as possible --
like "lineto", "rectto", etc.  Otherwise definitions will look just too
heavy.

    BTW, is it currently possible to "lift the pen" with AddButtonStyle, i.e.
draw two disjoint shapes?

       ___________________________________________________________________
       Dmitry Yu. Bolkhovityanov  |  Novosibirsk, RUSSIA
       phone (383-2)-39-49-56     |  The Budker Institute of Nuclear Physics
                                  |  Lab. 5-13
--
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: Mikhael Goikhman <[email-masked]>
Date: Sat, 4 Aug 2001 11:58:24 +0000

>     This would be a very useful feature.  I don't know the reasons of the

He wanted to emulate Blackbox WM window look, emulating TWM/CTWM window
look would be interesting too.

> absolute unsuitable here.

But win-95 buttons have colors unrelated to the window colorsets (active
and inactive), so unless there is a way to specify other colors in Vector,
this will not help you.

Actually, it is a good idea to have ButtonColorset, HilightButtonColorset
in addition to the current Colorset, HilightColorset in Style. And Vector
may have a syntax to choose between the window's colorset (current colors
numbers 0,1,2,3) and the button's colorset.

The current decoration code is totaly ignorant of colorsets, and I prefer
if someone more knowledgeable starts to change it.

> draw all those [X] and alikes).

I only meant a filled polygon, otherwice it's already possible using lines.

> like "lineto", "rectto", etc.  Otherwise definitions will look just too

These long names were not supposed to be a syntax, I have no problem if
the syntax is mnemonic (one char per command, like 'l' for line, 'r', 'c').

> draw two disjoint shapes?

You use 2 AddButtonStyle commands, one draws the first shape and the second
draws the second. The result is summed.

Regards,
Mikhael.