!!
!! $RCSfile: Hello.uil,v $
!!
!! Copyright (C) 1992 by Adobe Systems Incorporated.
!! All rights reserved.
!!
!! Permission to use, copy, modify, and distribute this software and its
!! documentation for any purpose and without fee is hereby granted,
!! provided that the above copyright notices appear in all copies and that
!! both those copyright notices and this permission notice appear in
!! supporting documentation and that the name of Adobe Systems
!! Incorporated not be used in advertising or publicity pertaining to
!! distribution of the software without specific, written prior
!! permission.  If any portion of this software is changed, it cannot be
!! marketed under Adobe's trademarks and/or copyrights unless Adobe, in
!! its sole discretion, approves by a prior writing the quality of the
!! resulting implementation.
!!
!! ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
!! ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
!! ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
!! IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND
!! NON-INFRINGEMENT OF THIRD PARTY RIGHTS.  IN NO EVENT SHALL ADOBE BE LIABLE
!! TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
!! DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
!! NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
!! CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  ADOBE WILL NOT
!! PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
!!
!! PostScript, Display PostScript, and Adobe are trademarks of Adobe Systems
!! Incorporated registered in the U.S.A. and other countries.
!!
!! Author: Adobe Systems Incorporated
!!
module HelloWorldApp
        version = 'v1.0'
        names = case_sensitive
        objects =
        {
                XmCascadeButton = gadget ;
                XmLabel         = gadget ;
                XmPushButton    = gadget ;
                XmSeparator     = gadget ;
        }


!!***************************************************************
!! PROCEDURE DECLARATIONS
!!***************************************************************

procedure
	resizeWindow        ();
        refreshWindow       ();
        createProc          (integer);
        quitApp             ();

procedure
        traceProc           ();
        writeProc           ();

!!***************************************************************
!! VALUE DECLARATIONS
!!***************************************************************

!!
!! the following list is duplicated in Hello.h for identification
!! of widgets as they are created
!!
value
        cMainDrawArea       : 1;
        cTraceToggle        : 2;
	cWriteTextToggle    : 3;

!!
!! ADOBE FONTS
!!
value
    hel_bold_font12 :
      font('-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1');
    hel_bold_font14 :
      font('-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1');
    hel_bold_font18 :
      font('-adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1');
    newcenturyschlbk_bold24 :
      font('-adobe-new century schoolbook-bold-r-normal--24-240-75-75-p-149-iso8859-1');

    dialogFont      : hel_bold_font12;
    textFont        : hel_bold_font12;
    labelFont       : hel_bold_font14;
    buttonFont      : hel_bold_font14;
    bigFont         : hel_bold_font18;
    jumboFont       : newcenturyschlbk_bold24;

!!
!! main window constant values
!!
value
        vCommandText    : "Commands";
        vWriteText      : "Write Text";
        vEraseText      : "Erase Text";
        vTraceText      : "Trace On";
        vQuitText       : "Quit";

!!***************************************************************
!! TOP LEVEL WIDGETS
!!***************************************************************

!!
!! The main window widget.  This displays the text drawing.
!!
object MainWindow : XmMainWindow
{
    arguments
    {
        !!XmNbackground = color('yellow');
    };
    controls
    {
        XmMenuBar           mMenuBar;
        XmForm              mMainForm;
    };
};

!!***************************************************************
!! Main window menu bar
!!***************************************************************

object mMenuBar : XmMenuBar           
{
    controls
    {
        XmCascadeButton mCommandButton;
    };
};

object mCommandButton : XmCascadeButton
{
    arguments
    {
        XmNfontList    = buttonFont;
        XmNlabelString = vCommandText;
    };
    controls
    {
        XmPulldownMenu mCommandMenu;
    };
};

object mCommandMenu : XmPulldownMenu
{
    controls
    {
        XmToggleButton  mWriteButton;
        XmToggleButton  mTraceButton;
        XmSeparator     {};
        XmPushButton    mQuitButton;
    };
};

object mWriteButton : XmToggleButton
{
    arguments
    {
        XmNfontList    = buttonFont;
        XmNlabelString = vWriteText;
    };
    callbacks
    {
	MrmNcreateCallback = procedure createProc (cWriteTextToggle);
        XmNvalueChangedCallback = procedure writeProc ();
    };
};
 
object mTraceButton : XmToggleButton
{
    arguments
    {
        XmNfontList    = buttonFont;
        XmNlabelString = vTraceText;
    };
    callbacks
    {
        MrmNcreateCallback = procedure createProc (cTraceToggle);
        XmNvalueChangedCallback = procedure traceProc ();
    };
};

object mQuitButton : XmPushButton
{
    arguments
    {
        XmNfontList    = buttonFont;
        XmNlabelString = vQuitText;
    };
    callbacks
    {
        XmNactivateCallback = procedure quitApp ();
    };
};
 
!!***************************************************************
!! Main window form
!!***************************************************************
object mMainForm : XmForm
{
    arguments
    {
        !!XmNbackground = color('green');
    };
    controls
    {
        XmDrawingArea   mDrawArea;
    };
};

!!***************************************************************
!! Main window drawing area
!!***************************************************************
object mDrawArea : XmDrawingArea
{
    arguments
    {
	XmNbottomAttachment = XmATTACH_FORM;
	XmNtopAttachment = XmATTACH_FORM;
	XmNleftAttachment = XmATTACH_FORM;
	XmNrightAttachment = XmATTACH_FORM;
    };
    callbacks
    {
        MrmNcreateCallback = procedure createProc (cMainDrawArea);
        XmNexposeCallback = procedure refreshWindow ();
	XmNresizeCallback = procedure resizeWindow ();
    };
};

!!***************************************************************
end module;

