On 18 Dec 2001 15:20:15 +0000, Tim Phipps wrote:
> 
[a nice suggestion for WindowStyle command skipped]

> plus the pattern to apply to new windows could be written as a function
> AddToFunc StyleFunction I WindowId $0 (<pattern>) WindowStyle ResizeOpaque
> 
> The StyleFunction function would be called with the newly-created
> window's id as the first parameter.
> 
> Additional style commands would just add to StyleFunction in
> a similar way to the way the style list build up. I think we may be able
> to remove the style list altogether with this. The only problem being
> the DestroyStyle command which would have to selectively remove parts of
> StyleFunction! DestroyStyle * would be the same a
> DestroyFunc StyleFunction.

This is not the only problem. Here are related ones.

Currently Style list is always optimized. It is not obvious how to do this
with this new StyleFunction. The function functionality just does not
allow to do everything we may want to do with StyleFunction.

Examples. I want a solution for these two problems.

1) Being able to switch normal icons on and off. Currently the only
solution is to issue "Style * NoIcon" to switch it off and hundreds of
"Style pattern Icon image" to switch them on again. Of course, the
solution to this is to add aditional Style flag HasIcon/NoIcon, so Icon is
stored for a window even it has NoIcon. But you may get the point. If
currently switching icons on and off two times is the same as doing this
10 times (because there is merging), with StyleFunction thousand of
new lines would be added, unless there is a way to optimize a function.
In this case it will not be a function in a normal sence.

2) It would be nice to have a way to do and undo style changes. This may
be useful for Style GUIs with ability to try/cancel style options. Or if
someone wants to enter to some temporary mode, i.e. to remember the way a
window (or windows) start now, apply some changes (say, iconify all new
windows) and then return to the previous state (with only some windows
started iconified). I see two possible solutions to this. First:
StartStyleGroup, EndStyleGroup, DeleteStyleGroup commands and disable
merging with styles inside the group. Second: DumpStyle / RestoreStyle.
In any case, to implement this, more operations over StyleFunction needed.

Just my thoughts.

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