! 
! Motif
!
! Copyright (c) 1987-2012, The Open Group. All rights reserved.
!
! These libraries and programs are free software; you can
! redistribute them and/or modify them under the terms of the GNU
! Lesser General Public License as published by the Free Software
! Foundation; either version 2 of the License, or (at your option)
! any later version.
!
! These libraries and programs are distributed in the hope that
! they will be useful, but WITHOUT ANY WARRANTY; without even the
! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
! PURPOSE. See the GNU Lesser General Public License for more
! details.
!
! You should have received a copy of the GNU Lesser General Public
! License along with these librararies and programs; if not, write
! to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
! Floor, Boston, MA 02110-1301 USA
! 
! 
! 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;
