DestroyFunc FuncFvwmHideApp
AddToFunc   FuncFvwmHideApp
+ I Iconify $0
+ I State 0 $0

DestroyFunc FuncFvwmPopupMenuPanelApps
AddToFunc   FuncFvwmPopupMenuPanelApps
+ I DestroyMenu MenuFvwmSwitchHidePageApps
+ I AddToMenu   MenuFvwmSwitchHidePageApps
+ I Next (CurrentPage, !CirculateHit, !Iconic) \
	+ "%menu/window-iconify.xpm%Hide all apps on this page" \
	All (CurrentPage, !CirculateHit, !Iconic) FuncFvwmHideApp true
+ I Next (CurrentPage, !CirculateHit, Iconic, State 0) \
	+ "%menu/window-iconify.xpm%Unhide hidden apps on this page" \
	All (CurrentPage, !CirculateHit, Iconic, State 0) FuncFvwmHideApp false
+ I Next (CurrentPage, !CirculateHit, !Iconic) Nop
+ I TestRc (!Match) Next (CurrentPage, !CirculateHit, Iconic, State 0) Nop
+ I TestRc (!Match) \
	+ "%menu/information.xpm%No apps on this page to hide or hidden" Nop
+ I + "" Nop
+ I + "%menu/configuration.xpm%Configure this part" \
	FuncFvwmShowMessage "Sorry" "This is not implemented yet"
+ I Popup MenuFvwmSwitchHidePageApps $*

DestroyFunc FuncFvwmHideAllApps
AddToFunc   FuncFvwmHideAllApps
+ I Next (CurrentPage, !CirculateHit, !Iconic) \
	All (CurrentPage, !CirculateHit, !Iconic) FuncFvwmHideApp true
+ I TestRc (!Match) Next (CurrentPage, !CirculateHit, Iconic, State 0) \
	All (CurrentPage, !CirculateHit, Iconic, State 0) FuncFvwmHideApp false

DestroyModuleConfig FvwmButtons-Panel: *
*FvwmButtons-Panel: Colorset 10
*FvwmButtons-Panel: ButtonGeometry 4x30+0-0
*FvwmButtons-Panel: Rows 1
*FvwmButtons-Panel: Frame 0
*FvwmButtons-Panel: Padding 0 0

# ---- application bar ----
*FvwmButtons-Panel: (26x1, Icon module/panel-start.png, ActionOnPress, \
	Action `Menu MenuFvwmRoot rectangle $widthx$height+$left+$top 0 -100m`, \
	Action(Mouse 3) FuncFvwmShowMessage "Sorry" "Configuration of parts is not implemented yet", \
)
*FvwmButtons-Panel: (3x1, Icon module/panel-holder.png, \
	ActionOnPress, \
	Action `FuncFvwmPopupMenuPanelApps rectangle $widthx$height+$left+$top 0 -100m`, \
	Action(Mouse 3) `FuncFvwmHideAllApps`, \
)
*FvwmButtons-Panel: (6x1, Padding 4 7, Icon 16x16/terminal.xpm, \
	Action(Mouse 1) `FuncFvwmTerminal`, \
	Action(Mouse 2) `FuncFvwm2Terminal`, \
	Action(Mouse 3) `FuncFvwm3Terminal`, \
)
*FvwmButtons-Panel: (6x1, Padding 4 7, Icon 16x16/netscape.xpm, \
	Action(Mouse 1) `FuncFvwmWWW`, \
	Action(Mouse 2) `FuncFvwm2WWW`, \
	Action(Mouse 3) `FuncFvwm3WWW`, \
)
*FvwmButtons-Panel: (6x1, Padding 4 7, Icon 16x16/music.xpm, \
	Panel(up) FvwmButtons-MultimediaPanel "FvwmButtons FvwmButtons-MultimediaPanel", \
	Action(Mouse 2) `Menu MenuFvwmMultimedia rectangle $widthx$height+$left+$top c -100m`, \
	Action(Mouse 3) `FuncFvwmShowMessage "Sorry" "Configuration is not implemented yet"`, \
)
# should be word processors instead editors here, I think
*FvwmButtons-Panel: (6x1, Padding 4 7, Icon 16x16/editor.xpm, \
	Action(Mouse 1) `FuncFvwmEditor`, \
	Action(Mouse 2) `FuncFvwm2Editor`, \
	Action(Mouse 3) `FuncFvwm3Editor`, \
)
*FvwmButtons-Panel: (6x1, Padding 4 7, Icon 16x16/xv.xpm, \
	Action `FuncFvwmImageView`, \
	Action(Mouse 2) `FuncFvwmImageEdit`, \
	Action(Mouse 3) `FuncFvwm3ImageView`, \
)

# ---- page bar ----
DestroyFunc ToggleFvwmPager
AddToFunc   ToggleFvwmPager
+ I None ($0, CirculateHit) FvwmPager $*
+ I Next ($0, CirculateHit) Close

*FvwmButtons-Panel: (3x1, Icon module/panel-holder.png, \
	ActionOnPress, \
	Action `SendToModule $./FvwmThemesPanelManager popup pagebar-config rectangle $widthx$height+$left+$top 0 -100m`, \
)
*FvwmButtons-Panel: (8x1, Container(Rows 2, \
	Font "shadow=1:-*-times new roman-bold-r-*-*-9-*;-*-times-medium-r-*-*-8-*;-microsoft-verdana-medium-r-*-*-8-*;xft:Luxi Sans:Bold:pixelsize=8:minspace=true" \
))

# TODO: specify transparency here (extend Container functionality?)

#*FvwmButtons-Panel: (Padding 2 2, Colorset 23, \
#	Panel(up, indicator, steps 0) FvwmPager-Single "FvwmPager FvwmPager-Single * *", \
#)

# TODO: Left in Contaners do not work, so currently specify it 4 times

*FvwmButtons-Panel: (Id page1, Padding 0 5, Colorset 23, Title 1, Left, \
	Action(Mouse 1) GotoPage 0 0, \
	Action(Mouse 2) Nop, \
	Action(Mouse 3) Nop, \
)
*FvwmButtons-Panel: (Id page2, Padding 0 5, Colorset 23, Title 2, Left, \
	Action(Mouse 1) GotoPage 1 0, \
	Action(Mouse 2) Nop, \
	Action(Mouse 3) Nop, \
)
#*FvwmButtons-Panel: (Padding 2 2, \
#	Panel(up, indicator, steps 0) FvwmPager-Desker "FvwmPager FvwmPager-Desker 0 3", \
#)
*FvwmButtons-Panel: (Id page3, Padding 0 5, Title 3, Left, \
	Action(Mouse 1) GotoPage 0 1, \
	Action(Mouse 2) Nop, \
	Action(Mouse 3) Nop, \
)
*FvwmButtons-Panel: (Id page4, Padding 0 5, Title 4, Left, \
	Action(Mouse 1) GotoPage 1 1, \
	Action(Mouse 2) Nop, \
	Action(Mouse 3) Nop, \
)
*FvwmButtons-Panel: (End)

# ---- task bar ----
*FvwmButtons-Panel: (3x1, Icon module/panel-holder.png, \
	ActionOnPress, \
	Action `SendToModule $./FvwmThemesPanelManager popup taskbar-config rectangle $widthx$height+$left+$top 0 -100m`, \
)
SetEnv IconManWidth 110  # fail safe to width 800
PipeRead `printf "SetEnv IconManWidth "; expr $[vp.width] / 4 - 90`
*FvwmButtons-Panel: ($[IconManWidth]x1, Swallow FvwmIconMan 'Module FvwmIconMan')

*FvwmButtons-Panel: (1x1)

# ---- clock/dock bar ----

*FvwmButtons-Panel: (16x1, Container(Columns 1, Colorset 24, \
	Font "shadow=1:xft:Luxi Sans:Bold:pixelsize=9:minspace=true" \
))
*FvwmButtons-Panel: (Id clock1, Title " ", \
	ActionOnPress, \
	Action `SendToModule $./FvwmThemesPanelManager popup clockbar-config rectangle $widthx$height+$left+$top -0 -100m`, \
	Action(Mouse 3) `SendToModule $./FvwmThemesPanelManager circulate clockbar-field1-format`, \
)
*FvwmButtons-Panel: (Id clock2, Title " ", \
	ActionOnPress, \
	Action `SendToModule $./FvwmThemesPanelManager popup clockbar-config rectangle $widthx$height+$left+$top -0 -100m`, \
	Action(Mouse 3) `SendToModule $./FvwmThemesPanelManager circulate clockbar-field2-format`, \
)
*FvwmButtons-Panel: (End)

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

DestroyModuleConfig FvwmButtons-MultimediaPanel: *
*FvwmButtons-MultimediaPanel: Colorset 10
*FvwmButtons-MultimediaPanel: Geometry 72x30+20000+20000
*FvwmButtons-MultimediaPanel: Rows 1
*FvwmButtons-MultimediaPanel: Frame 0
*FvwmButtons-MultimediaPanel: Padding 0 0

*FvwmButtons-MultimediaPanel: (6x1, Padding 4 7, Icon 16x16/music.xpm, \
	Action(Mouse 1) `Exec exec xmms`, \
	Action(Mouse 2) `Exec exec freeamp`, \
	Action(Mouse 3) `Exec exec kmid`, \
)
*FvwmButtons-MultimediaPanel: (6x1, Padding 4 7, Icon 16x16/sound.xpm, \
	Action(Mouse 1) `FuncFvwmSound`, \
	Action(Mouse 2) `FuncFvwm2Sound`, \
	Action(Mouse 3) `FuncFvwm3Sound`, \
)
*FvwmButtons-MultimediaPanel: (6x1, Padding 4 7, Icon 16x16/cd-player.xpm, \
	Action(Mouse 1) `FuncFvwmCdPlayer`, \
	Action(Mouse 2) `FuncFvwm2CdPlayer`, \
	Action(Mouse 3) `FuncFvwm3CdPlayer`, \
)
