# Windows Stuff

Explains the user interface of the Windows version. Most of it will also apply to the Unix version, however.

- with an overview about the interface,
- the usage of the clipboard,
- the internal and external editors,
- and the graphics exports.

## Overview

The Windows version of Euler uses two windows, the text window and the graphics window. Though the new Linux version is very similar, the following description specifies on the Windows compilation.

### Text Window

The text window contains the menu and a big text area. In the text area, you will find

- your input in red,
- Euler output in black,
- comments in green.

You can enter the input with the keyboard like in any other program. See the general section about the basics for more details. Here is just an overview.

backspace | deletes the character before the cursor
delete | deletes the character after the cursor
cursor left, right | move the cursor in the edit line
shift left, right | move the cursor one word
home | moves the cursor to the start of the line
end | moves the cursor to the end of the line
return | executes the current line
cursor up, down | moves the cursor to the previous or next line
shift up, down | recalls a previous command
escape | clears the line
alt del | removes the line
alt insert | inserts an empty line
tab | switches to the graphics screen
shift F1, F2, ... | calls macro F1, F2, ...
page up, down | scrolls through the Euler notebook

You can use also the mouse to position the cursor.

The Euler output is produced by an Euler command and cannot be edited. However, there is a menu option to remove output from the notebook.

Each command line can have a comment. To create or edit a comment press F5 or use the menu. An editor window will pop up, and you can enter the comment. The editor automatically breaks lines. To start a new paragraph, press return. Paragraphs will be separated by empty lines in the text window.

It is possible to edit a saved notebook with any editor. Comments are marked by "%" and input lines have a ">".

### Graphics Window

The graphics window displays the graphics output of Euler. It is resizable. Once you resize it, the graphics are automatically adjusted to the new window size. It is probably best to keep the window such that it is almost square. If you want to make sure, your graphics is square, draw a circle with the following commands:

    >reset(); keepsquare(1);
    >t=linspace(0,2*pi,500);
    >xplot(sin(t),cos(t));
    >keepsquare(0);

Euler will remember the sizes of both windows.

To switch to the graphics window and back to the text window, use the tab key.

The graphics window and the text window can only be minimized together.

## Clipboard

Euler uses the clipboard to paste and copy text, and to copy graphics.

To mark a text drag the mouse over the text, holding the left mouse button down. You can then copy the marked text to the clipboard with Ctrl-C or with the menu. This can be used to copy Euler output to other programs.

You can also copy just the commands. This is useful to make an executable Euler file, which runs the commands.

You can also use the clipboard to copy and paste. Euler will paste the text to the current cursor position, making a command of each line.

Moreover, you can copy the graphics as WMF (windows metafile) to the clipboard. Many Windows programs can paste this graphics format.

## Internal and External Editor

These editors are used to develop Euler functions or to edit long input. You can use the very simple internal editor, or any external editor of your choice.

Of course, you can also start the editor separately from the Euler program, and load the edited files with the "load" command to test it. With many editors, you can even call Euler from the editor and have give it the program file name as a parameter.

### Internal Editor

The internal editor edits a temporary file named "$$$$.e" by default. It will however create that file on first use, unless you load an old version of this temporary file. You can load any file into the editor. The editor will remember the name of your file and load it on subsequent calls. You can also save the file to a different file name.

The button "Interpret" will load the current file as Euler input. The current command line is replaced by the proper "load" command for that purpose.

If you leave the internal editor with "OK", your changes will be saved, but the file will not be loaded.

### External Editor

The external editor works a bit differently.

First of all, you should setup the editor of your choice with the corresponding menu entry. You provide

- the name of the editor,
- additional parameters
- the file to be edited.

By default, the Windows notepad is used. For an example, I use my Java editor JE, which is called via the Java runtime. The command name is thus "wjview" (the MS Java runtime) and the parameters are "/cp \je\je.jar edit" for the classpath and the startup class.

The file name will not be changed, even if you load a new file in the editor. Euler has no way of knowing about that. Instead, the current file name of the internal editor is used. So you can either load your file once into the internal editor, or enter the file name in the editor setup.

## Graphics Export

The Windows version of Euler can export graphics as

- bitmaps,
- metafiles,
- postscript.

The bitmaps may be in the size of the current graphics window, or any other size. You can also choose the color depth for the graphics.

The metafiles can be copied to the clipboard or saved to a file.

Postscript output is enhanced postscript, saved to a file.