! $XConsortium: exm_in_uil.uil /main/4 1996/07/15 15:12:38 drk $
! @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

!
! exm_in_uil.uil - Exm widget demo application UIL file.
!

module exmdemo

objects = { XmPushButton = gadget; }

procedure
	ManageCb(string);
        LetsDanceCb();
	ExitCb();

value SimpleHelpCS :
        compound_string ("ExmSimple displays one oval or rectangle.");
      StringHelpCS :
        compound_string ("ExmString displays one compound string.");
      TransferHelpCS :
        compound_string ("ExmStringTransfer acts as ExmString,", separate = true) &
        compound_string ("except that the string inside an,", separate = true) & 
        compound_string ("ExmStringTransfer can be transferred", separate = true) & 
        compound_string ("via primary, clipboard, or drag and drop.", separate = true); 
      CommandHelpCS :
        compound_string ("ExmCommandButton displays a compound string.", separate = true) &
        compound_string ("This widget can serve as a button inside a dialog box."); 
      GridHelpCS :
        compound_string ("ExmGrid is a sample Manager widget.", separate = true) &
        compound_string ("In this application, ExmGrid manages", separate = true) &
        compound_string ("two ExmSimple widgets, two ExmString", separate = true) &
        compound_string ("widgets, two ExmStringTransfer", separate = true) &
        compound_string ("widgets, and one XmNotebook widget.",  separate = true);
      TabHelpCS :
        compound_string ("ExmTabButton displays a compound string.", separate = true) &
        compound_string ("It can affix itself to one side of a", separate = true) &
        compound_string ("(like an XmNotebook).", separate = true);
      PannerHelpCS :
        compound_string ("ExmPanner is a two-dimensional navigator.", separate = true) &
        compound_string ("widget.  To navigate with the ExmPanner: ", separate = true) &
        compound_string ("  1. Place the cursor over the rectangular slider. ", separate = true) &
        compound_string ("  2. Press <Btn1Down>. ", separate = true) &
        compound_string ("  3. Move the cursor around. As you do,", separate = true) &
        compound_string ("     the viewport will change.", separate = true) &
        compound_string ("  4. Press <Btn2Up> to stop navigating.", separate = true);
      MenuHelpCS :
        compound_string ("ExmMenuButton displays a compound string.", separate = true) &
        compound_string ("The widget can serve as a button inside", separate = true) &
        compound_string ("a menu.", separate = true);
      DanceCS :
        compound_string ("No, I want to", separate = true) & 
        compound_string ("dance instead", separate = true); 
      DanceHelpCS :
        compound_string ("Everybody dance now!");
     a_compound_string :
        compound_string("A multiline compound string", separate = true) &
        compound_string("in an", separate = true) &
        compound_string("ExmString widget", separate = true);
     transfer_cstring_1 :
        compound_string ("ExmStringTransfer 1");
     transfer_cstring_2 :
        compound_string ("ExmStringTransfer 2");
     tab_button_string  :
	compound_string ("Tab But");       

!***********************************************************************
object appMain : XmMainWindow {
    arguments {
	XmNmenuBar = XmMenuBar menuBar;
	XmNworkWindow = XmFrame workArea;
    };
    controls {
	XmMenuBar menuBar;
	XmFrame workArea;
	unmanaged XmInformationDialog SimpleHelpDialog;
	unmanaged XmInformationDialog StringHelpDialog;
	unmanaged XmInformationDialog TransferHelpDialog;
	unmanaged XmInformationDialog CommandHelpDialog;
	unmanaged XmInformationDialog TabHelpDialog;
	unmanaged XmInformationDialog PannerHelpDialog;
	unmanaged XmInformationDialog MenuHelpDialog;
	unmanaged XmInformationDialog GridHelpDialog;
        unmanaged XmInformationDialog DanceHelpDialog;
	unmanaged XmTemplateDialog ExitQueryDialog;
    };
    callbacks {
    };
};


!***********************************************************************
object menuBar : XmMenuBar {
    arguments 
       { XmNmenuHelpWidget = XmCascadeButton helpCascade; 
       };
    controls 
       { XmCascadeButton fileCascade;
         XmCascadeButton helpCascade;
       };
};

object fileCascade : XmCascadeButton {
    arguments 
       { XmNlabelString ="File"; 
         XmNmnemonic = keysym("F"); 
       };
    controls 
       { XmPulldownMenu 
            { controls 
                { ExmMenuButton exitButton;
                }; 
            }; 
       };
};

object exitButton : ExmMenuButton {
    arguments 
       { ExmNcompoundString = "Exit"; 
         XmNmnemonic = keysym("E"); 
       };
    callbacks 
       { XmNactivateCallback = procedure ManageCb("*ExitQueryDialog"); 
       };
};


!*************************************************************
! Design Help Pulldown 
!*************************************************************
object helpCascade : XmCascadeButton {
    arguments 
       { XmNlabelString ="Help"; 
         XmNmnemonic = keysym("H"); 
       };
    controls 
       { XmPulldownMenu 
           { controls 
               { ExmMenuButton SimpleHelpButton; 
                 ExmMenuButton StringHelpButton; 
                 ExmMenuButton TransferHelpButton; 
                 ExmMenuButton CommandHelpButton; 
                 ExmMenuButton TabHelpButton; 
                 ExmMenuButton PannerHelpButton; 
                 ExmMenuButton MenuHelpButton; 
                 ExmMenuButton GridHelpButton; 
               }; 
           }; 
       };
};

object SimpleHelpButton : ExmMenuButton {
    arguments 
	{ ExmNcompoundString = "ExmSimple";
	  XmNmnemonic = keysym("E"); 
	};
    callbacks 
	{ XmNactivateCallback = procedure ManageCb("*SimpleHelpDialog"); 
	};
};


object StringHelpButton : ExmMenuButton {
    arguments 
	{ ExmNcompoundString = "ExmString";
	  XmNmnemonic = keysym("S"); 
	};
    callbacks 
	{ XmNactivateCallback = procedure ManageCb("*StringHelpDialog"); 
	};
};


object TransferHelpButton : ExmMenuButton {
    arguments 
	{ ExmNcompoundString = "ExmStringTransfer";
	  XmNmnemonic = keysym("T"); 
	};
    callbacks 
	{ XmNactivateCallback = procedure ManageCb("*TransferHelpDialog"); 
	};
};


object CommandHelpButton : ExmMenuButton {
    arguments 
	{ ExmNcompoundString = "ExmCommand";
	  XmNmnemonic = keysym("C"); 
	};
    callbacks 
	{ XmNactivateCallback = procedure ManageCb("*CommandHelpDialog"); 
	};
};


object TabHelpButton : ExmMenuButton {
    arguments 
	{ ExmNcompoundString = "ExmTabButton";
	  XmNmnemonic = keysym("B"); 
	};
    callbacks 
	{ XmNactivateCallback = procedure ManageCb("*TabHelpDialog"); 
	};
};


object PannerHelpButton : ExmMenuButton {
    arguments 
	{ ExmNcompoundString = "ExmPanner";
	  XmNmnemonic = keysym("P"); 
	};
    callbacks 
	{ XmNactivateCallback = procedure ManageCb("*PannerHelpDialog"); 
	};
};


object MenuHelpButton : ExmMenuButton {
    arguments 
	{ ExmNcompoundString = "ExmMenuButton";
	  XmNmnemonic = keysym("M"); 
	};
    callbacks 
	{ XmNactivateCallback = procedure ManageCb("*MenuHelpDialog"); 
	};
};


object GridHelpButton : ExmMenuButton {
    arguments 
	{ ExmNcompoundString = "ExmGrid";
	  XmNmnemonic = keysym("G"); 
	};
    callbacks 
	{ XmNactivateCallback = procedure ManageCb("*GridHelpDialog"); 
	};
};



!***********************************************************************
! Help Callbacks.
!***********************************************************************
object SimpleHelpDialog : XmInformationDialog {
    arguments {
	XmNdialogTitle = "Help";
	XmNcancelLabelString = "Dismiss";
	XmNdefaultButtonType = XmDIALOG_CANCEL_BUTTON;
	XmNmessageString = SimpleHelpCS;
    };
    controls {
	Xm_OK unmanaged { };
	Xm_Help unmanaged { };
    };
};


object StringHelpDialog : XmInformationDialog {
    arguments {
	XmNdialogTitle = "Help";
	XmNcancelLabelString = "Dismiss";
	XmNdefaultButtonType = XmDIALOG_CANCEL_BUTTON;
	XmNmessageString = StringHelpCS;
    };
    controls {
	Xm_OK unmanaged { };
	Xm_Help unmanaged { };
    };
};


object TransferHelpDialog : XmInformationDialog {
    arguments {
	XmNdialogTitle = "Help";
	XmNcancelLabelString = "Dismiss";
	XmNdefaultButtonType = XmDIALOG_CANCEL_BUTTON;
	XmNmessageString = TransferHelpCS;
    };
    controls {
	Xm_OK unmanaged { };
	Xm_Help unmanaged { };
    };
};


object CommandHelpDialog : XmInformationDialog {
    arguments {
	XmNdialogTitle = "Help";
	XmNcancelLabelString = "Dismiss";
	XmNdefaultButtonType = XmDIALOG_CANCEL_BUTTON;
	XmNmessageString = CommandHelpCS;
    };
    controls {
	Xm_OK unmanaged { };
	Xm_Help unmanaged { };
    };
};


object TabHelpDialog : XmInformationDialog {
    arguments {
	XmNdialogTitle = "Help";
	XmNcancelLabelString = "Dismiss";
	XmNdefaultButtonType = XmDIALOG_CANCEL_BUTTON;
	XmNmessageString = TabHelpCS;
    };
    controls {
	Xm_OK unmanaged { };
	Xm_Help unmanaged { };
    };
};


object PannerHelpDialog : XmInformationDialog {
    arguments {
	XmNdialogTitle = "Help";
	XmNcancelLabelString = "Dismiss";
	XmNdefaultButtonType = XmDIALOG_CANCEL_BUTTON;
	XmNmessageString = PannerHelpCS;
    };
    controls {
	Xm_OK unmanaged { };
	Xm_Help unmanaged { };
    };
};


object MenuHelpDialog : XmInformationDialog {
    arguments {
	XmNdialogTitle = "Help";
	XmNcancelLabelString = "Dismiss";
	XmNdefaultButtonType = XmDIALOG_CANCEL_BUTTON;
	XmNmessageString = MenuHelpCS;
    };
    controls {
	Xm_OK unmanaged { };
	Xm_Help unmanaged { };
    };
};


object GridHelpDialog : XmInformationDialog {
    arguments {
	XmNdialogTitle = "Help";
	XmNcancelLabelString = "Dismiss";
	XmNdefaultButtonType = XmDIALOG_CANCEL_BUTTON;
	XmNmessageString = GridHelpCS;
    };
    controls {
	Xm_OK unmanaged { };
	Xm_Help unmanaged { };
    };
};


!***********************************************************************
! Exit Callback 
!***********************************************************************
object ExitQueryDialog : XmTemplateDialog {
    arguments {
	XmNdialogTitle = "Dialog";
	XmNmessageString = "Do you really want to quit?";
    };
    controls {
	ExmCommandButton YesCommand; 
	ExmCommandButton NoCommand;
	ExmCommandButton DanceCommand;
	ExmCommandButton HelpCommand;
    };
};

object YesCommand : ExmCommandButton {
    arguments { 
	ExmNcompoundString = "Yes"; 
	};
    callbacks {
        XmNactivateCallback = procedure ExitCb();
	};
};


object NoCommand : ExmCommandButton {
    arguments { 
	ExmNcompoundString = "No"; 
	};
};


object DanceCommand : ExmCommandButton {
    arguments { 
	ExmNcompoundString = DanceCS; 
	};
    callbacks {
        XmNactivateCallback = procedure ManageCb("*DanceHelpDialog"); 
	};
};


object HelpCommand : ExmCommandButton {
    arguments { 
	ExmNcompoundString = "Help"; 
	};
    callbacks {
	XmNactivateCallback = procedure ManageCb("*CommandHelpDialog"); 
	};
};


object DanceHelpDialog : XmInformationDialog {
    arguments {
	XmNdialogTitle = "Dance";
	XmNcancelLabelString = "Dismiss";
	XmNdefaultButtonType = XmDIALOG_CANCEL_BUTTON;
	XmNmessageString = DanceHelpCS;
    };
    controls {
	Xm_OK unmanaged { };
	Xm_Help unmanaged { };
    };
};

!***********************************************************************
object workArea : XmFrame {
    arguments {
	XmNmarginWidth = 10;
	XmNmarginHeight = 10;
	XmNshadowThickness = 3;
    };
    controls { XmFrame gridFrame; };
};

object gridFrame : XmFrame {
    arguments { };
    controls {
	ExmGrid grid;
    };
};


!***********************************************************************
object grid : ExmGrid {
    arguments {
	XmNrows =    2;
	XmNcolumns = 4;
    };
    controls {
	ExmSimple Simple1;
	ExmSimple Simple2;
	ExmString String1;
	ExmString String2;
	ExmStringTransfer StringTransfer1;
	ExmStringTransfer StringTransfer2;
	XmNotebook	Notebook1;
    };
};


object Simple1 : ExmSimple { 
};

object Simple2 : ExmSimple { 
    arguments {
	ExmNsimpleShape = ExmSHAPE_RECTANGLE;
	XmNunitType = Xm100TH_MILLIMETERS;
	XmNsensitive = false;
	XmNmarginWidth = 300;
	XmNmarginHeight = 2000;
        ExmNgridMarginHeightWithinCell = 200;
    };
};

object String1 : ExmString {
    arguments {
	ExmNcompoundString = a_compound_string; 
    };
};

object String2 : ExmString {
    arguments {
   	ExmNcompoundString = a_compound_string; 
	XmNalignment = XmALIGNMENT_BEGINNING;
    };
};

object StringTransfer1 : ExmStringTransfer { 
    arguments {
	ExmNcompoundString = transfer_cstring_1;
        XmNalignment = XmALIGNMENT_END;
    };
};

object StringTransfer2 : ExmStringTransfer {
    arguments {
	ExmNcompoundString = transfer_cstring_2;
    };
};

object Notebook1 : XmNotebook { 
    controls {
        ExmTabButton TabButton1;
    };
};

object TabButton1 : ExmTabButton { 
    arguments {
        ExmNcompoundString = tab_button_string;
    };
};

end module;
