• Aucun résultat trouvé

Turbo Pascal windows

Dans le document Turbo Pasca~ (Page 22-25)

You can increase the number of windows that can potentially be opened by increasing the heap size

using the Startup option(Options I

Environment).

Key(s) Menu item Function

F1 Help I Contents Opens a context-sensitive

help screen

F1 F1 Help I Help on Help Brings up Help on Help. (Just press F1 when you're already in the help system.)

Shift-F1 Help I Index Brings up Help index A/t-F1 Help I Previous Topic Displays previous Help

screen

etr/-F1 Help I Topic Search Calls up language-specific help in Editor only

Key(s) Menu item Function

AIt-F9 Compile I Compile Compiles last file in editor etrl-F2 Run I Program Reset Resets running program etr/-F4 Debug I Evaluate/Modify Evaluates an expression etr/-F? Debug I Add Watch Adds a watch expression Girl-FB Debug I Toggle Breakpoint Sets or clears conditional

breakpoint

FB Run I Step Over Executes skipping procedure

calls

F9 Compile I Make Makes (compiles/links)

program

Most of what you see and do in the IDE happens in a window. A window is a screen area that you can move, resize, zoom, tile, overlap, close, and open.

You can have any number of windows open in Turbo Pascal (memory and heap space allowing), but only one window can be active at any time. The active window is the one that you're cur-rently working in. Any command you choose or text you type generally applies only to the active window. There are several types of windows, but most have these things in common:

• a title bar

• a close box

• scroll bars

• a resize comer

Figure 1.1 A typical window

.azoom box

• a window number

Turbo Pascal makes it easy to spot the active window by placing a double-lined border around it. The active window always has a close box, a zoom box, scroll bars, and a resize corner. If your windows are overlapping, the active window is always the one on top of all the others (the frontmost one).

The Edit window also displays the current line and column numbers in the lower left corner. If you've modified your file, an asterisk (*) will appear to the left of the column and line numbers.

This is what a typical window looks like:

Cl ick the

~to

quickly close the window.

The lDIliIlmi contains

the name of the window.

The mEiiImE! contains an icon you click to either enl arge or shrink the window.

I I

T T T

[ 1 ] = = = = = = = Window Title

======:

-[tll.~".

Each open wi ndow

:::i;l!Jn~,'~gi?;n ~

Use a ~ to scroll the contents of a window

T g

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::C::::::::::::::::::::::::::::::::::::::::::::::::::::E:::::::::::::::::::::::::::::::::!p

.a.

Drag the '14iM-Manyi to make the window larger or smaller

The close box of a window is the box in the upper left corner. You click this box to quickly close the window. (Or choose Window I Close or press Alt-F3.) The Help window is considered temporary;

you can close it by pressing Esc.

Shortcut: Double-click the title bar of a window to zoom or restore it.

Scroll bars let both mouse and keyboard users see how far into the file they've gone.

iw..

The title bar, the topmost horizontal bar of a window, contains the name of the window and the window number. Double-clicking the title bar zooms the window (and vice versa). You can also drag the title bar to move the window around.

Each of the windows you open in Turbo Pascal have a window number in the upper right border. Alt-O (zero) gives you a list of all windows you have open. You can make a window active

(bringing it to the top of the heap) by pressing Alt in combination with the window number. For example, if the Help window is #5 but has gotten buried under the other windows, Alt-5 brings it to the front.

The zoom box of a window appears in the upper right corner. If the icon in that corner is an up arrow (t), you can click the arrow to enlarge the window to the largest size possible. If the icon is a doubleheaded arrow (*), the window is already at its maximum size. In that case, clicking it returns the window to its previous size. To zoom a window from the keyboard, choose Window I Zoom, or press F5.

Scroll bars are horizontal or vertical bars that look like this:

g ...

III ...

C ... , ... , ..

,1111111,." ••••••••••••••••••• ".,11.1111, . . . . 11 . . . 11 ''''IIIIII''''''~

. . . 11 . . . ,11 . . . 11 . . . 111 . . . ,111 . . . 111 .. IIIUIi

••• ,1, •••••••••• , ••••••••• 111111 . . . ,11 ••• I .,11 . . . 11 •••••••••••••••••••••••••• ,11 . . . ,1 . . . .

You use these bars with a mouse to scroll the contents of the window. Click the arrow at either end to scroll one line at a time.

(Keep the mouse button pressed to scroll continuously.) You can click the shaded area to either side of the scroll box to scroll a page at a time. Finally, you can drag the scroll box to any spot on the bar to quickly move to a spot in the window relative to the position of the scroll box.

The resize box is in the lower right corner of a window. You drag any corner to make the window larger or smaller. You can spot the resize corner by its single-line border instead of the double-line border used in the rest of the window. To resize using the keyboard, choose Size/Move from the Window menu, or press Ctrl-F5.

Window management Table 1.7 gives you a quick rundown of how to handle windows in Turbo Pascal. Note that you don't need a mouse to perform these actions-a keyboard works just fine.

Table 1.7

Manipulating windows To accomplish this: Use one of these methods

Dans le document Turbo Pasca~ (Page 22-25)