!!
!! $RCSfile: Dial.uil,v $
!!
!! (c) Copyright 1992-1994 Adobe Systems Incorporated.
!! All rights reserved.
!! 
!! Permission to use, copy, modify, distribute, and sublicense 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.  No trademark license
!! to use the Adobe trademarks is hereby granted.  If the Adobe trademark
!! "Display PostScript"(tm) is used to describe this software, its
!! functionality or for any other purpose, such use shall be limited to a
!! statement that this software works in conjunction with the Display
!! PostScript system.  Proper trademark attribution to reflect Adobe's
!! ownership of the trademark shall be given whenever any such reference to
!! the Display PostScript system is made.
!! 
!! 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.
!! 
!! Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
!! Incorporated which may be registered in certain jurisdictions
!! 
!! Author:  Adobe Systems Incorporated



!!***************************************************************
!! MODULE DECLARATIONS
!!***************************************************************

!!
!! module DialApp
!!
module DialApp
        version = 'v1.0'
        names = case_sensitive
        objects =
        {
                XmCascadeButton = gadget ;
                XmPushButton    = gadget ;
                XmSeparator     = gadget ;
                XmToggleButton  = gadget ;
        }


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

procedure
        refreshWindow       ();
        createProc          (integer);
        quitApp             ();
        traceProc           ();
        drawProc            (integer);
        marksSel            (integer);
        
!!***************************************************************
!! VALUE DECLARATIONS
!!***************************************************************

!!
!! the following list is duplicated in Dial.h for identification
!! of widgets as they are created
!!
value
        cMainDrawArea       : 0;
        cTimingText0        : 1;
        cTimingText1        : 2;
        cTimingText2        : 3;
        cTimingText3        : 4;
        cTraceToggle        : 5;

!!
!! 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;


!!
!! general constant values
!!
value
        vLabelOffset    : 7;    ! pixels
        vFrameShadow    : XmSHADOW_ETCHED_IN;

!!
!! main window constant values
!!
value
        vMainWidth      : 780;  ! pixels
        vMainHeight     : 500;  ! pixels

        vMainDrawHeight : 400;  ! pixels
        vMainDrawWidth  : 400;  ! pixels

        vMainMargin     : 20;   ! pixels

value
        vTopPosition    : 5;    ! percent
        vBottomPosition : 95;   ! percent
        vDrawLeft       : 4;    ! percent

        vMethodsLeft    : 66;   ! percent
        vLeftCenter     : 57;   ! percent
        vRightCenter    : 63;   ! percent
        vDrawAllLeft    : 35;   ! percent
        vDrawAllRight   : 65;   ! percent
        vMethodsMargin  : 10;   ! pixels

        vMarksLeft      : 74;   ! percent
        vMarksMargin    : 10;   ! pixels

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

!!
!! The main window widget.  This displays the pattern drawing.
!!
object MainWindow : XmMainWindow
{
    controls
    {
        XmMenuBar           mMenuBar;
        XmForm              mMainForm;
    };
};

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

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

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

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

object mTraceButton : XmToggleButton
{
    arguments
    {
        XmNfontList    = buttonFont;
    };
    callbacks
    {
        MrmNcreateCallback = procedure createProc (cTraceToggle);
        XmNvalueChangedCallback = procedure traceProc ();
    };
};

object mQuitButton : XmPushButton
{
    arguments
    {
        XmNfontList    = buttonFont;
    };
    callbacks
    {
        XmNactivateCallback = procedure quitApp ();
    };
};
 
!!***************************************************************
!! Main window drawing area
!!***************************************************************

object mMainForm : XmForm
{
	arguments
	{
		XmNhorizontalSpacing = 5;
		XmNverticalSpacing = 5;
	};
    controls
    {
        XmDrawingArea   mDrawArea;
        XmFrame         mMethodsFrame;
        XmFrame         mMarksFrame;
    };
};

object mDrawArea : XmDrawingArea
{
    arguments
    {
        XmNleftAttachment   = XmATTACH_FORM ;
        XmNtopAttachment    = XmATTACH_FORM ;
        XmNbottomAttachment = XmATTACH_FORM ;
    };
    callbacks
    {
        MrmNcreateCallback = procedure createProc (cMainDrawArea);
        XmNexposeCallback = procedure refreshWindow ();
    };
};

!!***************************************************************
!! Methods box form
!!***************************************************************
object mMethodsFrame : XmFrame
{
    arguments
    {
        XmNshadowType       = vFrameShadow ;
        XmNleftAttachment   = XmATTACH_WIDGET ;
        XmNleftWidget       = XmDrawingArea mDrawArea;
        XmNrightAttachment  = XmATTACH_FORM ;
        XmNtopAttachment    = XmATTACH_FORM ;
    };
    controls
    {
        XmForm      mMethodsForm;
    };
};

object mMethodsForm : XmForm
{
    arguments
    {
        XmNhorizontalSpacing    = vMethodsMargin;
        XmNverticalSpacing      = vMethodsMargin;
    };
    controls
    {
        XmLabel         mMethodsTitle;
        XmPushButton    mButton0;
        XmLabel          mTimingText0;
        XmPushButton    mButton1;
        XmLabel          mTimingText1;
        XmPushButton    mButton2;
        XmLabel          mTimingText2;
        XmPushButton    mButton3;
        XmLabel          mTimingText3;
        XmPushButton    mDrawAllButton;
    };
};

object mMethodsTitle : XmLabel
{
    arguments
    {
        XmNalignment        = XmALIGNMENT_CENTER;
        XmNfontList         = labelFont ;

        XmNleftAttachment   = XmATTACH_FORM ;
        XmNrightAttachment  = XmATTACH_FORM ;

        XmNtopAttachment    = XmATTACH_FORM ;
    };
};

object mButton0 : XmPushButton
{
    arguments
    {
        XmNfontList    = buttonFont;

        XmNleftAttachment   = XmATTACH_FORM ;
        XmNrightAttachment  = XmATTACH_POSITION ;
        XmNrightPosition    = vLeftCenter;

        XmNtopAttachment    = XmATTACH_WIDGET;
        XmNtopWidget        = XmLabel mMethodsTitle;
    };
    callbacks
    {
        XmNactivateCallback = procedure drawProc (0);
    };
};

object mTimingText0 : XmLabel
{
    arguments
    {
        XmNfontList         = textFont ;

        XmNleftAttachment   = XmATTACH_POSITION;
        XmNleftPosition     = vRightCenter;
        XmNrightAttachment  = XmATTACH_FORM ;

        XmNtopAttachment    = XmATTACH_WIDGET ;
        XmNtopWidget        = XmLabel mMethodsTitle;
    };
    callbacks
    {
        MrmNcreateCallback = procedure createProc (cTimingText0);
    };
};

object mButton1 : XmPushButton
{
    arguments
    {
        XmNfontList    = buttonFont;

        XmNleftAttachment   = XmATTACH_FORM ;
        XmNrightAttachment  = XmATTACH_POSITION ;
        XmNrightPosition    = vLeftCenter;

        XmNtopAttachment    = XmATTACH_WIDGET;
        XmNtopWidget        = XmLabel mTimingText0;
    };
    callbacks
    {
        XmNactivateCallback = procedure drawProc (1);
    };
};

object mTimingText1 : XmLabel
{
    arguments
    {
        XmNfontList         = textFont ;
        XmNleftAttachment   = XmATTACH_POSITION;
        XmNleftPosition     = vRightCenter;
        XmNrightAttachment  = XmATTACH_FORM ;
        XmNtopAttachment    = XmATTACH_WIDGET ;
        XmNtopWidget        = XmLabel mTimingText0;
    };
    callbacks
    {
        MrmNcreateCallback = procedure createProc (cTimingText1);
    };
};

object mButton2 : XmPushButton
{
    arguments
    {
        XmNfontList    = buttonFont;

        XmNleftAttachment   = XmATTACH_FORM ;
        XmNrightAttachment  = XmATTACH_POSITION ;
        XmNrightPosition    = vLeftCenter;

        XmNtopAttachment    = XmATTACH_WIDGET;
        XmNtopWidget        = XmLabel mTimingText1;
    };
    callbacks
    {
        XmNactivateCallback = procedure drawProc (2);
    };
};

object mTimingText2 : XmLabel
{
    arguments
    {
        XmNfontList         = textFont ;
        XmNleftAttachment   = XmATTACH_POSITION;
        XmNleftPosition     = vRightCenter;
        XmNrightAttachment  = XmATTACH_FORM ;
        XmNtopAttachment    = XmATTACH_WIDGET ;
        XmNtopWidget        = XmLabel mTimingText1;
    };
    callbacks
    {
        MrmNcreateCallback = procedure createProc (cTimingText2);
    };
};

object mButton3 : XmPushButton
{
    arguments
    {
        XmNfontList    = buttonFont;

        XmNleftAttachment   = XmATTACH_FORM ;
        XmNrightAttachment  = XmATTACH_POSITION ;
        XmNrightPosition    = vLeftCenter;

        XmNtopAttachment    = XmATTACH_WIDGET;
        XmNtopWidget        = XmLabel mTimingText2;
    };
    callbacks
    {
        XmNactivateCallback = procedure drawProc (3);
    };
};

object mTimingText3 : XmLabel
{
    arguments
    {
        XmNfontList         = textFont ;
        XmNleftAttachment   = XmATTACH_POSITION;
        XmNleftPosition     = vRightCenter;
        XmNrightAttachment  = XmATTACH_FORM ;
        XmNtopAttachment    = XmATTACH_WIDGET ;
        XmNtopWidget        = XmLabel mTimingText2;
    };
    callbacks
    {
        MrmNcreateCallback = procedure createProc (cTimingText3);
    };
};

object mDrawAllButton : XmPushButton
{
    arguments
    {
        XmNfontList    = buttonFont;

        XmNleftAttachment   = XmATTACH_POSITION ;
        XmNleftPosition     = vDrawAllLeft;
        XmNrightAttachment  = XmATTACH_POSITION ;
        XmNrightPosition    = vDrawAllRight;

        XmNtopAttachment    = XmATTACH_WIDGET;
        XmNtopWidget        = XmLabel mTimingText3;
        XmNbottomAttachment = XmATTACH_FORM;
    };
    callbacks
    {
        XmNactivateCallback = procedure drawProc (4);
    };
};


!!***************************************************************
!! Marks to draw selection box
!!***************************************************************
object mMarksFrame : XmFrame
{
    arguments
    {
        XmNshadowType       = vFrameShadow ;
        XmNleftAttachment   = XmATTACH_WIDGET ;
        XmNleftWidget       = XmDrawingArea mDrawArea;
	XmNtopAttachment    = XmATTACH_WIDGET ;
	XmNtopWidget        = XmFrame mMethodsFrame ;
        XmNbottomAttachment = XmATTACH_FORM ;
	XmNrightAttachment  = XmATTACH_FORM;
    };
    controls
    {
        XmForm      mMarksForm;
    };
};

object mMarksForm : XmForm
{
    arguments
    {
        XmNhorizontalSpacing    = vMarksMargin;
        XmNverticalSpacing      = vMarksMargin;
    };
    controls
    {
        XmLabel         mMarksTitle;
        XmRowColumn     mMarksRowColumn;
    };
};

object mMarksTitle : XmLabel
{
    arguments
    {
        XmNalignment        = XmALIGNMENT_CENTER;
        XmNfontList         = labelFont ;
        XmNmarginTop        = vLabelOffset;
	XmNleftAttachment    = XmATTACH_FORM;
	XmNrightAttachment   = XmATTACH_FORM;
        XmNtopAttachment    = XmATTACH_FORM ;
    };
};

object mMarksRowColumn : XmRowColumn
{
    arguments
    {
        XmNorientation      = XmVERTICAL;
        XmNpacking          = XmPACK_COLUMN ;
        XmNnumColumns       = 2;

        XmNtopAttachment    = XmATTACH_WIDGET ;
        XmNtopWidget        = XmLabel mMarksTitle;

        XmNbottomAttachment = XmATTACH_FORM;
	XmNadjustLast = false ;
	XmNentryAlignment = XmALIGNMENT_CENTER;
    };
    controls
    {
        XmToggleButton  mMarksButton0;
        XmToggleButton  mMarksButton1;
        XmToggleButton  mMarksButton2;
        XmToggleButton  mMarksButton3;
    };
};

object mMarksButton0 : XmToggleButton
{
    callbacks
    {
        XmNvalueChangedCallback = procedure marksSel (0);
    };
};

object mMarksButton1 : XmToggleButton
{
    callbacks
    {
        XmNvalueChangedCallback = procedure marksSel (1);
    };
};

object mMarksButton2 : XmToggleButton
{
    callbacks
    {
        XmNvalueChangedCallback = procedure marksSel (2);
    };
};

object mMarksButton3 : XmToggleButton
{
    callbacks
    {
        XmNvalueChangedCallback = procedure marksSel (3);
    };
};

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

