From: <dom...@us...> - 2013-04-29 21:04:54
|
Revision: 323 http://sourceforge.net/p/fvwm-crystal/code/323 Author: dominique_libre Date: 2013-04-29 21:04:50 +0000 (Mon, 29 Apr 2013) Log Message: ----------- functions/Window-Buttons-Vertical: zpdated with the new maximize functions Modified Paths: -------------- ChangeLog fvwm/components/functions/Window-Buttons fvwm/components/functions/Window-Buttons-Vertical Modified: ChangeLog =================================================================== --- ChangeLog 2013-04-29 20:50:15 UTC (rev 322) +++ ChangeLog 2013-04-29 21:04:50 UTC (rev 323) @@ -7,6 +7,7 @@ doc: updated some headers, added a few sentences. doc/FAQ: added 3.7 about flaky MPlayer. updated and NumLock fix the mouse bindings and window decorations. + functions/Window-Buttons-Vertical: updated with the new maximize functions Dimanche 28 Avril 2013 Dominique Michel functions/Window-Buttons; functions/Fullscreen: cleanup of WindowResize Modified: fvwm/components/functions/Window-Buttons =================================================================== --- fvwm/components/functions/Window-Buttons 2013-04-29 20:50:15 UTC (rev 322) +++ fvwm/components/functions/Window-Buttons 2013-04-29 21:04:50 UTC (rev 323) @@ -20,9 +20,6 @@ # mouse resized width and height, the third one will contain a string # corresponding to its state (excepted fullscreen). # The fullscreen functions are implemented into the Fullscreen file. -# -# Bugs/improvments: -# - Finish to implement the mouse resized state. # Variables creation and destruction {{{1 # They must survive a restart => SetEnv Modified: fvwm/components/functions/Window-Buttons-Vertical =================================================================== --- fvwm/components/functions/Window-Buttons-Vertical 2013-04-29 20:50:15 UTC (rev 322) +++ fvwm/components/functions/Window-Buttons-Vertical 2013-04-29 21:04:50 UTC (rev 323) @@ -14,7 +14,96 @@ # menu - name of the menu opened on the mouse hold # function - function executed after mouse click -# Wrapper functions for window decorations +# The windows can have several states: its original or mouse resized state, +# a minimized state, a maximized state, a fullscreen state, and several other. +# A mouse click must set the windows into the wanted state, and when in +# fullscreen, the window must retrun in its precedent state. +# We need 3 environment variables per windows, 2 will contain its original or +# mouse resized width and height, the third one will contain a string +# corresponding to its state (excepted fullscreen). +# The fullscreen functions are implemented into the Fullscreen file. + +# Variables creation and destruction {{{1 +# They must survive a restart => SetEnv +# FvwmEvent will do it. +DestroyFunc Window-State-Init +AddToFunc Window-State-Init ++ I SetEnv "CurrentWindowState_$[w.id]" Default ++ I SetEnv "WindowWidth_$[w.id]" "$[w.width]p" ++ I SetEnv "WindowHeight_$[w.id]" "$[w.height]p" + +DestroyFunc Window-State-Destroy +AddToFunc Window-State-Destroy ++ I UnsetEnv "CurrentWindowState_$[w.id]" ++ I UnsetEnv "WindowWidth_$[w.id]" ++ I UnsetEnv "WindowHeight_$[w.id]" ++ I UnsetEnv "WindowX_$[w.id]" ++ I UnsetEnv "WindowY_$[w.id]" + +# Variables update, see components/Window-Basic + +# param for fvwm-event: add_window, destroy_window, property_change +DestroyModuleConfig FvwmEvent-Window-State-Init: * +*FvwmEvent-Window-State-Init: add_window Window-State-Init +*FvwmEvent-Window-State-Init: destroy_window Window-State-Destroy +Module FvwmEvent FvwmEvent-Window-State-Init + +## Wrapper function for the resizing functions {{{1 +# Logic: if actual_size=size then default_size else size +# Syntax: Window-Resize <size> +# Where size is one of Maximize-Minimize-Default-A100-H100-V100-VHgrow-Hgrow-Vgrow +# For fullscreen see components/Fullscreen +DestroyFunc Window-Resize +AddToFunc Window-Resize ++ I Test (EnvMatch CurrentWindowState_$[w.id] "$0") NS-Default ++ I TestRc (NoMatch) NS-"$0" + +DestroyFunc NS-Maximize +AddToFunc NS-Maximize ++ I Maximize True 100 100 ++ I SetEnv CurrentWindowState_$[w.id] Maximize + +DestroyFunc NS-Minimize +AddToFunc NS-Minimize ++ I ResizeMaximize direction East 200p 60p ++ I SetEnv CurrentWindowState_$[w.id] Minimize + +DestroyFunc NS-Default +AddToFunc NS-Default ++ I Maximize $[WindowWidth_$[w.id]] $[WindowHeight_$[w.id]] ++ I SetEnv CurrentWindowState_$[w.id] Default + +DestroyFunc NS-A100 +AddToFunc NS-A100 ++ I Maximize True 100 100 ++ I SetEnv CurrentWindowState_$[w.id] A100 + +DestroyFunc NS-H100 +AddToFunc NS-H100 ++ I Maximize True 100 0 ++ I SetEnv CurrentWindowState_$[w.id] H100 + +DestroyFunc NS-V100 +AddToFunc NS-V100 ++ I Maximize True 0 100 ++ I SetEnv CurrentWindowState_$[w.id] V100 + +DestroyFunc NS-Hgrow +AddToFunc NS-Hgrow ++ I Maximize True grow 0 ++ I SetEnv CurrentWindowState_$[w.id] Hgrow + +DestroyFunc NS-Vgrow +AddToFunc NS-Vgrow ++ I Maximize True 0 grow ++ I SetEnv CurrentWindowState_$[w.id] Vgrow + +DestroyFunc NS-VHgrow +AddToFunc NS-VHgrow ++ I Maximize True grow grow ++ I SetEnv CurrentWindowState_$[w.id] VHgrow + +# Wrapper functions for window decorations {{{1 DestroyFunc Window-MoveToPage-Forward AddToFunc Window-MoveToPage-Forward + I MoveToPage-Down @@ -85,7 +174,7 @@ + I PipeRead 'for i in `seq 0 $(($[desk.pagesy]-1))` ; do echo "AddToMenu /Window-Menu-Page \'$[gt.Move to page] $(($i+1))\' MoveToPage 0 $i" ; done' -# Combined version of menu for window styles other than FVWM-Crystal +# Combined version of menu for window styles other than FVWM-Crystal {{{1 DestroyMenu /Window-Menu AddToMenu /Window-Menu + '$[gt.Iconify]' Window-Iconify This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |