FVWM: Re: my window shade vector button

From: Dominik Vogt <dominik.vogt_at_gmx.de>
Date: Fri, 19 Jan 2001 22:56:04 +0100

On Fri, Jan 19, 2001 at 11:20:32AM -0700, Jeff Walker wrote:
> I designed this vector button. It got complex because you can't pickup the
> "pencil" while drawing. I use it to toggle the window shade.
> The second one is the same, but upside-down. My idea was to write a
> function that would swap the direction of the arrow, depending on the state
> of the window (rolled-up or fully visible). This worked fine, except for
> one thing, when I changed the face of the button, it changed it for all
> windows, not just the current window, thus new windows would take whatever
> direction was active when it was created (but existing windows stay the
> same, so I thought it worked for a few minutes). Makes sense. Anyway, here
> are the buttons.
>
> # arrow pointing up at a bar across the top
> ButtonStyle 3 15 10x5_at_1 90x5_at_1 90x20_at_0 50x20_at_0 50x25_at_0 \
> 80x55_at_0 60x55_at_0 60x90_at_0 40x90_at_0 40x55_at_1 20x55_at_1 50x25_at_1
> 50x20_at_0 \
> 10x20_at_0 10x5_at_1 -- Flat
> AddButtonStyle 3 ActiveDown 15 10x5_at_0 90x5_at_0 90x20_at_1 50x20_at_1 50x25_at_1 80x55_at_1
> \
> 60x55_at_1 60x90_at_1 40x90_at_1 40x55_at_0 20x55_at_0 50x25_at_0 50x20_at_1
> 10x20_at_1 \
> 10x5_at_0 -- Flat
>
> # arrow pointing down at a bar across the bottom
> AddButtonStyle 3 16 10x5_at_1 90x5_at_1 90x20_at_0 40x20_at_0 40x26_at_0
> 60x26_at_1 60x60_at_0 80x60_at_0 50x90_at_0 20x60_at_1 40x60_at_1 40x26_at_1 60x26_at_1 60x20_at_0
> 10x20_at_0 10x5_at_1 -- Flat
> AddButtonStyle 3 ActiveDown 16 10x5_at_0 90x5_at_0 90x20_at_1 40x20_at_1 40x26_at_1 60x26_at_0
> 60x60_at_1 80x60_at_1 50x90_at_1 20x60_at_0 40x60_at_0 40x26_at_0 60x26_at_0 60x20_at_1 10x20_at_1
> 10x5_at_0 -- Flat
>
> I think they are a little unique from what I saw on the website or linked
> pages because, like I said above, there are two objects, and I had to do a
> little "magic" (played with the colors) to make them look like they aren't
> part of the same object.

The button styles are global and apply to all windows. To get
what you want you need any 2.3.x beta release. Try this:

ButtonStyle 3 - MWMDecorShade
AddButtonStyle 3 ActiveUp <first normal vector>
AddButtonStyle 3 ActiveUp <second normal vector>
AddButtonStyle 3 ActiveDown <first normal vector>
AddButtonStyle 3 ActiveDown <second normal vector>
AddButtonStyle 3 Inactive <first normal vector>
AddButtonStyle 3 Inactive <second normal vector>
AddButtonStyle 3 ToggledActiveUp <first reverse vector>
AddButtonStyle 3 ToggledActiveUp <second reverse vector>
AddButtonStyle 3 ToggledActiveDown <first reverse vector>
AddButtonStyle 3 ToggledActiveDown <second reverse vector>
AddButtonStyle 3 ToggledInactive <first reverse vector>
AddButtonStyle 3 ToggledInactive <second reverse vector>

Bye

Dominik ^_^ ^_^

--
Dominik Vogt, dominik.vogt_at_gmx.de
Reply-To: dominik.vogt_at_gmx.de
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri Jan 19 2001 - 15:54:17 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:51 BST