Re: FVWM: fvwm toggle button

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Fri, 10 May 2002 22:17:38 +0000

On 10 May 2002 23:56:31 +0200, Jodok Ole Müllers wrote:
>
> Has anybody an idea how to ceate a "toggle" button.
> I want to press it and if the winlist is off it will turn it on
> and if it is on it will turn it of.
>
> Pseuydocode:
>
> ...
> *FvwmButtons(Title "Toggle Winlist",ActionToggleFvwmWinlist )
> ....
>
>
> AddToFunc ToggleFvwmWinlist
> + Module FvwmWinList if WinListIsOff
> + KillModule FvwmWinList if WinListIsOn

Even if it looks like a classic if-else problem that is only easily
solvable in 2.5.x versions, it may be easily done in 2.4.x+ too due to
the way Module and functions in FVWM work:

  AddToFunc ToggleFvwmWinList
  + I None (FvwmWinList, CirculateHit) Module FvwmWinList
  + I Next (FvwmWinList, CirculateHit) Close

"Module FvwmWinList" is guaranteed to create a new window only after a
function is finished and "Next Close" is failed.

Regards,
Mikhael.
--
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 May 10 2002 - 17:18:45 BST

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