Manual Pages for UNIX Darwin command on man place
MyWebUniversity

Manual Pages for UNIX Darwin command on man place

place(n) Tk Built-In Commands place(n)

NAME

place - Geometry manager for fixed or rubber-sheet placement

SYNOPSIS

ppllaaccee window option value ?option value ...? ppllaaccee ccoonnffiigguurree window ?option? ?value option value ...? ppllaaccee ffoorrggeett window ppllaaccee iinnffoo window ppllaaccee ssllaavveess window

DESCRIPTION

The placer is a geometry manager for Tk. It provides simple fixed

placement of windows, where you specify the exact size and location of

one window, called the slave, within another window, called the master.

The placer also provides rubber-sheet placement, where you specify the

size and location of the slave in terms of the dimensions of the mas-

ter, so that the slave changes size and location in response to changes

in the size of the master. Lastly, the placer allows you to mix these

styles of placement so that, for example, the slave has a fixed width

and height but is centered inside the master. ppllaaccee window option value ?option value ...?

Arrange for the placer to manage the geometry of a slave whose

pathName is window. The remaining arguments consist of one or

more option-value pairs that specify the way in which window's

geometry is managed. Option may have any of the values accepted by the ppllaaccee ccoonnffiigguurree command. ppllaaccee ccoonnffiigguurree window ?option? ?value option value ...?

Query or modify the geometry options of the slave given by win-

dow. If no option is specified, this command returns a list describing the available options (see TTkkCCoonnffiigguurreeIInnffoo for information on the format of this list). If option is specified with no value, then the command returns a list describing the

one named option (this list will be identical to the correspond-

ing sublist of the value returned if no option is specified).

If one or more option-value pairs are specified, then the com-

mand modifies the given option(s) to have the given value(s); in this case the command returns an empty string.

The following option-value pairs are supported:

-aanncchhoorr where

Where specifies which point of window is to be positioned

at the (x,y) location selected by the -xx, -yy, -rreellxx, and

-rreellyy options. The anchor point is in terms of the outer

area of window including its border, if any. Thus if

where is ssee then the lower-right corner of window's bor-

der will appear at the given (x,y) location in the mas-

ter. The anchor position defaults to nnww.

-bboorrddeerrmmooddee mode

Mode determines the degree to which borders within the

master are used in determining the placement of the

slave. The default and most common value is iinnssiiddee. In

this case the placer considers the area of the master to

be the innermost area of the master, inside any border:

an option of -xx 00 corresponds to an x-coordinate just

inside the border and an option of -rreellwwiiddtthh 11..00 means

window will fill the area inside the master's border.

If mode is oouuttssiiddee then the placer considers the area of

the master to include its border; this mode is typically used when placing window outside its master, as with the

options -xx 00 -yy 00 -aanncchhoorr nnee. Lastly, mode may be speci-

fied as iiggnnoorree, in which case borders are ignored: the area of the master is considered to be its official X area, which includes any internal border but no external

border. A bordermode of iiggnnoorree is probably not very use-

ful.

-hheeiigghhtt size

Size specifies the height for window in screen units (i.e. any of the forms accepted by TTkkGGeettPPiixxeellss). The height will be the outer dimension of window including its border, if any. If size is an empty string, or if no

-hheeiigghhtt or -rreellhheeiigghhtt option is specified, then the

height requested internally by the window will be used.

-iinn master

Master specifes the path name of the window relative to

which window is to be placed. Master must either be win-

dow's parent or a descendant of window's parent. In addition, master and window must both be descendants of

the same top-level window. These restrictions are neces-

sary to guarantee that window is visible whenever master

is visible. If this option isn't specified then the mas-

ter defaults to window's parent.

-rreellhheeiigghhtt size

Size specifies the height for window. In this case the

height is specified as a floating-point number relative

to the height of the master: 0.5 means window will be half as high as the master, 1.0 means window will have the same height as the master, and so on. If both

-hheeiigghhtt and -rreellhheeiigghhtt are specified for a slave, their

values are summed. For example, -rreellhheeiigghhtt 11..00 -hheeiigghhtt

-22 makes the slave 2 pixels shorter than the master.

-rreellwwiiddtthh size

Size specifies the width for window. In this case the

width is specified as a floating-point number relative to

the width of the master: 0.5 means window will be half as wide as the master, 1.0 means window will have the same

width as the master, and so on. If both -wwiiddtthh and -rreell-

wwiiddtthh are specified for a slave, their values are summed.

For example, -rreellwwiiddtthh 11..00 -wwiiddtthh 55 makes the slave 5

pixels wider than the master.

-rreellxx location

Location specifies the x-coordinate within the master

window of the anchor point for window. In this case the

location is specified in a relative fashion as a float-

ing-point number: 0.0 corresponds to the left edge of

the master and 1.0 corresponds to the right edge of the

master. Location need not be in the range 0.0-1.0. If

both -xx and -rreellxx are specified for a slave then their

values are summed. For example, -rreellxx 00..55 -xx -22 posi-

tions the left edge of the slave 2 pixels to the left of the center of its master.

-rreellyy location

Location specifies the y-coordinate within the master

window of the anchor point for window. In this case the

value is specified in a relative fashion as a floating-

point number: 0.0 corresponds to the top edge of the

master and 1.0 corresponds to the bottom edge of the mas-

ter. Location need not be in the range 0.0-1.0. If both

-yy and -rreellyy are specified for a slave then their values

are summed. For example, -rreellyy 00..55 -xx 33 positions the

top edge of the slave 3 pixels below the center of its master.

-wwiiddtthh size

Size specifies the width for window in screen units (i.e. any of the forms accepted by TTkkGGeettPPiixxeellss). The width will be the outer width of window including its border,

if any. If size is an empty string, or if no -wwiiddtthh or

-rreellwwiiddtthh option is specified, then the width requested

internally by the window will be used.

-xx location

Location specifies the x-coordinate within the master

window of the anchor point for window. The location is specified in screen units (i.e. any of the forms accepted by TTkkGGeettPPiixxeellss) and need not lie within the bounds of the master window.

-yy location

Location specifies the y-coordinate within the master

window of the anchor point for window. The location is specified in screen units (i.e. any of the forms accepted by TTkkGGeettPPiixxeellss) and need not lie within the bounds of the master window. If the same value is specified separately with two different

options, such as -xx and -rreellxx, then the most recent option is

used and the older one is ignored. ppllaaccee ffoorrggeett window

Causes the placer to stop managing the geometry of window. As a

side effect of this command window will be unmapped so that it doesn't appear on the screen. If window isn't currently managed

by the placer then the command has no effect. This command

returns an empty string. ppllaaccee iinnffoo window Returns a list giving the current configuration of window. The

list consists of option-value pairs in exactly the same form as

might be specified to the ppllaaccee ccoonnffiigguurree command. ppllaaccee ssllaavveess window Returns a list of all the slave windows for which window is the master. If there are no slaves for window then an empty string is returned. If the configuration of a window has been retrieved with ppllaaccee iinnffoo, that configuration can be restored later by first using ppllaaccee ffoorrggeett to erase any existing information for the window and then invoking ppllaaccee ccoonnffiigguurree with the saved information. FFIINNEE PPOOIINNTTSS It is not necessary for the master window to be the parent of the slave window. This feature is useful in at least two situations. First, for

complex window layouts it means you can create a hierarchy of subwin-

dows whose only purpose is to assist in the layout of the parent. The ``real children'' of the parent (i.e. the windows that are significant for the application's user interface) can be children of the parent yet

be placed inside the windows of the geometry-management hierarchy.

This means that the path names of the ``real children'' don't reflect

the geometry-management hierarchy and users can specify options for the

real children without being aware of the structure of the geometry-man-

agement hierarchy. A second reason for having a master different than the slave's parent

is to tie two siblings together. For example, the placer can be used

to force a window always to be positioned centered just below one of its siblings by specifying the configuration

-iinn sibling -rreellxx 00..55 -rreellyy 11..00 -aanncchhoorr nn -bboorrddeerrmmooddee oouuttssiiddee

Whenever the sibling is repositioned in the future, the slave will be repositioned as well.

Unlike many other geometry managers (such as the packer) the placer

does not make any attempt to manipulate the geometry of the master win-

dows or the parents of slave windows (i.e. it doesn't set their requested sizes). To control the sizes of these windows, make them windows like frames and canvases that provide configuration options for this purpose. KKEEYYWWOORRDDSS

geometry manager, height, location, master, place, rubber sheet, slave,

width

Tk place(n)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™