panedwindow.n
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:11k
- '"
- '" Copyright (c) 1992 The Regents of the University of California.
- '" Copyright (c) 1994-1996 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: panedwindow.n,v 1.2.2.3 2004/12/20 10:03:17 dkf Exp $
- '"
- .so man.macros
- .TH panedwindow n 8.4 Tk "Tk Built-In Commands"
- .BS
- '" Note: do not modify the .SH NAME line immediately below!
- .SH NAME
- panedwindow - Create and manipulate panedwindow widgets
- .SH SYNOPSIS
- fBpanedwindowfR fIpathName fR?fIoptionsfR?
- .SO
- -background -height -width
- -borderwidth -orient
- -cursor -relief
- .SE
- .SH "WIDGET-SPECIFIC OPTIONS"
- .OP -handlepad handlePad HandlePad
- When sash handles are drawn, specifies the distance from the top or
- left end of the sash (depending on the orientation of the widget) at
- which to draw the handle. May be any value accepted by fBTk_GetPixelsfR.
- .OP -handlesize handleSize HandleSize
- Specifies the side length of a sash handle. Handles are always
- drawn as squares. May be any value accepted by fBTk_GetPixelsfR.
- .OP -opaqueresize opaqueResize OpaqueResize
- Specifies whether panes should be resized as a sash is moved (true),
- or if resizing should be deferred until the sash is placed (false).
- .OP -sashcursor sashCursor SashCursor
- Mouse cursor to use when over a sash. If null,
- fBsb_h_double_arrowfR will be used for horizontal panedwindows, and
- fBsb_v_double_arrowfR will be used for vertical panedwindows.
- .OP -sashpad sashPad SashPad
- Specifies the amount of padding to leave of each side of a sash. May
- be any value accepted by fBTk_GetPixelsfR.
- .OP -sashrelief sashRelief SashRelief
- Relief to use when drawing a sash. May be any of the standard Tk
- relief values.
- .OP -sashwidth sashWidth SashWidth
- Specifies the width of each sash. May be any value accepted by
- fBTk_GetPixelsfR.
- .OP -showhandle showHandle ShowHandle
- Specifies whether sash handles should be shown. May be any valid Tcl
- boolean value.
- .BE
- .SH DESCRIPTION
- .PP
- The fBpanedwindowfR command creates a new window (given by the
- fIpathNamefR argument) and makes it into a panedwindow widget.
- Additional options, described above, may be specified on the command
- line or in the option database to configure aspects of the panedwindow
- such as its default background color and relief. The
- fBpanedwindowfR command returns the path name of the new window.
- .PP
- A panedwindow widget contains any number of panes, arranged
- horizontally or vertically, according to the value of the
- fB-orientfR option. Each pane contains one widget, and each pair of
- panes is separated by a moveable (via mouse movements) sash. Moving a
- sash causes the widgets on either side of the sash to be resized.
- .SH "WIDGET COMMAND"
- .PP
- The fBpanedwindowfR command creates a new Tcl command whose name is
- the same as the path name of the panedwindow's window. This command
- may be used to invoke various operations on the widget. It has the
- following general form:
- .CS
- fIpathName option fR?fIarg arg ...fR?
- .CE
- fIPathNamefR is the name of the command, which is the same as
- the panedwindow widget's path name. fIOptionfR and the fIargfRs
- determine the exact behavior of the command. The following
- commands are possible for panedwindow widgets:
- .TP
- fIpathName fBadd fIwindow ?window ...? ?option value ...?fR
- Add one or more windows to the panedwindow, each in a separate pane.
- The arguments consist of the names of one or more windows
- followed by pairs of arguments that specify how to manage the windows.
- fIOptionfR may have any of the values accepted by the
- fBconfigurefR subcommand.
- .TP
- fIpathName fBcget fIoptionfR
- Returns the current value of the configuration option given by
- fIoptionfR. fIOptionfR may have any of the values accepted by the
- fBpanedwindowfR command.
- .TP
- fIpathName fBconfigure fI?option? ?value option value ...?fR
- Query or modify the configuration options of the widget. If no
- fIoptionfR is specified, returns a list describing all of the
- available options for fIpathNamefR (see fBTk_ConfigureInfofR for
- information on the format of this list). If fIoptionfR is specified
- with no fIvaluefR, then the command returns a list describing the
- one named option (this list will be identical to the corresponding
- sublist of the value returned if no fIoptionfR is specified). If
- one or more fIoption-valuefR pairs are specified, then the command
- modifies the given widget option(s) to have the given value(s); in
- this case the command returns an empty string. fIOptionfR may have
- any of the values accepted by the fBpanedwindowfR command.
- .TP
- fIpathName fBforget fIwindow ?window ...?fR
- Remove the pane containing fIwindowfR from the panedwindow. All
- geometry management options for fIwindowfR will be forgotten.
- .TP
- fIpathName fBidentify fIx yfR
- Identify the panedwindow component underneath the point given by
- fIxfR and fIyfR, in window coordinates. If the point is over a
- sash or a sash handle, the result is a two element list containing the
- index of the sash or handle, and a word indicating whether it is over
- a sash or a handle, such as {0 sash} or {2 handle}. If the point is
- over any other part of the panedwindow, the result is an empty list.
- .TP
- fIpathName fBproxy fI?args?fR
- This command is used to query and change the position of the sash
- proxy, used for rubberband-style pane resizing. It can take any of
- the following forms:
- .RS
- .TP
- fIpathName fBproxy coordfR
- Return a list containing the x and y coordinates of the most recent
- proxy location.
- .TP
- fIpathName fBproxy forgetfR
- Remove the proxy from the display.
- .TP
- fIpathName fBproxy place fIx yfR
- Place the proxy at the given fIxfR and fIyfR coordinates.
- .RE
- .TP
- fIpathName fBsash fI?args?fR
- This command is used to query and change the position of sashes in the
- panedwindow. It can take any of the following forms:
- .RS
- .TP
- fIpathName fBsash coord fIindexfR
- Return the current x and y coordinate pair for the sash given by
- fIindexfR. fIIndexfR must be an integer between 0 and 1 less than
- the number of panes in the panedwindow. The coordinates given are
- those of the top left corner of the region containing the sash.
- .TP
- fIpathName fBsash dragto fIindex x yfR
- This command computes the difference between the given coordinates and the
- coordinates given to the last fBsash markfR command for the given
- sash. It then moves that sash the computed difference. The return
- value is the empty string.
- .TP
- fIpathName fBsash mark fIindex x yfR
- Records fIxfR and fIyfR for the sash given by fIindexfR; used in
- conjunction with later fBsash dragtofR commands to move the sash.
- .TP
- fIpathName fBsash place fIindex x yfR
- Place the sash given by fIindexfR at the given coordinates.
- .RE
- .TP
- fIpathName fBpanecget fIwindow optionfR
- Query a management option for fIwindowfR. fIOptionfR may be any
- value allowed by the fBpaneconfigurefR subcommand.
- .TP
- fIpathName fBpaneconfigure fIwindow ?option? ?value option value ...?fR
- Query or modify the management options for fIwindowfR. If no
- fIoptionfR is specified, returns a list describing all of the
- available options for fIpathNamefR (see fBTk_ConfigureInfofR for
- information on the format of this list). If fIoptionfR is specified
- with no fIvaluefR, then the command returns a list describing the
- one named option (this list will be identical to the corresponding
- sublist of the value returned if no fIoptionfR is specified). If
- one or more fIoption-valuefR pairs are specified, then the command
- modifies the given widget option(s) to have the given value(s); in
- this case the command returns an empty string. The following options
- are supported:
- .RS
- .TP
- fB-after fIwindowfR
- Insert the window after the window specified. fIwindowfR should be the
- name of a window already managed by fIpathNamefR.
- .TP
- fB-before fIwindowfR
- Insert the window before the window specified. fIwindowfR should be
- the name of a window already managed by fIpathNamefR.
- .TP
- fB-height fIsizefR
- Specify a height for the window. The height will be the outer
- dimension of the window including its border, if any. If fIsizefR
- is an empty string, or if fB-heightfR is not specified, then the
- height requested internally by the window will be used initially; the
- height may later be adjusted by the movement of sashes in the
- panedwindow. fISizefR may be any value accepted by fBTk_GetPixelsfR.
- .TP
- fB-minsize fInfR
- Specifies that the size of the window cannot be made less than
- fInfR. This constraint only affects the size of the widget in the
- paned dimension -- the x dimension for horizontal panedwindows, the y
- dimension for vertical panedwindows. May be any value accepted by
- fBTk_GetPixelsfR.
- .TP
- fB-padx fInfR
- Specifies a non-negative value indicating how much extra space to
- leave on each side of the window in the X-direction. The value may
- have any of the forms accepted by fBTk_GetPixelsfR.
- .TP
- fB-pady fInfR
- Specifies a non-negative value indicating how much extra space to
- leave on each side of the window in the Y-direction. The value may
- have any of the forms accepted by fBTk_GetPixelsfR.
- .TP
- fB-sticky fIstylefR
- If a window's pane is larger than the requested dimensions of the
- window, this option may be used to position (or stretch) the window
- within its pane. fIStylefR is a string that contains zero or more
- of the characters fBnfP, fBsfP, fBefP or fBwfP. The string
- can optionally contains spaces or commas, but they are ignored. Each
- letter refers to a side (north, south, east, or west) that the window
- will "stick" to. If both fBnfP and fBsfP (or fBefP and fBwfP)
- are specified, the window will be stretched to fill the entire height
- (or width) of its cavity.
- .TP
- fB-width fIsizefR
- Specify a width for the window. The width will be the outer
- dimension of the window including its border, if any. If fIsizefR
- is an empty string, or if fB-widthfR is not specified, then the
- width requested internally by the window will be used initially; the
- width may later be adjusted by the movement of sashes in the
- panedwindow. fISizefR may be any value accepted by fBTk_GetPixelsfR.
- .RE
- .TP
- fIpathName fBpanesfR
- Returns an ordered list of the widgets managed by fIpathNamefR.
- .SH "RESIZING PANES"
- A pane is resized by grabbing the sash (or sash handle if present) and
- dragging with the mouse. This is accomplished via mouse motion
- bindings on the widget. When a sash is moved, the sizes of the panes
- on each side of the sash, and thus the widgets in those panes, are
- adjusted.
- .PP
- When a pane is resized from outside (e.g. it is packed to expand and
- fill, and the containing toplevel is resized), space is added to the final
- (rightmost or bottommost) pane in the window.
- .SH KEYWORDS
- panedwindow, widget, geometry management