Subject: FVWM: menu placement, FvwmButtons button placement

From: Chris Taylor <[email-masked]>
Date: Thu, 22 Feb 1996 10:34:07 -0500 (EST)

My first question concerns the way FVWM draws menus near the right edge of the
display. I use FVWM-style menus -- submenus appear just as the pointer touches
a menu entry. Normally, a submenu appears to the right of its parent. At the
right edge of the display, however, things get crowded; the submenu appears
directly on top of its parent. This can be a problem, especially when, as in my
setup, there exist more than two levels of submenus. Could FVWM be changed so
that, at the right edge of the display, a submenu appears to the left of its
parent?

My second question addresses a long-existing problem: the method by which
FvwmButtons arranges buttons of various sizes. In this instance, I place a menu
button, an xload, an xclock, and several "switch to desk X" buttons in one
FvwmButtons window. Here's my setup:

*FvwmButtonsFore	DEFAULT_FOREGROUND
*FvwmButtonsBack	DEFAULT_BACKGROUND
*FvwmButtonsGeometry	650x40+0-0
*FvwmButtonsRows	2
*FvwmButtonsFont	DEFAULT_TITLE_FONT
*FvwmButtons(1x2)	FVWM	xlogo16.xpm	menu main-menu
*FvwmButtons(5x2)	-	-       swallow "xloadFvwm" exec xload -name
xloadFvwm &
*FvwmButtons(1x2)	-	-	swallow "xclockFvwm" exec xclock
-name xclockFvwm &
*FvwmButtons		Main		-	desk 0 0
*FvwmButtons		WebSrv		-	desk 0 1
*FvwmButtons		Browse1		-	desk 0 2
*FvwmButtons		Browse2		-	desk 0 3
*FvwmButtons		Notes		-	desk 0 4
*FvwmButtons		Post-Its	-	desk 0 5
*FvwmButtons		WebLog		-	desk 0 6
*FvwmButtons		PrxyLog		-	desk 0 7
*FvwmButtons		Misc1		-	desk 0 8
*FvwmButtons		Misc2		-	desk 0 9
*FvwmButtons		Misc3		-	desk 0 10
*FvwmButtons		Mail		-	desk 0 11

DEFAULT_BACKGROUND, DEFAULT_FOREGROUND, and DEFAULT_TITLE_FONT are M4 macros.

The above configuration produces the following look:

+------+-----------+------+----+----+----+----+----+----+
|menu  |xload xload|xclock|desk|desk|desk|desk|desk|desk|
|      |xload xload|xclock+----+----+----+----+----+----+
|button|xload xload|xclock|desk|desk|desk|desk|desk|desk|
+------+-----------+------+----+----+----+----+----+----+

Here's the problem: I want to put xclock at the right side of the window, so it
all looks like this:

+------+-----------+----+----+----+----+----+----+------+
|menu  |xload xload|desk|desk|desk|desk|desk|desk|xclock|
|      |xload xload+----+----+----+----+----+----+xclock|
|button|xload xload|desk|desk|desk|desk|desk|desk|xclock|
+------+-----------+----+----+----+----+----+----+------+

I've had no success yet. If I take the logical approach, i.e., move the line
referencing "xclockFvwm" to the end of the FvwmButtons list, I end up with this
arrangement:

+------+-----------+----+----+----+----+----+-----+----+
|menu  |xload xload|desk|desk|desk|desk|desk|desk |desk|
|      |xload xload+----+----+----+----+----+-----+----+
|button|xload xload|desk|desk|desk|desk|desk|clock|    |
+------+-----------+----+----+----+----+----+-----+----+

Nothing exists in the lower-right corner. FvwmButtons ignores the size
specification for xclock, "(1x2)". I've tried using silly sizes like "(10x2)",
but FvwmButtons just puts more "desk" buttons in the top row, and leaves xclock
at the bottom in a 10x1 size button.

Ideas, anyone? I've been scratching my head over this for a bit, but I suspect
the problem lies in FvwmButtons.

Chris Taylor     / My views do not represent \ PGP public key available
[email-masked] \    those of Cabletron.    / via keyserver or request

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Albrecht Kadlec)
Date: Thu, 22 Feb 96 17:58:18 +0100

>>>>> Chris Taylor writes:

C> .................................................... Could FVWM be changed so
C> that, at the right edge of the display, a submenu appears to the left of its
C> parent?
seconded.

C> My second question addresses a long-existing problem: the method by which
C> FvwmButtons arranges buttons of various sizes. In this instance, I place a menu
C> button, an xload, an xclock, and several "switch to desk X" buttons in one
C> FvwmButtons window. Here's my setup:

C> *FvwmButtons		Browse2		-	desk 0 3
C> *FvwmButtons		Notes		-	desk 0 4
C> *FvwmButtons		Post-Its	-	desk 0 5

put xclock here!!!!

C> *FvwmButtons		WebLog		-	desk 0 6
C> *FvwmButtons		PrxyLog		-	desk 0 7
C> *FvwmButtons		Misc1		-	desk 0 8
C> *FvwmButtons		Misc2		-	desk 0 9
C> *FvwmButtons		Misc3		-	desk 0 10
C> *FvwmButtons		Mail		-	desk 0 11

C> Here's the problem: I want to put xclock at the right side of the window, so it
C> all looks like this:

C> +------+-----------+----+----+----+----+----+----+------+
C> |menu  |xload xload|desk|desk|desk|desk|desk|desk|xclock|
C> |      |xload xload+----+----+----+----+----+----+xclock|
C> |button|xload xload|desk|desk|desk|desk|desk|desk|xclock|
C> +------+-----------+----+----+----+----+----+----+------+

C> I've had no success yet. If I take the logical approach, i.e., move the line
C> referencing "xclockFvwm" to the end of the FvwmButtons list, I end up with this
C> arrangement:

C> +------+-----------+----+----+----+----+----+-----+----+
C> |menu  |xload xload|desk|desk|desk|desk|desk|desk |desk|
C> |      |xload xload+----+----+----+----+----+-----+----+
C> |button|xload xload|desk|desk|desk|desk|desk|clock|    |
C> +------+-----------+----+----+----+----+----+-----+----+

C> Nothing exists in the lower-right corner. FvwmButtons ignores the size
C> specification for xclock, "(1x2)". I've tried using silly sizes like "(10x2)",
C> but FvwmButtons just puts more "desk" buttons in the top row, and leaves xclock
C> at the bottom in a 10x1 size button.

fvwmbutton uses left to right placement (at least for *FvwmButtonsRows 2)
:
when fvwmbutton gets to swallowing the clock, there's only one row left, so
the "silly" size 1x2 is ignored. 

I got tired of shuffling all the icons 'till everything fits again,
so I use a symbolic link FvwmSwallow (points to FvwmButton)

FvwmButton declares the small buttons, FvwmSwallow swallows my console,
Fvwm Buttons and the pager. (just some more depth added to the 3d look)

see my .fvwm2rc below (sorry, had to break some lines):

###################### FvwmSwallow button-bar ################################
*FvwmSwallowFore Black
*FvwmSwallowBack #908090
*FvwmSwallowFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*

# Geometry - really likes to pick its own size, but giving a position is OK
# -- never mind I use a fixed size for my toolbar.
*FvwmSwallowGeometry 900x74-0-0

# Layout: specify rows or columns, not both
*FvwmSwallowRows 2

*FvwmSwallow(10x2) - whatever Swallow "Console" exec console -display $HOSTDISPLAY 
	-geometry 70x5-1500-1500  # real console on sun's, rsh sun-xterm on hp's
*FvwmSwallow(4x2) - whatever SwallowModule "FvwmButtons" FvwmButtons
*FvwmSwallow(4x2) - whatever SwallowModule "FvwmPager" FvwmPager 0 0

###################### FvwmButtons button-bar ################################
*FvwmButtonsFore Black
*FvwmButtonsBack Grey
*FvwmButtonsFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*

# Geometry - really likes to pick its own size, but giving a position is OK
# out of my eyes - you're to be swallowed!
*FvwmButtonsGeometry -1500-1500

# Layout: specify rows or columns, not both
*FvwmButtonsRows 2

#*FvwmButtons xxx  unknown	Function xxx
*FvwmButtons -	   Door.bmp	Function DoorQuit  # dooropener on single click
						   # quit on doubleclick
*FvwmButtons -	   xterm.xpm	Menu Xterms	Exec xterm -title $HOST 
	-display $HOSTDISPLAY &
*FvwmButtons -	   toolbox.xpm	Menu Tools	Exec exec xlock -allowroot
#*FvwmButtons -	   page.xpm	Menu Window_Ops	TogglePage
*FvwmButtons -		whatever Swallow "xbiff"  exec exec xbiff  
	-geometry -1500-1500 -bg Grey -fg Black

#*FvwmButtons(2x1) -	whatever Swallow "xload"  exec exec xload 
	 -geometry -1500-1500 -bg Grey -fg Black -nolabel -hl grey50
*FvwmButtons(3x1) -	whatever Swallow "perfmeter"  exec 
	set LD_LIBRARY_PATH $OPENWINHOME/lib; export LD_LIBRARY_PATH; 
	exec $OPENWINHOME/bin/perfmeter -geometry -1500-1500 -bg Grey -fg Black
*FvwmButtons -		whatever Swallow "xclock" exec 
	exec xclock -geometry -1500-1500 -bg Grey -fg Black -padding 0
#*FvwmButtons -		whatever Swallow "clock"  exec 
	exec $OPENWINHOME/bin/clock -digital -24 -geometry -1500-1500 -bg Grey 
	-fg Black

cheers,
albrecht
-- 
In the Beijing area, the water table has dropped from 14 feet in 1955
to 160 feet in 1995 and is still falling while water is increasingly
demanded for domestic, industrial and tourist use.  A Chinese
scientific report predicted that unless the present decline is
reversed - not merely arrested - Beijing would be unhabitable by the
year 2015.	-- (Z Magazine, December 1995, Henry Rosemont,Jr.).
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].