### Copyright (C) 1995, 1996, 1997 Jeppe Buk (buk@imada.sdu.dk)
### This program is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
### the Free Software Foundation; either version 2 of the License, or
### (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
### GNU General Public License for more details.
###
### You should have received a copy of the GNU General Public License
### along with this program; if not, write to the Free Software
### Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

proc FvwmScroll {} {
  # Modules / FvwmScroll
  Desc "Configuration of the FvwmScroll module"
  ShortDesc "FvwmScroll"

  Header h -text "FvwmScroll" -frame:relief flat \
      -help "On this page you configure the FvwmScroll module. This"\
      "module is used for putting a scroll bar around windows you think"\
      "are too large. (NOTE: The scroll bars can be removed again by"\
      "clicking on the button in the lower right corner of the scroll bars."
  Line l
  CheckBox spawn -text "Spawn this module when Fvwm2 starts" \
      -help "There's no sense in spawning this module, because it will"\
      "exit after putting scroll bars around one window. Put it in a menu"\
      "or bind it to a key or mouse instead."
  Init {Disable spawn}

  Line globL

  CheckBox fcB -text "Specify foreground color" \
      -help "Check this option if you want to change the foreground"\
      "color of the scroll bars."
  Command fc \
      -default [list "grey" 0] \
      -setvalue {
	$widget configure -bg [lindex $fc 0] -text "      "} \
      -invoke {ColorWidget $colorList [lindex $fc 0] \
		   [lindex $fc 1]} \
      -disable {$widget configure -relief flat } \
      -enable {$widget configure -relief raised } \
      -help "In this widget you configure the color of scroll bars."
  Frame fcF -entries fcB fc
  Change {
    if {$changeElm == "fcB"} {if {$fcB == 1} {Enable fc} else {Disable fc}}
  }
  Save {if {$fcB == 1} {print "*FvwmScrollFore\t[hash2rgb [lindex $fc 0]]"}}

  CheckBox bcB -text "Specify background color" \
      -help "Check this option if you want to change the background"\
      "color of the scroll bars."
  Command bc \
      -default [list "black" 0] \
      -setvalue {
	$widget configure -bg [lindex $bc 0] -text "      "} \
      -invoke {ColorWidget $colorList [lindex $bc 0] \
		   [lindex $bc 1]} \
      -disable {$widget configure -relief flat } \
      -enable {$widget configure -relief raised } \
      -help "In this widget you configure the color of the background of"\
      "the scroll bars."
  Frame bcF -entries bcB bc
  Change {
    if {$changeElm == "bcB"} {if {$bcB == 1} {Enable bc} else {Disable bc}}
  }
  Save {if {$bcB == 1} {print "*FvwmScrollBack\t[hash2rgb [lindex $bc 0]]"}}
}
