Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/ftp/documents/system-docs/vms-guide/html/VUG_40.html
Дата изменения: Wed Nov 1 17:38:25 1995 Дата индексирования: Sun Dec 23 18:30:30 2007 Кодировка: Поисковые слова: neptune |
Manipulating Windows
Input Focus
If you have more than one window on the screen, Motif needs to know in which window typed text is displayed. Making a window active is called giving it input focus. This brings the window in front of all other windows, see Figure 6.4. Only one window can have input focus. There are two ways to set input focus:
Figure 6.4: Input Focus
Moving and Resizing Windows
To move a window to another part of the screen:
To change the size of a window:
Selecting and Copying Text
Text can be selected and copied to another location in a window or to another window. You can move a character, word or any amount of consecutive text by using the mouse pointer. First you must select the text to be copied. The different text objects that can be selected are listed in Table 6.2.
Table 6.2: Text Selection Methods
Now that the text has been selected, you can copy it to one or more locations:
Using the Window Manager
The Window Manager (see Figure 6.5) provides a menu that lets you control the placement and size of windows and icons. (An icon is a small graphic representation of an application.) To access this menu, position the mouse pointer over an unoccupied space on the screen (workspace) and click and hold the left mouse button. The menu allows you to customize many window features. The features that can be modified using the Window Manager Workspace menu are described in Table 6.3.
To permanently save any changes you have made, pull down the Session Manager Options menu and choose the "Save the Session Manager" menu item. You will see the effects of your changes at the next login.
Generated with CERN WebMaker
Figure 6.5: Window Elements
Table 6.3: Window Manager Workspace Menu Items
Changing Input Focus
You would change the input focus method by selecting the "Workspace" item under the Options menu from the Window Manager's Workspace menu. The dialog box that appears displays the current settings marked by the shaded check boxes. The input focus options appear in a box under the first statement: "To make a window active". Make your choice and click on the [OK] button when you are finished. The Window Manager needs to be restarted if you want to see the change. One way is to select "Restart.." from the Window Manager's Workspace menu. Since you have modified the Window Manager, the Restart dialog box will ask you if you want to save these new current settings. Click on the [Yes] button and wait. The Window Manger will restart, retaining all existing windows. During this process you will notice the mouse pointer becomes a small clock. This generally indicates an application must complete some action before you can proceed. In this case the Window Manager must complete the restart process before you can continue. Changing Colors
You can change colors for all areas of the screen using the Window Manager. Figure 6.6 shows the names used for each area.
Changing text, foreground, background, etc. to all the same color makes it impossible to view the screen.
Figure 6.6: Color Areas
Automatic Startup
When you login, some applications are started automatically, saving you some time and typing. You define which applications are automatically started. To do this, choose the "Automatic Startup..." menu item from the Options menu in the Session Manager. The Automatic Startup dialog box displays two lists:
To move an application from one list to another, click on that application name. You may sometimes want multiple copies of the same application running in different windows; simply click on it more than once.
Do not remove Window Manager from your Automatic Startup or you will not be able to manipulate any of your windows.
Click on the [OK] button to save the changes. Use the [Cancel] button to make no changes and dismiss the dialog box. Window Positioning at Startup
Instead of having your DECterm windows started automatically ("Automatic Startup" on page 112) and then having to reposition the windows where you want them, you can create windows at a specific place on the screen. To do this, you use a command procedure called DECW$LOGIN.COM
which Motif executes at login. Figure 6.7 shows an example of this file. The command procedure must be located in your default directory. This file tends to run faster and allows better control over DECterm titles than does the autostart method. This method allows you to specify titles, icon names, position on the screen, and many other options (type HELP
CREATE/TERMINAL
for more information). You can also start other applications from this command procedure.
$! DECW$LOGIN.COM - Create some DECterms and other applications here rather
$! than via Auto-Start.
$!
$! Note: This is only supported for VMS V5.3 or greater.
$!
$! version = f$getsyi ("VERSION")
$! if version .lts. "V5.3 "
$! then
$! write sys$output "DECW$LOGIN.COM exiting; need VMS V5.3 or higher."
$! exit
$! endif
$
$ username = f$edit(f$getjpi(0,"USERNAME"),"COLLAPSE")
$!
$! Get the node name for use in the window titles
$!
$ nodnam = f$getsyi("NODENAME")
$ if nodnam .eqs. "" then nodnam = f$trnlnm("SYS$NODE") - "_" - "::"
$!
$! Create some DECterms
$!
$ create/terminal/detach -
/window=( title="''nodnam'1", -
icon_name="''nodnam'1", -
initial_state=window, -
x_position=350, -
y_position=0, -
rows=48, columns=80 -
)
$!
$! Create an iconized DECterm
$!
$ create/terminal/detach -
/window=( title="''nodnam'2", -
icon_name="''nodnam'2", -
initial_state=icon, -
x_position=5, -
y_position=225, -
rows=48, columns=80 -
)
$!
$! Create an iconized DECterm
$!
$ create/terminal/detach -
/window=( title="''nodnam'3", -
icon_name="''nodnam'3", -
initial_state=icon, -
x_position=350, -
y_position=225, -
rows=48, columns=80 -
)
$!
$! Start the clock
$!
$ spawn/nolog/nowait/input=nl:/process='username'_CAL -
run sys$system:decw$CALENDAR.exe
$!
$! Start the bookreader
$!
$ spawn/nolog/nowait/input=nl:/process='username'_BOOK -
run sys$system:decw$bookreader.exe
$!
$ exit
Figure 6.7: DECW$LOGIN.COM Example