# FVWM-Crystal plugin: InformationBox
# Written by: Maciej Delmanowski <harnir@linux.net.pl>

# How to use:
# From the FVWM configuration:
#
# InformationBox Text to display
#
# From the command line:
#
# FvwmCommand "InformationBox Text to display"
#
# Using a pipe:
#
# echo "InformationBox Text to display" | FvwmCommand -c
#
# Example use: you can use InformationBox to display title of the currently
# played track. To do that, you need a XMMS plugin called "Song change"
# (should be available in default XMMS installation). Open XMMS preferences
# dialog, 'Song change' plugin settings, and in first line, which sets what
# command to launch after the song change, write a line:
#
# FvwmCommand "InformationBox %s"
#
# Don't forget to enable "Song change" plugin in Preferences window. Now,
# everytime a song is changed, you will see it's title on the screen.
# Believe me, it's addictive ;)


SetEnv InformationBox-Geometry "$[vp.width]x22+-1--1"
SetEnv InformationBox-Font "xft:Tahoma:pixelsize=13"
SetEnv InformationBox-Justify "Center"

DestroyFunc InformationBox-Off
AddToFunc InformationBox-Off
+ I DestroyFunc InformationBox
+ I AddToFunc InformationBox I Nop

DestroyFunc InformationBox
AddToFunc InformationBox
+ I None (InformationBox) InformationBox-Show
+ I None (InformationBox) Wait InformationBox
+ I SendToModule InformationBox ChangeButton InformationBox Title "$*"

DestroyFunc InformationBox-Show
AddToFunc InformationBox-Show
+ I All (InformationBox) Close
+ I DestroyModuleConfig InformationBox: *
+ I *InformationBox: Rows 1
+ I *InformationBox: Geometry $[InformationBox-Geometry]
+ I *InformationBox: BoxSize smart
+ I *InformationBox: Colorset $[cs-panel-inactive]
+ I *InformationBox: Padding 4 1
+ I *InformationBox: Frame 0
+ I *InformationBox: Font $[InformationBox-Font]
+ I *InformationBox: (1x1, Id "InformationBox", Title ($[InformationBox-Justify]) "InformationBox", \
	Action (Mouse 2) InformationBox-Close, \
	Action (Mouse 3) AA)
+ I Module FvwmButtons InformationBox

DestroyFunc InformationBox-Close
AddToFunc InformationBox-Close
+ I All (InformationBox) Close

Style InformationBox Sticky, NeverFocus, WindowListSkip, FixedPosition, \
      FixedSize, StaysOnBottom, NoHandles, BorderWidth 1, HandleWidth 1, \
      NoTitle, NoIcon, Colorset $[cs-panel-border], \
      BorderColorset $[cs-panel-border], HilightColorset $[cs-panel-border], \
      HilightBorderColorset $[cs-panel-border]

