#### redraw, stereo, show inside, lights, bigcursor ####
-------------------------------------------
funct: "REDRAW (if stereo, bak to single) (left-click-REDRAW)"
keyboard equivlalent: <Cmd/Alt-r>
  set stereoflag 0
  set convergentflag 0
  redrawbutton
-------------------------------------------
funct: "Divergent Stereo REDRAW (mid-click-REDRAW)"
  set stereoflag 1
  set convergentflag 0
  redrawbutton
-------------------------------------------
funct: "Convergent Stereo REDRAW (shift-mid-clk-REDRAW)"
  set stereoflag 1
  set convergentflag 1
  redrawbutton
-------------------------------------------
funct: "Toggle Light Inside/Back Surf (ctrl-mid-clk-REDRAW)"
  set lighttwosidedflag [expr !$twosidedflag]
  redrawbutton
-------------------------------------------
funct: "Lights Bright/Position Popup (shift-R-clk-REDRAW)"
  lightsctrls
-------------------------------------------
funct: "Toggle Disp Mult Timecourses (ctrl-R-clk-REDRAW)"
  set multitimecourseflag [expr !$multitimecourseflag]
-------------------------------------------
funct: "Toggle BigCursor (shows neigh) (shift-L-clk-REDRAW)"
  set bigcursorflag [expr !$bigcursorflag]
-------------------------------------------


Detailed Description of "REDRAW" Button Actions

-------------------------------------------
funct: "REDRAW (if stereo, back to single) (left-click-REDRAW)"
keyboard equivalent: <Cmd/Alt-r>
  set stereoflag 0
  set convergentflag 0
  redrawbutton
-------------------------------------------

The "REDRAW" button procedure (tksurfer.tcl) is
automatically called by most interface elements
that affect the rendered image and rarely has to
be explicitly clicked.

proc redrawbutton {  } {
  transform		;# apply transform
  resize_window 0		;# reshape window
  dolighting		;# reset lights
  redraw		;# C/tcl redraw function
  resettransform		;# reset transform
  after 100		;# stop feedback
}

The default left-click on REDRAW also turns off
stereo viewing if this has been enabled.

-------------------------------------------
funct: "Divergent Stereo REDRAW (mid-click-REDRAW)"
  set stereoflag 1
  set convergentflag 0
  redrawbutton
-------------------------------------------

An alternate middle-click on the REDRAW button
displays divergent stereo viewing.  The brain is
drawn twice, side-by-side, for stereo viewing by
divergent fixation (left copy viewed by left eye,
right copy viewed by right eye).

-------------------------------------------
funct: "Convergent Stereo REDRAW (shift-mid-clk-REDRAW)"
  set stereoflag 1
  set convergentflag 1
  redrawbutton
-------------------------------------------

A second alternate shift-middle-click on REDRAW
displays convergent ('cross-eye') stereo viewing.
The brain is draw twice (left copy viewed by
right eye, and vice versa).  Some people prefer
this to divergent viewing.

-------------------------------------------
Hints for stereo viewing
-------------------------------------------

It is easiest to achieve stereo fusion when there
is single high-contrast target -- e.g., brain at
near initial magnification -- but it is harder to
make out details that way.  If you zoom
(shift-R-click drag up/down) *after* fusing, you
won't break stereo fusion.  To do that, have your
left finger on the shift key *before* you fuse,
since you will break fusion if you have to look
away at the keyboard.  Another useful high
contrast target is the color scale disk or
vertical bar at the lower right.

Stereo viewing is particularly good for
appreciating the orientation of the surface
normal display, and the complex geometry of the
folded (smoothwm) surface.

A Google Daydream or equivalent set of closeup
stereo lenses can be taped to the screen to make
divergent fusion easier (N.B. won't work with
convergent display).

Use "winxy:" ($glwinxydim) to adjust the
intraocular distance.

-------------------------------------------
funct: "Toggle Light Inside/Back Surface (control-mid-clk-REDRAW)"
  set lighttwosidedflag [expr !$twosidedflag]
  redrawbutton
-------------------------------------------

An alternate ctrl-middle-click on the REDRAW
button toggles whether back/inside surfaces
should be lit.

The inside of the closed folded and inflated
surfaces are not normally visible.  Use this
option to visualize the inside of a cut 3D
surface (inside is dark gray).

The PLANE button sets this automatically.

The default is 0 (off).

The relative brightness of the inside surface is
set by $insidesurffact.  This variable (def=0.6)
appears in the larger F3 interface in an
unlabeled entry directly to the right of the
mid-lower right "offset:" entry.

N.B.: when looking at the inside of the brain
surface, there will be a strong 'hollow-face
illusion' and you may have to interactivel rotate
the surface (shift-left-click-drag) to overcome
this.

-------------------------------------------
funct: "Popup For Lights Brightness/Position (shift-R-clk-REDRAW)"
  lightsctrls
-------------------------------------------

An alternate shift-right-click on the REDRAW
button makes a popup containing the brightnesses
and positions of the fix lights that illuminate
the brain.

The brightness parameters are:

  $light0
  $light1
  $light2
  $light3

and the position x,y,z parameters are:

  $light0x
  $light0y
  $light0z
  $light1x
  $light1y
  [etc]

See right-click help on the popup for details.

-------------------------------------------
funct: "Toggle Display Multiple Timecourses (ctrl-R-clk-REDRAW)"
  set multitimecourseflag [expr !$multitimecourseflag]
-------------------------------------------

An alternate ctrl-right-click on the REDRAW
button toggles whether to not to overlay multiple
single-voxel timecourses (from each successive
ctrl-middle-click on a vertex in the surface
window).

The default is 0 (off).

-------------------------------------------
funct: "Toggle Big Cursor (also show neigh) (shift-L-clk-REDRAW)"
  set bigcursorflag [expr !$bigcursorflag]
-------------------------------------------

For high resolution surfaces with large number of
vertices (e.g., post-mortem cerebellum scan), it
can be difficult to see which vertex is selected.
When $bigcursorflag is on, an additional ring of
mesh edges are highlighted (normally, only the
edges extending from the selected vertex are
highlighted).

When $bigcursorflag is ON, only the central
vertex will be selected by a left-click (i.e., 
the same single-vertex selection as when
$bigcursorflag is OFF) - except in the following
special case:

If $bigcursorflag is ON when the C/tcl command
write_val_selected_list_to_label is executed, the
the neighbors of selected vertices will be
included in the output label.  This is useful
when you want to outline where a cut should be
made using one surface, convert those outlines to
a label, and then display that label on a
different surface - for example, to outline the
cerebellar vermis on the highly folded smoothwm
surface where it is easier to see, save that
outline as a label, then display it on the
inflated surface, where the cuts are much easier
to make.

