! 
! @OPENGROUP_COPYRIGHT@
! COPYRIGHT NOTICE
! Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
! Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group
! ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
! the full copyright text.
! 
! This software is subject to an open license. It may only be
! used on, with or for operating systems which are themselves open
! source systems. You must contact The Open Group for a license
! allowing distribution and sublicensing of this software on, with,
! or for operating systems which are not Open Source programs.
! 
! See http://www.opengroup.org/openmotif/license for full
! details of the license agreement. Any use, reproduction, or
! distribution of the program constitutes recipient's acceptance of
! this agreement.
! 
! EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
! PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
! KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
! WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
! OR FITNESS FOR A PARTICULAR PURPOSE
! 
! EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
! NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,
! INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED
! AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
! ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
! EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
! POSSIBILITY OF SUCH DAMAGES.
! 
! 
! HISTORY
! 
!   $XConsortium: xlistWarn.uil /main/4 1995/07/13 20:33:17 drk $
!******************************************************************************
!*	This module contains a line that will produce a warning upon 
!*	compilation. This line is the line that specifies a fontList for
!*	a Bulletin Board (this resource is not available). This line is
!*	in the file to test the Warning features of the Callable UIL compiler.

module xlistWarn
        version = 'v1.0'
        names = case_sensitive

  procedure
          exit_test();
	  Get_Text(string);
	  Change_Font(string);
	  Place_Hunt();
	  Hunt_String();
	  Get_File();
	  Place_FsBox();

  value
	  wheat			     : color('wheat');
	  navy			     : color('navy');
	  forest_green		     : color('forestgreen');

  value
	variable: font('variable');

  object                                  ! The main window widget.
	  widgetmain:	XmMainWindow {
		controls {
			XmBulletinBoard BB1;
		};
	  };

          BB1: XmBulletinBoard {
              arguments {
                  XmNx = 0;
                  XmNy = 0;
		  XmNfontList = variable;  ! Warning message on this resource
		  XmNbackground = navy;
                  XmNdialogTitle =  compound_string ("Demo Editor");
              };
    	      controls {
                  XmMenuBar		Menu_Bar;
		  XmScrolledWindow 	ScrolledWin;
  	      };
  	  };
!/*****************************************************************************
!/*	MenuBar - define a menu Bar to give user all available options
!/*****************************************************************************

  object
        Menu_Bar:  XmMenuBar {
		arguments {
			XmNwidth =  600;
			XmNheight =  50;
			XmNx = 0;
			XmNy = 0;
		};
	    	controls {
			XmCascadeButton  File_Button;
			XmCascadeButton	 Option_Button;
     	    	};
        };

  object
	File_Button:	XmCascadeButton {
		arguments {
			XmNlabelString = compound_string("File");
			XmNfontList = variable;	
		};
		controls {
			XmPulldownMenu 	File_Menu;
		};
	};

  object
	Option_Button:	XmCascadeButton {
		arguments {
			XmNlabelString = compound_string("Option");
			XmNfontList = variable;	
		};
		controls {
			XmPulldownMenu 	Option_Menu;
		};
	};

!/****************************************************************************
!/*  	File Menu - Give the User the ability to open files, save files,
!/*		    and exit the editor.
!/****************************************************************************

   object 
	File_Menu:	XmPulldownMenu {
		arguments {
			XmNbackground = forest_green;
		};
		controls {
			XmPushButton 		Open_Button;
			XmPushButton		Quit_Button;
		};
	};


  object
	Open_Button:	XmPushButton  {
		arguments {
			XmNlabelString = compound_string("Open File ..");
			XmNfontList = variable;	
		};
		callbacks {
			XmNactivateCallback = procedure Place_FsBox();
		};
	};
  

  object
	Quit_Button:	XmPushButton  {
		arguments {
			XmNlabelString = compound_string("Quit");
			XmNfontList = variable;	
		};
		callbacks {
			XmNactivateCallback = procedure exit_test();
		};
	};

!/****************************************************************************
!/*	Option Menu - To Give the user the ability to chose options
!/****************************************************************************
	
  object
	Option_Menu:	XmPulldownMenu {
		arguments {
			XmNbackground = forest_green;
		};
		controls {
			XmCascadeButton		Option1;
			XmPushButton		hunt_for;
		};
	};

   object
	Option1:	XmCascadeButton {
		arguments {
			XmNfontList = variable;
			XmNlabelString = compound_string("Fonts");
		};
		controls {
			XmPulldownMenu Option_Pulldown1;
		};
	};

   object
	Option_Pulldown1: 	XmPulldownMenu {
		arguments {
			XmNbackground = forest_green;
		};
		controls {
			XmPushButton font1;
			XmPushButton font2;
			XmPushButton font3;
			XmPushButton font4;
		};
	};
			
		
   object
	font1:	XmPushButton {
		arguments {
			XmNfontList = variable;
			XmNlabelString = compound_string("Fixed");
		};
		callbacks {
			XmNactivateCallback = procedure Change_Font
					('fixed');	
		};
	};


   object
	font2:	XmPushButton {
		arguments {
			XmNfontList = variable;
			XmNlabelString = compound_string("Variable");
		};
		callbacks {
			XmNactivateCallback = procedure Change_Font
					('variable');	
		};
	};


   object
	font3:	XmPushButton {
		arguments {
			XmNfontList = variable;
			XmNlabelString = compound_string("8x13bold");
		};
		callbacks {
			XmNactivateCallback = procedure Change_Font
					('8x13bold');	
		};
	};


   object
	font4:	XmPushButton {
		arguments {
			XmNfontList = variable;
			XmNlabelString = compound_string("6x12");
		};
		callbacks {
			XmNactivateCallback = procedure Change_Font
					('6x12');	
		};
	};


   object
	hunt_for: 	XmPushButton {
		arguments {
			XmNfontList = variable;
			XmNlabelString = compound_string("Hunt For ..");
		};
		callbacks {
			XmNactivateCallback = procedure Place_Hunt();
		};
	};
!/****************************************************************************
!/*	Text Area - Define The actual Text area 
!/****************************************************************************
   object 
	ScrolledWin:	XmScrolledWindow {
		arguments {
			XmNx = 0;
			XmNy = 50;
			XmNscrollBarPlacement = XmBOTTOM_LEFT;
			XmNbackground = navy;
		};
		controls {
			XmText	Text_Area;
		};
	};

   object
	Text_Area:	XmText {
		arguments {
			XmNwidth = 600;
			XmNheight = 500;
                	XmNbackground =  forest_green;
                	XmNshadowThickness =  3;
                	XmNeditable =  false;
			XmNeditMode = XmMULTI_LINE_EDIT;
			XmNwordWrap = true;
            	};
	};

!/***************************************************************************/
!/* 	A prompt Dialog used to get Hunt information
!/***************************************************************************/

  object
	Hunt_info:	XmPromptDialog {
		arguments {
			XmNselectionLabelString = compound_string
					('Enter String to Hunt for:');
                	XmNbackground =  forest_green;
		};
		callbacks {
			XmNokCallback = procedure Hunt_String();
		};
	};

!/**************************************************************************/
!/*	A File Selection Box to be used to open a file for viewing       
!/**************************************************************************/

   object
	File_Open:	XmFileSelectionDialog {
		arguments {
			XmNbackground = forest_green;
			XmNautoUnmanage = true;
		};
		callbacks {
			XmNokCallback = procedure Get_File();
		};
	};


end module;
