%D \module
%D   [      file=x-e-1010,
%D        version=2004.04.05,
%D          title=\EXAMPLE\ GUI Files,
%D       subtitle=Calculator math testing,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D This is experimental code. Don't change it, don't rely on
%D this interface remaining the same, don't use tricks used
%D here but not described in manuals, so: asume that this
%D file does not exists.

\usemodule[e-0000]

\loadEXArequest{\inputfilename}
\loadEXAmodes  {examodes.tex}

\definetypeface
  [mainface][rm][serif]
  [\getvariable{font}{serif}]
  [default]
  [encoding=texnansi,rscale=\getvariable{scale}{serif}]

\definetypeface
  [mainface][ss][sans]
  [\getvariable{font}{sans}]
  [default]
  [encoding=texnansi,rscale=\getvariable{scale}{sans}]

\definetypeface
  [mainface][tt][mono]
  [\getvariable{font}{mono}]
  [default]
  [encoding=texnansi,rscale=\getvariable{scale}{mono}]

\definetypeface
  [mainface][mm][math]
  [\getvariable{font}{math}]
  [default]
  [encoding=default,rscale=\getvariable{scale}{math}]

\definetypeface
  [mainface][cg][calligraphy]
  [\getvariable{font}{calligraphy}]
  [default]
  [encoding=texnansi,rscale=\getvariable{scale}{calligraphy}]

\setupbodyfont
  [mainface]

\setuplayout
  [height=middle]

\setupfootertexts
  [\getvariable{font}{serif} ---
   \getvariable{font}{sans}  ---
   \getvariable{font}{mono}  ---
   \getvariable{font}{math}  ---
   \getvariable{font}{calligraphy}]

\startsetups[sample]

  \start
    \rm \getvalue{\getvariable{font}{style}} \readfile {\getvariable{font}{sample}} {} {} \endgraf
  \stop

  \blank

  \start
    \ss \getvalue{\getvariable{font}{style}} \readfile {\getvariable{font}{sample}} {} {} \endgraf
  \stop

  \blank

  \start
    \tt \getvalue{\getvariable{font}{style}} \readfile {\getvariable{font}{sample}} {} {} \endgraf
  \stop

  \blank

  \midaligned{$\hbox{todo: math}$}

  \blank

  \start
    \cg \getvalue{\getvariable{font}{style}} \readfile {\getvariable{font}{sample}} {} {} \endgraf
  \stop

\stopsetups

\starttext

\startmode[papersize-fit]

  \startTEXpage
    \setups[sample]
  \stopTEXpage

\stopmode

\startnotmode[papersize-fit]

  \setups[sample]

\stopnotmode

\stoptext
