On 04 Aug 2001 16:15:37 +0700, Dmitry Yu. Bolkhovityanov wrote:
> 
>     First, is it possible to do a Windows-3.1-like windows and menus?  The
> problem with borders is that in case of "BorderStyle -- flat" handles are
> invisible even without "HiddenHandles".  The accompanying problem with menus
> is that there's only "BorderWidth" flag, without an ability to switch
> 3D-ness off (with Nops too).  Both seems to be caused by lack of
> "BorderColor" concept.  Am I missing something?

Windows have "BorderColor" concept. Style * [Hilight]BorderColorset.

Menus have "BorderColor" concept (kind of) using MenuStyle MenuColorset
and ActiveColorset; you may specify sh and hi colors in these colorsets.

I don't remember how should look windows-3.1 windows and menus, so I can't
say whether something is missing to fully or partially emulate the look.
It is hard to believe someone is interesting in microsoft solutions. :)

>     Second, is it possible to create an "if-then-else" construct in a
> function?  I tried to emulate the behaviour of Win9x's TaskBar, which can be
> described as:
> 
>     if (Iconic  ||  !Raised)
>     {
>         Iconify Off
>         Raise
>         Focus
>     }
>     else
>     {
>         Iconify On
>     }
> 
> (i.e. deiconify if iconified, otherwise raise of not raised, otherwise
> iconify).

We discussed adding shell abilities to fvwmrc two years ago and the
decission was not to do this, since preprocessors and PipeRead can do it.

But if-else construct does not seem too hard to implement. If we do this
we may have if, else, endif commands, so braces are not needed.

        if (Iconic || !Raised)
                Iconify Off
        else
                if (!Iconic)
                        Iconify On
                endif
        endif

This only seems complex, in fact it is simple. There is a list of boolean
conditions (one for each level of "if") and the current command is
executed or skipped depending on the last boolean. (if, else, endif)
commands only manipulate this list of booleans (push, not, pop).

>     But this can't be done with a syntax of "if-then; if-then", since the
> following happens:
> 
>     AddToFunc "Deiconify-Raise-Focus"
>     + "I" Iconify Off
>     + "I" Raise
>     + "I" Focus
>     AddToFunc "Deiconify-or-Raise-or-Iconify"
>     + "I" Current (Iconic) Deiconify-Raise-Focus
>     + "I" Current (!Raised) Raise
>     + "I" Current (Raised, !Iconic) Iconify On
> 
> but by the time the last line is reached, the window will *always* be raised
> and deiconified.  Is this fixable somehow?

Well, with some hacks everything is possible, including your example. :)

  SetEnv MyCondition 0
  Current (Iconic || !Raised) SetEnv MyCondition 1
  PipeRead `if [ $[MyCondition] == 1]; echo Iconify Off; echo Raise; \
        echo Focus; else echo Iconify On; fi`

Regards,
Mikhael.
--
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 PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to