#! ../mofe --f
#
# sample script to demonstrate the notebook widget (requires Motif 2.0
# and the HTML widget)
#
# Bookmarks: Some major.minor/tabs could be added by pushing on some
# "insert finger" stuff.
#
# Some of the text below has been borrowed from the hotmetal distribution.
#
# In fact the texts should not be in this program but rather in some
# files xxx$n.html and read when the page is selected.
#

scriptNeeds HTML "This Script needs the HTML Widget!"
scriptNeeds XmNotebook "This Script requires Motif 2.0!"

set ht6 {
  <UL> <LI>Dummy<LI>2<LI>3</UL>  }
set ht2 {
  apples are high in fiber
}
set ht3 {
  bananas are high in Potassium
}
set ht4 {
  oranges are high in Vitamin C
}
set ht5 {
  celery
}
set ht1 {<HTML>
  <HEAD>
  <TITLE>MyCompany Inc. Home Page</TITLE>
  </HEAD>
  <BODY>
  <H1><IMG SRC="ghostview.xpm">Welcome to MyCompany!</H1>
  <P>Welcome to MyCompany!  MyCo is the world's leading supplier of
  blabbety-blabble techology. We have been in business since 1997, which
  makes us the newest entry in this field. We helped found the Blibbitz
  User's Group, and are publicly traded (XYZ Stock Exchange, symbol MyCo).
  </P>
  <P>Our newest and most exciting product is
  <A HREF="product1.html">Product One</A>. Select <A HREF="product1-order.html"
  >here</A> to order your own copy of Product One. You can also
  <A HREF="custreg.htm">register for our customer newsletter</A> or
  <A HREF="ftp://ftp.myco.com//pub/product1/demo.tar.gz">ftp a
  demonstration kit.</A>
  </P>
  <P>We are pleased to serve up the following additional information via
  the <A HREF="http:/info.cern.ch/TheProject.html">World Wide Web</A>:
  </P>
  <UL>
  <LI><P><A HREF="XXX/Releases.html">MyCo Press Releases</A></P></LI>
  <LI><P><A HREF="XXX/Lit.html">MyCo Marketing Literature</A></P></LI>
  <LI><P><A HREF="XXX/Intro.html">Introduction to Blabble Technology</A></P></LI>
  <LI><P><A HREF="XXX/Training">MyCo Training Services</A></P></LI>
  <LI><P><A HREF="XXX/Consulting">MyCo Consulting Services</A></P></LI>
  </UL>
  <P>In case you are relatively new to the World Wide Web, you may wish
  to read the
  <A HREF="http://www.ncsa.uiuc.edu/demoweb/demo.html">NCSA Mosaic Demo
  Document</A>.  There is also the Suggested
  <A HREF="http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/StartingPoints/NetworkStartingPoints.html"
  >Starting Points for Internet Exploration</A>. You may wish to use the
  following resources to keep track of the evolution of cyberspace and to
  find  information on the Internet:
  </P>
  <UL>
  <LI><P><A HREF="Docs/whats-new.html">What's New</A> with NCSA Mosaic
  and the Internet.</P></LI>
  <LI><P><A HREF="http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html"
  >Internet Resources Meta-Index</A> at NCSA.</P></LI>
  </UL>
  <H2>Comments or Problems</H2>
  <P>Again, thanks for visiting MyCompany's WWW server. We hope to hear
  from you again soon.
  </P>
  <P>For information on MyCompany's products and services, please send
  e-mail to <B>info@MyCompany.com</B>, phone us at +1 416-NNN-NNNN,
  800-NNN-NNNN, or FAX your request to +1 416-NNN-NNNN. If you have
  problems or comments concerning our WWW service,  please send e-mail to
  the following address: info-www@myco.com.
  </P>
  <P>This page, and all contents, are Copyright (C) 1994 by MyCompany
  Inc., SomeCity, SomeCountry.
  </P>
  </BODY>
  </HTML>
}
set ht7 {
  sweet potato
}
set ht8 {
  <HTML><HEAD><TITLE>Replace this text.</TITLE></HEAD>
  <BODY><H1>The Document Heading</H1>
  <P>Start typing paragraph here by replacing this text.</P>
  <P>This para contains an image: <IMG SRC="img.gif"></P></BODY>
  </HTML>
}

mergeResources topLevel \
    *bindingPixmap spiral.xpm \
    *h1.text $ht1 \
    *h2.text $ht2 \
    *h3.text $ht3 \
    *h4.text $ht4 \
    *h5.text $ht5 \
    *h6.text $ht6 \
    *h7.text $ht7 \
    *h8.text $ht8

XmRowColumn rc topLevel
XmRowColumn rc2 rc orientation horizontal
XmNotebook notebook rc bindingType spiral

foreach n {1 2 3 4 5 6 7 8} {
  XmFrame f$n notebook notebookChildType page \
      pageNumber $n  width 580 height 610
  
  HTML h$n f$n \
      width 570 height 600 \
      marginWidth 10 anchorUnderlines 1 anchorColor slateBlue \
      anchorCallback {puts stderr %h}
}

XmLabel tropical notebook notebookChildType status_area pageNumber 2
XmPushButton fruits notebook notebookChildType major_tab pageNumber 1
XmPushButton vegetables notebook notebookChildType major_tab pageNumber 4
XmPushButton green notebook notebookChildType minor_tab pageNumber 6
XmPushButton orange notebook notebookChildType minor_tab pageNumber 4

realize

