0122-0123.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 320 行

HTML
320
字号
<HTML>



<HEAD>

<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=01 //-->

<!-- PAGES=0001-0736 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="0119-0121.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0124-0125.html">Next</A></CENTER></P>







<A NAME="PAGENUM-122"><P>Page 122</P></A>





<TABLE>



<TR><TD>

Dump Widget Tree to a File

</TD><TD>

When documenting applications it is often useful to be able to dump the entire

application widget tree to an ASCII file. This file can then be included in the manual page. When

this menu item is selected, a pop-up dialog is activated. Type the name of the file in this

dialog, and either select Okay, or type a carriage-return.

editres will dump the widget tree to this file. To cancel the file dialog, select the Cancel button.

</TD></TR><TR><TD>

Show Resource Box

</TD><TD>

This command will pop up a resource box for the current application. This resource

box (described in detail later in this section) will allow the user to see exactly which

resources can be set for the widget that is currently selected in the widget tree display. Only

one widget may be currently selected; if greater or fewer are selected,

editres will refuse to pop up the resource box and put an error message in the Message Area.

</TD></TR><TR><TD>

Set Resource

</TD><TD>

This command will pop up a simple dialog box for setting an arbitrary resource on

all selected widgets. You must type in the resource name, as well as the value. You can use

the Tab key to switch between the resource name field and the resource value field.

</TD></TR><TR><TD>

Quit

</TD><TD>

Exits editres.

</TD></TR></TABLE>





<P><B>

TREE COMMANDS

</B></P>





<P>The Tree menu contains several commands that enable operations to be performed on the widget tree.</P>





<TABLE>



<TR><TD>

Select Widget in Client

</TD><TD>

This menu item allows you to select any widget in the application;

editres will then highlight the corresponding element the widget tree display. After this menu item

is selected, the pointer cursor will again turn to a crosshair, and you must click any

pointer button in the widget you wish to have displayed. Since some widgets are fully obscured

by their children, it is not possible to get to every widget this way, but this mechanism

does give very useful feedback between the elements in the widget tree and those in the

actual application.

</TD></TR><TR><TD>

Select All, Unselect All,Invert All

</TD><TD>

These functions allow the user to select, unselect, or invert all widgets in the widget tree.

</TD></TR><TR><TD>

Select Children,

Select Parents

</TD><TD>

These functions select the immediate parent or children of each of the currently selected

widgets.

</TD></TR><TR><TD>

Select Descendants,

Select Ancestors

</TD><TD>

These functions select all parents or children of each of the currently selected widgets. This

is a recursive search.

</TD></TR><TR><TD>

Show Widget Names,

Show Class Names,

Show Widget Windows

</TD><TD>

When the tree widget is initially displayed, the labels of each widget in the tree correspond

to the widget names. These functions will cause the label of all widgets in the tree to be

changed to show the class name, IDs, or window associated with each widget in

the application. The widget IDs, and windows are shown as hex numbers.

</TD></TR><TR><TD>

</TD><TD>

In addition, there are keyboard accelerators for each of the Tree operations. If the

input focus is over an individual widget in the tree, then that operation will only affect

that widget. If the input focus is in the Tree background, it will have exactly the same effect

as the corresponding menu item.

</TD></TR><TR><TD>

</TD><TD>

The translation entries shown may be applied to any widget in the application. If

that widget is a child of the Tree widget, then it will only affect

that widget; otherwise, it will have the same effect as the commands in the Tree menu.

</TD></TR><TR><TD>

Flash Active Widgets

</TD><TD>

This command is the inverse of the Select Widget in Client command; it will show the

user each widget that is currently selected in the widget tree by flashing the corresponding

widget in the application numFlashes (three by default) times in the

flash-Color.

</TD></TR></TABLE>





<TABLE>



<TR><TD>

Key

</TD><TD>

Option

</TD><TD>

Translation Entry

</TD></TR><TR><TD>

space

</TD><TD>

Unselect

</TD><TD>

Select(nothing)

</TD></TR><TR><TD>

w

</TD><TD>

Select

</TD><TD>

Select(widget)

</TD></TR><TR><TD>

s

</TD><TD>

Select

</TD><TD>

Select(all)

</TD></TR><TR><TD>

i

</TD><TD>

Invert

</TD><TD>

Select(invert)

</TD></TR></TABLE>



<A NAME="PAGENUM-123"><P>Page 123</P></A>





<TABLE>



<TR><TD>

Key

</TD><TD>

Option

</TD><TD>

Translation Entry

</TD></TR><TR><TD>

c

</TD><TD>

Select

</TD><TD>

Children Select(children)

</TD></TR><TR><TD>

d

</TD><TD>

Select Descendants

</TD><TD>

Select(descendants)

</TD></TR><TR><TD>

p

</TD><TD>

Select Parent

</TD><TD>

Select(parent)

</TD></TR><TR><TD>

a

</TD><TD>

Select Ancestors

</TD><TD>

Select(ancestors)

</TD></TR><TR><TD>

N

</TD><TD>

Show Widget Names

</TD><TD>

Relabel(name)

</TD></TR><TR><TD>

C

</TD><TD>

Show Class Names

</TD><TD>

Relabel(class)

</TD></TR><TR><TD>

I

</TD><TD>

Show Widget IDs

</TD><TD>

Relabel(id)

</TD></TR><TR><TD>

W

</TD><TD>

Show Widget Windows

</TD><TD>

Relabel(window)

</TD></TR><TR><TD>

T

</TD><TD>

Toggle Widget/Class Name

</TD><TD>

Relabel(toggle)

</TD></TR></TABLE>



<P>Clicking button 1 on a widget adds it to the set of selected widgets. Clicking button 2 on a widget deselects all other

widgets and then selects just that widget. Clicking button 3 on a widget toggles its label between the widget's instance name

the widget's class name.

</P>



<P><B>

USING THE RESOURCE BOX

</B></P>



<P>The resource box contains five different areas. Each of the areas, as they appear on the screen from top to bottom,

are discussed in the following list:

</P>





<TABLE>



<TR><TD>

The Resource Line

</TD><TD>

This area at the top of the resource box shows the current resource name exactly as

it would appear if you were to save it to a file or apply it.

</TD></TR><TR><TD>

The Widget Names and Classes

</TD><TD>

This area enables you to select exactly which widgets this resource will apply to.

The area contains four lines; the first contains the name of the selected widget and all

its ancestors, and the more restrictive dot (.) separator. The second line contains

less specific class names of each widget, as well as the less restrictive star

(*) separator. The third line contains a set of special buttons called Any Widget that will

generalize this level to match any widget. The last line contains a set of special buttons

called Any Widget Chain that will turn the single level into something that matches zero

or more levels.

</TD></TR><TR><TD>

</TD><TD>

The initial state of this area is the most restrictive, using the resource names and

the dot separator. By selecting the other buttons in this area, you can ease the

restrictions to allow more and more widgets to match the specification. The extreme case is

to select all the Any Widget Chain buttons, which will match every widget in

the application. As you select different buttons, the tree display will update to show

you exactly which widgets will be affected by the current resource specification.

</TD></TR><TR><TD>

Normal and Constraint Resources

</TD><TD>

The next area allows you to select the name of the normal or constraint

resources you wish to set. Some widgets may not have constraint resources, so that area

will not appear.

</TD></TR><TR><TD>

Resource Value

</TD><TD>

This next area allows you to enter the resource value. This value should be

entered exactly as you would type a line into your resource file. Thus, it should contain

no unescaped newlines. There are a few special character sequences for this file:

</TD></TR><TR><TD>

</TD><TD>

\n-     This will be replaced with a newline.

</TD></TR><TR><TD>

</TD><TD>

\###-     Where # is any octal digit. This will be replaced with a

single byte that contains this sequence interpreted as an

octal number. For example, a value containing a

NULL byte can be stored by specifying \000.

</TD></TR><TR><TD>

</TD><TD>

\&lt;new-line&gt;-     This will compress to nothing.

</TD></TR><TR><TD>

</TD><TD>

\\-     This will compress to a single backslash.

</TD></TR></TABLE>







<P><CENTER>

<a href="0119-0121.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0124-0125.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?