From don@brillig.umd.edu Mon Apr 4 19:45:28 1988
Date: Mon, 28 Mar 88 20:43:02 EST
From: Don Hopkins
To: davidh%dent.Berkeley.EDU@cad.Berkeley.EDU
Cc: don@brillig.umd.edu
Subject: pie menus
It's certianly true that a pie menu with a lot of choices can get
quite large. In my NeWS implementation, the labels are not confined to
the wedges, though. An inner radius is calculated around which all the
labels are justified. Lines delimiting the slices are drawn inside of
the inner radius, and the labels are justified around the outside of
it. (Respectivly,) the labels on the (left/right) side of the menu
have their (right/left) edge vertically centered at points on the
inner radius, and the very (top/bottom) labels are horizontally
centered on their (bottom/top) edge. i.e.:
+---B---+
R label L
+---T---+
If a label is on the (Right/Left/Bottom/Top) of the menu, the label is
positioned so that point (R/L/B/T) is on the inner radius, in the
direction of the center of the slice. (Does that make any sense?)
The inner radius is calculated by guessing an initial inner radius,
and going around the menu checking to see of the bounding boxes of any
two adjacent labels overlap. If they do, the inner radius is pushed
out until they don't, and the loop is continued. When it gets all the
way around, the inner radius will be big enought so that no labels
will overlap. The outer radius (of the menu window) is then calculated
by finding the distance to the corner that is the furthest point from
the menu center.
I have found that 8 choices is a very good number for pie menus. Using
the layout scheme described above, the labels do not generally need to
be pushed out very much, if at all. 8 items gives you 4 sets of
opposite directions, good for expressing opposite and orthogonal
relationships between menu items. It's also easy to mouse ahead
reliably into an 8 item menu. Mouse ahead works well enough with pie
menus that I have implemented menu display suppression when the events
that would determine a menu choice are read within a certian ammount
of time, and I find that it speeds up interaction considerably. Also,
if you mouse ahead into a submenu, and then pause, the submenu that
you're at will pop up first, then finally the menu you've already
choosen from, underneath.
One way of supporting 2 dimensional input is to use the distance as an
argument. (You can't reliably mouse ahead to a certian distance like
you can with direction, though, and if you use distance as an
argument, you can't just move out further to get more angular
precision.)
Just for jollies, I've enclosed a uuencoded pixrect dump of the NeWS
root menu! Enjoy!
-Don
begin 644 rootmenu.can
M6:9JE0 1@ $9 0 #@T " 0 P#_ #]_O_\ /W^__P _
M?[__ #]_O_\ /W^__P _?[__ #]_O_\ /W^__P _?[__ #]_O_\ /W^__P _
M?[__ #]_O_\ /W^__P _?[__ #]_O_\ /W^__P _?[__ #]_O_\ /W^__P _
M?[__ #]_O_\ /W^__P _?[__ #]_O_\ /W^__P _?[__ #]_O_\ /W^__P _
M?[__ #]_O_\ /W^__P _?[__ #]_O_\ /W^__P _?[__ #]_O_\ /W^__P _
M?[__ #]_O_\ /W^__P _?[__ #]_O_\ /W^__P _?[_P#Q&C92;HJFPM\;-U-OBZ?<'_P ?
M'Q\?'Q\?'Q\?'Q\?'Q\?'Q\?'Q\?'Q\?/S\_/S\_/S\_/S\_/S\_/S\_/S\_
M/S\_/U]?7U]?7U]?7U]?7U]?7U]?7U]?7U]?7U]_?W]_?W]_?W]_?W]_?W]_
M?W]_?W]_?W]_GY^?GY^?GY^?GY^?GY^?GY^?GY^?GY^?G[^_O[^_O[^_O[^_
MO[^_O[^_O[^_O[^_O[_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?________
M________________________\ \7'R #P" O^ 'P"
M!/^ '0 _@ 3__( ; ?__X " /__X( : '__@ 0 __Z &0 '_\" ! #_^"
M& _^( & !_\@!< ?^ ( & '_@ " %@ /_( ( #_P@!8 ?\" " #_H 5
M '^@ H ?X @!0 #_" "@ /\( 4 #_ @ H _R % #^@ P ?X 3 /X@ P
M'\" $@ /X( , ?P@!( /X @ P ?R $@#^@ X ?X 1 /X@ X '\" $ '
MX( . ?@@! 'X @ X ?B $ !^@! ?H 0 /R $ _@ \ _" $ /P( .
M ? @! ^" #@ ?@ " $ !^( . #Z $@!\@ X ?( 2 #Z #0 !\( 2 ^
M ( , /@@!( !\" # 'P( 2 /@@ P #X 4 /" # ^@!0 ?( , 'R % ^
M@ P ^( 4 !^ "P !X( 4 > ( * / @!0 \" "@ '@ " % !X( * ^
M%@#P@ H 'H 6 'B "@ \@!8 /( * 'B %@ >@ H \( 6 ^ "0 !X( 6 >
M ( ( / @!8 \" " '@ " %@ !X( ( ^ & #P@ @ 'H 8 'B " \@!@
M/( ( 'B & >@ @ \( 8 ^ " #@@!@ !X ' '@@!@ !X @ 8 \" & #
MP( & > ( 8 '@@ 8 #X : /" !@ .@!H <( & !Z &@!X@ 8 /( : #R
M!@!X@!H 'H & '" # !X( + Z !@#P@ P !AB "P /@ 4 >" # (!( +
M > ( $ ' @ P $ * "P #@ " ! #P( , ! "@ L \" ! '@ " # @
M 8 + '@@ 0 !X - "#!@ P X( $ ^ #0 @P8 , /" ! .@ T ( & # !P
M@ 0 'H - ! "@ P >( $ #R #0 0 H , #R ! X@ T " 2 # <@ 0 >( -
M 88@ P 'H $ '" #0 !X( , Z ! #P@!P #X $ ." ' '@ , >" ' '
M@ " @ !P( < . ( " / @!P \" @ #@ " ' !P( " > ( < '@
M@ ( !X > ." @ /@!X \( " Z '@!P@ ( 'H > 'B @ <@!X .( " !R
M" !@ K_@ D .( " #B " '@ K_P( ( !R @ X@ @ #X *_^" " <@ (
M>( ( ^ "O_@@ @ 'H " '" " ?@ K_\( ( Z @!P@ @ '\__^3__S( $
M__" " .@ ( X( ( !^'__G__\^ !/_P@ @ !X " ." " ?MDR9,.&$PR!Q_" " #@ X @ @ 'G@D229,R)DR9_^?\( ( ' .
M ( ( !YX3)DPXF3#,P____" " !P #@ " " ?_GR "/_P@ @ < !X
M@ @ '_Y\@ C_\( ( '@ > "0 ?_GR "/_P@ D X '@ D #X *_^" "0#@
M > "0 /@ K_X( ) . #H ) > "O_ @ D < .@ D 8 *_X * ' #H @
M ' #H @ ' '( " ?@&8&, S,^@ < ?" "P X !R @ & &!S ,S8X '
M &8@ L . <@ ( !@S;P9
M@9V ,QC#\< . !@ !C8,S9AP_'( % !P .( " 8,V:&-F,QC P & 8
M! !F9LS9LP ,( % !P .( " ?LV,&,\,P^@ , 8#@, 'P\S,\>( ' !P
M.( . # \#( . !P .( . #!\&( . !P <( . !!^&( . X <( . !C^$( .
M X <( . !G_,( . X <( . S^,( . X <( . Q\8( . X <( . 08
M8( . X <( . 8 X( . X <( . ( P( . X X( @ < X( , &" ! ,
M@ P !P#@@ P '( $ 'B # ' ." # '@ , ^" # ' ." # !X( " ^
M ( , < X( - #R @#\@ T !P#@@ T #X " /" #0 ' ." ! !^ #@ 0
M H " , #\P !B !P ' ." ! !C@ X ,;" "0 ' ." ! !C/-CS;( * #&S
MQMM@@ 8 !P#@@ 0 8V;MFW@ 8( ( #&V;=NP ," ! ' ." ! !^9LP;<'XX
M@ @ /S9LVS#\<( $ < X( $ &9^S/M@ R " S-FS;, 8@ 0 !P#@@ 0
M8V#-FV!^.( ( #&V;-LP_'" ! ' ." ! !C9NV;8 !@@ @ ,;9MVS P( $
M < X( $ &,\V.]@@ H ,;/&VS" !@ ' ." !@# @ \ P( ' < X( & ,"
M!0 #@ ( P( # S @ < !P#@@ 8 P( % !R @!X@ , !X @ < !P#@@ T
M\( " !Z #0 ' ." # #P( " ? @ P !P#@@ P /H $ /B # ' ." # !X
M@ 0 /( , < X( , &" ! ,@ P !P!P@ X @# @ X #@!P@ X @# @ X
M#@!P@ X ! !@@ X #@!P@ X ! !@@ X #@!P@ X # @@ X #@!P@ X " P
M@ X #@!P@ X & 0@ X #@!P@ X $ 0@ X #@ X@ X $ 8@ X ' X &.
M @# & '@ 4 , ( !C89G@ 8 @ 8 ' X &. @# & ,@ 4 ( , #S
M89F & ( & !P . !C/'FPVSSS?GCQX( " & ! DV&9[8V>9F> ( #
M !P . !C9LW@W9F;S,V;, # & ! !FV"9;MNS9FS X " !P . !C<,W
MV9F;C V#,/QP , @ !FV#;;-FS-LX#\< !P ' !C'/V -F9^PQ]@_
M& # ( ?M@VVS9LS;#@ 8 . < &,.P8 V9F##,V# /QP@ 0 P]@
M9FS9LS;!P_' X !P -F;-@ #9FYL,S9LP ," ! ##V!F;-NS&8S X "
M #@ ' ^/'F -F,\PQV\>" !@ ##V!F;,V>&8> ( # #@ '( @ #@ #H @
M ' #H @ ' #H @ ' #H @ ' !X @ . !X @ . !X @ . !X @ H
M? ##X / '@ . ( * ,8 PP : # !P #@ " "@#&S;&;/,S.@ P
M < X @ H <,W9FV;,Q@ &@ H < <" "@ @#@@ H ?&V88SPS!H , > @#@@!X
M!X " '" '@ .@ ( <( > Z @!X@!X 'H " #B '@ <@ ( .( > !R @ <
M@!X .( " !R '@ X@ ( 'H > 'B @ .@!X <( " ^ '@#P@ ( !X > ."
M @ '@ " ' !X( " . ( < ' @ ( \" ' #P( " ' @!P X @ (
M >" ' '@ " P#@@!P !X $ /" ' /@ 0 <( < Z ! !X@!P 'H $ #B
M' <@ 0 /( < #R ! >@!P >( $ Z ' !P@ 0 #X < /" ! '@!P X( $
M > ( : '@@ 0 \" &@ #P( $ ' @!H X @ 0 >" &@ '@ " !0#P
M@!H #X & '" &@ .@ 8 >( : !Z !@ \@!H /( & !Z &@!X@ 8 #H : '"
M!@ /@!H \( & > ( 8 '@@ 8 \" & #P( & '@@!@ !X @ < X( 8
M > " #P@!@ #X ( 'B & >@ @ /( 8 #R " >@!@ >( ( ^ & #P@ @
M!X @!8 >" " #P( 6 / @ @ >" %@ '@ " "0#P@!8 #X * 'B %@ >
M@ H /( 6 #R "@ >@!8 >( * ^ %@#P@ H !X @!0 >" "@ #P( 4 /
M@ H >" % '@ " "P#X@!0 'X , 'R % ^@ P /H 4 'R # /@!0 \( ,
M ? @!( ^" # #X( 2 ? @ P ?" $@ /@ " #0!\@!( /H . #Z $@!\
M@ X 'X @! ?B #@ 'P( 0 /@@ X _" $ /P( / /R $ _@! ?H 0
M 'Z $ ?@ " #@ !^( 0 ?@@ X !^" $ #^( . !_ @!$ _H . '^ $@ _
M@ " # !_( 2 _@@ P !_" $@ #^( , !_ @!, _H , '^ % _P( * /\
M@!0 #_" "@ /\( 4 '^@ H ?X @!4 ?\" " #_H 6 _\@ @ /_" %@ !
M_X @ 8 ?^ ( 7 #_X@ 8 '_R & '_\" ! #_^" &0!__X $ /_^@!H
@!___@ ( ___@@!L /X $__R '0" !/^ 'P" O^ - "
end