# The functions from this component can be overwritten in the personal theme.

DestroyFunc WindowListFunc
AddToFunc   WindowListFunc
+ I WindowId $0 Iconify false
+ I WindowId $0 FlipFocus
+ I WindowId $0 Raise
+ I WindowId $0 WarpToWindow 10p 10p

DestroyFunc FuncFvwmSelectWindow
AddToFunc   FuncFvwmSelectWindow
+ I Focus
#+ I Raise
#+ I WindowId $0 WarpToWindow 50 50

# ----------------------------------------------------------------------------

DestroyFunc FuncFvwmDeiconifyFocusAndRaise
AddToFunc   FuncFvwmDeiconifyFocusAndRaise
+ I Iconify off
+ I Focus
+ I Raise

DestroyFunc FuncFvwmDeiconifyFocusAndWarp
AddToFunc   FuncFvwmDeiconifyFocusAndWarp
+ I Iconify off
+ I Focus
+ I WarpToWindow 10p 10p

DestroyFunc FuncFvwmRestore
AddToFunc   FuncFvwmRestore
+ I WindowId "$w" (!Iconic !Shaded Maximized) Maximize    false
+ I WindowId "$w" (!Iconic  Shaded          ) WindowShade false
+ I WindowId "$w" ( Iconic                  ) Iconify     false

DestroyFunc FuncFvwmDelete
AddToFunc   FuncFvwmDelete
+ I Delete

DestroyFunc FuncFvwmDeleteOrDestroy
AddToFunc   FuncFvwmDeleteOrDestroy
+ H Nop
+ M Nop
+ C Delete
+ D Destroy

DestroyFunc FuncFvwmMaximize
AddToFunc   FuncFvwmMaximize
+ M Nop
+ H Maximize 0 95
+ C Maximize 100 95
+ D Maximize 100 100

DestroyFunc FuncFvwmMaximizeVertically
AddToFunc   FuncFvwmMaximizeVertically
+ H Maximize 0 100
+ M Maximize 0 100
+ C Maximize 0 100

DestroyFunc FuncFvwmMaximizeHorizontally
AddToFunc   FuncFvwmMaximizeHorizontally
+ H Maximize 100 0
+ M Maximize 100 0
+ C Maximize 100 0

DestroyFunc FuncFvwmIconifySameResource
AddToFunc   FuncFvwmIconifySameResource
+ I All ($r) Iconify $0

DestroyFunc FuncFvwmIconify
AddToFunc   FuncFvwmIconify
+ C Iconify

DestroyFunc FuncFvwmConsole
AddToFunc   FuncFvwmConsole
+ I Module FvwmConsole -fg $[fg.cs22] -bg $[bg.cs22] $*

# ----------------------------------------------------------------------------
# These functions probably need not be configurable (move to themes-rc?).

DestroyFunc FuncFvwmShowMessage
AddToFunc   FuncFvwmShowMessage
+ I Exec echo "$1" | perl -pe 's/\^n/\n/g; s/\^t/\t/g; s/\^\^/^/g' - | \
	xmessage -g 480x120 -nearmouse -title "$0" -file - \
	-xrm "*form*foreground:$[fg.cs36]" -xrm "*form*background:$[bg.cs36]" \
	-xrm "*form*message*foreground:$[fg.cs34]" -xrm "*form*message*background:$[bg.cs34]"

DestroyFunc FuncFvwmShowButtonInfo
AddToFunc   FuncFvwmShowButtonInfo
+ I FuncFvwmShowMessage "Button Info" "$0"
