% mmncc.sth
% sample mmncc style
% HtX (1.0b)  (c) 1996, Richard M. Salter
% Please read copyright and distribution agreement

\input{report.sth}
\typeout{Substyle:  mmcc}
\seticondir{../icons/}

\newcommand{\docheader}[3]{
\begin{center}
\title{Module \hash #2: #3}
\begin{table}[cellpadding=15][][halign=center]
\image{\icondir LH.gif}
\image{\icondir iushield.gif}
\image{\icondir iupui-cs.gif}\col[valign=middle halign=center]
\header{3}{\centering\it #1}\row[][halign=center]\par
\header{5}{\centering Multi-campus Modular Non-major\\Curriculum in Computing}
\end{table}
\end{center}
\hr[noshade size=2]
{\div[center]\header{1}{Module \hash #2: #3}}
\hr[noshade size=2]}

\newenvironment{goallist}{
\header{2}{\it\image[middle][][hspace=15]{\icondir goal.gif} Goals}
\begin{itemize}}
{\end{itemize}\hr[noshade size=2]}

\newenvironment{prereqs}{
\header{2}{\it\image[middle][][hspace=15]{\icondir suitcase.gif}
 Prerequisite Skills}
\begin{itemize}}
{\end{itemize}\hr[noshade size=2]}

\newenvironment{vocab}{
\hr[noshade size=2]
\header{2}{\it\it\image[middle][][hspace=15]{\icondir type.gif} 
Vocabulary / Main Concepts}
\begin{itemize}}
{\end{itemize}\hr[noshade size=2]}

\newenvironment{leftimage}[1]{
\image[left][][hspace=15 vspace=10]{#1}}
{\break[left]}

\newenvironment{rightimage}[1]{
\image[right][][hspace=15 vspace=10]{#1}}
{\break[right]}

% q and a

\newbuf{ansf}
\newctr{qctr}
\newctr{cellans}

\newcommand{\cellans}{\setctr{cellans}1}
\newcommand{\keyans}{\clrctr{cellans}}

\newenvironment{quest} {
\incctr{qctr}
\anchor{Q\ctr{qctr}}{\par\image[BOTTOM]{\icondir begin_colorline.gif}}
\begin{description}
\item[\bf Q. \ctr{qctr}]}
{
\ifthen {\numeq{\ctr{cellans}}0}
	\par \cdots\cdots Click here to return:\cdots\link{Q\ctr{qctr}}
	{\image[TOP][HERE]{\icondir curved_back.GIF}}
	\vspace{50}
	\end{excursion}\par
\ifelse \par \cdots\cdots 
	Click here to return:\cdots\xlink{../\uref{Q\ctr{qctr}}}
	{\image[TOP][HERE]{\icondir curved_back.GIF}}
	\end{cell}\par
\endif
\image[TOP]{\icondir end_colorline.GIF}\par}

\newcommand{\ans} {\par
\end{description}\hr
Click here for the answer:
\ifthen {\numeq{\ctr{cellans}}0}
	\link{A\ctr{qctr}}{\image[MIDDLE]{\icondir green_query.GIF}}
	\begin{excursion}{\buf{ansf}}{a}
	\anchor{A\ctr{qctr}}{\bf A. \ctr{qctr}}\cdots\cdots\cdots
\ifelse \cellref[A\ctr{qctr}]{\image[MIDDLE]{\icondir green_query.GIF}}
	\begin{cell}{A\ctr{qctr}}
\endif}

\newcommand{\newansfile}[1][1]{
\begin{excursion}{#2}{w}
\preamb[#1]{Answers}
\end{excursion}
\setbuf{ansf}{#2}}

% multiple choice question using applet

\newctr{mcq}
\newenvironment{mcquest}{
\clrctr{mcq}
\incctr{qctr}
\begin{center}
\anchor{Q\ctr{qctr}}{\par\image[BOTTOM]{\icondir begin_colorline.GIF}}\par
\begin{applet}[\appletdir][\substr{1}{6}{\getprop{bgprop}}]{200}{300}{MCQuest}
\begin{capture}{0}}
{\ifthen {\numeq{\ctr{mcq}}{0}}
	\end{capture}
	\jparam{quest}{\ctr{qctr}. \buf0}
\endif	
\jparam{alts}{\ctr{mcq}}
\end{applet}\par
\image[TOP]{\icondir end_colorline.GIF}\par
\end{center}
}

\newcommand{\mans}[1][1]{
\ifthen {\numeq{\ctr{mcq}}{0}}
	\end{capture}
	\jparam{quest}{\ctr{qctr}. \buf0}
\endif	
\jparam{A\ctr{mcq}}{#2}
\ifdef[\jparam{R\ctr{mcq}}{#1}]{#1}
\incctr{mcq}
}

\newcommand{\mans*}[1][1]{
\jparam{Correct}{\ctr{mcq}}
\mans[#1]{#2}
}

Colors

\newcommand{\paleBlue}{\wallpaint{fbd8ff}}
\newcommand{\palePink}{\wallpaint{ffbfe1}}
\newcommand{\paleGreen}{\wallpaint{bfffcb}}
\newcommand{\paleLavender}{\wallpaint{d8bfff}}
\newcommand{\robinsEggBlue}{\wallpaint{c0ffff}}
\newcommand{\pastelGreen}{\wallpaint{d4ffd4}}
\newcommand{\palePurple}{\wallpaint{ffd4ff}}

\newkeyhole[\mainfileroot\ key][d8bfff]{\curfileroot key}
\newansfile[ffbfe1]{\curfileroot ans}
\newcelldir{\mainfileroot cell}
