Subject: FVWM: win like buttons

From: Johannes Zellner <[email-masked]>
Date: Wed, 29 Aug 2001 21:15:25 +0200

Hi,

I'd like to have the windows like right button styles:

1) I'm sure someone has created the 'vector' layouts yet.
   Where can I find them ?
2) Is there a means to modify the maximize button (like in windows)
   to show, if a window is maximized or not ?

related: Is there a function to remove title, border, handles ...
if a window is maximized ?

-- 
   Johannes
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 30 Aug 2001 11:12:16 +0000

> 1) I'm sure someone has created the 'vector' layouts yet.

It is not possible to create Vector definition for this kind of buttons.
In the future Vector may support drawing using filled shapes, currently
only lines are supported.

It is easy to create the buttons that you want if you use ready images.
You may get images mini.winXX*.xpm from fvwm_images.tgz on fvwm.org.
fvwm-themes contains even more WinXX related button pixmaps.

>    to show, if a window is maximized or not ?

Yes, it's possible to use different buttons in normal and maximized states.

Now I see that samples system.fvwm2rc-sample-95 and DecorWin95 shipped
with fvwm-2.4.0 don't use this feature.

This is however used in fvwm-themes, take a look at buttons@redmond98:

  http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/fvwm-themes/fvwm-themes/themes/redmond98/buttons?rev=1.8&content-type=text/plain

I hope you get an idea (use ButtonStyle instead of AddButtonStyle).

> if a window is maximized ?

This is not done on Maximize, but you may write needed functions yourself
and use them instead of Maximize. This is from bindings in fvwm-themes:

  DestroyFunc FuncFvwmMaximizeFullScreen
  AddToFunc   FuncFvwmMaximizeFullScreen
  + I Style $n NoTitle, NoHandles, BorderWidth 0
  + I WindowId "$w" UpdateStyles
  + I WindowId "$w" Maximize true

  DestroyFunc FuncFvwmUnmaximizeFullScreen
  AddToFunc   FuncFvwmUnmaximizeFullScreen
  + I WindowId "$w" Maximize false
  + I Style $n Title, Handles, BorderWidth 5

  # press Shift-Ctrl-F11 to maximize, Shift-Ctrl-F12 to unmaximize
  Key F11         A       SC      Pick FuncFvwmMaximizeFullScreen
  Key F12         A       SC      Pick FuncFvwmUnmaximizeFullScreen

This does not work with fvwm-2.2.x versions. You should upgrade if needed.

Regards,
Mikhael.

---

From: Johannes Zellner <[email-masked]>
Date: Thu, 30 Aug 2001 21:35:20 +0200

>   Key F12         A       SC      Pick FuncFvwmUnmaximizeFullScreen

almost perfect. Now I tried to map this to one key:

Key F11 A SC Pick FuncFvwmToggleFullScreen

DestroyFunc FuncFvwmToggleFullScreen
AddToFunc   FuncFvwmToggleFullScreen
+ I Current ( Maximized) FuncFvwmUnmaximizeFullScreen
+ I Current (!Maximized) FuncFvwmMaximizeFullScreen

unfortunately the first line minimizes the window (if it's maximized)
and the second line gets triggered also, because now the window is
certainly minimized. --> the window will stay maximized always.

What I'd need would be a 'else' function for conditionals.
Is this possible ? -- something like:

+ I Current (Maximized) ... else ...