
#                    /*** fvwm2-ade:  functions ***/

#      /*** This section sets up some user-defined functions. ***/

#/*********************************************************************
# * InitFunction is the place to put anything you want started when   *
# * you begin a session with fvwm2.  A typical entry for running an   *
# * application (an nxterm, for example) looks like this:             *
# *                                                                   *
# *     +				"I" Exec nxterm               *
# *                                                                   *
# *********************************************************************/

AddToFunc InitFunction
+				"I" Module FvwmBanner
+				"I" Module FvwmButtons
+				"I" Module FvwmAuto 750
+				"I" Module FvwmBacker

#/*********************************************************************
# * RestartFunction should contain the same fvwm2 modules that are    *
# * started in InitFunction, because a restart destroys any modules   *
# * that are running (though it does not affect application windows.  *
# *********************************************************************/

AddToFunc RestartFunction
+				"I" Module FvwmButtons
+				"I" Module FvwmAuto 750
+				"I" Module FvwmBacker

#/*********************************************************************
# * If bound to a mouse key, Move-or-Raise raises (if necessary) and  *
# * moves an item when the key is held down and the mouse is moved.   *
# * If the button is double-clicked, the WindowShade function is      *
# * invoked, reducing the window to only its title bar (or bringing   *
# * the window back to normal, if it is in the "WindowShade"d state.  *
# *********************************************************************/

AddToFunc Move-or-Raise
+				"I" Raise
+				"M" Move
+				"D" WindowShade

#/*********************************************************************
# * If bound to a mouse key, Move-or-Raise2 raises (if necessary) and *
# * moves an item when the key is held down and the mouse is moved.   *
# * If the button is double-clicked, the window is lowered.           *
# *********************************************************************/

AddToFunc Move-or-Raise2
+				"M" Raise
+                               "M" Move
+                               "D" Lower

#/*********************************************************************
# * Maximize-Button1 is intended for binding to a mouse button.  A    *
# * single click will maximize the window vertically, and a double    *
# * click will maximize the window horizontally.                      *
# *********************************************************************/

AddToFunc Maximize-Button1
+				"C" Maximize 0 100
+				"D" Maximize 100 0

#/*********************************************************************
# * If bound to a mouse key, Move-or-Iconify raises the window on a   *
# * mouse click and moves an icon while the mouse button is held down *
# * and the mouse is moved.  If launched any other way,               *
# * Move-or-Iconify iconifies the selected window.                    *
# *********************************************************************/

AddToFunc Move-or-Iconify
+				"I" Raise
+                               "M" Move
+				"C" Iconify

#/*********************************************************************
# * If bound to a mouse key, Resize-or-Raise and Resize-or-Raise2     *
# * raises (if necessary) and resizes a window when the mouse button  *
# * is held down and the mouse is moved.  If the mouse button is      *
# * double-clicked, the window is lowered.  Resize-or-Raise is used   *
# * for items bound to a window (e.g. a titlebar button), while       *
# * Resize-or-Raise2 is intended to be invoked before the window to   *
# * which it will be applied is chosen.                               *
# *********************************************************************/

AddToFunc Resize-or-Raise
+				"I" Raise
+                               "M" Resize
+                               "D" Lower

AddToFunc Resize-or-Raise2
+				"M" Raise
+                               "M" Resize
+                               "D" Lower