/* $XConsortium: README /main/3 1996/07/15 14:04:13 drk $ */ This demo is pretty much the "more" program Motif-ied and internationalized. You can view files in your language ! This demo only works if your Operating System supports setlocale() and Xlib supports the same locale as your OS. The program MUST be executed through the sh script "xmfile" This script is a Korn Shell script currently running on ULTRIX 4.1 or ULTRIX 4.2 HPUX 8.05 OSF1.0.4 You may have to do some work for running on your OS and your shell. Steps to follow: 1) Check your Operating System Reference Manual for supported locales (usually "man setlocale") to know your locale names. 2) Edit the xmfile script. The script contains association between languages and locales names For example if you want to run in French, and the name of the french locale on your system is FROG_REDMEAT then 1) make sure that the variable $sysname contains the name of your OS 2) add a case in the case statement for french under your OS that sets the LANG variable LANG=FROG_REDMEAT 3) The UID files are searched in the directory named with the language name. 4) If you want to add a new language add a case branch for the language. create a directory of that name. Go into this directory. Create adequate X resource files and uil files. compile the uil file 5) Come back to the xmfile directory Execute "xmfile language". where "language" is one the arguments listed in the script : french, english, german. Of course you may only view files in the specified language If you execute "xmfile" with no argument, the default language is French. ========================================== After the program has started: Allow a user to view files in separate windows. There is one top level shell created per file opened. The first top level shell created (application shell) is called the Primary shell. Others are Secondary. Each top level shell is parent of a Main Window, the work area of which is a PanedWindow. The menu bar has entries File for opening/closing file, exiting View for controlling the panes in the pane window The File menu contains commands Open, and Exit or Close In the primary shell, Exit exits the client In the secondaries, Close closes the shell The Open menu: On selecting Open/File in the menu bar, a file selection box is mapped to choose the file. If OpenFile is successful, close first the current file opened, destroy all existing panes, and display the new file. Close: this entry only exists on the secondary windows. It destroys the top level shell and closes the file. Exit: this entry only exists on the primary shell closes the file and the shell. The View menu: New Pane: Creates a new pane in the paned window Delete Pane: delete the current pane. Search: pops a dialogue box for searching text in the file On the OK callback of the dialogue box search the string. if found show in current pane else pop up dialogue box again.