diff options
author | dgp <dgp@users.sourceforge.net> | 2007-11-01 16:37:09 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-11-01 16:37:09 (GMT) |
commit | 0241933d2fcf1a09145b33048c52e40988a8bfa9 (patch) | |
tree | cee00028b46ebd747b575cdf9398299f2c8393c8 | |
parent | 08a5977be6d47dbe4b3fa1bac892353f66dd2990 (diff) | |
download | tk-0241933d2fcf1a09145b33048c52e40988a8bfa9.zip tk-0241933d2fcf1a09145b33048c52e40988a8bfa9.tar.gz tk-0241933d2fcf1a09145b33048c52e40988a8bfa9.tar.bz2 |
merge updates from HEAD
165 files changed, 3026 insertions, 2375 deletions
@@ -1,3 +1,147 @@ +2007-11-01 Donal K. Fellows <donal.k.fellows@man.ac.uk> + + * doc/colors.n: Added list of Windows system colors. [Bug 945409] + +2007-11-01 Daniel Steffen <das@users.sourceforge.net> + + * macosx/tkMacOSXColor.c (GetThemeColor): improve translation of RGB + pixel values into RGBColor. + + * library/demos/widget: increase height of main window text widget to + use more of the available vertical space. + + * doc/bind.n: document the Option modifier, clarify meaning + and availability of Command & Option. + + * doc/console.n: clarify availability of [console] in TkAqua. + +2007-11-01 Donal K. Fellows <donal.k.fellows@man.ac.uk> + + * unix/installManPage, doc/*.n: Make documentation use the name that + scripts use as much as possible. [Bug 1640073] + + * doc/text.n: Fixed mistake in [$t tag remove] docs. [Bug 1792191] + + * doc/bind.n: Documented the Command modifier. [Bug 1232908] + + * doc/console.n, doc/wish.1: Made it clearer when and why the console + command is present. [Bug 1386955] + +2007-10-31 Donal K. Fellows <donal.k.fellows@manchester.ac.uk> + + * library/demos/entry3.tcl: Improved description/comments so that + people better understand what is being validated, following suggestion + from Don Porter. + + * library/demos/image2.tcl (loadImage): Mark non-loadable images + as such instead of throwing a nasty dialog, following suggestion + from Don Porter. + + * generic/tkImgPhoto.c (Tk_PhotoPutBlock): More optimization, derived + from [Patch 224066]. + +2007-10-30 Joe English <jenglish@users.sourceforge.net> + + * library/ttk/combobox.tcl (Unpost): BUGFIX: Unpost can be called with + no preceding Post. + +2007-10-31 Pat Thoyts <patthoyts@users.sourceforge.net> + + * win/rules.vc: Use -fp:strict with msvc8 as -fp:precise fails on + * generic/tkObj.c: amd64 builds. Fix the two places in Tk that + * generic/tkTrig.c: generate errors with msvc8 when using this flag. + +2007-10-30 Jeff Hobbs <jeffh@ActiveState.com> + + * library/choosedir.tcl: only enable OK button when valid in + conjunction with -mustexist. [Bug 1550528] + + * library/listbox.tcl (::tk::ListboxBeginSelect): ignore -takefocus + when considering focus on <1>, it is for tab focus. + +2007-10-30 Don Porter <dgp@users.sourceforge.net> + + * generic/tk.h: Bump version number to 8.5b2.1 to distinguish + * library/tk.tcl: CVS development snapshots from the 8.5b2 + * unix/configure.in: release. + * unix/tk.spec: + * win/configure.in: + + * unix/configure: autoconf (2.59) + * win/configure: + +2007-10-30 Jeff Hobbs <jeffh@ActiveState.com> + + * doc/text.n: fix spelling of -inactiveselectbackground [Bug 1626415] + + * library/entry.tcl: don't error with Clear event. [Bug 1509288] + + * library/ttk/fonts.tcl: use size -12 TkFixedFont (was -10) on X11 + +2007-10-30 Donal K. Fellows <donal.k.fellows@manchester.ac.uk> + + * library/demos/unicodeout.tcl: Fixed Arabic and Hebrew rendering on + Windows. [Bug 1803723] + + * generic/tkImgPhoto.c (ImgPhotoCmd): Rename enumeration for somewhat + simpler-to-read code. [Bug 1677613] + +2007-10-30 Joe English <jenglish@users.sourceforge.net> + + * generic/ttk/ttkWidget.c: Split up RedisplayWidget() to factor out + double-buffering related code. + + * macosx/ttkMacOSXAquaTheme.c: Use SetThemeBackGround/ + kThemeBrushModelessDialogBackground{Active|Inactive} instead of + ApplyThemeBackground/kThemeBackgroundWindowHeader (advice from DAS). + + * library/ttk/aquaTheme.tcl: Use darker shade for inactive and + disabled text, to match typical values of most + kThemeXXXTextColorInactive values. + +2007-10-30 Donal K. Fellows <donal.k.fellows@man.ac.uk> + + * doc/selection.n: Clarify UTF8_STRING handling. [Bug 1778563] + + * doc/text.n: Clarify search subccommand docs. [Bug 1622919] + +2007-10-29 Jeff Hobbs <jeffh@ActiveState.com> + + * macosx/tkMacOSXFont.c (InitSystemFonts): + * library/ttk/fonts.tcl: use Monaco 11 (was 9) as Aqua TkFixedFont + + * tests/listbox.test, tests/panedwindow.test, tests/scrollbar.test: + * library/bgerror.tcl, library/dialog.tcl, library/listbox.tcl: + * library/msgbox.tcl, library/optMenu.tcl, library/tclIndex: + * library/tkfbox.tcl, library/demos/floor.tcl, library/demos/rmt: + * library/demos/tcolor, library/demos/text.tcl: + * library/demos/twind.tcl, library/demos/widget: Buh-bye Motif look + * library/ttk/fonts.tcl: Update of Tk default look in 8.5 + * macosx/tkMacOSXDefault.h: Trims border sizes, cleaner X11 look + * unix/tkUnixDefault.h: with minor modifications for Win32/Aqua. + * win/tkWinDefault.h: Uses Tk*Font definitions throughout for + * win/tkWinFont.c: classic widgets. [Bug #1820344] + * library/obsolete.tcl (::tk::classic::restore): This restores + changes made to defaults in 8.5 using the 'option' command, + segmented into logical groups. + + * tests/winfo.test: winfo-4.5 raise .t to above . for Windows + + * tests/unixWm.test: note TIP#142 results and remove unnecessary + catches. + +2007-10-29 Donal K. Fellows <donal.k.fellows@man.ac.uk> + + * doc/*.1, doc/*.n, doc/*.3: Lots more GOOBE work. + +2007-10-28 Joe English <jenglish@users.sourceforge.net> + + * library/ttk/combobox.tcl: Make popdown window [wm resizable 0 0] on + OSX, to prevent TkAqua from shrinking the scrollbar to make room for a + grow box that isn't there. + * macosx/ttkMacOSXTheme.c, library/ttk/aquaTheme.tcl: Reworked + combobox layout. + 2007-10-26 Don Porter <dgp@users.sourceforge.net> *** 8.5b2 TAGGED FOR RELEASE *** @@ -20,8 +164,9 @@ 2007-10-26 Daniel Steffen <das@users.sourceforge.net> - * macosx/tkMacOSXWm.c (ApplyMasterOverrideChanges): fix window class of - transient toplevels that are not also overrideredirect. [Bug 1816252] + * macosx/tkMacOSXWm.c (ApplyMasterOverrideChanges): fix window class + of transient toplevels that are not also overrideredirect. [Bug + 1816252] * macosx/tkMacOSXDialog.c: TIP#242 cleanup. * library/demos/filebox.tcl: demo TIP#242 -typevariable. @@ -48,7 +193,7 @@ 2007-10-24 Joe English <jenglish@users.sourceforge.net> * generic/ttk/*.c, win/{ttkWinMonitor,ttkWinTheme,ttkWinXPTheme}.c, - macosx/ttkMacOSXTheme.c: Move widget layout registration + * macosx/ttkMacOSXTheme.c: Move widget layout registration from TtkElements_Init() to widget *_Init() routines. Renaming/consistency: s/...ElementGeometry()/...ElementSize()/ diff --git a/doc/3DBorder.3 b/doc/3DBorder.3 index 88829f2..08dce07 100644 --- a/doc/3DBorder.3 +++ b/doc/3DBorder.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: 3DBorder.3,v 1.7 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: 3DBorder.3,v 1.7.2.1 2007/11/01 16:37:10 dgp Exp $ '\" .so man.macros .TH Tk_Alloc3DBorderFromObj 3 8.1 Tk "Tk Library Procedures" @@ -100,7 +100,7 @@ for \fBTk_Fill3DRectangle\fR). .AP XPoint *pointPtr in Pointer to array of points describing the set of vertices in a polygon. The polygon need not be closed (it will be closed automatically if it -isn't). +is not). .AP int numPoints in Number of points at \fI*pointPtr\fR. .AP int polyBorderWidth in @@ -168,7 +168,7 @@ prevents \fBTk_Get3DBorder\fR from caching the return value, so .PP \fBTk_Get3DBorderFromObj\fR returns the token for an existing border, given the window and color name used to create the border. -\fBTk_Get3DBorderFromObj\fR doesn't actually create the border; it must +\fBTk_Get3DBorderFromObj\fR does not actually create the border; it must already have been created with a previous call to \fBTk_Alloc3DBorderFromObj\fR or \fBTk_Get3DBorder\fR. The return value is cached in \fIobjPtr\fR, which speeds up @@ -238,7 +238,9 @@ Each procedure takes \fIx\fR, \fIy\fR, \fIwidth\fR, and \fIheight\fR arguments that describe the rectangular area of the beveled edge (e.g., \fIwidth\fR is the border width for \fBTk_3DVerticalBevel\fR). The \fIleftBorder\fR and \fItopBorder\fR arguments indicate the -position of the border relative to the ``inside'' of the object, and +position of the border relative to the +.QW inside +of the object, and \fIrelief\fR indicates the relief of the inside of the object relative to the outside. \fBTk_3DVerticalBevel\fR just draws a rectangular region. diff --git a/doc/CanvTkwin.3 b/doc/CanvTkwin.3 index efa9125..84e7a96 100644 --- a/doc/CanvTkwin.3 +++ b/doc/CanvTkwin.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CanvTkwin.3,v 1.5 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: CanvTkwin.3,v 1.5.2.1 2007/11/01 16:37:10 dgp Exp $ '\" .so man.macros .TH Tk_CanvasTkwin 3 4.1 Tk "Tk Library Procedures" @@ -140,7 +140,7 @@ modified using image commands. .PP \fBTk_CanvasTagsParseProc\fR and \fBTk_CanvasTagsPrintProc\fR are procedures that handle the \fB\-tags\fR option for canvas items. -The code of a canvas type manager won't call these procedures +The code of a canvas type manager will not call these procedures directly, but will use their addresses to create a \fBTk_CustomOption\fR structure for the \fB\-tags\fR option. The code typically looks like this: diff --git a/doc/CanvTxtInfo.3 b/doc/CanvTxtInfo.3 index 10fee39..168d1a4 100644 --- a/doc/CanvTxtInfo.3 +++ b/doc/CanvTxtInfo.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CanvTxtInfo.3,v 1.3 2004/09/19 16:05:36 dkf Exp $ +'\" RCS: @(#) $Id: CanvTxtInfo.3,v 1.3.2.1 2007/11/01 16:37:11 dgp Exp $ '\" .so man.macros .TH Tk_CanvasTextInfo 3 4.0 Tk "Tk Library Procedures" @@ -58,7 +58,7 @@ selected text, in pixels. \fIselFgColorPtr\fR points to an XColor that describes the foreground color to be used when drawing selected text. \fIselItemPtr\fR points to the item that is currently selected, or -NULL if there is no item selected or if the canvas doesn't have the +NULL if there is no item selected or if the canvas does not have the selection. \fIselectFirst\fR and \fIselectLast\fR give the indices of the first and last selected characters in \fIselItemPtr\fR, as returned by the diff --git a/doc/ConfigWidg.3 b/doc/ConfigWidg.3 index 4a1bcda..7ec2038 100644 --- a/doc/ConfigWidg.3 +++ b/doc/ConfigWidg.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ConfigWidg.3,v 1.16 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: ConfigWidg.3,v 1.16.2.1 2007/11/01 16:37:11 dgp Exp $ '\" .so man.macros .TH Tk_ConfigureWidget 3 4.1 Tk "Tk Library Procedures" @@ -118,9 +118,12 @@ The \fItype\fR field indicates what type of configuration option this is (e.g. \fBTK_CONFIG_COLOR\fR for a color value, or \fBTK_CONFIG_INT\fR for an integer value). The \fItype\fR field indicates how to use the value of the option (more on this below). -The \fIargvName\fR field is a string such as ``\-font'' or ``\-bg'', +The \fIargvName\fR field is a string such as +.QW \-font +or +.QW \-bg , which is compared with the values in \fIargv\fR (if \fIargvName\fR is -NULL it means this is a grouped entry; see GROUPED ENTRIES below). The +NULL it means this is a grouped entry; see \fBGROUPED ENTRIES\fR below). The \fIdbName\fR and \fIdbClass\fR fields are used to look up a value for this option in the option database. The \fIdefValue\fR field specifies a default value for this configuration option if no @@ -162,7 +165,8 @@ of each \fIspecs\fR entry indicates where in \fIwidgRec\fR to store the information about this configuration option. You should use the \fBTk_Offset\fR macro to generate \fIoffset\fR values (see below for a description of \fBTk_Offset\fR). The location indicated by -\fIwidgRec\fR and \fIoffset\fR will be referred to as the ``target'' +\fIwidgRec\fR and \fIoffset\fR will be referred to as the +.QW target in the descriptions below. .PP The \fItype\fR field of each entry in \fIspecs\fR determines what @@ -181,7 +185,7 @@ If \fBTK_CONFIG_NULL_OK\fR is specified in \fIspecFlags\fR then the value may be an empty string, in which case the target and \fItkwin\fR's active cursor will be set to \fBNone\fR. If the previous value of the target -wasn't \fBNone\fR, then it is freed by passing it to \fBTk_FreeCursor\fR. +was not \fBNone\fR, then it is freed by passing it to \fBTk_FreeCursor\fR. .TP \fBTK_CONFIG_ANCHOR\fR The value must be an ASCII string identifying an anchor point in one of the ways @@ -197,14 +201,24 @@ is stored in the target. If \fBTK_CONFIG_NULL_OK\fR is specified in \fIspecFlags\fR then the value may be an empty string, in which case the target is set to \fBNone\fR. If the previous value of the target -wasn't \fBNone\fR, then it is freed by passing it to \fBTk_FreeBitmap\fR. +was not \fBNone\fR, then it is freed by passing it to \fBTk_FreeBitmap\fR. .TP \fBTK_CONFIG_BOOLEAN\fR The value must be an ASCII string specifying a boolean value. Any -of the values ``true'', ``yes'', ``on'', or ``1'', +of the values +.QW true , +.QW yes , +.QW on , +or +.QW 1 , or an abbreviation of one of these values, means true; -any of the values ``false'', ``no'', ``off'', or ``0'', or an abbreviation of -one of these values, means false. +any of the values +.QW false , +.QW no , +.QW off , +or +.QW 0 , +or an abbreviation of one of these values, means false. The target is expected to be an integer; for true values it will be set to 1 and for false values it will be set to 0. .TP @@ -216,7 +230,7 @@ is stored in the target. If \fBTK_CONFIG_NULL_OK\fR is specified in \fIspecFlags\fR then the value may be an empty string, in which case the target will be set to NULL. If the previous value of the target -wasn't NULL, then it is freed by passing it to \fBTk_Free3DBorder\fR. +was not NULL, then it is freed by passing it to \fBTk_Free3DBorder\fR. .TP \fBTK_CONFIG_CAP_STYLE\fR The value must be @@ -234,7 +248,7 @@ is stored in the target. If \fBTK_CONFIG_NULL_OK\fR is specified in \fIspecFlags\fR then the value may be an empty string, in which case the target will be set to \fBNone\fR. If the previous value of the target -wasn't NULL, then it is freed by passing it to \fBTk_FreeColor\fR. +was not NULL, then it is freed by passing it to \fBTk_FreeColor\fR. .TP \fBTK_CONFIG_CURSOR\fR This option is identical to \fBTK_CONFIG_ACTIVE_CURSOR\fR except @@ -265,12 +279,15 @@ is stored in the target. If \fBTK_CONFIG_NULL_OK\fR is specified in \fIspecFlags\fR then the value may be an empty string, in which case the target will be set to NULL. If the previous value of the target -wasn't NULL, then it is freed by passing it to \fBTk_FreeFont\fR. +was not NULL, then it is freed by passing it to \fBTk_FreeFont\fR. .TP \fBTK_CONFIG_INT\fR The value must be an ASCII integer string -in the format accepted by \fBstrtol\fR (e.g. ``0'' -and ``0x'' prefixes may be used to specify octal or hexadecimal +in the format accepted by \fBstrtol\fR (e.g. +.QW 0 +and +.QW 0x +prefixes may be used to specify octal or hexadecimal numbers, respectively). The string is converted to an integer value and the integer is stored in the target. .TP @@ -314,19 +331,22 @@ of the value is made by allocating memory space with space. A pointer to the new string is stored in the target. If \fBTK_CONFIG_NULL_OK\fR is specified in \fIspecFlags\fR then the value may be an empty string, in which case the target will be set to NULL. -If the previous value of the target wasn't NULL, then it is +If the previous value of the target was not NULL, then it is freed by passing it to \fBTcl_Free\fR. .TP \fBTK_CONFIG_SYNONYM\fR This \fItype\fR value identifies special entries in \fIspecs\fR that are synonyms for other entries. If an \fIargv\fR value matches the -\fIargvName\fR of a \fBTK_CONFIG_SYNONYM\fR entry, the entry isn't used +\fIargvName\fR of a \fBTK_CONFIG_SYNONYM\fR entry, the entry is not used directly. Instead, \fBTk_ConfigureWidget\fR searches \fIspecs\fR for another entry whose \fIargvName\fR is the same as the \fIdbName\fR field in the \fBTK_CONFIG_SYNONYM\fR entry; this new entry is used just as if its \fIargvName\fR had matched the \fIargv\fR value. The synonym mechanism allows multiple \fIargv\fR values to be used for -a single configuration option, such as ``\-background'' and ``\-bg''. +a single configuration option, such as +.QW \-background +and +.QW \-bg . .TP \fBTK_CONFIG_UID\fR The value is translated to a \fBTk_Uid\fR @@ -369,8 +389,8 @@ First, if the \fIflags\fR argument to \fBTk_ConfigureWidget\fR has the \fBTK_CONFIG_ARGV_ONLY\fR bit set (i.e., \fIflags\fR | \fBTK_CONFIG_ARGV_ONLY\fR != 0), then the option database and \fIdefValue\fR fields are not used. In this case, if an entry in -\fIspecs\fR doesn't match a field in \fIargv\fR then nothing happens: -the corresponding target isn't modified. This feature is useful +\fIspecs\fR does not match a field in \fIargv\fR then nothing happens: +the corresponding target is not modified. This feature is useful when the goal is to modify certain configuration options while leaving others in their current state, such as when a \fBconfigure\fR widget command is being processed. @@ -399,7 +419,7 @@ on the type of the target. This flag is typically used to allow a feature to be turned off entirely, e.g. set a cursor value to \fBNone\fR so that a window simply inherits its parent's cursor. -If this bit isn't set then empty strings are processed as strings, +If this bit is not set then empty strings are processed as strings, which generally results in an error. .TP \fBTK_CONFIG_DONT_SET_DEFAULT\fR @@ -520,7 +540,7 @@ to release all of the resources associated with configuration options. It scans through \fIspecs\fR and for each entry corresponding to a resource that must be explicitly freed (e.g. those with type \fBTK_CONFIG_COLOR\fR), it frees the resource in the widget record. -If the field in the widget record doesn't refer to a resource (e.g. +If the field in the widget record does not refer to a resource (e.g. it contains a null pointer) then no resource is freed for that entry. After freeing a resource, \fBTk_FreeOptions\fR sets the diff --git a/doc/ConfigWind.3 b/doc/ConfigWind.3 index c9f0089..3dfc98c 100644 --- a/doc/ConfigWind.3 +++ b/doc/ConfigWind.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ConfigWind.3,v 1.2 1998/09/14 18:22:46 stanton Exp $ +'\" RCS: @(#) $Id: ConfigWind.3,v 1.2.32.1 2007/11/01 16:37:11 dgp Exp $ '\" .so man.macros .TH Tk_ConfigureWindow 3 4.0 Tk "Tk Library Procedures" @@ -81,7 +81,6 @@ New cursor to use for \fItkwin\fR. If \fBNone\fR is specified, then \fItkwin\fR will not have its own cursor; it will use the cursor of its parent. .BE - .SH DESCRIPTION .PP These procedures are analogous to the X library procedures @@ -127,9 +126,8 @@ To change the stacking order, use the procedure \fBTk_RestackWindow\fR. The procedure \fBTk_SetWindowColormap\fR will automatically add \fItkwin\fR to the \fBTK_COLORMAP_WINDOWS\fR property of its nearest top-level ancestor if the new colormap is different from -that of \fItkwin\fR's parent and \fItkwin\fR isn't already in +that of \fItkwin\fR's parent and \fItkwin\fR is not already in the \fBTK_COLORMAP_WINDOWS\fR property. - .SH BUGS .PP \fBTk_SetWindowBackgroundPixmap\fR and \fBTk_SetWindowBorderPixmap\fR @@ -145,9 +143,7 @@ and \fIpixmap\fR has been passed to the X server. A similar problem occurs for the \fIcursor\fR argument passed to \fBTk_DefineCursor\fR. The solution is the same as for pixmaps above: call \fBTk_MakeWindowExist\fR before freeing the cursor. - .SH "SEE ALSO" Tk_MoveToplevelWindow, Tk_RestackWindow - .SH KEYWORDS attributes, border, color, configure, height, pixel, pixmap, width, window, x, y diff --git a/doc/CrtCmHdlr.3 b/doc/CrtCmHdlr.3 index 7c050ec..8aedee0 100644 --- a/doc/CrtCmHdlr.3 +++ b/doc/CrtCmHdlr.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtCmHdlr.3,v 1.2 2004/09/19 16:05:36 dkf Exp $ +'\" RCS: @(#) $Id: CrtCmHdlr.3,v 1.2.2.1 2007/11/01 16:37:11 dgp Exp $ '\" .so man.macros .TH Tk_CreateClientMessageHandler 3 "8.4" Tk "Tk Library Procedures" @@ -27,7 +27,7 @@ Procedure to invoke whenever a ClientMessage X event occurs on any display. .PP \fBTk_CreateClientMessageHandler\fR arranges for \fIproc\fR to be invoked -in the future whenever a ClientMessage X event occurs that isn't handled by +in the future whenever a ClientMessage X event occurs that is not handled by \fBWM_PROTOCOL\fR. \fBTk_CreateClientMessageHandler\fR is intended for use by applications which need to watch X ClientMessage events, such as drag and drop applications. @@ -49,7 +49,7 @@ The \fItkwin\fR parameter to \fIproc\fR is the Tk window which is associated with this event. \fIEventPtr\fR is a pointer to the X event. .PP Whenever an X ClientMessage event is processed by \fBTk_HandleEvent\fR, -the \fIproc\fR is called if it wasn't handled as a \fBWM_PROTOCOL\fR. +the \fIproc\fR is called if it was not handled as a \fBWM_PROTOCOL\fR. The return value from \fIproc\fR is normally 0. A non-zero return value indicates that the event is not to be handled further; that is, \fIproc\fR has done all processing that is to be diff --git a/doc/CrtErrHdlr.3 b/doc/CrtErrHdlr.3 index 3cf7ba1..33ad976 100644 --- a/doc/CrtErrHdlr.3 +++ b/doc/CrtErrHdlr.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtErrHdlr.3,v 1.3 2004/09/19 16:05:36 dkf Exp $ +'\" RCS: @(#) $Id: CrtErrHdlr.3,v 1.3.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_CreateErrorHandler 3 "" Tk "Tk Library Procedures" @@ -26,13 +26,13 @@ Tk_ErrorHandler Display whose errors are to be handled. .AP int error in Match only error events with this value in the \fIerror_code\fR -field. If -1, then match any \fIerror_code\fR value. +field. If \-1, then match any \fIerror_code\fR value. .AP int request in Match only error events with this value in the \fIrequest_code\fR -field. If -1, then match any \fIrequest_code\fR value. +field. If \-1, then match any \fIrequest_code\fR value. .AP int minor in Match only error events with this value in the \fIminor_code\fR -field. If -1, then match any \fIminor_code\fR value. +field. If \-1, then match any \fIminor_code\fR value. .AP Tk_ErrorProc *proc in Procedure to invoke whenever an error event is received for \fIdisplay\fR and matches \fIerror\fR, \fIrequest\fR, and \fIminor\fR. @@ -43,14 +43,13 @@ Arbitrary one-word value to pass to \fIproc\fR. Token for error handler to delete (return value from a previous call to \fBTk_CreateErrorHandler\fR). .BE - .SH DESCRIPTION .PP \fBTk_CreateErrorHandler\fR arranges for a particular procedure (\fIproc\fR) to be called whenever certain protocol errors occur on a particular display (\fIdisplay\fR). Protocol errors occur when the X protocol is used incorrectly, such as attempting to map a window -that doesn't exist. See the Xlib documentation for \fBXSetErrorHandler\fR +that does not exist. See the Xlib documentation for \fBXSetErrorHandler\fR for more information on the kinds of errors that can occur. For \fIproc\fR to be invoked to handle a particular error, five things must occur: @@ -58,15 +57,15 @@ to handle a particular error, five things must occur: The error must pertain to \fIdisplay\fR. .IP [2] Either the \fIerror\fR argument to \fBTk_CreateErrorHandler\fR -must have been -1, or the \fIerror\fR argument must match +must have been \-1, or the \fIerror\fR argument must match the \fIerror_code\fR field from the error event. .IP [3] Either the \fIrequest\fR argument to \fBTk_CreateErrorHandler\fR -must have been -1, or the \fIrequest\fR argument must match +must have been \-1, or the \fIrequest\fR argument must match the \fIrequest_code\fR field from the error event. .IP [4] Either the \fIminor\fR argument to \fBTk_CreateErrorHandler\fR -must have been -1, or the \fIminor\fR argument must match +must have been \-1, or the \fIminor\fR argument must match the \fIminor_code\fR field from the error event. .IP [5] The protocol request to which the error pertains must have been @@ -98,14 +97,13 @@ If more than more than one handler matches a particular error, then they are invoked in turn. The handlers will be invoked in reverse order of creation: most recently declared handler first. If any handler returns 0, then subsequent (older) handlers will -not be invoked. If no handler returns 0, then Tk invokes X'es +not be invoked. If no handler returns 0, then Tk invokes X's default error handler, which prints an error message and aborts the program. If you wish to have a default handler that deals with errors that no other handler can deal with, then declare it first. .PP -The X documentation states that ``the error handler should not call -any functions (directly or indirectly) on the display that will -generate protocol requests or that will look for input events.'' +The X documentation states that +.QW "the error handler should not call any functions (directly or indirectly) on the display that will generate protocol requests or that will look for input events." This restriction applies to handlers declared by \fBTk_CreateErrorHandler\fR; disobey it at your own risk. .PP diff --git a/doc/CrtItemType.3 b/doc/CrtItemType.3 index 0922e5a..f556828 100644 --- a/doc/CrtItemType.3 +++ b/doc/CrtItemType.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtItemType.3,v 1.10 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: CrtItemType.3,v 1.10.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_CreateItemType 3 4.0 Tk "Tk Library Procedures" @@ -24,7 +24,6 @@ Tk_ItemType * .AP Tk_ItemType *typePtr in Structure that defines the new type of canvas item. .BE - .SH INTRODUCTION .PP \fBTk_CreateItemType\fR is invoked to define a new kind of canvas item @@ -54,7 +53,6 @@ for an existing type and modify it for the new type. Tk provides a number of utility procedures for the use of canvas type managers, such as \fBTk_CanvasCoords\fR and \fBTk_CanvasPsColor\fR; these are described in separate manual entries. - .SH "DATA STRUCTURES" .PP A type manager consists of a collection of procedures that provide a @@ -154,8 +152,7 @@ A Tk_Canvas handle is typically passed in to the procedures of a type manager, and the type manager can pass the handle back to library procedures such as Tk_CanvasTkwin to fetch information about the canvas. - -.SH NAME +.SS NAME .PP This section and the ones that follow describe each of the fields in a Tk_ItemType structure in detail. @@ -165,8 +162,7 @@ in \fBcreate\fR widget commands to create items of the new type. If there already existed an item type by this name then the new item type replaces the old one. - -.SH ITEMSIZE +.SS ITEMSIZE \fItypePtr->itemSize\fR gives the size in bytes of item records of this type, including the Tk_Item header. Tk uses this size to allocate memory space for items of the type. @@ -174,8 +170,7 @@ All of the item records for a given type must have the same size. If variable length fields are needed for an item (such as a list of points for a polygon), the type manager can allocate a separate object of variable length and keep a pointer to it in the item record. - -.SH CREATEPROC +.SS CREATEPROC .PP \fItypePtr->createProc\fR points to a procedure for Tk to call whenever a new item of this type is created. @@ -214,8 +209,7 @@ If an error occurs Tk will free the item record, so \fIcreateProc\fR must be sure to leave the item record in a clean state if it returns an error (e.g., it must free any additional memory that it allocated for the item). - -.SH CONFIGSPECS +.SS CONFIGSPECS .PP Each type manager must provide a standard table describing its configuration options, in a form suitable for use with @@ -229,8 +223,7 @@ for this type. Note: Tk provides a custom option type \fBtk_CanvasTagsOption\fR for implementing the \fB\-tags\fR option; see an existing type manager for an example of how to use it in \fIconfigSpecs\fR. - -.SH CONFIGPROC +.SS CONFIGPROC .PP \fItypePtr->configProc\fR is called by Tk whenever the \fBitemconfigure\fR widget command is invoked to change the @@ -265,8 +258,7 @@ procedure will usually invoke \fIconfigProc\fR with different flag values. leaves an error message in \fIinterp->result\fR if an error occurs. It must update the item's bounding box to reflect the new configuration options. - -.SH COORDPROC +.SS COORDPROC .PP \fItypePtr->coordProc\fR is invoked by Tk to implement the \fBcoords\fR widget command for an item. @@ -295,8 +287,7 @@ box in the item's header), and return a standard Tcl completion code. If an error occurs, \fIcoordProc\fR must leave an error message in \fIinterp->result\fR. - -.SH DELETEPROC +.SS DELETEPROC .PP \fItypePtr->deleteProc\fR is invoked by Tk to delete an item and free any resources allocated to it. @@ -314,8 +305,7 @@ the canvas. so that Tk can free the item record. \fIdeleteProc\fR should not actually free the item record; this will be done by Tk when \fIdeleteProc\fR returns. - -.SH "DISPLAYPROC AND ALWAYSREDRAW" +.SS "DISPLAYPROC AND ALWAYSREDRAW" .PP \fItypePtr->displayProc\fR is invoked by Tk to redraw an item on the screen. @@ -354,12 +344,11 @@ Normally an item's \fIdisplayProc\fR is only invoked if the item overlaps the area being displayed. However, if \fItypePtr->alwaysRedraw\fR has a non-zero value, then \fIdisplayProc\fR is invoked during every redisplay operation, -even if the item doesn't overlap the area of redisplay. +even if the item does not overlap the area of redisplay. \fIalwaysRedraw\fR should normally be set to 0; it is only set to 1 in special cases such as window items that need to be unmapped when they are off-screen. - -.SH POINTPROC +.SS POINTPROC .PP \fItypePtr->pointProc\fR is invoked by Tk to find out how close a given point is to a canvas item. @@ -378,8 +367,7 @@ the x and y coordinates of a point. \fIpointProc\fR must return a real value giving the distance from the point to the item, or 0 if the point lies inside the item. - -.SH AREAPROC +.SS AREAPROC .PP \fItypePtr->areaProc\fR is invoked by Tk to find out the relationship between an item and a rectangular area. @@ -398,8 +386,7 @@ coordinates of the lower right corner. \fIareaProc\fR must return \-1 if the item lies entirely outside the given area, 0 if it lies partially inside and partially outside the area, and 1 if it lies entirely inside the area. - -.SH POSTSCRIPTPROC +.SS POSTSCRIPTPROC .PP \fItypePtr->postscriptProc\fR is invoked by Tk to generate Postscript for an item during the \fBpostscript\fR widget command. @@ -449,8 +436,7 @@ during the first pass; the type manager can use \fIprepass\fR to skip all Postscript generation except for calls to \fBTk_CanvasPsFont\fR. During the second pass \fIprepass\fR will be 0, so the type manager must generate complete Postscript. - -.SH SCALEPROC +.SS SCALEPROC \fItypePtr->scaleProc\fR is invoked by Tk to rescale a canvas item during the \fBscale\fR widget command. The procedure must match the following prototype: @@ -469,15 +455,14 @@ the item is to be scaled, and \fIscaleX\fR and \fIscaleY\fR give the x and y scale factors. The item should adjust its coordinates so that a point in the item that used to have coordinates \fIx\fR and \fIy\fR will have new -coordinates \fIx'\fR and \fIy'\fR, where +coordinates \fIx\(fm\fR and \fIy\(fm\fR, where .CS -\fIx' = originX + scaleX*(x-originX) -y' = originY + scaleY*(y-originY)\fR +\fIx\(fm = originX + scaleX*(x-originX) +y\(fm = originY + scaleY*(y-originY)\fR .CE \fIscaleProc\fR must also update the bounding box in the item's header. - -.SH TRANSLATEPROC +.SS TRANSLATEPROC \fItypePtr->translateProc\fR is invoked by Tk to translate a canvas item during the \fBmove\fR widget command. The procedure must match the following prototype: @@ -493,8 +478,7 @@ and \fIdeltaX\fR and \fIdeltaY\fR give the amounts that should be added to each x and y coordinate within the item. The type manager should adjust the item's coordinates and update the bounding box in the item's header. - -.SH INDEXPROC +.SS INDEXPROC \fItypePtr->indexProc\fR is invoked by Tk to translate a string index specification into a numerical index, for example during the \fBindex\fR widget command. @@ -520,15 +504,14 @@ are supported (e.g., numbers, \fBinsert\fR, \fBsel.first\fR, \fBend\fR, etc.). \fIindexProc\fR should return a Tcl completion code and set \fIinterp->result\fR in the event of an error. - -.SH ICURSORPROC +.SS ICURSORPROC .PP \fItypePtr->icursorProc\fR is invoked by Tk during the \fBicursor\fR widget command to set the position of the insertion cursor in a textual item. It is only relevant for item types that support an insertion cursor; \fItypePtr->icursorProc\fR may be specified as NULL for item types -that don't support an insertion cursor. +that do not support an insertion cursor. The procedure must match the following prototype: .CS typedef void Tk_ItemCursorProc( @@ -543,8 +526,7 @@ The type manager should position the insertion cursor in the item just before the character given by \fIindex\fR. Whether or not to actually display the insertion cursor is determined by other information provided by \fBTk_CanvasGetTextInfo\fR. - -.SH SELECTIONPROC +.SS SELECTIONPROC .PP \fItypePtr->selectionProc\fR is invoked by Tk during selection retrievals; it must return part or all of the selected text in @@ -571,10 +553,9 @@ of bytes to return. \fIselectionProc\fR should extract up to \fImaxBytes\fR characters from the selection and copy them to \fImaxBytes\fR; it should return a count of the number of bytes actually copied, which may -be less than \fImaxBytes\fR if there aren't \fIoffset+maxBytes\fR bytes +be less than \fImaxBytes\fR if there are not \fIoffset+maxBytes\fR bytes in the selection. - -.SH INSERTPROC +.SS INSERTPROC .PP \fItypePtr->insertProc\fR is invoked by Tk during the \fBinsert\fR widget command to insert new text into a @@ -597,8 +578,7 @@ contains new text to insert just before the character given by \fIindex\fR. The type manager should insert the text and recompute the bounding box in the item's header. - -.SH DCHARSPROC +.SS DCHARSPROC .PP \fItypePtr->dCharsProc\fR is invoked by Tk during the \fBdchars\fR widget command to delete a range of text from a canvas item. @@ -618,9 +598,7 @@ typedef void Tk_ItemDCharsProc( to be deleted, as returned by previous calls to \fItypePtr->indexProc\fR. The type manager should delete the specified characters and update the bounding box in the item's header. - .SH "SEE ALSO" Tk_CanvasPsY, Tk_CanvasTextInfo, Tk_CanvasTkwin - .SH KEYWORDS canvas, focus, item type, selection, type manager diff --git a/doc/CrtSelHdlr.3 b/doc/CrtSelHdlr.3 index ffb16ad..0c7a6a2 100644 --- a/doc/CrtSelHdlr.3 +++ b/doc/CrtSelHdlr.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtSelHdlr.3,v 1.3 2004/09/19 16:05:36 dkf Exp $ +'\" RCS: @(#) $Id: CrtSelHdlr.3,v 1.3.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_CreateSelHandler 3 4.0 Tk "Tk Library Procedures" @@ -37,11 +37,10 @@ and the selection contents are requested in the format given by .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .AP Atom format in -If the selection requestor isn't in this process, \fIformat\fR determines +If the selection requestor is not in this process, \fIformat\fR determines the representation used to transmit the selection to its requestor. .BE - .SH DESCRIPTION .PP \fBTk_CreateSelHandler\fR arranges for a particular procedure @@ -77,7 +76,7 @@ at \fIbuffer\fR containing \fImaxBytes\fR or fewer characters count of the number of non-NULL characters stored at \fIbuffer\fR. If the selection no longer exists (e.g. it once existed but the user deleted the range of characters containing -it), then \fIproc\fR should return -1. +it), then \fIproc\fR should return \-1. .PP When transferring large selections, Tk will break them up into smaller pieces (typically a few thousand bytes each) for more diff --git a/doc/CrtWindow.3 b/doc/CrtWindow.3 index b938c2f..0bef253 100644 --- a/doc/CrtWindow.3 +++ b/doc/CrtWindow.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtWindow.3,v 1.8 2007/01/05 00:00:47 nijtmans Exp $ +'\" RCS: @(#) $Id: CrtWindow.3,v 1.8.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_CreateWindow 3 4.2 Tk "Tk Library Procedures" @@ -32,7 +32,7 @@ Tk_Window .AS Tcl_Interp *topLevScreen .AP Tcl_Interp *interp out Tcl interpreter to use for error reporting. If no error occurs, -then \fI*interp\fR isn't modified. +then \fI*interp\fR is not modified. .AP Tk_Window parent in Token for the window that is to serve as the logical parent of the new window. @@ -43,15 +43,15 @@ the same \fIparent\fR. Has same format as \fIscreenName\fR. If NULL, then new window is created as an internal window. If non-NULL, new window is created as a top-level window on screen \fItopLevScreen\fR. If \fItopLevScreen\fR -is an empty string (``'') then new -window is created as top-level window of \fIparent\fR's screen. +is an empty string +.PQ "" +then new window is created as top-level window of \fIparent\fR's screen. .AP Tk_Window tkwin in Token for window. .AP "const char" *pathName in Name of new window, specified as path name within application (e.g. \fB.a.b.c\fR). .BE - .SH DESCRIPTION .PP The procedures \fBTk_CreateWindow\fR, @@ -59,7 +59,7 @@ The procedures \fBTk_CreateWindow\fR, are used to create new windows for use in Tk-based applications. Each of the procedures returns a token that can be used to manipulate the window in other calls to the Tk -library. If the window couldn't be created successfully, then NULL +library. If the window could not be created successfully, then NULL is returned and \fIinterp->result\fR is modified to hold an error message. .PP @@ -104,7 +104,7 @@ as in calls to \fBTk_CreateWindow\fR, the parent of the new window must exist at the time of the call, but the new window must not already exist. .PP -The window creation procedures don't +The window creation procedures do not actually issue the command to X to create a window. Instead, they create a local data structure associated with the window and defer the creation of the X window. @@ -117,7 +117,7 @@ mapped all of the window attributes can be set while creating the window. .PP The value returned by a window-creation procedure is not the -X token for the window (it can't be, since X hasn't been +X token for the window (it cannot be, since X has not been asked to create the window yet). Instead, it is a token for Tk's local data structure for the window. Most of the Tk library procedures take Tk_Window tokens, rather @@ -139,7 +139,7 @@ then the event handlers will be invoked later, after X has seen the request and returned an event for it. .PP If a window has been created -but hasn't been mapped, so no X window exists, it is +but has not been mapped, so no X window exists, it is possible to force the creation of the X window by calling \fBTk_MakeWindowExist\fR. This procedure issues the X commands to instantiate the window given by \fItkwin\fR. diff --git a/doc/FontId.3 b/doc/FontId.3 index c121963..c7a3fc7 100644 --- a/doc/FontId.3 +++ b/doc/FontId.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FontId.3,v 1.6 2005/04/22 21:32:23 georgeps Exp $ +'\" RCS: @(#) $Id: FontId.3,v 1.6.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_FontId 3 8.0 Tk "Tk Library Procedures" @@ -56,7 +56,9 @@ ascent, descent, and linespace, used in font metrics. Postscript font name that should be used when printing. The return value is the size in points of the \fItkfont\fR and the Postscript font name is appended to \fIdsPtr\fR. \fIDsPtr\fR must refer to an initialized -\fBTcl_DString\fR. Given a ``reasonable'' Postscript printer, the +\fBTcl_DString\fR. Given a +.QW reasonable +Postscript printer, the following screen font families should print correctly: .IP \fBAvant Garde\fR, \fBArial\fR, \fBBookman\fR, \fBCourier\fR, diff --git a/doc/FreeXId.3 b/doc/FreeXId.3 index 6bb4bb8..1b96c03 100644 --- a/doc/FreeXId.3 +++ b/doc/FreeXId.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FreeXId.3,v 1.4 1999/04/21 21:53:21 rjohnson Exp $ +'\" RCS: @(#) $Id: FreeXId.3,v 1.4.26.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_FreeXId 3 4.0 Tk "Tk Library Procedures" @@ -25,7 +25,6 @@ Display for which \fIid\fR was allocated. Identifier of X resource (window, font, pixmap, cursor, graphics context, or colormap) that is no longer in use. .BE - .SH DESCRIPTION .PP The default allocator for resource identifiers provided by Xlib is very @@ -44,9 +43,8 @@ However, if you allocate resources directly from Xlib, for example by calling \fBXCreatePixmap\fR, then you should call \fBTk_FreeXId\fR when you call the corresponding Xlib free procedure, such as \fBXFreePixmap\fR. -If you don't call \fBTk_FreeXId\fR then the resource identifier will +If you do not call \fBTk_FreeXId\fR then the resource identifier will be lost, which could cause problems if the application runs long enough to lose all of the available identifiers. - .SH KEYWORDS resource identifier diff --git a/doc/GetAnchor.3 b/doc/GetAnchor.3 index b52583f..52e6314 100644 --- a/doc/GetAnchor.3 +++ b/doc/GetAnchor.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetAnchor.3,v 1.6 2007/01/05 00:00:49 nijtmans Exp $ +'\" RCS: @(#) $Id: GetAnchor.3,v 1.6.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_GetAnchorFromObj 3 8.1 Tk "Tk Library Procedures" @@ -29,8 +29,17 @@ const char * .AP Tcl_Interp *interp in Interpreter to use for error reporting, or NULL. .AP Tcl_Obj *objPtr in/out -String value contains name of anchor point: \fBn\fR, \fBne\fR, -\fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR; +String value contains name of anchor point: +.QW n , +.QW ne , +.QW e , +.QW se , +.QW s , +.QW sw , +.QW w , +.QW nw , +or +.QW center ; internal rep will be modified to cache corresponding Tk_Anchor. .AP "const char" *string in Same as \fIobjPtr\fR except description of anchor point is passed as @@ -41,7 +50,6 @@ Pointer to location in which to store anchor position corresponding to .AP Tk_Anchor anchor in Anchor position, e.g. \fBTCL_ANCHOR_CENTER\fR. .BE - .SH DESCRIPTION .PP \fBTk_GetAnchorFromObj\fR places in \fI*anchorPtr\fR an anchor position @@ -56,10 +64,10 @@ position the top center point of the object at a particular place. .PP Under normal circumstances the return value is \fBTCL_OK\fR and \fIinterp\fR is unused. -If \fIstring\fR doesn't contain a valid anchor position +If \fIstring\fR does not contain a valid anchor position or an abbreviation of one of these names, \fBTCL_ERROR\fR is returned, \fI*anchorPtr\fR is unmodified, and an error message is -stored in \fIinterp\fR's result if \fIinterp\fR isn't NULL. +stored in \fIinterp\fR's result if \fIinterp\fR is not NULL. \fBTk_GetAnchorFromObj\fR caches information about the return value in \fIobjPtr\fR, which speeds up future calls to \fBTk_GetAnchorFromObj\fR with the same \fIobjPtr\fR. @@ -73,8 +81,8 @@ return value, so \fBTk_GetAnchor\fR is less efficient than \fBTk_NameOfAnchor\fR is the logical inverse of \fBTk_GetAnchor\fR. Given an anchor position such as \fBTK_ANCHOR_N\fR it returns a statically-allocated string corresponding to \fIanchor\fR. -If \fIanchor\fR isn't a legal anchor value, then -``unknown anchor position'' is returned. - +If \fIanchor\fR is not a legal anchor value, then +.QW "unknown anchor position" +is returned. .SH KEYWORDS anchor position diff --git a/doc/GetBitmap.3 b/doc/GetBitmap.3 index 9742785..842a1c2 100644 --- a/doc/GetBitmap.3 +++ b/doc/GetBitmap.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetBitmap.3,v 1.10 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: GetBitmap.3,v 1.10.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_AllocBitmapFromObj 3 8.1 Tk "Tk Library Procedures" @@ -48,7 +48,7 @@ String value describes desired bitmap; internal rep will be modified to cache pointer to corresponding Pixmap. .AP "const char" *info in Same as \fIobjPtr\fR except description of bitmap is passed as a string and -resulting Pixmap isn't cached. +resulting Pixmap is not cached. .AP "const char" *name in Name for new bitmap to be defined. .AP "const char" *source in @@ -93,8 +93,9 @@ by Tk: .RS .TP 12 \fBerror\fR -The international "don't" symbol: a circle with a diagonal line -across it. +The international +.QW don't +symbol: a circle with a diagonal line across it. .TP 12 \fBgray75\fR 75% gray: a checkerboard pattern where three out of four bits are on. @@ -113,7 +114,8 @@ every fourth pixel in every other row. An hourglass symbol. .TP 12 \fBinfo\fR -A large letter ``i''. +A large letter +.QW i . .TP 12 \fBquesthead\fR The silhouette of a human head, with a question mark in it. @@ -180,7 +182,7 @@ Under normal conditions, \fBTk_AllocBitmapFromObj\fR returns an identifier for the requested bitmap. If an error occurs in creating the bitmap, such as when \fIobjPtr\fR refers to a non-existent file, then \fBNone\fR is returned and an error -message is left in \fIinterp\fR's result if \fIinterp\fR isn't +message is left in \fIinterp\fR's result if \fIinterp\fR is not NULL. \fBTk_AllocBitmapFromObj\fR caches information about the return value in \fIobjPtr\fR, which speeds up future calls to procedures such as \fBTk_AllocBitmapFromObj\fR and \fBTk_GetBitmapFromObj\fR. @@ -193,7 +195,7 @@ return value, so \fBTk_GetBitmap\fR is less efficient than .PP \fBTk_GetBitmapFromObj\fR returns the token for an existing bitmap, given the window and description used to create the bitmap. -\fBTk_GetBitmapFromObj\fR doesn't actually create the bitmap; the bitmap +\fBTk_GetBitmapFromObj\fR does not actually create the bitmap; the bitmap must already have been created with a previous call to \fBTk_AllocBitmapFromObj\fR or \fBTk_GetBitmap\fR. The return value is cached in \fIobjPtr\fR, which speeds up @@ -212,7 +214,7 @@ describe the bitmap. \fBTCL_ERROR\fR is returned and an error message is left in \fIinterp->result\fR. Note: \fBTk_DefineBitmap\fR expects the memory pointed to by -\fIsource\fR to be static: \fBTk_DefineBitmap\fR doesn't make +\fIsource\fR to be static: \fBTk_DefineBitmap\fR does not make a private copy of this memory, but uses the bytes pointed to by \fIsource\fR later in calls to \fBTk_AllocBitmapFromObj\fR or \fBTk_GetBitmap\fR. diff --git a/doc/GetCapStyl.3 b/doc/GetCapStyl.3 index e0e04a2..47bffda 100644 --- a/doc/GetCapStyl.3 +++ b/doc/GetCapStyl.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetCapStyl.3,v 1.4 2007/01/05 00:00:49 nijtmans Exp $ +'\" RCS: @(#) $Id: GetCapStyl.3,v 1.4.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_GetCapStyle 3 "" Tk "Tk Library Procedures" @@ -26,8 +26,11 @@ const char * .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP "const char" *string in -String containing name of cap style: one of ```butt'', ``projecting'', -or ``round''. +String containing name of cap style: one of +.QW butt , +.QW projecting , +or +.QW round . .AP int *capPtr out Pointer to location in which to store X cap style corresponding to \fIstring\fR. @@ -48,7 +51,7 @@ implies. .PP Under normal circumstances the return value is \fBTCL_OK\fR and \fIinterp\fR is unused. -If \fIstring\fR doesn't contain a valid cap style +If \fIstring\fR does not contain a valid cap style or an abbreviation of one of these names, then an error message is stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and \fI*capPtr\fR is unmodified. @@ -56,8 +59,9 @@ stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and \fBTk_NameOfCapStyle\fR is the logical inverse of \fBTk_GetCapStyle\fR. Given a cap style such as \fBCapButt\fR it returns a statically-allocated string corresponding to \fIcap\fR. -If \fIcap\fR isn't a legal cap style, then -``unknown cap style'' is returned. +If \fIcap\fR is not a legal cap style, then +.QW "unknown cap style" +is returned. .SH KEYWORDS butt, cap style, projecting, round diff --git a/doc/GetClrmap.3 b/doc/GetClrmap.3 index ebdb17f..bb8bff3 100644 --- a/doc/GetClrmap.3 +++ b/doc/GetClrmap.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetClrmap.3,v 1.4 2007/01/05 00:00:49 nijtmans Exp $ +'\" RCS: @(#) $Id: GetClrmap.3,v 1.4.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_GetColormap 3 4.0 Tk "Tk Library Procedures" @@ -44,7 +44,7 @@ If its \fIstring\fR argument is \fBnew\fR then a new colormap is created; otherwise \fIstring\fR must be the name of another window with the same screen and visual as \fItkwin\fR, and the colormap from that window is returned. -If \fIstring\fR doesn't make sense, or if it refers to a window on +If \fIstring\fR does not make sense, or if it refers to a window on a different screen from \fItkwin\fR or with a different visual than \fItkwin\fR, then \fBTk_GetColormap\fR returns \fBNone\fR and leaves an error message in \fIinterp->result\fR. diff --git a/doc/GetColor.3 b/doc/GetColor.3 index ec1a40b..7714072 100644 --- a/doc/GetColor.3 +++ b/doc/GetColor.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetColor.3,v 1.6 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: GetColor.3,v 1.6.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_AllocColorFromObj 3 8.1 Tk "Tk Library Procedures" @@ -48,7 +48,7 @@ String value describes desired color; internal rep will be modified to cache pointer to corresponding (XColor *). .AP char *name in Same as \fIobjPtr\fR except description of color is passed as a string and -resulting (XColor *) isn't cached. +resulting (XColor *) is not cached. .AP XColor *prefPtr in Indicates red, green, and blue intensities of desired color. @@ -99,7 +99,7 @@ depending on the limitations of the screen) and a pixel value that may be used to draw with the color in \fItkwin\fR. If an error occurs in \fBTk_AllocColorFromObj\fR (such as an unknown color name) then NULL is returned and an error message is stored in -\fIinterp\fR's result if \fIinterp\fR isn't NULL. +\fIinterp\fR's result if \fIinterp\fR is not NULL. If the colormap for \fItkwin\fR is full, \fBTk_AllocColorFromObj\fR will use the closest existing color in the colormap. \fBTk_AllocColorFromObj\fR caches information about @@ -114,7 +114,7 @@ return value, so \fBTk_GetColor\fR is less efficient than .PP \fBTk_GetColorFromObj\fR returns the token for an existing color, given the window and description used to create the color. -\fBTk_GetColorFromObj\fR doesn't actually create the color; the color +\fBTk_GetColorFromObj\fR does not actually create the color; the color must already have been created with a previous call to \fBTk_AllocColorFromObj\fR or \fBTk_GetColor\fR. The return value is cached in \fIobjPtr\fR, which speeds up diff --git a/doc/GetCursor.3 b/doc/GetCursor.3 index 0b9efb6..ee83221 100644 --- a/doc/GetCursor.3 +++ b/doc/GetCursor.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetCursor.3,v 1.9 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: GetCursor.3,v 1.9.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_AllocCursorFromObj 3 8.1 Tk "Tk Library Procedures" @@ -45,7 +45,7 @@ Description of cursor; see below for possible values. Internal rep will be modified to cache pointer to corresponding Tk_Cursor. .AP char *name in Same as \fIobjPtr\fR except description of cursor is passed as a string and -resulting Tk_Cursor isn't cached. +resulting Tk_Cursor is not cached. .AP "const char" *source in Data for cursor cursor, in standard cursor format. .AP "const char" *mask in @@ -86,14 +86,15 @@ future calls to procedures such as \fBTk_AllocCursorFromObj\fR and \fBTk_GetCursorFromObj\fR. If an error occurs in creating the cursor, such as when \fIobjPtr\fR refers to a non-existent file, then \fBNone\fR is returned and an error message will be stored in \fIinterp\fR's result -if \fIinterp\fR isn't NULL. \fIObjPtr\fR must contain a standard Tcl +if \fIinterp\fR is not NULL. \fIObjPtr\fR must contain a standard Tcl list with one of the following forms: .TP \fIname\fR\0[\fIfgColor\fR\0[\fIbgColor\fR]] \fIName\fR is the name of a cursor in the standard X cursor cursor, i.e., any of the names defined in \fBcursorcursor.h\fR, without the \fBXC_\fR. Some example values are \fBX_cursor\fR, \fBhand2\fR, -or \fBleft_ptr\fR. Appendix B of ``The X Window System'' +or \fBleft_ptr\fR. Appendix B of +.QW "The X Window System" by Scheifler & Gettys has illustrations showing what each of these cursors looks like. If \fIfgColor\fR and \fIbgColor\fR are both specified, they give the foreground and background colors to use @@ -144,7 +145,7 @@ return value, so \fBTk_GetCursor\fR is less efficient than .PP \fBTk_GetCursorFromObj\fR returns the token for an existing cursor, given the window and description used to create the cursor. -\fBTk_GetCursorFromObj\fR doesn't actually create the cursor; the cursor +\fBTk_GetCursorFromObj\fR does not actually create the cursor; the cursor must already have been created with a previous call to \fBTk_AllocCursorFromObj\fR or \fBTk_GetCursor\fR. The return value is cached in \fIobjPtr\fR, which speeds up diff --git a/doc/GetDash.3 b/doc/GetDash.3 index eeaffa8..cf1bed4 100644 --- a/doc/GetDash.3 +++ b/doc/GetDash.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetDash.3,v 1.5 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: GetDash.3,v 1.5.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_GetDash 3 8.3 Tk "Tk Library Procedures" @@ -33,31 +33,41 @@ value converted from \fIstring\fR. .PP These procedure parses the string and fills in the result in the Tk_Dash structure. The string can be a list of integers or a -character string containing only \fB[.,-_]\fR or spaces. If all -goes well, \fBTCL_OK\fR is returned. If \fIstring\fR doesn't have the +character string containing only +.QW \fB.,\-_\fR +or spaces. If all +goes well, \fBTCL_OK\fR is returned. If \fIstring\fR does not have the proper syntax then \fBTCL_ERROR\fR is returned, an error message is left in the interpreter's result, and nothing is stored at *\fIdashPtr\fR. .PP The first possible syntax is a list of integers. Each element represents the number of pixels of a line segment. Only the odd -segments are drawn using the "outline" color. The other segments -are drawn transparent. +segments are drawn using the +.QW outline +color. The other segments are drawn transparent. .PP The second possible syntax is a character list containing only -5 possible characters \fB[.,-_ ]\fR. The space can be used +5 possible characters +.QW "\fB.,\-_ \fR" . +The space can be used to enlarge the space between other line elements, and can not occur as the first position in the string. Some examples: - -dash . = -dash {2 4} - -dash - = -dash {6 4} - -dash -. = -dash {6 4 2 4} - -dash -.. = -dash {6 4 2 4 2 4} - -dash {. } = -dash {2 8} - -dash , = -dash {4 4} +.CS + \-dash . = \-dash {2 4} + \-dash \- = \-dash {6 4} + \-dash \-. = \-dash {6 4 2 4} + \-dash \-.. = \-dash {6 4 2 4 2 4} + \-dash {. } = \-dash {2 8} + \-dash , = \-dash {4 4} +.CE .PP The main difference of this syntax with the previous is that it is shape-conserving. This means that all values in the dash list will be multiplied by the line width before display. This -assures that "." will always be displayed as a dot and "-" +assures that +.QW . +will always be displayed as a dot and +.QW \- always as a dash regardless of the line width. .PP On systems where only a limited set of dash patterns, the dash diff --git a/doc/GetFont.3 b/doc/GetFont.3 index 6d085ce..12c251b 100644 --- a/doc/GetFont.3 +++ b/doc/GetFont.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetFont.3,v 1.9 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: GetFont.3,v 1.9.2.1 2007/11/01 16:37:12 dgp Exp $ '\" .so man.macros .TH Tk_AllocFontFromObj 3 8.1 Tk "Tk Library Procedures" @@ -47,7 +47,7 @@ for the \fBfont\fR command for details on acceptable formats. Internal rep will be modified to cache corresponding Tk_Font. .AP "const char" *string in Same as \fIobjPtr\fR except description of font is passed as a string and -resulting Tk_Font isn't cached. +resulting Tk_Font is not cached. .AP Tk_Font tkfont in Opaque font token. .BE @@ -64,7 +64,7 @@ the documentation for the \fBfont\fR command for a description of the valid formats. If \fBTk_AllocFontFromObj\fR is unsuccessful (because, for example, \fIobjPtr\fR did not contain a valid font specification) then it returns \fBNULL\fR and leaves an error message in \fIinterp\fR's result -if \fIinterp\fR isn't \fBNULL\fR. \fBTk_AllocFontFromObj\fR caches +if \fIinterp\fR is not \fBNULL\fR. \fBTk_AllocFontFromObj\fR caches information about the return value in \fIobjPtr\fR, which speeds up future calls to procedures such as \fBTk_AllocFontFromObj\fR and \fBTk_GetFontFromObj\fR. @@ -77,7 +77,7 @@ matching Tk_Font, so \fBTk_GetFont\fR is less efficient than .PP \fBTk_GetFontFromObj\fR returns the token for an existing font, given the window and description used to create the font. -\fBTk_GetFontFromObj\fR doesn't actually create the font; the font +\fBTk_GetFontFromObj\fR does not actually create the font; the font must already have been created with a previous call to \fBTk_AllocFontFromObj\fR or \fBTk_GetFont\fR. The return value is cached in \fIobjPtr\fR, which speeds up diff --git a/doc/GetImage.3 b/doc/GetImage.3 index 32cd2d6..ff9fe57 100644 --- a/doc/GetImage.3 +++ b/doc/GetImage.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetImage.3,v 1.7 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: GetImage.3,v 1.7.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetImage 3 4.0 Tk "Tk Library Procedures" @@ -75,7 +75,7 @@ display an image. identifies the window where the image will be displayed. \fBTk_GetImage\fR looks up the image in the table of existing images and returns a token for a new instance of the image. -If the image doesn't exist then \fBTk_GetImage\fR returns NULL +If the image does not exist then \fBTk_GetImage\fR returns NULL and leaves an error message in \fIinterp->result\fR. .PP When a widget wishes to actually display an image it must diff --git a/doc/GetJoinStl.3 b/doc/GetJoinStl.3 index b715424..f143942 100644 --- a/doc/GetJoinStl.3 +++ b/doc/GetJoinStl.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetJoinStl.3,v 1.4 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: GetJoinStl.3,v 1.4.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetJoinStyle 3 "" Tk "Tk Library Procedures" @@ -26,8 +26,11 @@ const char * .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP "const char" *string in -String containing name of join style: one of ``bevel'', ``miter'', -or ``round''. +String containing name of join style: one of +.QW bevel , +.QW miter , +or +.QW round . .AP int *joinPtr out Pointer to location in which to store X join style corresponding to \fIstring\fR. @@ -47,7 +50,7 @@ implies. .PP Under normal circumstances the return value is \fBTCL_OK\fR and \fIinterp\fR is unused. -If \fIstring\fR doesn't contain a valid join style +If \fIstring\fR does not contain a valid join style or an abbreviation of one of these names, then an error message is stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and \fI*joinPtr\fR is unmodified. @@ -55,8 +58,9 @@ stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and \fBTk_NameOfJoinStyle\fR is the logical inverse of \fBTk_GetJoinStyle\fR. Given a join style such as \fBJoinBevel\fR it returns a statically-allocated string corresponding to \fIjoin\fR. -If \fIjoin\fR isn't a legal join style, then -``unknown join style'' is returned. +If \fIjoin\fR is not a legal join style, then +.QW "unknown join style" +is returned. .SH KEYWORDS bevel, join style, miter, round diff --git a/doc/GetJustify.3 b/doc/GetJustify.3 index 47df31e..a3b4751 100644 --- a/doc/GetJustify.3 +++ b/doc/GetJustify.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetJustify.3,v 1.6 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: GetJustify.3,v 1.6.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetJustifyFromObj 3 8.1 Tk "Tk Library Procedures" @@ -29,9 +29,12 @@ const char * .AP Tcl_Interp *interp in Interpreter to use for error reporting, or NULL. .AP Tcl_Obj *objPtr in/out -String value contains name of justification style (\fBleft\fR, \fBright\fR, or -\fBcenter\fR). The -internal rep will be modified to cache corresponding justify value. +String value contains name of justification style, one of +.QW left , +.QW right , +or +.QW center . +The internal rep will be modified to cache corresponding justify value. .AP "const char" *string in Same as \fIobjPtr\fR except description of justification style is passed as a string. @@ -41,7 +44,6 @@ Pointer to location in which to store justify value corresponding to .AP Tk_Justify justify in Justification style (one of the values listed below). .BE - .SH DESCRIPTION .PP \fBTk_GetJustifyFromObj\fR places in \fI*justifyPtr\fR the justify value @@ -62,10 +64,10 @@ both the left and right edges of lines may be ragged. .PP Under normal circumstances the return value is \fBTCL_OK\fR and \fIinterp\fR is unused. -If \fIobjPtr\fR doesn't contain a valid justification style +If \fIobjPtr\fR does not contain a valid justification style or an abbreviation of one of these names, \fBTCL_ERROR\fR is returned, \fI*justifyPtr\fR is unmodified, and an error message is -stored in \fIinterp\fR's result if \fIinterp\fR isn't NULL. +stored in \fIinterp\fR's result if \fIinterp\fR is not NULL. \fBTk_GetJustifyFromObj\fR caches information about the return value in \fIobjPtr\fR, which speeds up future calls to \fBTk_GetJustifyFromObj\fR with the same \fIobjPtr\fR. @@ -79,8 +81,9 @@ return value, so \fBTk_GetJustify\fR is less efficient than \fBTk_NameOfJustify\fR is the logical inverse of \fBTk_GetJustify\fR. Given a justify value it returns a statically-allocated string corresponding to \fIjustify\fR. -If \fIjustify\fR isn't a legal justify value, then -``unknown justification style'' is returned. +If \fIjustify\fR is not a legal justify value, then +.QW "unknown justification style" +is returned. .SH KEYWORDS center, fill, justification, string diff --git a/doc/GetPixels.3 b/doc/GetPixels.3 index f0d674d..889f00f 100644 --- a/doc/GetPixels.3 +++ b/doc/GetPixels.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetPixels.3,v 1.6 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: GetPixels.3,v 1.6.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetPixelsFromObj 3 8.1 Tk "Tk Library Procedures" @@ -77,9 +77,9 @@ on the screen. nearest even number of pixels and stores that value at \fI*intPtr\fR. It returns \fBTCL_OK\fR under normal circumstances. If an error occurs (e.g. \fIobjPtr\fR contains a number followed -by a character that isn't one of the ones above) then +by a character that is not one of the ones above) then \fBTCL_ERROR\fR is returned and an error message is left -in \fIinterp\fR's result if \fIinterp\fR isn't NULL. +in \fIinterp\fR's result if \fIinterp\fR is not NULL. \fBTk_GetPixelsFromObj\fR caches information about the return value in \fIobjPtr\fR, which speeds up future calls to \fBTk_GetPixelsFromObj\fR with the same \fIobjPtr\fR. diff --git a/doc/GetRelief.3 b/doc/GetRelief.3 index 3ba3b34..a650c5b 100644 --- a/doc/GetRelief.3 +++ b/doc/GetRelief.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetRelief.3,v 1.7 2007/01/05 00:00:49 nijtmans Exp $ +'\" RCS: @(#) $Id: GetRelief.3,v 1.7.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetReliefFromObj 3 8.1 Tk "Tk Library Procedures" @@ -29,9 +29,15 @@ const char * .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP Tcl_Obj *objPtr in/out -String value contains name of relief (one of \fBflat\fR, \fBgroove\fR, -\fBraised\fR, \fBridge\fR, \fBsolid\fR, or \fBsunken\fR); -internal rep will be modified to cache corresponding relief value. +String value contains name of relief, one of +.QW flat , +.QW groove , +.QW raised , +.QW ridge , +.QW solid , +or +.QW sunken ; +the internal rep will be modified to cache corresponding relief value. .AP char *string in Same as \fIobjPtr\fR except description of relief is passed as a string. @@ -45,7 +51,6 @@ Relief value (one of \fBTK_RELIEF_FLAT\fR, \fBTK_RELIEF_RAISED\fR, \fBTK_RELIEF_SUNKEN\fR, \fBTK_RELIEF_GROOVE\fR, \fBTK_RELIEF_SOLID\fR, or \fBTK_RELIEF_RIDGE\fR). .BE - .SH DESCRIPTION .PP \fBTk_GetReliefFromObj\fR places in \fI*reliefPtr\fR the relief value @@ -54,10 +59,10 @@ corresponding to the value of \fIobjPtr\fR. This value will be one of \fBTK_RELIEF_GROOVE\fR, \fBTK_RELIEF_SOLID\fR, or \fBTK_RELIEF_RIDGE\fR. Under normal circumstances the return value is \fBTCL_OK\fR and \fIinterp\fR is unused. -If \fIobjPtr\fR doesn't contain one of the valid relief names +If \fIobjPtr\fR does not contain one of the valid relief names or an abbreviation of one of them, then \fBTCL_ERROR\fR is returned, \fI*reliefPtr\fR is unmodified, and an error message -is stored in \fIinterp\fR's result if \fIinterp\fR isn't NULL. +is stored in \fIinterp\fR's result if \fIinterp\fR is not NULL. \fBTk_GetReliefFromObj\fR caches information about the return value in \fIobjPtr\fR, which speeds up future calls to \fBTk_GetReliefFromObj\fR with the same \fIobjPtr\fR. @@ -71,8 +76,8 @@ return value, so \fBTk_GetRelief\fR is less efficient than \fBTk_NameOfRelief\fR is the logical inverse of \fBTk_GetRelief\fR. Given a relief value it returns the corresponding string (\fBflat\fR, \fBraised\fR, \fBsunken\fR, \fBgroove\fR, \fBsolid\fR, or \fBridge\fR). -If \fIrelief\fR isn't a legal relief value, then ``unknown relief'' +If \fIrelief\fR is not a legal relief value, then +.QW "unknown relief" is returned. - .SH KEYWORDS name, relief, string diff --git a/doc/GetRootCrd.3 b/doc/GetRootCrd.3 index 697d339..0e3f974 100644 --- a/doc/GetRootCrd.3 +++ b/doc/GetRootCrd.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetRootCrd.3,v 1.2 1998/09/14 18:22:51 stanton Exp $ +'\" RCS: @(#) $Id: GetRootCrd.3,v 1.2.32.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetRootCoords 3 "" Tk "Tk Library Procedures" @@ -28,7 +28,6 @@ corresponding to left edge of \fItkwin\fR's border. Pointer to location in which to store root-window y-coordinate corresponding to top edge of \fItkwin\fR's border. .BE - .SH DESCRIPTION .PP This procedure scans through the structural information maintained @@ -36,8 +35,7 @@ by Tk to compute the root-window coordinates corresponding to the upper-left corner of \fItkwin\fR's border. If \fItkwin\fR has no border, then \fBTk_GetRootCoords\fR returns the root-window coordinates corresponding to location (0,0) in \fItkwin\fR. -\fBTk_GetRootCoords\fR is relatively efficient, since it doesn't have to +\fBTk_GetRootCoords\fR is relatively efficient, since it does not have to communicate with the X server. - .SH KEYWORDS coordinates, root window diff --git a/doc/GetSelect.3 b/doc/GetSelect.3 index c673866..272a0a7 100644 --- a/doc/GetSelect.3 +++ b/doc/GetSelect.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetSelect.3,v 1.3 2004/09/19 16:05:36 dkf Exp $ +'\" RCS: @(#) $Id: GetSelect.3,v 1.3.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetSelection 3 4.0 Tk "Tk Library Procedures" @@ -67,7 +67,7 @@ values separated by white space. .PP \fBTk_GetSelection\fR returns to its caller when the selection has been completely retrieved and processed by \fIproc\fR, or when a -fatal error has occurred (e.g. the selection owner didn't respond +fatal error has occurred (e.g. the selection owner did not respond promptly). \fBTk_GetSelection\fR normally returns \fBTCL_OK\fR; if an error occurs, it returns \fBTCL_ERROR\fR and leaves an error message in \fIinterp->result\fR. \fIProc\fR should also return either diff --git a/doc/GetUid.3 b/doc/GetUid.3 index 303dc47..46cb409 100644 --- a/doc/GetUid.3 +++ b/doc/GetUid.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetUid.3,v 1.4 2004/02/17 13:47:22 dkf Exp $ +'\" RCS: @(#) $Id: GetUid.3,v 1.4.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetUid 3 "" Tk "Tk Library Procedures" @@ -31,7 +31,8 @@ to \fIstring\fR. Unique identifiers are similar to atoms in Lisp, and are used in Tk to speed up comparisons and searches. A unique identifier (type Tk_Uid) is a string pointer -and may be used anywhere that a variable of type ``char *'' +and may be used anywhere that a variable of type +.QW "char *" could be used. However, there is guaranteed to be exactly one unique identifier for any given string value. If \fBTk_GetUid\fR is called twice, once with string \fIa\fR and once with string diff --git a/doc/GetVRoot.3 b/doc/GetVRoot.3 index 5f8c97e..4b85d57 100644 --- a/doc/GetVRoot.3 +++ b/doc/GetVRoot.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetVRoot.3,v 1.3 2004/08/22 15:43:20 dkf Exp $ +'\" RCS: @(#) $Id: GetVRoot.3,v 1.3.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetVRootGeometry 3 4.0 Tk "Tk Library Procedures" @@ -34,14 +34,15 @@ Points to word in which to store height of virtual root. .SH DESCRIPTION .PP \fBTk_GetVRootGeometry\fR returns geometry information about the virtual -root window associated with \fItkwin\fR. The ``associated'' virtual -root is the one in which \fItkwin\fR's nearest top-level ancestor (or +root window associated with \fItkwin\fR. The +.QW associated +virtual root is the one in which \fItkwin\fR's nearest top-level ancestor (or \fItkwin\fR itself if it is a top-level window) has been reparented by the window manager. This window is identified by a \fB__SWM_ROOT\fR or \fB__WM_ROOT\fR property placed on the top-level window by the window manager. If \fItkwin\fR is not associated with a virtual root (e.g. -because the window manager doesn't use virtual roots) then *\fIxPtr\fR and +because the window manager does not use virtual roots) then *\fIxPtr\fR and *\fIyPtr\fR will be set to 0 and *\fIwidthPtr\fR and *\fIheightPtr\fR will be set to the dimensions of the screen containing \fItkwin\fR. diff --git a/doc/GetVisual.3 b/doc/GetVisual.3 index f4f94c6..e787d13 100644 --- a/doc/GetVisual.3 +++ b/doc/GetVisual.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetVisual.3,v 1.4 2007/01/05 00:00:49 nijtmans Exp $ +'\" RCS: @(#) $Id: GetVisual.3,v 1.4.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetVisual 3 4.0 Tk "Tk Library Procedures" @@ -33,7 +33,6 @@ Depth of returned visual gets stored here. If non-NULL then a suitable colormap for visual is found and its identifier is stored here. .BE - .SH DESCRIPTION .PP \fBTk_GetVisual\fR takes a string description of a visual and @@ -76,23 +75,28 @@ as \fItkwin\fR. Use the visual whose X identifier is \fInumber\fR. .TP 15 \fBbest\fR ?\fIdepth\fR? -Choose the ``best possible'' visual, using the following rules, in -decreasing order of priority: -(a) a visual that has exactly the desired depth is best, followed +Choose the +.QW "best possible" +visual, using the following rules, in decreasing order of priority: +.RS +.IP (a) +a visual that has exactly the desired depth is best, followed by a visual with greater depth than requested (but as little extra as possible), followed by a visual with less depth than requested (but as great a depth as possible); -(b) if no \fIdepth\fR is specified, then the deepest available visual +.IP (b) +if no \fIdepth\fR is specified, then the deepest available visual is chosen; -(c) \fBpseudocolor\fR is better than \fBtruecolor\fR or \fBdirectcolor\fR, +.IP (c) +\fBpseudocolor\fR is better than \fBtruecolor\fR or \fBdirectcolor\fR, which are better than \fBstaticcolor\fR, which is better than \fBstaticgray\fR or \fBgrayscale\fR; -(d) the default visual for the screen is better than any other visual. - +.IP (d) +the default visual for the screen is better than any other visual. +.RE .SH CREDITS .PP The idea for \fBTk_GetVisual\fR, and the first implementation, came from Paul Mackerras. - .SH KEYWORDS colormap, screen, visual diff --git a/doc/Inactive.3 b/doc/Inactive.3 index 37cd93f..85ddc65 100644 --- a/doc/Inactive.3 +++ b/doc/Inactive.3 @@ -2,7 +2,7 @@ '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: Inactive.3,v 1.1 2005/05/31 15:24:53 rmax Exp $ +'\" RCS: @(#) $Id: Inactive.3,v 1.1.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_GetUserInactiveTime 3 8.5 Tk "Tk Library Procedures" @@ -28,10 +28,10 @@ reset. .PP \fBTk_GetUserInactiveTime\fR returns the number of milliseconds that have passed since the last user interaction (usually via keyboard or -mouse) with the respective display. On systems and displays that don't -support querying the user inactiviy time, \fB-1\fR is returned. +mouse) with the respective display. On systems and displays that do not +support querying the user inactiviy time, \fB\-1\fR is returned. \fBTk_GetUserInactiveTime\fR resets the user inactivity timer of the -given display to zero. On windowing systems that don't support +given display to zero. On windowing systems that do not support multiple displays \fIdisplay\fR can be passed as \fBNULL\fR. .SH KEYWORDS diff --git a/doc/InternAtom.3 b/doc/InternAtom.3 index fbe62b9..3daa073 100644 --- a/doc/InternAtom.3 +++ b/doc/InternAtom.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: InternAtom.3,v 1.4 2007/01/05 00:00:49 nijtmans Exp $ +'\" RCS: @(#) $Id: InternAtom.3,v 1.4.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_InternAtom 3 "" Tk "Tk Library Procedures" @@ -44,7 +44,8 @@ by \fBTk_GetAtomName\fR is in Tk's storage: the caller need not free this space when finished with the string, and the caller should not modify the contents of the returned string. If there is no atom \fIatom\fR on \fItkwin\fR's display, -then \fBTk_GetAtomName\fR returns the string ``?bad atom?''. +then \fBTk_GetAtomName\fR returns the string +.QW ?bad atom? . .PP Tk caches the information returned by \fBTk_InternAtom\fR and \fBTk_GetAtomName\fR diff --git a/doc/MaintGeom.3 b/doc/MaintGeom.3 index 4f59c0e..5757c7b 100644 --- a/doc/MaintGeom.3 +++ b/doc/MaintGeom.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: MaintGeom.3,v 1.3 2000/10/05 00:50:00 ericm Exp $ +'\" RCS: @(#) $Id: MaintGeom.3,v 1.3.14.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_MaintainGeometry 3 4.0 Tk "Tk Library Procedures" @@ -64,7 +64,7 @@ is unmapped, the slave is automatically removed by the screen by X. .PP \fBTk_MaintainGeometry\fR deals with these problems for slaves -whose masters aren't their parents, as well as handling the simpler +whose masters are not their parents, as well as handling the simpler case of slaves whose masters are their parents. \fBTk_MaintainGeometry\fR is typically called by a window manager once it has decided where a slave should be positioned relative @@ -97,7 +97,6 @@ If \fBTk_MaintainGeometry\fR is called repeatedly for the same \fImaster\fR\-\fIslave\fR pair, the information from the most recent call supersedes any older information. If \fBTk_UnmaintainGeometry\fR is called for a \fImaster\fR\-\fIslave\fR -pair that is isn't currently managed, the call has no effect. - +pair that is is not currently managed, the call has no effect. .SH KEYWORDS geometry manager, map, master, parent, position, slave, unmap diff --git a/doc/ManageGeom.3 b/doc/ManageGeom.3 index 6921758..1ba919b 100644 --- a/doc/ManageGeom.3 +++ b/doc/ManageGeom.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ManageGeom.3,v 1.4 2007/01/03 05:06:27 nijtmans Exp $ +'\" RCS: @(#) $Id: ManageGeom.3,v 1.4.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_ManageGeometry 3 4.0 Tk "Tk Library Procedures" @@ -24,13 +24,12 @@ Token for window to be managed. .AP "const Tk_GeomMgr" *mgrPtr in Pointer to data structure containing information about the geometry manager, or NULL to indicate that \fItkwin\fR's geometry -shouldn't be managed anymore. +should not be managed anymore. The data structure pointed to by \fImgrPtr\fR must be static: Tk keeps a reference to it as long as the window is managed. .AP ClientData clientData in Arbitrary one-word value to pass to geometry manager callbacks. .BE - .SH DESCRIPTION .PP \fBTk_ManageGeometry\fR arranges for a particular geometry manager, diff --git a/doc/MapWindow.3 b/doc/MapWindow.3 index a1ddce0..e9245dc 100644 --- a/doc/MapWindow.3 +++ b/doc/MapWindow.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: MapWindow.3,v 1.4 1999/04/21 21:53:22 rjohnson Exp $ +'\" RCS: @(#) $Id: MapWindow.3,v 1.4.26.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_MapWindow 3 "" Tk "Tk Library Procedures" @@ -31,7 +31,7 @@ Token for window. These procedures may be used to map and unmap windows managed by Tk. \fBTk_MapWindow\fR maps the window given by \fItkwin\fR, and also creates an X window corresponding -to \fItkwin\fR if it doesn't already exist. See the +to \fItkwin\fR if it does not already exist. See the \fBTk_CreateWindow\fR manual entry for information on deferred window creation. \fBTk_UnmapWindow\fR unmaps \fItkwin\fR's window @@ -39,7 +39,7 @@ from the screen. .PP If \fItkwin\fR is a child window (i.e. \fBTk_CreateWindow\fR was used to create a child window), then event handlers interested in map -and unmap events are invoked immediately. If \fItkwin\fR isn't an +and unmap events are invoked immediately. If \fItkwin\fR is not an internal window, then the event handlers will be invoked later, after X has seen the request and returned an event for it. .PP diff --git a/doc/MeasureChar.3 b/doc/MeasureChar.3 index 79e4cbc..9fa005d 100644 --- a/doc/MeasureChar.3 +++ b/doc/MeasureChar.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: MeasureChar.3,v 1.7 2005/04/06 21:11:54 dkf Exp $ +'\" RCS: @(#) $Id: MeasureChar.3,v 1.7.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_MeasureChars 3 8.1 Tk "Tk Library Procedures" @@ -121,7 +121,7 @@ space in pixels the given \fIstring\fR needs. given \fIdrawable\fR. .PP \fBTk_UnderlineChars\fR underlines the given range of characters in the -given \fIstring\fR. It doesn't draw the characters (which are assumed to +given \fIstring\fR. It does not draw the characters (which are assumed to have been displayed previously by \fBTk_DrawChars\fR); it just draws the underline. This procedure is used to underline a few characters without having to construct an underlined font. To produce natively underlined diff --git a/doc/MoveToplev.3 b/doc/MoveToplev.3 index f87cf51..a478d0c 100644 --- a/doc/MoveToplev.3 +++ b/doc/MoveToplev.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: MoveToplev.3,v 1.2 1998/09/14 18:22:52 stanton Exp $ +'\" RCS: @(#) $Id: MoveToplev.3,v 1.2.32.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_MoveToplevelWindow 3 "" Tk "Tk Library Procedures" @@ -46,7 +46,7 @@ similar in function to the \fBwm geometry\fR Tcl command except that negative offsets cannot be specified. It is invoked by widgets such as menus that want to appear at a particular place on the screen. .PP -When \fBTk_MoveToplevelWindow\fR is called it doesn't immediately +When \fBTk_MoveToplevelWindow\fR is called it does not immediately pass on the new desired location to the window manager; it defers this action until all other outstanding work has been completed, using the \fBTk_DoWhenIdle\fR mechanism. @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Name.3,v 1.5 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: Name.3,v 1.5.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_Name 3 "" Tk "Tk Library Procedures" @@ -55,9 +55,17 @@ The \fBTk_PathName\fR macro returns a hierarchical name for \fItkwin\fR. Path names have a structure similar to file names in Unix but with dots between elements instead of slashes: the main window for -an application has the path name ``.''; its children have names like -``.a'' and ``.b''; their children have names like ``.a.aa'' and -``.b.bb''; and so on. A window is considered to be a child of +an application has the path name +.QW . ; +its children have names like +.QW .a +and +.QW .b ; +their children have names like +.QW .a.aa +and +.QW .b.bb ; +and so on. A window is considered to be a child of another window for naming purposes if the second window was named as the first window's \fIparent\fR when the first window was created. This is not always the same as the X window hierarchy. For diff --git a/doc/ParseArgv.3 b/doc/ParseArgv.3 index de4feb7..592ed40 100644 --- a/doc/ParseArgv.3 +++ b/doc/ParseArgv.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ParseArgv.3,v 1.6 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: ParseArgv.3,v 1.6.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_ParseArgv 3 "" Tk "Tk Library Procedures" @@ -55,7 +55,7 @@ the caller. At the end of the call arguments that are left in \fIargv\fR, and \fIargv[*argcPtr]\fR will hold the value NULL. Normally, \fBTk_ParseArgv\fR assumes that \fIargv[0]\fR is a command name, so it is treated like -an argument that doesn't match \fIargTable\fR and returned to the +an argument that does not match \fIargTable\fR and returned to the caller; however, if the \fBTK_ARGV_DONT_SKIP_FIRST_ARG\fR bit is set in \fIflags\fR then \fIargv[0]\fR will be processed just like the other elements of \fIargv\fR. @@ -79,7 +79,10 @@ typedef struct { char *\fIhelp\fR; } Tk_ArgvInfo; .CE -The \fIkey\fR field is a string such as ``\-display'' or ``\-bg'' +The \fIkey\fR field is a string such as +.QW \-display +or +.QW \-bg that is compared with the values in \fIargv\fR. \fIType\fR indicates how to process an argument that matches \fIkey\fR (more on this below). \fISrc\fR and \fIdst\fR are additional @@ -104,11 +107,13 @@ skipped and returned to the caller. .PP Once a matching argument specifier is found, \fBTk_ParseArgv\fR processes the argument according to the \fItype\fR field of the -specifier. The argument that matched \fIkey\fR is called ``the matching -argument'' in the descriptions below. As part of the processing, +specifier. The argument that matched \fIkey\fR is called +.QW "the matching argument" +in the descriptions below. As part of the processing, \fBTk_ParseArgv\fR may also use the next argument in \fIargv\fR -after the matching argument, which is called ``the following -argument''. The legal values for \fItype\fR, and the processing +after the matching argument, which is called +.QW "the following argument" . +The legal values for \fItype\fR, and the processing that they cause, are as follows: .TP \fBTK_ARGV_END\fR @@ -123,8 +128,11 @@ The matching argument is discarded. .TP \fBTK_ARGV_INT\fR The following argument must contain an -integer string in the format accepted by \fBstrtol\fR (e.g. ``0'' -and ``0x'' prefixes may be used to specify octal or hexadecimal +integer string in the format accepted by \fBstrtol\fR (e.g. +.QW 0 +and +.QW 0x +prefixes may be used to specify octal or hexadecimal numbers, respectively). \fIDst\fR is treated as a pointer to an integer; the following argument is converted to an integer value and stored at \fI*dst\fR. \fISrc\fR is ignored. The matching @@ -192,7 +200,7 @@ extra documentation, which will be included when some other This option is used by programs or commands that allow the last several of their options to be the name and/or options for some other program. If a \fBTK_ARGV_REST\fR argument is found, then -\fBTk_ParseArgv\fR doesn't process any +\fBTk_ParseArgv\fR does not process any of the remaining arguments; it returns them all at the beginning of \fIargv\fR (along with any other unprocessed arguments). In addition, \fBTk_ParseArgv\fR treats \fIdst\fR as the address of an @@ -218,7 +226,7 @@ int The \fIdst\fR and \fIkey\fR parameters will contain the corresponding fields from the \fIargTable\fR entry, and \fInextArg\fR will point to the following argument from \fIargv\fR -(or NULL if there aren't any more arguments left in \fIargv\fR). +(or NULL if there are not any more arguments left in \fIargv\fR). If \fIfunc\fR uses \fInextArg\fR (so that \fBTk_ParseArgv\fR should discard it), then it should return 1. Otherwise it should return 0 and \fBTkParseArgv\fR will process the following @@ -254,16 +262,15 @@ then return any that are left by compacting them to the beginning of should return a count of how many arguments are left in \fIargv\fR; \fBTk_ParseArgv\fR will process them. If \fIgenfunc\fR encounters an error then it should leave an error message in \fIinterp->result\fR, -in the usual Tcl fashion, and return -1; when this happens +in the usual Tcl fashion, and return \-1; when this happens \fBTk_ParseArgv\fR will abort its processing and return \fBTCL_ERROR\fR. .RE - .SH "FLAGS" .TP \fBTK_ARGV_DONT_SKIP_FIRST_ARG\fR \fBTk_ParseArgv\fR normally treats \fIargv[0]\fR as a program or command name, and returns it to the caller just as if it -hadn't matched \fIargTable\fR. If this flag is given, then +had not matched \fIargTable\fR. If this flag is given, then \fIargv[0]\fR is not given special treatment. .TP \fBTK_ARGV_NO_ABBREV\fR @@ -274,17 +281,16 @@ only exact matches will be acceptable. \fBTK_ARGV_NO_LEFTOVERS\fR Normally, \fBTk_ParseArgv\fR returns unrecognized arguments to the caller. If this bit is set in \fIflags\fR then \fBTk_ParseArgv\fR -will return an error if it encounters any argument that doesn't +will return an error if it encounters any argument that does not match \fIargTable\fR. The only exception to this rule is \fIargv[0]\fR, which will be returned to the caller with no errors as -long as \fBTK_ARGV_DONT_SKIP_FIRST_ARG\fR isn't specified. +long as \fBTK_ARGV_DONT_SKIP_FIRST_ARG\fR is not specified. .TP \fBTK_ARGV_NO_DEFAULTS\fR Normally, \fBTk_ParseArgv\fR searches an internal table of standard argument specifiers in addition to \fIargTable\fR. If this bit is set in \fIflags\fR, then \fBTk_ParseArgv\fR will use only \fIargTable\fR and not its default table. - .SH EXAMPLE .PP Here is an example definition of an \fIargTable\fR and @@ -306,11 +312,11 @@ Boolean exec = FALSE; * Define option descriptions. */ Tk_ArgvInfo argTable[] = { - {"-X", TK_ARGV_CONSTANT, (char *) 1, (char *) &debugFlag, + {"\-X", TK_ARGV_CONSTANT, (char *) 1, (char *) &debugFlag, "Turn on debugging printfs"}, - {"-N", TK_ARGV_INT, (char *) NULL, (char *) &numReps, + {"\-N", TK_ARGV_INT, (char *) NULL, (char *) &numReps, "Number of repetitions"}, - {"-of", TK_ARGV_STRING, (char *) NULL, (char *) &fileName, + {"\-of", TK_ARGV_STRING, (char *) NULL, (char *) &fileName, "Name of file for output"}, {"x", TK_ARGV_REST, (char *) NULL, (char *) &exec, "File to exec, followed by any arguments (must be last argument)."}, @@ -340,13 +346,15 @@ Note that default values can be assigned to variables named in particular arguments are present in \fIargv\fR. Here are some example command lines and their effects. .CS -prog -N 200 infile # just sets the numReps variable to 200 -prog -of out200 infile # sets fileName to reference "out200" -prog -XN 10 infile # sets the debug flag, also sets numReps +prog \-N 200 infile # just sets the numReps variable to 200 +prog \-of out200 infile # sets fileName to reference "out200" +prog \-XN 10 infile # sets the debug flag, also sets numReps .CE In all of the above examples, \fIargc\fR will be set by \fBTk_ParseArgv\fR to 2, -\fIargv\fR[0] will be ``prog'', \fIargv\fR[1] will be ``infile'', +\fIargv\fR[0] will be +.QW prog , +\fIargv\fR[1] will be +.QW infile , and \fIargv\fR[2] will be NULL. - .SH KEYWORDS arguments, command line, options diff --git a/doc/RestrictEv.3 b/doc/RestrictEv.3 index abf231f..37e8e5e 100644 --- a/doc/RestrictEv.3 +++ b/doc/RestrictEv.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: RestrictEv.3,v 1.3 2004/09/19 16:05:36 dkf Exp $ +'\" RCS: @(#) $Id: RestrictEv.3,v 1.3.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_RestrictEvents 3 "" Tk "Tk Library Procedures" @@ -70,8 +70,9 @@ bindings with the \fBbind\fR Tcl command or by calling \fBTk_CreateEventHandler\fR and \fBTk_DeleteEventHandler\fR from C. The main place where \fBTk_RestrictEvents\fR must be used is when performing synchronous actions (for example, if you need to wait -for a particular event to occur on a particular window but you don't -want to invoke any handlers for any other events). The ``obvious'' +for a particular event to occur on a particular window but you do not +want to invoke any handlers for any other events). The +.QW obvious solution in these situations is to call \fBXNextEvent\fR or \fBXWindowEvent\fR, but these procedures cannot be used because Tk keeps its own event queue that is separate from the X event diff --git a/doc/SetAppName.3 b/doc/SetAppName.3 index 9a93185..a3c7bac 100644 --- a/doc/SetAppName.3 +++ b/doc/SetAppName.3 @@ -5,13 +5,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetAppName.3,v 1.4 2007/01/05 00:00:49 nijtmans Exp $ +'\" RCS: @(#) $Id: SetAppName.3,v 1.4.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures" .BS .SH NAME -Tk_SetAppName \- Set the name of an application for ``send'' commands +Tk_SetAppName \- Set the name of an application for 'send' commands .SH SYNOPSIS .nf \fB#include <tk.h>\fR @@ -37,7 +37,8 @@ display will be able to use the \fBsend\fR command to invoke operations in the application. If \fIname\fR is already in use by some other application on the display, then a new name will be generated by appending -``\fB #2\fR'' to \fIname\fR; if this name is also in use, +.QW "\fB #2\fR" +to \fIname\fR; if this name is also in use, the number will be incremented until an unused name is found. The return value from the procedure is a pointer to the name actually used. @@ -56,7 +57,7 @@ becomes inaccessible via \fBsend\fR. The application can be made accessible again by calling \fBTk_SetAppName\fR. .PP \fBTk_SetAppName\fR is called automatically by \fBTk_Init\fR, -so applications don't normally need to call it explicitly. +so applications do not normally need to call it explicitly. .PP The command \fBtk appname\fR provides Tcl-level access to the functionality of \fBTk_SetAppName\fR. diff --git a/doc/SetOptions.3 b/doc/SetOptions.3 index 4e94bfc..734c336 100644 --- a/doc/SetOptions.3 +++ b/doc/SetOptions.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetOptions.3,v 1.13 2007/01/05 00:00:49 nijtmans Exp $ +'\" RCS: @(#) $Id: SetOptions.3,v 1.13.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_SetOptions 3 8.1 Tk "Tk Library Procedures" @@ -95,10 +95,12 @@ options are supported, these procedures handle all the details of parsing options and storing their values into a C structure associated with the widget or object. The procedures were designed primarily for widgets in Tk, but they can also be used for other kinds of objects that -have configuration options. In the rest of this manual page ``widget'' will -be used to refer to the object whose options are being managed; in -practice the object may not actually be a widget. The term ``widget -record'' is used to refer to the C-level structure in +have configuration options. In the rest of this manual page +.QW widget +will be used to refer to the object whose options are being managed; in +practice the object may not actually be a widget. The term +.QW "widget record" +is used to refer to the C-level structure in which information about a particular widget or object is stored. .PP Note: the easiest way to learn how to use these procedures is to @@ -141,7 +143,7 @@ was already present in the widget record. \fBTk_InitOptions\fR normally returns \fBTCL_OK\fR. If an error occurred while setting the default values (e.g., because a default value was erroneous) then \fBTCL_ERROR\fR is returned and an error message is left in \fIinterp\fR's result if \fIinterp\fR -isn't NULL. +is not NULL. .PP \fBTk_SetOptions\fR is invoked to modify configuration options based on information specified in a Tcl command. The command might be one that @@ -156,10 +158,10 @@ and stores the value of the option into the widget record given by \fIrecordPtr\fR. \fBTk_SetOptions\fR normally returns \fBTCL_OK\fR. If an error occurred (such as an unknown option name or an illegal option value) then \fBTCL_ERROR\fR is returned and an error message is left in -\fIinterp\fR's result if \fIinterp\fR isn't NULL. +\fIinterp\fR's result if \fIinterp\fR is not NULL. .PP \fBTk_SetOptions\fR has two additional features. First, if the -\fImaskPtr\fR argument isn't NULL then it points to an integer +\fImaskPtr\fR argument is not NULL then it points to an integer value that is filled in with information about the options that were modified. For each option in the template passed to \fBTk_CreateOptionTable\fR there is a \fItypeMask\fR field. The @@ -172,8 +174,8 @@ that bit set. Another bit might indicate that the geometry of the widget must be recomputed, and so on. \fBTk_SetOptions\fR OR's together the \fItypeMask\fR fields from all the options that were modified and returns this value at *\fImaskPtr\fR; the caller can then use this information -to optimize itself so that, for example, it doesn't redisplay the widget -if the modified options don't affect the widget's appearance. +to optimize itself so that, for example, it does not redisplay the widget +if the modified options do not affect the widget's appearance. .PP The second additional feature of \fBTk_SetOptions\fR has to do with error recovery. If an error occurs while processing configuration options, this @@ -382,7 +384,7 @@ flag; if a NULL value is set, the internal representation is set to zero. \fBTK_OPTION_END\fR Marks the end of the template. There must be a Tk_OptionSpec structure with \fItype\fR \fBTK_OPTION_END\fR at the end of each template. If the -\fIclientData\fR field of this structure isn't NULL, then it points to +\fIclientData\fR field of this structure is not NULL, then it points to an additional array of Tk_OptionSpec's, which is itself terminated by another \fBTK_OPTION_END\fR entry. Templates may be chained arbitrarily deeply. This feature allows common options to be shared by several @@ -410,7 +412,7 @@ The internal form is a Tk_Justify like the values returned by The value must specify a screen distance such as \fB2i\fR or \fB6.4\fR. The internal form is an integer value giving a distance in pixels, like the values returned by -\fBTk_GetPixelsFromObj\fR. Note: if the \fIobjOffset\fR field isn't +\fBTk_GetPixelsFromObj\fR. Note: if the \fIobjOffset\fR field is not used then information about the original value of this option will be lost. See \fBOBJOFFSET VS. INTERNALOFFSET\fR below for details. This option type supports the \fBTK_OPTION_NULL_OK\fR flag; if a NULL value is set, the @@ -480,7 +482,7 @@ an error occurs in \fBTk_InitOptions\fR. In most cases it is simplest to use the \fIinternalOffset\fR field of a Tk_OptionSpec structure and not the \fIobjOffset\fR field. This makes the internal form of the value immediately available to the -widget code so the value doesn't have to be extracted from an object +widget code so the value does not have to be extracted from an object each time it is used. However, there are two cases where the \fIobjOffset\fR field is useful. The first case is for \fBTK_OPTION_PIXELS\fR options. In this case, the internal form is diff --git a/doc/SetVisual.3 b/doc/SetVisual.3 index c95145a..391a036 100644 --- a/doc/SetVisual.3 +++ b/doc/SetVisual.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetVisual.3,v 1.2 1998/09/14 18:22:53 stanton Exp $ +'\" RCS: @(#) $Id: SetVisual.3,v 1.2.32.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_SetWindowVisual 3 4.0 Tk "Tk Library Procedures" @@ -42,7 +42,7 @@ actually been created in X (e.g. before \fBTk_MapWindow\fR or The safest thing is to call \fBTk_SetWindowVisual\fR immediately after calling \fBTk_CreateWindow\fR. If \fItkwin\fR has already been created before \fBTk_SetWindowVisual\fR -is called then it returns 0 and doesn't make any changes; otherwise +is called then it returns 0 and does not make any changes; otherwise it returns 1 to signify that the operation completed successfully. .PP diff --git a/doc/StrictMotif.3 b/doc/StrictMotif.3 index ab80c33..5ab24c8 100644 --- a/doc/StrictMotif.3 +++ b/doc/StrictMotif.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: StrictMotif.3,v 1.2 1998/09/14 18:22:54 stanton Exp $ +'\" RCS: @(#) $Id: StrictMotif.3,v 1.2.32.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_StrictMotif 3 4.0 Tk "Tk Library Procedures" @@ -30,8 +30,9 @@ variable in the interpreter associated with \fItkwin\fR's application. The value is returned as an integer that is either 0 or 1. 1 means that strict Motif compliance has been requested, so anything that is not part of the Motif specification should be avoided. -0 means that ``Motif-like'' is good enough, and extra features -are welcome. +0 means that +.QW Motif-like +is good enough, and extra features are welcome. .PP This procedure uses a link to the Tcl variable to provide much faster access to the variable's value than could be had by calling diff --git a/doc/TextLayout.3 b/doc/TextLayout.3 index 287906f..3039857 100644 --- a/doc/TextLayout.3 +++ b/doc/TextLayout.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: TextLayout.3,v 1.7 2005/04/06 21:11:54 dkf Exp $ +'\" RCS: @(#) $Id: TextLayout.3,v 1.7.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_ComputeTextLayout 3 8.1 Tk "Tk Library Procedures" @@ -216,7 +216,7 @@ the given point (\fIx, y\fR) to the characters in \fIlayout\fR. Newline/return characters and non-displaying space characters that occur at the end of individual lines in the text layout are ignored for hit detection purposes, but tab characters are not. The return value is 0 if the point -actually hits the \fIlayout\fR. If the point didn't hit the \fIlayout\fR +actually hits the \fIlayout\fR. If the point did not hit the \fIlayout\fR then the return value is the distance in pixels from the point to the \fIlayout\fR. .PP diff --git a/doc/TkInitStubs.3 b/doc/TkInitStubs.3 index 4deb307..e7d93ea 100644 --- a/doc/TkInitStubs.3 +++ b/doc/TkInitStubs.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: TkInitStubs.3,v 1.5 2007/01/05 00:00:48 nijtmans Exp $ +'\" RCS: @(#) $Id: TkInitStubs.3,v 1.5.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_InitStubs 3 8.4 Tk "Tk Library Procedures" @@ -51,7 +51,7 @@ Call \fBTk_InitStubs\fR if the extension before calling any other Tk functions. .IP 2) 5 Define the \fBUSE_TCL_STUBS\fR symbol. Typically, you would include the -\fB-DUSE_TCL_STUBS\fR flag when compiling the extension. +\fB\-DUSE_TCL_STUBS\fR flag when compiling the extension. .IP 3) 5 Link the extension with the Tcl and Tk stubs libraries instead of the standard Tcl and Tk libraries. On Unix platforms, the library diff --git a/doc/Tk_Init.3 b/doc/Tk_Init.3 index 6a3f0bc..da222e8 100644 --- a/doc/Tk_Init.3 +++ b/doc/Tk_Init.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tk_Init.3,v 1.4 2000/09/07 17:38:16 hobbs Exp $ +'\" RCS: @(#) $Id: Tk_Init.3,v 1.4.14.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_Init 3 8.0 Tk "Tk Library Procedures" @@ -54,8 +54,9 @@ Continuous ringing of the bell is a nuisance. .TP \fBclipboard\fR A malicious script could replace the contents of the clipboard with -the string \fB"rm -r *"\fR and lead to surprises when the contents of -the clipboard are pasted. +the string +.QW "\fBrm \-r *\fR" +and lead to surprises when the contents of the clipboard are pasted. .TP \fBgrab\fR Grab can be used to block the user from using any other applications. diff --git a/doc/Tk_Main.3 b/doc/Tk_Main.3 index aebf8db..962a600 100644 --- a/doc/Tk_Main.3 +++ b/doc/Tk_Main.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tk_Main.3,v 1.2 1998/09/14 18:22:54 stanton Exp $ +'\" RCS: @(#) $Id: Tk_Main.3,v 1.2.32.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_Main 3 4.0 Tk "Tk Library Procedures" @@ -46,7 +46,8 @@ nothing but invoke \fBTk_Main\fR. .PP When it is has finished its own initialization, but before it processes commands, \fBTk_Main\fR calls the procedure given by -the \fIappInitProc\fR argument. This procedure provides a ``hook'' +the \fIappInitProc\fR argument. This procedure provides a +.QW hook for the application to perform its own initialization, such as defining application-specific commands. The procedure must have an interface that matches the type \fBTcl_AppInitProc\fR: diff --git a/doc/WindowId.3 b/doc/WindowId.3 index 9c5a2e9..1a00cb9 100644 --- a/doc/WindowId.3 +++ b/doc/WindowId.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: WindowId.3,v 1.11 2007/01/05 00:00:49 nijtmans Exp $ +'\" RCS: @(#) $Id: WindowId.3,v 1.11.2.1 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH Tk_WindowId 3 "8.4" Tk "Tk Library Procedures" @@ -156,11 +156,11 @@ is not a free-standing window, but rather is embedded in some other application. .PP \fBTk_IsMapped\fR returns a non-zero value if \fItkwin\fR -is mapped and zero if \fItkwin\fR isn't mapped. +is mapped and zero if \fItkwin\fR is not mapped. .PP \fBTk_IsTopLevel\fR returns a non-zero value if \fItkwin\fR is a top-level window (its X parent is the root window of the -screen) and zero if \fItkwin\fR isn't a top-level window. +screen) and zero if \fItkwin\fR is not a top-level window. .PP \fBTk_ReqWidth\fR and \fBTk_ReqHeight\fR return information about the window's requested size. These values correspond to the last @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: bind.n,v 1.20.2.1 2007/10/17 14:37:05 dgp Exp $ +'\" RCS: @(#) $Id: bind.n,v 1.20.2.2 2007/11/01 16:37:13 dgp Exp $ '\" .so man.macros .TH bind n 8.0 Tk "Tk Built-In Commands" @@ -17,7 +17,6 @@ bind \- Arrange for X events to invoke Tcl scripts .SH SYNOPSIS \fBbind\fI tag\fR ?\fIsequence\fR? ?\fB+\fR??\fIscript\fR? .BE - .SH "INTRODUCTION" .PP The \fBbind\fR command associates Tcl scripts with X events. @@ -25,7 +24,9 @@ If all three arguments are specified, \fBbind\fR will arrange for \fIscript\fR (a Tcl script) to be evaluated whenever the event(s) given by \fIsequence\fR occur in the window(s) identified by \fItag\fR. -If \fIscript\fR is prefixed with a ``+'', then it is appended to +If \fIscript\fR is prefixed with a +.QW + , +then it is appended to any existing binding for \fIsequence\fR; otherwise \fIscript\fR replaces any existing binding. If \fIscript\fR is an empty string then the current binding for @@ -74,7 +75,7 @@ pattern matches a \fBKeyPress\fR event for the particular character. The second form of pattern is longer but more general. It has the following syntax: .CS -\fB<\fImodifier-modifier-type-detail\fB>\fR +\fB<\fImodifier\-modifier\-type\-detail\fB>\fR .CE The entire event pattern is surrounded by angle brackets. Inside the angle brackets are zero or more modifiers, an event @@ -104,16 +105,16 @@ manual page for each widget for details. Modifiers consist of any of the following values: .DS .ta 6c -\fBControl\fR \fBMod2, M2\fR +\fBControl\fR \fBMod1, M1, Command\fR +\fBAlt\fR \fBMod2, M2, Option\fR \fBShift\fR \fBMod3, M3\fR \fBLock\fR \fBMod4, M4\fR -\fBButton1, B1\fR \fBMod5, M5\fR -\fBButton2, B2\fR \fBMeta, M\fR -\fBButton3, B3\fR \fBAlt\fR -\fBButton4, B4\fR \fBDouble\fR -\fBButton5, B5\fR \fBTriple\fR -\fBMod1, M1\fR \fBQuadruple\fR -\fBExtended\fR +\fBExtended\fR \fBMod5, M5\fR +\fBButton1, B1\fR \fBMeta, M\fR +\fBButton2, B2\fR \fBDouble\fR +\fBButton3, B3\fR \fBTriple\fR +\fBButton4, B4\fR \fBQuadruple\fR +\fBButton5, B5\fR .DE Where more than one value is listed, separated by commas, the values are equivalent. @@ -125,8 +126,8 @@ must include all of those specified in the event pattern. An event may also contain additional modifiers not specified in the binding. For example, if button 1 is pressed while the shift and control keys -are down, the pattern \fB<Control-Button-1>\fR will match -the event, but \fB<Mod1-Button-1>\fR will not. +are down, the pattern \fB<Control\-Button\-1>\fR will match +the event, but \fB<Mod1\-Button\-1>\fR will not. If no modifiers are specified, then any combination of modifiers may be present in the event. .PP @@ -145,14 +146,18 @@ events. They cause a particular event pattern to be repeated 2, 3 or 4 times, and also place a time and space requirement on the sequence: for a sequence of events to match a \fBDouble\fR, \fBTriple\fR or \fBQuadruple\fR pattern, all of the events must occur close together in time and without -substantial mouse motion in between. For example, \fB<Double-Button-1>\fR -is equivalent to \fB<Button-1><Button-1>\fR with the extra time and space +substantial mouse motion in between. For example, \fB<Double\-Button\-1>\fR +is equivalent to \fB<Button\-1><Button\-1>\fR with the extra time and space requirement. .PP +The \fBCommand\fR and \fBOption\fR modifiers are equivalents of \fBMod1\fR +resp. \fBMod2\fR, they correspond to Macintosh-specific modifier keys. +.PP .VS 8.5 The \fBExtended\fR modifier is, at present, specific to Windows. It -appears on events that are associated with the keys on the "extended -keyboard." On a US keyboard, the extended keys include the \fBAlt\fR +appears on events that are associated with the keys on the +.QW "extended keyboard" . +On a US keyboard, the extended keys include the \fBAlt\fR and \fBControl\fR keys at the right of the keyboard, the cursor keys in the cluster to the left of the numeric pad, the \fBNumLock\fR key, the \fBBreak\fR key, the \fBPrintScreen\fR key, and the \fB/\fR and @@ -268,8 +273,9 @@ it is destroyed. .RS .PP When the \fBDestroy\fR event is delivered -to a widget, it is in a ``half-dead'' state: the widget still exists, -but most operations on it will fail. +to a widget, it is in a +.QW half-dead +state: the widget still exists, but most operations on it will fail. .RE .IP "\fBFocusIn\fR, \fBFocusOut\fR" 5 The \fBFocusIn\fR and \fBFocusOut\fR events are generated @@ -280,8 +286,8 @@ and a \fBFocusIn\fR event is sent to the new one. .PP In addition, if the old and new focus windows do not share a common parent, -``virtual crossing'' focus events are sent to the intermediate -windows in the hierarchy. +.QW "virtual crossing" +focus events are sent to the intermediate windows in the hierarchy. Thus a \fBFocusIn\fR event indicates that the target window or one of its descendants has acquired the focus, and a \fBFocusOut\fR event indicates that the focus @@ -301,7 +307,8 @@ events are only delivered to the window owning the grab. .PP In addition, when the pointer moves between two windows, \fBEnter\fR and \fBLeave\fR -``virtual crossing'' events are sent to intermediate windows +.QW "virtual crossing" +events are sent to intermediate windows in the hierarchy in the same manner as for \fBFocusIn\fR and \fBFocusOut\fR events. .RE @@ -316,7 +323,7 @@ associated with a window has been changed, installed, or uninstalled. .RS .PP Widgets may be assigned a private colormap by -specifying a \fB-colormap\fR option; the window manager +specifying a \fB\-colormap\fR option; the window manager is responsible for installing and uninstalling colormaps as necessary. .PP @@ -350,7 +357,7 @@ position in the stacking order. .PP The last part of a long event specification is \fIdetail\fR. In the case of a \fBButtonPress\fR or \fBButtonRelease\fR event, it is the -number of a button (1-5). If a button number is given, then only an +number of a button (1\-5). If a button number is given, then only an event on that particular button will match; if no button number is given, then an event on any button will match. Note: giving a specific button number is different than specifying a button modifier; @@ -359,17 +366,22 @@ while in the second it refers to some other button that is already depressed when the matching event occurs. If a button number is given then \fItype\fR may be omitted: if will default to \fBButtonPress\fR. For example, the specifier \fB<1>\fR -is equivalent to \fB<ButtonPress-1>\fR. +is equivalent to \fB<ButtonPress\-1>\fR. .PP If the event type is \fBKeyPress\fR or \fBKeyRelease\fR, then \fIdetail\fR may be specified in the form of an X keysym. Keysyms are textual specifications for particular keys on the keyboard; -they include all the alphanumeric ASCII characters (e.g. ``a'' is -the keysym for the ASCII character ``a''), plus descriptions for -non-alphanumeric characters (``comma'' is the keysym for the comma -character), plus descriptions for all the non-ASCII keys on the -keyboard (``Shift_L'' is the keysym for the left shift key, and -``F1'' is the keysym for the F1 function key, if it exists). The +they include all the alphanumeric ASCII characters (e.g. +.QW a +is the keysym for the ASCII character +.QW a ), +plus descriptions for non-alphanumeric characters +.PQ comma "is the keysym for the comma character" , +plus descriptions for all the non-ASCII keys on the keyboard (e.g. +.QW Shift_L +is the keysym for the left shift key, and +.QW F1 +is the keysym for the F1 function key, if it exists). The complete list of keysyms is not presented here; it is available in other X documentation and may vary from system to system. @@ -377,8 +389,8 @@ If necessary, you can use the \fB%K\fR notation described below to print out the keysym name for a particular key. If a keysym \fIdetail\fR is given, then the \fItype\fR field may be omitted; it will default to \fBKeyPress\fR. -For example, \fB<Control-comma>\fR is equivalent to -\fB<Control-KeyPress-comma>\fR. +For example, \fB<Control\-comma>\fR is equivalent to +\fB<Control\-KeyPress\-comma>\fR. .SH "BINDING SCRIPTS AND SUBSTITUTIONS" .PP The \fIscript\fR argument to \fBbind\fR is a Tcl script, @@ -513,7 +525,7 @@ For \fBConfigure\fR and \fBCreate\fR requests, the \fIx\fR and \fIy\fR coordinates of the window relative to its parent window. .IP \fB%A\fR 5 Substitutes the UNICODE character corresponding to the event, or -the empty string if the event doesn't correspond to a UNICODE character +the empty string if the event does not correspond to a UNICODE character (e.g. the shift key was pressed). \fBXmbLookupString\fR (or \fBXLookupString\fR when input method support is turned off) does all the work of translating from the event to a UNICODE character. @@ -530,8 +542,11 @@ the delta. The sign of the value represents the direction the mouse wheel was scrolled. .IP \fB%E\fR 5 The \fIsend_event\fR field from the event. Valid for all event types. -\fB0\fR indicates that this is a ``normal'' event, \fB1\fR indicates -that it is a ``synthetic'' event generated by \fBSendEvent\fR. +\fB0\fR indicates that this is a +.QW normal +event, \fB1\fR indicates that it is a +.QW synthetic +event generated by \fBSendEvent\fR. .IP \fB%K\fR 5 The keysym corresponding to the event, substituted as a textual string. Valid only for \fBKeyPress\fR and \fBKeyRelease\fR events. @@ -586,7 +601,7 @@ actually executed will be .CE This will cause the \fBinsert\fR to receive the original replacement string (open square bracket) as its first argument. -If the extra backslash hadn't been added, Tcl would not have been +If the extra backslash had not been added, Tcl would not have been able to parse the script correctly. .SH "MULTIPLE MATCHES" .PP @@ -614,21 +629,28 @@ have the same \fItag\fR, then the most specific binding is chosen and its script is evaluated. The following tests are applied, in order, to determine which of several matching sequences is more specific: -(a) an event pattern that specifies a specific button or key is more specific -than one that doesn't; -(b) a longer sequence (in terms of number +.RS +.IP (a) +an event pattern that specifies a specific button or key is more specific +than one that does not; +.IP (b) +a longer sequence (in terms of number of events matched) is more specific than a shorter sequence; -(c) if the modifiers specified in one pattern are a subset of the +.IP (c) +if the modifiers specified in one pattern are a subset of the modifiers in another pattern, then the pattern with more modifiers is more specific. -(d) a virtual event whose physical pattern matches the sequence is less +.IP (d) +a virtual event whose physical pattern matches the sequence is less specific than the same physical pattern that is not associated with a virtual event. -(e) given a sequence that matches two or more virtual events, one +.IP (e) +given a sequence that matches two or more virtual events, one of the virtual events will be chosen, but the order is undefined. +.RE .PP If the matching sequences contain more than one event, then tests -(c)-(e) are applied in order from the most recent event to the least recent +(c)\-(e) are applied in order from the most recent event to the least recent event in the sequences. If these tests fail to determine a winner, then the most recently registered sequence is the winner. .PP @@ -637,13 +659,13 @@ same sequence, and both of those virtual events are bound to the same window tag, then only one of the virtual events will be triggered, and it will be picked at random: .CS -event add <<Paste>> <Control-y> -event add <<Paste>> <Button-2> -event add <<Scroll>> <Button-2> +event add <<Paste>> <Control\-y> +event add <<Paste>> <Button\-2> +event add <<Scroll>> <Button\-2> \fBbind\fR Entry <<Paste>> {puts Paste} \fBbind\fR Entry <<Scroll>> {puts Scroll} .CE -If the user types Control-y, the \fB<<Paste>>\fR binding +If the user types Control\-y, the \fB<<Paste>>\fR binding will be invoked, but if the user presses button 2 then one of either the \fB<<Paste>>\fR or the \fB<<Scroll>>\fR bindings will be invoked, but exactly which one gets invoked is undefined. @@ -657,12 +679,12 @@ When a \fIsequence\fR specified in a \fBbind\fR command contains more than one event pattern, then its script is executed whenever the recent events (leading up to and including the current event) match the given sequence. This means, for example, that if button 1 is -clicked repeatedly the sequence \fB<Double-ButtonPress-1>\fR will match +clicked repeatedly the sequence \fB<Double\-ButtonPress\-1>\fR will match each button press but the first. If extraneous events that would prevent a match occur in the middle of an event sequence then the extraneous events are ignored unless they are \fBKeyPress\fR or \fBButtonPress\fR events. -For example, \fB<Double-ButtonPress-1>\fR will match a sequence of +For example, \fB<Double\-ButtonPress\-1>\fR will match a sequence of presses of button 1, even though there will be \fBButtonRelease\fR events (and possibly \fBMotion\fR events) between the \fBButtonPress\fR events. @@ -685,7 +707,7 @@ The \fBbgerror\fR command will be executed at global level Arrange for a string describing the motion of the mouse to be printed out when the mouse is double-clicked: .CS -\fBbind\fR . <Double-1> { +\fBbind\fR . <Double\-1> { puts "hi from (%x,%y)" } .CE @@ -694,14 +716,12 @@ A little GUI that displays what the keysym name of the last key pressed is: .CS set keysym "Press any key" -pack [label .l -textvariable keysym -padx 2m -pady 1m] +pack [label .l \-textvariable keysym \-padx 2m \-pady 1m] \fBbind\fR . <Key> { set keysym "You pressed %K" } .CE - .SH "SEE ALSO" bgerror(n), bindtags(n), event(n), focus(n), grab(n), keysyms(n) - .SH KEYWORDS binding, event diff --git a/doc/bindtags.n b/doc/bindtags.n index f82b61b..3f80020 100644 --- a/doc/bindtags.n +++ b/doc/bindtags.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: bindtags.n,v 1.4 2004/10/28 10:22:51 dkf Exp $ +'\" RCS: @(#) $Id: bindtags.n,v 1.4.2.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH bindtags n 4.0 Tk "Tk Built-In Commands" @@ -57,8 +57,9 @@ For example, the command .CE reverses the order in which binding scripts will be evaluated for a button named \fB.b\fR so that \fBall\fR bindings are invoked -first, following by bindings for \fB.b\fR's toplevel (``.''), followed by -class bindings, followed by bindings for \fB.b\fR. +first, following by bindings for \fB.b\fR's toplevel +.PQ . "" , +followed by class bindings, followed by bindings for \fB.b\fR. If \fItagList\fR is an empty list then the binding tags for \fIwindow\fR are returned to the default state described above. .PP diff --git a/doc/button.n b/doc/button.n index 54c0a2f..9202150 100644 --- a/doc/button.n +++ b/doc/button.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: button.n,v 1.11.2.1 2007/09/04 17:44:19 dgp Exp $ +'\" RCS: @(#) $Id: button.n,v 1.11.2.2 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH button n 4.4 Tk "Tk Built-In Commands" @@ -47,7 +47,7 @@ Specifies a desired height for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in lines of text. -If this option isn't specified, the button's desired height is computed +If this option is not specified, the button's desired height is computed from the size of the image or bitmap or text being displayed in it. .OP \-overrelief overRelief OverRelief Specifies an alternative relief for the button, to be used when the @@ -72,7 +72,7 @@ Specifies a desired width for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in characters. -If this option isn't specified, the button's desired width is computed +If this option is not specified, the button's desired width is computed from the size of the image or bitmap or text being displayed in it. .BE @@ -178,23 +178,25 @@ The behavior of buttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. .SH EXAMPLES -This is the classic Tk "Hello, World!" demonstration: +This is the classic Tk +.QW "Hello, World!" +demonstration: .PP .CS - \fBbutton\fR .b -text "Hello, World!" -command exit + \fBbutton\fR .b \-text "Hello, World!" \-command exit pack .b .CE .PP This example demonstrates how to handle button accelerators: .PP .CS - \fBbutton\fR .b1 -text Hello -underline 0 - \fBbutton\fR .b2 -text World -underline 0 - bind . <Key-h> {.b1 flash; .b1 invoke} - bind . <Key-w> {.b2 flash; .b2 invoke} + \fBbutton\fR .b1 \-text Hello \-underline 0 + \fBbutton\fR .b2 \-text World \-underline 0 + bind . <Key\-h> {.b1 flash; .b1 invoke} + bind . <Key\-w> {.b2 flash; .b2 invoke} pack .b1 .b2 .CE .SH "SEE ALSO" -ttk_button(n) +ttk::button(n) .SH KEYWORDS button, widget diff --git a/doc/canvas.n b/doc/canvas.n index 2a104f1..8add34a 100644 --- a/doc/canvas.n +++ b/doc/canvas.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: canvas.n,v 1.24.2.3 2007/10/27 04:23:13 dgp Exp $ +'\" RCS: @(#) $Id: canvas.n,v 1.24.2.4 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH canvas n 8.3 Tk "Tk Built-In Commands" @@ -28,8 +28,9 @@ canvas \- Create and manipulate canvas widgets .SH "WIDGET-SPECIFIC OPTIONS" .OP \-closeenough closeEnough CloseEnough Specifies a floating-point value indicating how close the mouse cursor -must be to an item before it is considered to be ``inside'' the item. -Defaults to 1.0. +must be to an item before it is considered to be +.QW inside +the item. Defaults to 1.0. .OP \-confine confine Confine Specifies a boolean value that indicates whether or not it should be allowable to set the canvas's view outside the region defined by the @@ -112,8 +113,9 @@ The items in a canvas are ordered for purposes of display, with the first item in the display list being displayed first, followed by the next item in the list, and so on. Items later in the display list obscure those that are -earlier in the display list and are sometimes referred to -as being ``on top'' of earlier items. +earlier in the display list and are sometimes referred to as being +.QW "on top" +of earlier items. When a new item is created it is placed at the end of the display list, on top of everything else. Widget commands may be used to re-arrange the order of the @@ -136,11 +138,15 @@ canvas widget. Each item may also have any number of \fItags\fR associated with it. A tag is just a string of characters, and it may take any form except that of an integer. -For example, ``x123'' is OK but ``123'' isn't. +For example, +.QW x123 +is OK but +.QW 123 +is not. The same tag may be associated with many different items. This is commonly done to group items in various interesting -ways; for example, all selected items might be given the -tag ``selected''. +ways; for example, all selected items might be given the tag +.QW selected . .PP The tag \fBall\fR is implicitly associated with every item in the canvas; it may be used to invoke operations on @@ -164,8 +170,12 @@ an argument specifies either an id that selects a single item or a tag that selects zero or more items. .PP \fItagOrId\fR may contain a logical expressions of -tags by using operators: '&&', '||', '^' '!', and parenthesized -subexpressions. For example: +tags by using operators: +.QW \fB&&\fR , +.QW \fB||\fR , +.QW \fB^\fR , +.QW \fB!\fR , +and parenthesized subexpressions. For example: .CS .c find withtag {(a&&!b)||(!a&&b)} .CE @@ -173,7 +183,11 @@ or equivalently: .CS .c find withtag {a^b} .CE -will find only those items with either "a" or "b" tags, but not both. +will find only those items with either +.QW a +or +.QW b +tags, but not both. .PP Some widget commands only operate on a single item at a time; if \fItagOrId\fR is specified in a way that @@ -238,7 +252,7 @@ support as many of these forms as practical. Note that it is possible to refer to the character just after the last one in the text item; this is necessary for such tasks as inserting new text at the end of the item. -Lines and Polygons don't support the insertion cursor +Lines and Polygons do not support the insertion cursor and the selection. Their indices are supposed to be even always, because coordinates always appear in pairs. .TP 10 @@ -267,11 +281,11 @@ is drawn in this item. Not valid for lines and polygons. .TP 10 \fBsel.first\fR Refers to the first selected character in the item. -If the selection isn't in this item then this form is illegal. +If the selection is not in this item then this form is illegal. .TP 10 \fBsel.last\fR Refers to the last selected character in the item. -If the selection isn't in this item then this form is illegal. +If the selection is not in this item then this form is illegal. .TP 10 \fB@\fIx,y\fR Refers to the character or coordinate at the point given by \fIx\fR and @@ -286,24 +300,32 @@ Many items support the notion of a dash pattern for outlines. .PP The first possible syntax is a list of integers. Each element represents the number of pixels of a line segment. Only the odd -segments are drawn using the "outline" color. The other segments -are drawn transparent. +segments are drawn using the +.QW outline +color. The other segments are drawn transparent. .PP The second possible syntax is a character list containing only -5 possible characters \fB[.,-_ ]\fR. The space can be used -to enlarge the space between other line elements, and can not +5 possible characters +.QW "\fB.,\-_ \fR" . +The space can be used +to enlarge the space between other line elements, and cannot occur as the first position in the string. Some examples: - -dash . = -dash {2 4} - -dash - = -dash {6 4} - -dash -. = -dash {6 4 2 4} - -dash -.. = -dash {6 4 2 4 2 4} - -dash {. } = -dash {2 8} - -dash , = -dash {4 4} +.CS +\-dash . \(-> \-dash {2 4} +\-dash \- \(-> \-dash {6 4} +\-dash \-. \(-> \-dash {6 4 2 4} +\-dash \-.. \(-> \-dash {6 4 2 4 2 4} +\-dash {. } \(-> \-dash {2 8} +\-dash , \(-> \-dash {4 4} +.CE .PP The main difference of this syntax with the previous is that it is shape-conserving. This means that all values in the dash list will be multiplied by the line width before display. This -assures that "." will always be displayed as a dot and "-" +assures that +.QW . +will always be displayed as a dot and +.QW \- always as a dash regardless of the line width. .PP On systems which support only a limited set of dash patterns, the dash @@ -328,7 +350,7 @@ The following widget commands are possible for canvas widgets: For each item that meets the constraints specified by \fIsearchSpec\fR and the \fIarg\fRs, add \fItag\fR to the list of tags associated with the item if it -isn't already present on that list. +is not already present on that list. It is possible that no items will satisfy the constraints given by \fIsearchSpec\fR and \fIarg\fRs, in which case the command has no effect. @@ -391,7 +413,9 @@ Selects all the items given by \fItagOrId\fR. \fIpathName \fBbbox \fItagOrId\fR ?\fItagOrId tagOrId ...\fR? Returns a list with four elements giving an approximate bounding box for all the items named by the \fItagOrId\fR arguments. -The list has the form ``\fIx1 y1 x2 y2\fR'' such that the drawn +The list has the form +.QW "\fIx1 y1 x2 y2\fR" +such that the drawn areas of all the named elements are within the region bounded by \fIx1\fR on the left, \fIx2\fR on the right, \fIy1\fR on the top, and \fIy2\fR on the bottom. @@ -414,8 +438,9 @@ on the syntax of \fIsequence\fR and the substitutions performed on \fIcommand\fR before invoking it. If all arguments are specified then a new binding is created, replacing any existing binding for the same \fIsequence\fR and \fItagOrId\fR -(if the first character of \fIcommand\fR is ``+'' then \fIcommand\fR -augments an existing binding rather than replacing it). +(if the first character of \fIcommand\fR is +.QW + +then \fIcommand\fR augments an existing binding rather than replacing it). In this case the return value is an empty string. If \fIcommand\fR is omitted then the command returns the \fIcommand\fR associated with \fItagOrId\fR and \fIsequence\fR (an error occurs @@ -428,8 +453,9 @@ defined for \fItagOrId\fR. The only events for which bindings may be specified are those related to the mouse and keyboard (such as \fBEnter\fR, \fBLeave\fR, \fBButtonPress\fR, \fBMotion\fR, and \fBKeyPress\fR) or virtual events. -The handling of events in canvases uses the current item defined in ITEM -IDS AND TAGS above. \fBEnter\fR and \fBLeave\fR events trigger for an +The handling of events in canvases uses the current item defined in +\fBITEM IDS AND TAGS\fR above. \fBEnter\fR and \fBLeave\fR events +trigger for an item when it becomes the current item or ceases to be the current item; note that these events are different than \fBEnter\fR and \fBLeave\fR events for windows. Mouse-related events are directed to the current @@ -519,11 +545,11 @@ This command returns the id for the new item. \fIpathName \fBdchars \fItagOrId first \fR?\fIlast\fR? For each item given by \fItagOrId\fR, delete the characters, or coordinates, in the range given by \fIfirst\fR and \fIlast\fR, inclusive. -If some of the items given by \fItagOrId\fR don't support +If some of the items given by \fItagOrId\fR do not support indexing operations then they ignore dchars. Text items interpret \fIfirst\fR and \fIlast\fR as indices to a character, line and polygon items interpret them indices to a coordinate (an x,y pair). -Indices are described in INDICES above. +Indices are described in \fBINDICES\fR above. If \fIlast\fR is omitted, it defaults to \fIfirst\fR. This command returns an empty string. .TP @@ -535,7 +561,7 @@ an empty string. For each of the items given by \fItagOrId\fR, delete the tag given by \fItagToDelete\fR from the list of those associated with the item. -If an item doesn't have the tag \fItagToDelete\fR then +If an item does not have the tag \fItagToDelete\fR then the item is unaffected by the command. If \fItagToDelete\fR is omitted then it defaults to \fItagOrId\fR. This command returns an empty string. @@ -554,8 +580,8 @@ Set the keyboard focus for the canvas widget to the item given by If \fItagOrId\fR refers to several items, then the focus is set to the first such item in the display list that supports the insertion cursor. -If \fItagOrId\fR doesn't refer to any items, or if none of them -support the insertion cursor, then the focus isn't changed. +If \fItagOrId\fR does not refer to any items, or if none of them +support the insertion cursor, then the focus is not changed. If \fItagOrId\fR is an empty string, then the focus item is reset so that no item has the focus. If \fItagOrId\fR is not specified then the command returns the @@ -568,12 +594,12 @@ the insertion cursor and all keyboard events will be directed to that item. The focus item within a canvas and the focus window on the screen (set with the \fBfocus\fR command) are totally independent: -a given item doesn't actually have the input focus unless (a) +a given item does not actually have the input focus unless (a) its canvas is the focus window and (b) the item is the focus item within the canvas. In most cases it is advisable to follow the \fBfocus\fR widget command with the \fBfocus\fR command to set the focus window to -the canvas (if it wasn't there already). +the canvas (if it was not there already). .RE .TP \fIpathName \fBgettags\fR \fItagOrId\fR @@ -581,27 +607,27 @@ Return a list whose elements are the tags associated with the item given by \fItagOrId\fR. If \fItagOrId\fR refers to more than one item, then the tags are returned from the first such item in the display list. -If \fItagOrId\fR doesn't refer to any items, or if the item +If \fItagOrId\fR does not refer to any items, or if the item contains no tags, then an empty string is returned. .TP \fIpathName \fBicursor \fItagOrId index\fR Set the position of the insertion cursor for the item(s) given by \fItagOrId\fR to just before the character whose position is given by \fIindex\fR. -If some or all of the items given by \fItagOrId\fR don't support +If some or all of the items given by \fItagOrId\fR do not support an insertion cursor then this command has no effect on them. -See INDICES above for a description of the +See \fBINDICES\fR above for a description of the legal forms for \fIindex\fR. Note: the insertion cursor is only displayed in an item if that item currently has the keyboard focus (see the widget command \fBfocus\fR, below), but the cursor position may -be set even when the item doesn't have the focus. +be set even when the item does not have the focus. This command returns an empty string. .TP \fIpathName \fBindex \fItagOrId index\fR This command returns a decimal string giving the numerical index within \fItagOrId\fR corresponding to \fIindex\fR. \fIIndex\fR gives a textual description of the desired position -as described in INDICES above. +as described in \fBINDICES\fR above. Text items interpret \fIindex\fR as an index to a character, line and polygon items interpret it as an index to a coordinate (an x,y pair). The return value is guaranteed to lie between 0 and the number @@ -618,7 +644,7 @@ Text items interpret \fIbeforeThis\fR as an index to a character, line and polygon items interpret it as an index to a coordinate (an x,y pair). For lines and polygons the \fIstring\fR must be a valid coordinate sequence. -See INDICES above for information about the forms allowed +See \fBINDICES\fR above for information about the forms allowed for \fIbeforeThis\fR. This command returns an empty string. .TP @@ -691,7 +717,7 @@ Note: by default Postscript is only generated for information that appears in the canvas's window on the screen. If the canvas is freshly created it may still have its initial size of 1x1 pixel so nothing will appear in the Postscript. To get around this problem -either invoke the "update" command to wait for the canvas window +either invoke the \fBupdate\fR command to wait for the canvas window to reach its final size, or else use the \fB\-width\fR and \fB\-height\fR options to specify the area of the canvas to print. The \fIoption\fR\-\fIvalue\fR argument pairs provide additional @@ -703,13 +729,14 @@ options are supported: \fIVarName\fR must be the name of an array variable that specifies a color mapping to use in the Postscript. Each element of \fIvarName\fR must consist of Postscript -code to set a particular color value (e.g. ``\fB1.0 1.0 0.0 setrgbcolor\fR''). +code to set a particular color value (e.g. +.QW "\fB1.0 1.0 0.0 setrgbcolor\fR" ). When outputting color information in the Postscript, Tk checks to see if there is an element of \fIvarName\fR with the same name as the color. If so, Tk uses the value of the element as the Postscript command to set the color. -If this option hasn't been specified, or if there isn't an entry +If this option has not been specified, or if there is no entry in \fIvarName\fR for a given color, then Tk uses the red, green, and blue intensities from the X color. .TP @@ -721,7 +748,7 @@ to black or white). .TP \fB\-file \fIfileName\fR Specifies the name of the file in which to write the Postscript. -If this option isn't specified then the Postscript is returned as the +If this option is not specified then the Postscript is returned as the result of the command instead of being written to a file. .TP \fB\-fontmap \fIvarName\fR @@ -792,9 +819,10 @@ Defaults to the center of the page. \fIBoolean\fR specifies whether the printed area is to be rotated 90 degrees. In non-rotated output the x-axis of the printed area runs along -the short dimension of the page (``portrait'' orientation); -in rotated output the x-axis runs along the long dimension of the -page (``landscape'' orientation). +the short dimension of the page +.PQ portrait orientation ; +in rotated output the x-axis runs along the long dimension of the page +.PQ landscape orientation . Defaults to non-rotated. .TP \fB\-width \fIsize\fR @@ -875,7 +903,7 @@ an item that supports indexing and selection; if it refers to multiple items then the first of these that supports indexing and the selection is used. \fIIndex\fR gives a textual description of a position -within \fItagOrId\fR, as described in INDICES above. +within \fItagOrId\fR, as described in \fBINDICES\fR above. .RS .TP \fIpathName \fBselect adjust \fItagOrId index\fR @@ -885,14 +913,14 @@ end of the selection to be at \fIindex\fR (i.e. including but not going beyond \fIindex\fR). The other end of the selection is made the anchor point for future \fBselect to\fR commands. -If the selection isn't currently in \fItagOrId\fR then +If the selection is not currently in \fItagOrId\fR then this command behaves the same as the \fBselect to\fR widget command. Returns an empty string. .TP \fIpathName \fBselect clear\fR Clear the selection if it is in this widget. -If the selection isn't in this widget then the command +If the selection is not in this widget then the command has no effect. Returns an empty string. .TP @@ -900,7 +928,7 @@ Returns an empty string. Set the selection anchor point for the widget to be just before the character given by \fIindex\fR in the item given by \fItagOrId\fR. -This command doesn't change the selection; it just sets +This command does not change the selection; it just sets the fixed end of the selection for future \fBselect to\fR commands. Returns an empty string. @@ -920,7 +948,7 @@ it will include the character given by the anchor point only if \fIindex\fR is greater than or equal to the anchor point. The anchor point is determined by the most recent \fBselect adjust\fR or \fBselect from\fR command for this widget. -If the selection anchor point for the widget isn't currently in +If the selection anchor point for the widget is not currently in \fItagOrId\fR, then it is set to the same character given by \fIindex\fR. Returns an empty string. @@ -931,7 +959,7 @@ Returns the type of the item given by \fItagOrId\fR, such as \fBrectangle\fR or \fBtext\fR. If \fItagOrId\fR refers to more than one item, then the type of the first item in the display list is returned. -If \fItagOrId\fR doesn't refer to any items at all then +If \fItagOrId\fR does not refer to any items at all then an empty string is returned. .TP \fIpathName \fBxview \fR?\fIargs\fR? @@ -1015,7 +1043,7 @@ first, the form of the \fBcreate\fR command used to create instances of the type; and second, a set of configuration options for items of that type, which may be used in the \fBcreate\fR and \fBitemconfigure\fR widget commands. -Most items don't support indexing or selection or the commands +Most items do not support indexing or selection or the commands related to them, such as \fBindex\fR and \fBinsert\fR. Where items do support these facilities, it is noted explicitly in the descriptions below. @@ -1037,12 +1065,12 @@ This option specifies dash patterns for the normal, active state, and disabled state of an item. \fIpattern\fR may have any of the forms accepted by \fBTk_GetDash\fR. If the dash options are omitted then the default is a solid outline. -See "DASH PATTERNS" for more information. +See \fBDASH PATTERNS\fR for more information. .TP \fB\-dashoffset \fIoffset\fR The starting \fIoffset\fR in pixels into the pattern provided by the \fB\-dash\fR option. \fB\-dashoffset\fR is ignored if there is no -\fB-dash\fR pattern. The \fIoffset\fR may have any of the forms described +\fB\-dash\fR pattern. The \fIoffset\fR may have any of the forms described in the \fBCOORDINATES\fR section above. .TP \fB\-fill \fIcolor\fR @@ -1076,7 +1104,7 @@ Specifies the offset of stipples. The offset value can be of the form first case the origin is the origin of the toplevel of the current window. For the canvas itself and canvas objects the origin is the canvas origin, but putting \fB#\fR in front of the coordinate pair indicates using the -toplevel origin instead. For canvas objects, the \fB-offset\fR option is +toplevel origin instead. For canvas objects, the \fB\-offset\fR option is used for stippling as well. For the line and polygon canvas items you can also specify an index as argument, which connects the stipple origin to one of the coordinate points of the line/polygon. @@ -1091,7 +1119,7 @@ outline of the item in its normal, active and disabled states. Indicates that the outline for the item should be drawn with a stipple pattern; \fIbitmap\fR specifies the stipple pattern to use, in any of the forms accepted by \fBTk_GetBitmap\fR. -If the \fB\-outline\fR option hasn't been specified then this option +If the \fB\-outline\fR option has not been specified then this option has no effect. If \fIbitmap\fR is an empty string (the default), then the outline is drawn in a solid fashion. @@ -1107,7 +1135,7 @@ This option specifies stipple patterns that should be used to fill the item in its normal, active and disabled states. \fIbitmap\fR specifies the stipple pattern to use, in any of the forms accepted by \fBTk_GetBitmap\fR. -If the \fB\-fill\fR option hasn't been specified then this option +If the \fB\-fill\fR option has not been specified then this option has no effect. If \fIbitmap\fR is an empty string (the default), then filling is done in a solid fashion. @@ -1157,7 +1185,7 @@ pairs, each of which sets one of the configuration options for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be used in \fBitemconfigure\fR widget commands to change the item's configuration. -.br +.PP The following standard options are supported by arcs: .CS \-dash @@ -1190,7 +1218,7 @@ Specifies the size of the angular range occupied by the arc. The arc's range extends for \fIdegrees\fR degrees counter-clockwise from the starting angle given by the \fB\-start\fR option. \fIDegrees\fR may be negative. -If it is greater than 360 or less than -360, then \fIdegrees\fR +If it is greater than 360 or less than \-360, then \fIdegrees\fR modulo 360 is used as the extent. .TP \fB\-start \fIdegrees\fR @@ -1227,7 +1255,7 @@ pairs, each of which sets one of the configuration options for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be used in \fBitemconfigure\fR widget commands to change the item's configuration. -.br +.PP The following standard options are supported by bitmaps: .CS \-state @@ -1249,10 +1277,11 @@ This option defaults to \fBcenter\fR. \fB\-activebackground \fIbitmap\fR .TP \fB\-disabledbackground \fIbitmap\fR -Specifies the color to use for each of the bitmap's '0' valued pixels -in its normal, active and disabled states. +Specifies the color to use for each of the bitmap's +.QW 0 +valued pixels in its normal, active and disabled states. \fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR. -If this option isn't specified, or if it is specified as an empty +If this option is not specified, or if it is specified as an empty string, then nothing is displayed where the bitmap pixels are 0; this produces a transparent effect. .TP @@ -1270,8 +1299,9 @@ disabled states. \fB\-activeforeground \fIbitmap\fR .TP \fB\-disabledforeground \fIbitmap\fR -Specifies the color to use for each of the bitmap's '1' valued pixels -in its normal, active and disabled states. +Specifies the color to use for each of the bitmap's +.QW 1 +valued pixels in its normal, active and disabled states. \fIColor\fR may have any of the forms accepted by \fBTk_GetColor\fR and defaults to \fBblack\fR. .SH "IMAGE ITEMS" @@ -1291,7 +1321,7 @@ pairs, each of which sets one of the configuration options for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be used in \fBitemconfigure\fR widget commands to change the item's configuration. -.br +.PP The following standard options are supported by images: .CS \-state @@ -1336,7 +1366,7 @@ pairs, each of which sets one of the configuration options for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be used in \fBitemconfigure\fR widget commands to change the item's configuration. -.br +.PP The following standard options are supported by lines: .CS \-dash @@ -1377,14 +1407,16 @@ The second element gives the distance along the line from the trailing points of the arrowhead to the tip, and the third element gives the distance from the outside edge of the line to the trailing points. -If this option isn't specified then Tk picks a ``reasonable'' shape. +If this option is not specified then Tk picks a +.QW reasonable +shape. .TP \fB\-capstyle \fIstyle\fR Specifies the ways in which caps are to be drawn at the endpoints of the line. \fIStyle\fR may have any of the forms accepted by \fBTk_GetCapStyle\fR (\fBbutt\fR, \fBprojecting\fR, or \fBround\fR). -If this option isn't specified then it defaults to \fBbutt\fR. +If this option is not specified then it defaults to \fBbutt\fR. Where arrowheads are drawn the cap style is ignored. .TP \fB\-joinstyle \fIstyle\fR @@ -1392,7 +1424,7 @@ Specifies the ways in which joints are to be drawn at the vertices of the line. \fIStyle\fR may have any of the forms accepted by \fBTk_GetCapStyle\fR (\fBbevel\fR, \fBmiter\fR, or \fBround\fR). -If this option isn't specified then it defaults to \fBround\fR. +If this option is not specified then it defaults to \fBround\fR. If the line only contains two points then this option is irrelevant. .TP @@ -1446,7 +1478,7 @@ pairs, each of which sets one of the configuration options for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be used in \fBitemconfigure\fR widget commands to change the item's configuration. -.br +.PP The following standard options are supported by ovals: .CS \-dash @@ -1493,7 +1525,7 @@ pairs, each of which sets one of the configuration options for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be used in \fBitemconfigure\fR widget commands to change the item's configuration. -.br +.PP The following standard options are supported by polygons: .CS \-dash @@ -1526,7 +1558,7 @@ Specifies the ways in which joints are to be drawn at the vertices of the outline. \fIStyle\fR may have any of the forms accepted by \fBTk_GetCapStyle\fR (\fBbevel\fR, \fBmiter\fR, or \fBround\fR). -If this option isn't specified then it defaults to \fBround\fR. +If this option is not specified then it defaults to \fBround\fR. .TP \fB\-smooth \fIboolean\fR \fIBoolean\fR must have one of the forms accepted by \fBTcl_GetBoolean\fR @@ -1558,8 +1590,9 @@ will be approximated with \fInumber\fR line segments. This option is ignored unless the \fB\-smooth\fR option is true or \fBraw\fR. .PP Polygon items are different from other items such as rectangles, ovals -and arcs in that interior points are considered to be ``inside'' a -polygon (e.g. for purposes of the \fBfind closest\fR and +and arcs in that interior points are considered to be +.QW inside +a polygon (e.g. for purposes of the \fBfind closest\fR and \fBfind overlapping\fR widget commands) even if it is not filled. For most other item types, an interior point is considered to be inside the item only if the item @@ -1585,7 +1618,7 @@ pairs, each of which sets one of the configuration options for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be used in \fBitemconfigure\fR widget commands to change the item's configuration. -.br +.PP The following standard options are supported by rectangles: .CS \-dash @@ -1633,7 +1666,7 @@ pairs, each of which sets one of the configuration options for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be used in \fBitemconfigure\fR widget commands to change the item's configuration. -.br +.PP The following standard options are supported by text items: .CS \-fill @@ -1660,7 +1693,7 @@ This option defaults to \fBcenter\fR. \fB\-font \fIfontName\fR Specifies the font to use for the text item. \fIFontName\fR may be any string acceptable to \fBTk_GetFont\fR. -If this option isn't specified, it defaults to a system-dependent +If this option is not specified, it defaults to a system-dependent font. .TP \fB\-justify \fIhow\fR @@ -1714,7 +1747,7 @@ pairs, each of which sets one of the configuration options for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be used in \fBitemconfigure\fR widget commands to change the item's configuration. -.br +.PP The following standard options are supported by window items: .CS \-state @@ -1735,14 +1768,14 @@ This option defaults to \fBcenter\fR. Specifies the height to assign to the item's window. \fIPixels\fR may have any of the forms described in the \fBCOORDINATES\fR section above. -If this option isn't specified, or if it is specified as an empty +If this option is not specified, or if it is specified as an empty string, then the window is given whatever height it requests internally. .TP \fB\-width \fIpixels\fR Specifies the width to assign to the item's window. \fIPixels\fR may have any of the forms described in the \fBCOORDINATES\fR section above. -If this option isn't specified, or if it is specified as an empty +If this option is not specified, or if it is specified as an empty string, then the window is given whatever width it requests internally. .TP \fB\-window \fIpathName\fR @@ -1763,7 +1796,7 @@ See the documentation for \fBTk_CreateItemType\fR. .SH BINDINGS .PP In the current implementation, new canvases are not given any -default behavior: you'll have to execute explicit Tcl commands +default behavior: you will have to execute explicit Tcl commands to give the canvas its behavior. .SH CREDITS .PP diff --git a/doc/checkbutton.n b/doc/checkbutton.n index 6ed9b8e..e0c0b17 100644 --- a/doc/checkbutton.n +++ b/doc/checkbutton.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: checkbutton.n,v 1.12.2.1 2007/09/04 17:44:20 dgp Exp $ +'\" RCS: @(#) $Id: checkbutton.n,v 1.12.2.2 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH checkbutton n 4.4 Tk "Tk Built-In Commands" @@ -36,7 +36,7 @@ Specifies a desired height for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in lines of text. -If this option isn't specified, the button's desired height is computed +If this option is not specified, the button's desired height is computed from the size of the image or bitmap or text being displayed in it. .OP \-indicatoron indicatorOn IndicatorOn Specifies whether or not the indicator should be drawn. Must be a @@ -45,19 +45,25 @@ ignored and the widget's relief is always sunken if the widget is selected and raised otherwise. .OP \-offrelief offRelief OffRelief Specifies the relief for the checkbutton when the indicator is not drawn and -the checkbutton is off. The default value is "raised". By setting this option -to "flat" and setting -indicatoron to false and -overrelief to raised, -the effect is achieved +the checkbutton is off. The default value is +.QW raised . +By setting this option to +.QW flat +and setting \fB\-indicatoron\fR to false and \fB\-overrelief\fR to +.QW raised , +the effect is achieved of having a flat button that raises on mouse-over and which is depressed when activated. This is the behavior typically exhibited by the Bold, Italic, and Underline checkbuttons on the toolbar of a word-processor, for example. .OP \-offvalue offValue Value Specifies value to store in the button's associated variable whenever -this button is deselected. Defaults to ``0''. +this button is deselected. Defaults to +.QW 0 . .OP \-onvalue onValue Value Specifies value to store in the button's associated variable whenever -this button is selected. Defaults to ``1''. +this button is selected. Defaults to +.QW 1 . .OP \-overrelief overRelief OverRelief Specifies an alternative relief for the checkbutton, to be used when the mouse cursor is over the widget. This option can be used to make @@ -100,7 +106,8 @@ specified. .OP \-tristatevalue tristateValue Value .VS 8.5 Specifies the value that causes the checkbutton to display the multi-value -selection, also known as the tri-state mode. Defaults to ``""'' +selection, also known as the tri-state mode. Defaults to +.QW "" . .VE 8.5 .OP \-variable variable Variable Specifies name of global variable to set to indicate whether @@ -112,10 +119,9 @@ Specifies a desired width for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in characters. -If this option isn't specified, the button's desired width is computed +If this option is not specified, the button's desired width is computed from the size of the image or bitmap or text being displayed in it. .BE - .SH DESCRIPTION .PP The \fBcheckbutton\fR command creates a new window (given by the @@ -162,20 +168,30 @@ the indicator is drawn with a tri-state appearance and is in the tri-state mode indicating mixed or multiple values. (This is used when the check box represents the state of multiple items.) The indicator is drawn in a platform dependent manner. Under Unix and -Windows, the background interior of the box is ``grayed''. Under Mac, -the indicator is drawn with a dash mark inside. +Windows, the background interior of the box is +.QW grayed . +Under Mac, the indicator is drawn with a dash mark inside. By default, the name of the variable associated with a checkbutton is the same as the \fIname\fR used to create the checkbutton. -The variable name, and the ``on'', ``off'' and ``tristate'' values stored in -it, may be modified with options on the command line or in the option -database. +The variable name, and the +.QW on , +.QW off +and +.QW tristate +values stored in it, may be modified with options on the command line +or in the option database. Configuration options may also be used to modify the way the indicator is displayed (or whether it is displayed at all). By default a checkbutton is configured to select and deselect itself on alternate button clicks. In addition, each checkbutton monitors its associated variable and automatically selects and deselects itself when the variables value -changes to and from the button's ``on'', ``off'' and ``tristate'' values. +changes to and from the button's +.QW on , +.QW off +and +.QW tristate +values. .VE 8.5 .SH "WIDGET COMMAND" .PP @@ -211,7 +227,8 @@ this case the command returns an empty string. command. .TP \fIpathName \fBdeselect\fR -Deselects the checkbutton and sets the associated variable to its ``off'' +Deselects the checkbutton and sets the associated variable to its +.QW off value. .TP \fIpathName \fBflash\fR @@ -230,7 +247,8 @@ empty string if there is no command associated with the checkbutton. This command is ignored if the checkbutton's state is \fBdisabled\fR. .TP \fIpathName \fBselect\fR -Selects the checkbutton and sets the associated variable to its ``on'' +Selects the checkbutton and sets the associated variable to its +.QW on value. .TP \fIpathName \fBtoggle\fR @@ -254,27 +272,25 @@ invoked, if there is one). .IP [3] When a checkbutton has the input focus, the space key causes the checkbutton to be invoked. Under Windows, there are additional key bindings; plus -(+) and equal (=) select the button, and minus (-) deselects the button. +(+) and equal (=) select the button, and minus (\-) deselects the button. .PP If the checkbutton's state is \fBdisabled\fR then none of the above actions occur: the checkbutton is completely non-responsive. .PP The behavior of checkbuttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. - .SH EXAMPLE This example shows a group of uncoupled checkbuttons. .PP .CS - labelframe .lbl -text "Steps:" - \fBcheckbutton\fR .c1 -text Lights -variable lights - \fBcheckbutton\fR .c2 -text Cameras -variable cameras - \fBcheckbutton\fR .c3 -text Action! -variable action - pack .c1 .c2 .c3 -in .lbl + labelframe .lbl \-text "Steps:" + \fBcheckbutton\fR .c1 \-text Lights \-variable lights + \fBcheckbutton\fR .c2 \-text Cameras \-variable cameras + \fBcheckbutton\fR .c3 \-text Action! \-variable action + pack .c1 .c2 .c3 \-in .lbl pack .lbl .CE - .SH "SEE ALSO" -button(n), options(n), radiobutton(n), ttk_checkbutton(n) +button(n), options(n), radiobutton(n), ttk::checkbutton(n) .SH KEYWORDS checkbutton, widget diff --git a/doc/chooseDirectory.n b/doc/chooseDirectory.n index fdeef5d..24d22ba 100644 --- a/doc/chooseDirectory.n +++ b/doc/chooseDirectory.n @@ -2,7 +2,7 @@ '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: chooseDirectory.n,v 1.4.2.2 2007/10/27 04:23:13 dgp Exp $ +'\" RCS: @(#) $Id: chooseDirectory.n,v 1.4.2.3 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH tk_chooseDirectory n 8.3 Tk "Tk Built-In Commands" @@ -14,7 +14,6 @@ tk_chooseDirectory \- pops up a dialog box for the user to select a directory. .SH SYNOPSIS \fBtk_chooseDirectory \fR?\fIoption value ...\fR? .BE - .SH DESCRIPTION .PP The procedure \fBtk_chooseDirectory\fR pops up a dialog box for the @@ -31,6 +30,11 @@ the Macintosh. This is not a bug. Rather, the \fIGeneral Controls\fR control panel on the Mac allows the end user to override the application default directory. .TP +\fB\-mustexist\fR \fIboolean\fR +Specifies whether the user may specify non-existent directories. If +this parameter is true, then the user may only select directories that +already exist. The default value is \fIfalse\fR. +.TP \fB\-parent\fR \fIwindow\fR Makes \fIwindow\fR the logical parent of the dialog. The dialog is displayed on top of its parent window. @@ -38,19 +42,14 @@ is displayed on top of its parent window. \fB\-title\fR \fItitleString\fR Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title will be displayed. -.TP -\fB\-mustexist\fR \fIboolean\fR -Specifies whether the user may specify non-existent directories. If -this parameter is true, then the user may only select directories that -already exist. The default value is \fIfalse\fR. .SH EXAMPLE .CS -set dir [\fBtk_chooseDirectory\fR \\ +set dir [\fBtk_chooseDirectory\fR \e \-initialdir ~ \-title "Choose a directory"] if {$dir eq ""} { - label .l -text "No directory selected" + label .l \-text "No directory selected" } else { - label .l -text "Selected $dir" + label .l \-text "Selected $dir" } .CE diff --git a/doc/clipboard.n b/doc/clipboard.n index 3589d40..ee59f8a 100644 --- a/doc/clipboard.n +++ b/doc/clipboard.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: clipboard.n,v 1.11.2.2 2007/10/27 04:23:13 dgp Exp $ +'\" RCS: @(#) $Id: clipboard.n,v 1.11.2.3 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH clipboard n 8.4 Tk "Tk Built-In Commands" @@ -21,7 +21,7 @@ clipboard \- Manipulate Tk clipboard .PP This command provides a Tcl interface to the Tk clipboard, which stores data for later retrieval using the selection mechanism -(via the \fB-selection CLIPBOARD\fR option). +(via the \fB\-selection CLIPBOARD\fR option). In order to copy data into the clipboard, \fBclipboard clear\fR must be called, followed by a sequence of one or more calls to \fBclipboard append\fR. To ensure that the clipboard is updated atomically, all @@ -34,8 +34,9 @@ forms are currently supported: .TP \fBclipboard clear\fR ?\fB\-displayof\fR \fIwindow\fR? Claims ownership of the clipboard on \fIwindow\fR's display and removes -any previous contents. \fIWindow\fR defaults to ``.''. Returns an -empty string. +any previous contents. \fIWindow\fR defaults to +.QW . . +Returns an empty string. .TP \fBclipboard append\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-format\fR \fIformat\fR? ?\fB\-type\fR \fItype\fR? ?\fB\-\|\-\fR? \fIdata\fR Appends \fIdata\fR to the clipboard on \fIwindow\fR's @@ -45,7 +46,9 @@ display. .RS .PP \fIType\fR specifies the form in which the selection is to be returned -(the desired ``target'' for conversion, in ICCCM terminology), and +(the desired +.QW target +for conversion, in ICCCM terminology), and should be an atom name such as STRING or FILE_NAME; see the Inter-Client Communication Conventions Manual for complete details. \fIType\fR defaults to STRING. @@ -67,7 +70,7 @@ boundaries. All items appended to the clipboard with the same \fItype\fR must have the same \fIformat\fR. .PP The \fIformat\fR argument is needed only for compatibility with -clipboard requesters that don't use Tk. If the Tk toolkit is being +clipboard requesters that do not use Tk. If the Tk toolkit is being used to retrieve the CLIPBOARD selection then the value is converted back to a string at the requesting end, so \fIformat\fR is irrelevant. @@ -80,10 +83,13 @@ with a \fB\-\fR. .TP \fBclipboard get\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-type\fR \fItype\fR? Retrieve data from the clipboard on \fIwindow\fR's display. -\fIwindow\fR defaults to ".". \fIType\fR specifies the form in which +\fIWindow\fR defaults to +.QW . . +\fIType\fR specifies the form in which the data is to be returned and should be an atom name such as STRING or FILE_NAME. \fIType\fR defaults to STRING. This command is -equivalent to \fBselection get -selection CLIPBOARD\fR. +equivalent to +.QW "\fBselection get \-selection CLIPBOARD\fR" . .SH EXAMPLES Get the current contents of the clipboard. .CS @@ -111,10 +117,10 @@ proc getItemConfig {canvas tag} { append script {$canvas create } [$canvas type $item] append script { } [$canvas coords $item] { } foreach config [$canvas itemconf $item] { - lassign $config name - - - value + lassign $config name \- \- \- value append script [list $name $value] { } } - append script \\n + append script \en } return [string trim $script] } @@ -122,10 +128,10 @@ proc getItemConfig {canvas tag} { # Set up a binding on a canvas to cut and paste an item set c [canvas .c] pack $c -$c create text 150 30 -text "cut and paste me" +$c create text 150 30 \-text "cut and paste me" bind $c <<Cut>> { \fBclipboard clear\fR - \fBclipboard append -type\fR TkCanvasItem \\ + \fBclipboard append \-type\fR TkCanvasItem \e [getItemConfig %W current] # Delete because this is cut, not copy. %W delete current @@ -133,7 +139,7 @@ bind $c <<Cut>> { bind $c <<Paste>> { catch { set canvas %W - eval [\fBclipboard get -type\fR TkCanvasItem] + eval [\fBclipboard get \-type\fR TkCanvasItem] } } .CE diff --git a/doc/colors.n b/doc/colors.n index b50b957..28812ee 100644 --- a/doc/colors.n +++ b/doc/colors.n @@ -3,13 +3,13 @@ '\" Copyright (c) 2003 ActiveState Corporation. '\" Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net> '\" -'\" RCS: @(#) $Id: colors.n,v 1.6 2007/04/23 21:19:51 das Exp $ +'\" RCS: @(#) $Id: colors.n,v 1.6.2.1 2007/11/01 16:37:14 dgp Exp $ '\" '\" .so man.macros .TH colors n 8.3 Tk "Tk Built-In Commands" .BS -'\" Note: do not modify the .SH NAME line immediately below! +.\" Note: do not modify the .SH NAME line immediately below! .SH NAME colors \- symbolic color names recognized by Tk .BE @@ -779,11 +779,10 @@ yellow3 205 205 0 yellow4 139 139 0 YellowGreen 154 205 50 .CE - .SH "PORTABILITY ISSUES" - .TP \fBMac OS X\fR +. On Mac OS X, the following additional system colors are available (note that the actual color values depend on the currently active OS theme, and typically many of these will in fact be patterns rather than pure colors): @@ -925,7 +924,41 @@ systemNotificationText systemSystemDetailText .CE .RE - +.TP +\fBWindows\fR +. +On Windows, the following additional system colors are available +(note that the actual color values depend on the currently active OS theme): +.RS +.CS +3dDarkShadow +3dLight +ActiveBorder +ActiveCaption +AppWorkspace +Background +ButtonFace +ButtonHighlight +ButtonShadow +ButtonText +CaptionText +DisabledText +GrayText +Highlight +HighlightText +InactiveBorder +InactiveCaption +InactiveCaptionText +InfoBackground +InfoText +Menu +MenuText +Scrollbar +Window +WindowFrame +WindowText +.CE +.RE .SH "SEE ALSO" options(n), Tk_GetColor(3) .SH KEYWORDS diff --git a/doc/console.n b/doc/console.n index 198432d..0fdc0ab 100644 --- a/doc/console.n +++ b/doc/console.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: console.n,v 1.7.2.1 2007/09/04 17:44:21 dgp Exp $ +'\" RCS: @(#) $Id: console.n,v 1.7.2.2 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH console n 8.4 Tk "Tk Built-In Commands" @@ -15,7 +15,6 @@ console \- Control the console on systems without a real console .SH SYNOPSIS \fBconsole\fR \fIsubcommand\fR ?\fIarg ...\fR? .BE - .SH DESCRIPTION .PP The console window is a replacement for a real console to allow input @@ -24,7 +23,13 @@ a real console. It is implemented as a separate interpreter with the Tk toolkit loaded, and control over this interpreter is given through the \fBconsole\fR command. The behaviour of the console window is defined mainly through the contents of the \fIconsole.tcl\fR file in -the Tk library. +the Tk library. Except for TkAqua, this command is not available when +Tk is loaded into a tclsh interpreter with +.QW "\fBpackage require Tk\fR" , +as a conventional terminal is expected to be present in that case. +In TkAqua, this command is ony available when stdin is \fB/dev/null\fR +(as is the case e.g. when the application embedding Tk is started +from the Mac OS X Finder). .PP .TP \fBconsole eval \fIscript\fR diff --git a/doc/cursors.n b/doc/cursors.n index e79e1d5..7ac70ec 100644 --- a/doc/cursors.n +++ b/doc/cursors.n @@ -4,7 +4,7 @@ '\" '\" Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net> '\" -'\" RCS: @(#) $Id: cursors.n,v 1.5 2007/04/23 21:19:51 das Exp $ +'\" RCS: @(#) $Id: cursors.n,v 1.5.2.1 2007/11/01 16:37:14 dgp Exp $ '\" '\" .so man.macros @@ -14,10 +14,9 @@ .SH NAME cursors \- mouse cursors available in Tk .BE - .SH DESCRIPTION .PP -The \fB-cursor\fR widget option allows a Tk programmer to change the +The \fB\-cursor\fR widget option allows a Tk programmer to change the mouse cursor for a particular widget. The cursor names recognized by Tk on all platforms are: .CS @@ -99,12 +98,10 @@ umbrella ur_angle watch xterm - -The \fBnone\fR cursor can be specified to eliminate the cursor. .CE - +.PP +The \fBnone\fR cursor can be specified to eliminate the cursor. .SH "PORTABILITY ISSUES" - .TP \fBWindows\fR On Windows systems, the following cursors are mapped to native cursors: @@ -135,7 +132,6 @@ uparrow wait .CE .RE - .TP \fBMac OS X\fR On Mac OS X systems, the following cursors are mapped to native cursors: @@ -174,6 +170,5 @@ countingupanddownhand spinning .CE .RE - .SH KEYWORDS cursor, option diff --git a/doc/destroy.n b/doc/destroy.n index ce01326..a311718 100644 --- a/doc/destroy.n +++ b/doc/destroy.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: destroy.n,v 1.3 2004/06/21 14:24:04 dkf Exp $ +'\" RCS: @(#) $Id: destroy.n,v 1.3.2.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH destroy n "" Tk "Tk Built-In Commands" @@ -16,13 +16,14 @@ destroy \- Destroy one or more windows .SH SYNOPSIS \fBdestroy \fR?\fIwindow window ...\fR? .BE - .SH DESCRIPTION .PP This command deletes the windows given by the \fIwindow\fR arguments, plus all of their descendants. -If a \fIwindow\fR ``.'' is deleted then the entire application -will be destroyed. +If a \fIwindow\fR +.QW . +is deleted then all windows will be destroyed and the application will +(normally) exit. The \fIwindow\fRs are destroyed in order, and if an error occurs in destroying a window the command aborts without destroying the remaining windows. diff --git a/doc/dialog.n b/doc/dialog.n index 21571fd..31aee62 100644 --- a/doc/dialog.n +++ b/doc/dialog.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: dialog.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: dialog.n,v 1.3.2.3 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH tk_dialog n 4.1 Tk "Tk Built-In Commands" @@ -41,7 +41,7 @@ If this is an empty string then no bitmap is displayed in the dialog. If this is an integer greater than or equal to zero, then it gives the index of the button that is to be the default button for the dialog (0 for the leftmost button, and so on). -If less than zero or an empty string then there won't be any default +If less than zero or an empty string then there will not be any default button. .TP \fIstring\fR @@ -55,14 +55,14 @@ mouse or by typing return to invoke the default button (if any). Then it returns the index of the selected button: 0 for the leftmost button, 1 for the button next to it, and so on. If the dialog's window is destroyed before the user selects one -of the buttons, then -1 is returned. +of the buttons, then \-1 is returned. .PP While waiting for the user to respond, \fBtk_dialog\fR sets a local grab. This prevents the user from interacting with the application in any way except to invoke the dialog box. .SH EXAMPLE .CS -set reply [\fBtk_dialog\fR .foo "The Title" "Do you want to say yes?" \\ +set reply [\fBtk_dialog\fR .foo "The Title" "Do you want to say yes?" \e questhead 0 Yes No "I'm not sure"] .CE diff --git a/doc/entry.n b/doc/entry.n index 8f7c4ed..5cb3777 100644 --- a/doc/entry.n +++ b/doc/entry.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: entry.n,v 1.16 2006/12/13 23:04:32 hobbs Exp $ +'\" RCS: @(#) $Id: entry.n,v 1.16.2.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH entry n 8.3 Tk "Tk Built-In Commands" @@ -45,7 +45,8 @@ this option is the empty string, the normal background color is used. If this option is specified, then the true contents of the entry are not displayed in the window. Instead, each character in the entry's value will be displayed as -the first character in the value of this option, such as ``*''. +the first character in the value of this option, such as +.QW * . This is useful, for example, if the entry is to be used to enter a password. If characters in the entry are selected and copied elsewhere, the @@ -60,7 +61,7 @@ contents of the widget may still be selected. If the entry is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the entry may be displayed in a different color, depending on the values of the -\fB-disabledforeground\fR and \fB-disabledbackground\fR options. +\fB\-disabledforeground\fR and \fB\-disabledbackground\fR options. .OP \-validate validate Validate Specifies the mode in which validation should operate: \fBnone\fR, \fBfocus\fR, \fBfocusin\fR, \fBfocusout\fR, \fBkey\fR, or \fBall\fR. @@ -80,7 +81,6 @@ in average-size characters of the widget's font. If the value is less than or equal to zero, the widget picks a size just large enough to hold its current text. .BE - .SH DESCRIPTION .PP The \fBentry\fR command creates a new window (given by the @@ -140,9 +140,9 @@ are recognized: .PP .IP \fB%d\fR 5 Type of action: 1 for \fBinsert\fR, 0 for \fBdelete\fR, -or -1 for focus, forced or textvariable validation. +or \-1 for focus, forced or textvariable validation. .IP \fB%i\fR 5 -Index of char string to be inserted/deleted, if any, otherwise -1. +Index of char string to be inserted/deleted, if any, otherwise \-1. .IP \fB%P\fR 5 The value of the entry if the edit is allowed. If you are configuring the entry widget to have a new textvariable, this will be the value of that @@ -179,7 +179,7 @@ validated. If you wish to edit the entry widget (for example set it to {}) during validation and still have the \fBvalidate\fR option set, you should include the command .CS -after idle {%W config -validate %v} +after idle {%W config \-validate %v} .CE in the \fBvalidateCommand\fR or \fBinvalidCommand\fR (whichever one you were editing the entry widget from). It is also recommended to not set an @@ -191,10 +191,11 @@ The \fBentry\fR command creates a new Tcl command whose name is \fIpathName\fR. 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? +\fIpathName subcommand \fR?\fIarg arg ...\fR? .CE -\fIOption\fR and the \fIarg\fRs +\fISubcommand\fR and the \fIarg\fRs determine the exact behavior of the command. +.SS INDICES .PP Many of the widget commands for entries take one or more indices as arguments. An index specifies a particular character in the entry's @@ -219,22 +220,27 @@ insertion cursor. .TP 12 \fBsel.first\fR Indicates the first character in the selection. It is an error to -use this form if the selection isn't in the entry window. +use this form if the selection is not in the entry window. .TP 12 \fBsel.last\fR Indicates the character just after the last one in the selection. -It is an error to use this form if the selection isn't in the +It is an error to use this form if the selection is not in the entry window. .TP 12 \fB@\fInumber\fR In this form, \fInumber\fR is treated as an x-coordinate in the entry's window; the character spanning that x-coordinate is used. -For example, ``\fB@0\fR'' indicates the left-most character in the -window. +For example, +.QW \fB@0\fR +indicates the left-most character in the window. .LP -Abbreviations may be used for any of the forms above, e.g. ``\fBe\fR'' -or ``\fBsel.f\fR''. In general, out-of-range indices are automatically -rounded to the nearest legal value. +Abbreviations may be used for any of the forms above, e.g. +.QW \fBe\fR +or +.QW \fBsel.f\fR . +In general, out-of-range indices are automatically rounded to the +nearest legal value. +.SS SUBCOMMANDS .PP The following commands are possible for entry widgets: .TP @@ -273,7 +279,7 @@ Delete one or more elements of the entry. \fIFirst\fR is the index of the first character to delete, and \fIlast\fR is the index of the character just after the last one to delete. -If \fIlast\fR isn't specified it defaults to \fIfirst\fR+1, +If \fIlast\fR is not specified it defaults to \fIfirst\fR+1, i.e. a single character is deleted. This command returns an empty string. .TP @@ -323,19 +329,19 @@ Locate the end of the selection nearest to the character given by (i.e. including but not going beyond \fIindex\fR). The other end of the selection is made the anchor point for future \fBselect to\fR commands. If the selection -isn't currently in the entry, then a new selection is created to +is not currently in the entry, then a new selection is created to include the characters between \fIindex\fR and the most recent selection anchor point, inclusive. Returns an empty string. .TP \fIpathName \fBselection clear\fR Clear the selection if it is currently in this widget. If the -selection isn't in this widget then the command has no effect. +selection is not in this widget then the command has no effect. Returns an empty string. .TP \fIpathName \fBselection from \fIindex\fR Set the selection anchor point to just before the character -given by \fIindex\fR. Doesn't change the selection. +given by \fIindex\fR. Does not change the selection. Returns an empty string. .TP \fIpathName \fBselection present\fR @@ -359,7 +365,7 @@ to the characters from the anchor point up to but not including \fIindex\fR. The anchor point is determined by the most recent \fBselect from\fR or \fBselect adjust\fR command in this widget. -If the selection isn't in this widget then a new selection is +If the selection is not in this widget then a new selection is created using the most recent anchor point specified for the widget. Returns an empty string. .RE @@ -411,10 +417,11 @@ become visible. .SH "DEFAULT BINDINGS" .PP Tk automatically creates class bindings for entries that give them -the following default behavior. -In the descriptions below, ``word'' refers to a contiguous group -of letters, digits, or ``_'' characters, or any single character -other than these. +the following default behavior. In the descriptions below, +.QW word +refers to a contiguous group of letters, digits, or +.QW _ +characters, or any single character other than these. .IP [1] Clicking mouse button 1 positions the insertion cursor just before the character underneath the mouse cursor, sets the @@ -475,7 +482,7 @@ Shift-End moves the cursor to the end and extends the selection to that point. .IP [12] The Select key and Control-Space set the selection anchor to the position -of the insertion cursor. They don't affect the current selection. +of the insertion cursor. They do not affect the current selection. Shift-Select and Control-Shift-Space adjust the selection to the current position of the insertion cursor, selecting from the anchor to the insertion cursor if there was not any selection previously. @@ -525,9 +532,7 @@ entry whatever the value of its \fB\-state\fR option. .PP The behavior of entries can be changed by defining new bindings for individual widgets or by redefining the class bindings. - .SH "SEE ALSO" -ttk_entry(n) - +ttk::entry(n) .SH KEYWORDS entry, widget diff --git a/doc/event.n b/doc/event.n index 5849b85..439357e 100644 --- a/doc/event.n +++ b/doc/event.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: event.n,v 1.12 2005/04/06 21:11:54 dkf Exp $ +'\" RCS: @(#) $Id: event.n,v 1.12.2.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH event n 8.3 Tk "Tk Built-In Commands" @@ -16,7 +16,6 @@ event \- Miscellaneous event facilities: define virtual events and generate even .SH SYNOPSIS \fBevent\fI option \fR?\fIarg arg ...\fR? .BE - .SH DESCRIPTION .PP The \fBevent\fR command provides several facilities for dealing with @@ -62,14 +61,14 @@ argument of the \fBbind\fR command except that it must consist of a single event pattern, not a sequence. \fIOption-value\fR pairs may be used to specify additional attributes of the event, such as the x and y mouse position; see -EVENT FIELDS below. If the \fB\-when\fR option is not specified, the +\fBEVENT FIELDS\fR below. If the \fB\-when\fR option is not specified, the event is processed immediately: all of the handlers for the event will complete before the \fBevent generate\fR command returns. If the \fB\-when\fR option is specified then it determines when the event is processed. Certain events, such as key events, require that the window has focus to receive the event properly. .TP -\fBevent info \fR?<<\fIvirtual\fB>>\fR? +\fBevent info \fR?\fB<<\fIvirtual\fB>>\fR? Returns information about virtual events. If the \fB<<\fIvirtual\fB>>\fR argument is omitted, the return value is a list of all the virtual events that are currently defined. @@ -80,8 +79,9 @@ not defined then an empty string is returned. .SH "EVENT FIELDS" .PP The following options are supported for the \fBevent generate\fR -command. These correspond to the ``%'' expansions -allowed in binding scripts for the \fBbind\fR command. +command. These correspond to the +.QW % +expansions allowed in binding scripts for the \fBbind\fR command. .TP \fB\-above\fI window\fR \fIWindow\fR specifies the \fIabove\fR field for the event, @@ -119,7 +119,7 @@ for the \fBMouseWheel\fR event. The \fIdelta\fR refers to the direction and magnitude the mouse wheel was rotated. Note the value is not a screen distance but are units of motion in the mouse wheel. Typically these values are multiples of 120. For example, 120 should -scroll the text widget up 4 lines and -240 would scroll the text +scroll the text widget up 4 lines and \-240 would scroll the text widget down 8 lines. Of course, other widgets may define different behaviors for mouse wheel motion. This field corresponds to the \fB%D\fR substitution for binding scripts. @@ -333,11 +333,15 @@ changed. .TP \fB<<TraverseIn>>\fR This is sent to a widget when the focus enters the widget because of a -user-driven "tab to widget" action. +user-driven +.QW "tab to widget" +action. .TP \fB<<TraverseOut>>\fR This is sent to a widget when the focus leaves the widget because of a -user-driven "tab to widget" action. +user-driven +.QW "tab to widget" +action. .PP Tk defines the following virtual events for the purposes of unifying bindings across multiple platforms. Users expect them to behave in the diff --git a/doc/focus.n b/doc/focus.n index ca325fa..88f5a4a 100644 --- a/doc/focus.n +++ b/doc/focus.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: focus.n,v 1.4 2004/06/21 19:39:54 dkf Exp $ +'\" RCS: @(#) $Id: focus.n,v 1.4.2.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH focus n 4.0 Tk "Tk Built-In Commands" @@ -69,7 +69,7 @@ displays. If the application currently has the input focus on \fIwindow\fR's display, this command resets the input focus for \fIwindow\fR's display to \fIwindow\fR and returns an empty string. -If the application doesn't currently have the input focus on +If the application does not currently have the input focus on \fIwindow\fR's display, \fIwindow\fR will be remembered as the focus for its top-level; the next time the focus arrives at the top-level, Tk will redirect it to \fIwindow\fR. @@ -77,12 +77,12 @@ If \fIwindow\fR is an empty string then the command does nothing. .TP \fBfocus \-displayof\fR \fIwindow\fR Returns the name of the focus window on the display containing \fIwindow\fR. -If the focus window for \fIwindow\fR's display isn't in this +If the focus window for \fIwindow\fR's display is not in this application, the return value is an empty string. .TP \fBfocus \-force \fIwindow\fR Sets the focus of \fIwindow\fR's display to \fIwindow\fR, even if -the application doesn't currently have the input focus for the display. +the application does not currently have the input focus for the display. This command should be used sparingly, if at all. In normal usage, an application should not claim the focus for itself; instead, it should wait for the window manager to give it @@ -99,7 +99,7 @@ will receive the input focus the next time the window manager gives the focus to the top-level. .SH "QUIRKS" .PP -When an internal window receives the input focus, Tk doesn't actually +When an internal window receives the input focus, Tk does not actually set the X focus to that window; as far as X is concerned, the focus will stay on the top-level window containing the window with the focus. However, Tk generates FocusIn and FocusOut events just as if the X @@ -112,11 +112,11 @@ To make a window that only participates in the focus traversal ring when a variable is set, add the following bindings to the widgets \fIbefore\fR and \fIafter\fR it in that focus ring: .CS -button .before -text "Before" -button .middle -text "Middle" -button .after -text "After" -checkbutton .flag -variable traverseToMiddle -takefocus 0 -pack .flag -side left +button .before \-text "Before" +button .middle \-text "Middle" +button .after \-text "After" +checkbutton .flag \-variable traverseToMiddle \-takefocus 0 +pack .flag \-side left pack .before .middle .after bind .before <Tab> { if {!$traverseToMiddle} { @@ -124,7 +124,7 @@ bind .before <Tab> { break } } -bind .after <Shift-Tab> { +bind .after <Shift\-Tab> { if {!$traverseToMiddle} { \fBfocus\fR .before break diff --git a/doc/focusNext.n b/doc/focusNext.n index fb326b3..c0f7653 100644 --- a/doc/focusNext.n +++ b/doc/focusNext.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: focusNext.n,v 1.2 1998/09/14 18:22:56 stanton Exp $ +'\" RCS: @(#) $Id: focusNext.n,v 1.2.32.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH tk_focusNext n 4.0 Tk "Tk Built-In Commands" @@ -24,8 +24,9 @@ tk_focusNext, tk_focusPrev, tk_focusFollowsMouse \- Utility procedures for manag .SH DESCRIPTION .PP \fBtk_focusNext\fR is a utility procedure used for keyboard traversal. -It returns the ``next'' window after \fIwindow\fR in focus order. -The focus order is determined by +It returns the +.QW next +window after \fIwindow\fR in focus order. The focus order is determined by the stacking order of windows and the structure of the window hierarchy. Among siblings, the focus order is the same as the stacking order, with the lowest window being first. @@ -52,7 +53,7 @@ The \fBfocus\fR command may be used to move the focus to a window other than the one under the mouse, but as soon as the mouse moves into a new window the focus will jump to that window. Note: at present there is no built-in support for returning the -application to an explicit focus model; to do this you'll have +application to an explicit focus model; to do this you will have to write a script that deletes the bindings created by \fBtk_focusFollowsMouse\fR. @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: font.n,v 1.11.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: font.n,v 1.11.2.3 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH font n 8.0 Tk "Tk Built-In Commands" @@ -23,22 +23,22 @@ fonts, such as defining named fonts and inspecting the actual attributes of a font. The command has several different forms, determined by the first argument. The following forms are currently supported: .TP -\fBfont actual \fIfont\fR ?\fB\-displayof \fIwindow\fR? ?\fIoption\fR? ?\fB--\fR? ?\fIchar\fR? +\fBfont actual \fIfont\fR ?\fB\-displayof \fIwindow\fR? ?\fIoption\fR? ?\fB\-\|\-\fR? ?\fIchar\fR? . Returns information about the actual attributes that are obtained when \fIfont\fR is used on \fIwindow\fR's display; the actual attributes obtained may differ from the attributes requested due to platform-dependant limitations, such as the availability of font families and pointsizes. -\fIfont\fR is a font description; see FONT DESCRIPTIONS below. If the +\fIfont\fR is a font description; see \fBFONT DESCRIPTIONS\fR below. If the \fIwindow\fR argument is omitted, it defaults to the main window. If \fIoption\fR is specified, returns the value of that attribute; if it is omitted, the return value is a list of all the attributes and their values. -See FONT OPTIONS below for a list of the possible attributes. If the +See \fBFONT OPTIONS\fR below for a list of the possible attributes. If the \fIchar\fR argument is supplied, it must be a single character. The font attributes returned will be those of the specific font used to render that character, which will be different from the base font if the base font does not contain the given character. If \fIchar\fR may be a hyphen, it -should be preceded by \fB--\fR to distinguish it from a misspelled +should be preceded by \fB\-\|\-\fR to distinguish it from a misspelled \fIoption\fR. .TP \fBfont configure \fIfontname\fR ?\fIoption\fR? ?\fIvalue option value ...\fR? @@ -50,7 +50,7 @@ is specified with no \fIvalue\fR, then returns the current value of that attribute. If one or more \fIoption\fR\-\fIvalue\fR pairs are specified, then the command modifies the given named font to have the given values; in this case, all widgets using that font will redisplay themselves using the -new attributes for the font. See FONT OPTIONS below for a list of the +new attributes for the font. See \fBFONT OPTIONS\fR below for a list of the possible attributes. .TP \fBfont create\fR ?\fIfontname\fR? ?\fIoption value ...\fR? @@ -59,13 +59,13 @@ Creates a new named font and returns its name. \fIfontname\fR specifies the name for the font; if it is omitted, then Tk generates a new name of the form \fBfont\fIx\fR, where \fIx\fR is an integer. There may be any number of \fIoption\fR\-\fIvalue\fR pairs, which provide the desired attributes for -the new named font. See FONT OPTIONS below for a list of the possible +the new named font. See \fBFONT OPTIONS\fR below for a list of the possible attributes. .TP \fBfont delete\fR \fIfontname\fR ?\fIfontname ...\fR? . Delete the specified named fonts. If there are widgets using the named font, -the named font won't actually be deleted until all the instances are +the named font will not actually be deleted until all the instances are released. Those widgets will continue to display using the last known values for the named font. If a deleted named font is subsequently recreated with another call to \fBfont create\fR, the widgets will use the new named font @@ -81,10 +81,13 @@ omitted, it defaults to the main window. . Measures the amount of space the string \fItext\fR would use in the given \fIfont\fR when displayed in \fIwindow\fR. \fIfont\fR is a font description; -see FONT DESCRIPTIONS below. If the \fIwindow\fR argument is omitted, it +see \fBFONT DESCRIPTIONS\fR below. If the \fIwindow\fR argument is +omitted, it defaults to the main window. The return value is the total width in pixels of \fItext\fR, not including the extra pixels used by highly exaggerated -characters such as cursive ``f''. If the string contains newlines or tabs, +characters such as cursive +.QW f . +If the string contains newlines or tabs, those characters are not expanded or treated specially when measuring the string. .TP @@ -92,11 +95,12 @@ string. . Returns information about the metrics (the font-specific data), for \fIfont\fR when it is used on \fIwindow\fR's display. \fIfont\fR is a font -description; see FONT DESCRIPTIONS below. If the \fIwindow\fR argument is +description; see \fBFONT DESCRIPTIONS\fR below. If the \fIwindow\fR +argument is omitted, it defaults to the main window. If \fIoption\fR is specified, returns the value of that metric; if it is omitted, the return value is a -list of all the metrics and their values. See FONT METRICS below for a list -of the possible metrics. +list of all the metrics and their values. See \fBFONT METRICS\fR +below for a list of the possible metrics. .TP \fBfont names\fR The return value is a list of all the named fonts that are currently defined. @@ -118,16 +122,18 @@ font will be substituted automatically. [2] \fIsystemfont\fR . The platform-specific name of a font, interpreted by the graphics server. -This also includes, under X, an XLFD (see [4]) for which a single ``\fB*\fR'' +This also includes, under X, an XLFD (see [4]) for which a single +.QW \fB*\fR character was used to elide more than one field in the middle of the -name. See PLATFORM-SPECIFIC issues for a list of the system fonts. +name. See \fBPLATFORM-SPECIFIC\fR issues for a list of the system fonts. .TP [3] \fIfamily \fR?\fIsize\fR? ?\fIstyle\fR? ?\fIstyle ...\fR? . A properly formed list whose first element is the desired font \fIfamily\fR and whose optional second element is the desired \fIsize\fR. The interpretation of the \fIsize\fR attribute follows the same rules -described for \fB\-size\fR in FONT OPTIONS below. Any additional optional +described for \fB\-size\fR in \fBFONT OPTIONS\fR below. Any +additional optional arguments following the \fIsize\fR are font \fIstyle\fRs. Possible values for the \fIstyle\fR arguments are as follows: .RS @@ -141,15 +147,23 @@ underline overstrike\fR [4] X-font names (XLFD) . A Unix-centric font name of the form -\fI-foundry-family-weight-slant-setwidth-addstyle-pixel-point-resx-resy-spacing-width-charset-encoding\fR. -The ``\fB*\fR'' character may be used to skip individual fields that the -user does not care about. There must be exactly one ``\fB*\fR'' for each -field skipped, except that a ``\fB*\fR'' at the end of the XLFD skips any -remaining fields; the shortest valid XLFD is simply ``\fB*\fR'', signifying -all fields as defaults. Any fields that were skipped are given default +\fI\-foundry\-family\-weight\-slant\-setwidth\-addstyle\-pixel\-point\-resx\-resy\-spacing\-width\-charset\-encoding\fR. +The +.QW \fB*\fR +character may be used to skip individual fields that the +user does not care about. There must be exactly one +.QW \fB*\fR +for each field skipped, except that a +.QW \fB*\fR +at the end of the XLFD skips any +remaining fields; the shortest valid XLFD is simply +.QW \fB*\fR , +signifying all fields as defaults. Any fields that were skipped are +given default values. For compatibility, an XLFD always chooses a font of the specified pixel size (not point size); although this interpretation is not strictly -correct, all existing applications using XLFDs assumed that one ``point'' +correct, all existing applications using XLFDs assumed that one +.QW point was in fact one pixel and would display incorrectly (generally larger) if the correct size font were actually used. .TP @@ -157,7 +171,7 @@ the correct size font were actually used. . A properly formed list of \fIoption\fR\-\fIvalue\fR pairs that specify the desired attributes of the font, in the same format used when defining -a named font; see FONT OPTIONS below. +a named font; see \fBFONT OPTIONS\fR below. .LP When font description \fIfont\fR is used, the system attempts to parse the description according to each of the above five rules, in the order specified. @@ -173,9 +187,13 @@ an error is generated. The following options are used by the \fBfont metrics\fR command to query font-specific data determined when the font was created. These properties are for the whole font itself and not for individual characters drawn in that -font. In the following definitions, the ``baseline'' of a font is the +font. In the following definitions, the +.QW baseline +of a font is the horizontal line where the bottom of most letters line up; certain letters, -such as lower-case ``g'' stick below the baseline. +such as lower-case +.QW g +stick below the baseline. .TP \fB\-ascent \0\fR . @@ -196,9 +214,13 @@ above the baseline line plus the descent below the baseline. .TP \fB\-fixed \0\fR . -Returns a boolean flag that is ``\fB1\fR'' if this is a fixed-width font, +Returns a boolean flag that is +.QW \fB1\fR +if this is a fixed-width font, where each normal character is the same width as all the other -characters, or is ``\fB0\fR'' if this is a proportionally-spaced font, where +characters, or is +.QW \fB0\fR +if this is a proportionally-spaced font, where individual characters have different widths. The widths of control characters, tab characters, and other non-printing characters are not included when calculating this value. @@ -210,9 +232,13 @@ above: \fB\-family \fIname\fR . The case-insensitive font family name. Tk guarantees to support the font -families named \fBCourier\fR (a monospaced ``typewriter'' font), \fBTimes\fR -(a serifed ``newspaper'' font), and \fBHelvetica\fR (a sans-serif -``European'' font). The most closely matching native font family will +families named \fBCourier\fR (a monospaced +.QW typewriter +font), \fBTimes\fR (a serifed +.QW newspaper +font), and \fBHelvetica\fR (a sans-serif +.QW European +font). The most closely matching native font family will automatically be substituted when one of the above font families is used. The \fIname\fR may also be the name of a native, platform-specific font family; in that case it will work as desired on one platform but may not @@ -261,42 +287,108 @@ font should be underlined. The default value for underline is \fBfalse\fR. The value is a boolean flag that specifies whether a horizontal line should be drawn through the middle of characters in this font. The default value for overstrike is \fBfalse\fR. -.SH "PLATFORM-SPECIFIC ISSUES" +.SH "STANDARD FONTS" .LP -The following named system fonts are supported: +The following named fonts are supported on all systems, and default to values +that match appropriate system defaults. +.TP +\fBTkDefaultFont\fR +. +This font is the default for all GUI items not otherwise specified. +.TP +\fBTkTextFont\fR +. +This font should be used for user text in entry widgets, listboxes etc. +.TP +\fBTkFixedFont\fR +. +This font is the standard fixed-width font. +.TP +\fBTkMenuFont\fR +. +This font is used for menu items. +.TP +\fBTkHeadingFont\fR +. +This font should be used for column headings in lists and tables. +.TP +\fBTkCaptionFont\fR +. +This font should be used for window and dialog caption bars. +.TP +\fBTkSmallCaptionFont\fR +. +This font should be used for captions on contained windows or tool dialogs. +.TP +\fBTkIconFont\fR +. +This font should be used for icon captions. +.TP +\fBTkTooltipFont\fR +. +This font should be used for tooltip windows (transient information windows). +.LP +It is \fInot\fR advised to change these fonts, as they may be modified by Tk +itself in response to system changes. Instead, make a copy of the font and +modify that. +.SH "PLATFORM-SPECIFIC FONTS" +.LP +The following system fonts are supported: .RS .TP -X Windows: +\fBX Windows\fR All valid X font names, including those listed by xlsfonts(1), are available. .TP -MS Windows: +\fBMS Windows\fR .DS .ta 3c 6c \fBsystem ansi device systemfixed ansifixed oemfixed\fR .DE .TP -Mac OS X: +\fBMac OS X\fR .DS .ta 3c 6c \fBsystem application menu\fR .DE +Additionally, the following named fonts provide access to the Aqua theme fonts: +.DS +\fBsystemSystemFont +systemEmphasizedSystemFont +systemSmallSystemFont +systemSmallEmphasizedSystemFont +systemApplicationFont +systemLabelFont +systemViewsFont +systemMenuTitleFont +systemMenuItemFont +systemMenuItemMarkFont +systemMenuItemCmdKeyFont +systemWindowTitleFont +systemPushButtonFont +systemUtilityWindowTitleFont +systemAlertHeaderFont +systemToolbarFont +systemMiniSystemFont +systemDetailSystemFont +systemDetailEmphasizedSystemFont\fR +.DE .RE .SH EXAMPLE Fill a text widget with lots of font demonstrators, one for every font family installed on your system: .CS -pack [text .t -wrap none] -fill both -expand 1 +pack [text .t \-wrap none] \-fill both \-expand 1 set count 0 set tabwidth 0 -foreach family [lsort -dictionary [\fBfont families\fR]] { - .t tag configure f[incr count] -font [list $family 10] - .t insert end ${family}:\\t {} \\ - "This is a simple sampler\\n" f$count - set w [\fBfont measure\fR [.t cget -font] ${family}:] +foreach family [lsort \-dictionary [\fBfont families\fR]] { + .t tag configure f[incr count] \-font [list $family 10] + .t insert end ${family}:\\t {} \e + "This is a simple sampler\en" f$count + set w [\fBfont measure\fR [.t cget \-font] ${family}:] if {$w+5 > $tabwidth} { set tabwidth [expr {$w+5}] - .t configure -tabs $tabwidth + .t configure \-tabs $tabwidth } } .CE diff --git a/doc/frame.n b/doc/frame.n index 8d362a1..dd93a9e 100644 --- a/doc/frame.n +++ b/doc/frame.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: frame.n,v 1.6 2006/12/13 23:04:32 hobbs Exp $ +'\" RCS: @(#) $Id: frame.n,v 1.6.2.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH frame n 8.4 Tk "Tk Built-In Commands" @@ -58,7 +58,7 @@ widget command. Specifies the desired height for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all. Note that this -sets the total height of the frame, any \fB-borderwidth\fR or similar is +sets the total height of the frame, any \fB\-borderwidth\fR or similar is not added. Normally \fB\-height\fR should not be used if a propagating geometry manager, such as \fBgrid\fR or \fBpack\fR, is used within the frame since the geometry manager will override the height of the frame. @@ -73,12 +73,11 @@ widget command. Specifies the desired width for the window in any of the forms acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all. Note that this -sets the total width of the frame, any \fB-borderwidth\fR or similar is +sets the total width of the frame, any \fB\-borderwidth\fR or similar is not added. Normally \fB\-width\fR should not be used if a propagating geometry manager, such as \fBgrid\fR or \fBpack\fR, is used within the frame since the geometry manager will override the width of the frame. .BE - .SH DESCRIPTION .PP The \fBframe\fR command creates a new window (given by the @@ -94,7 +93,6 @@ A frame is a simple widget. Its primary purpose is to act as a spacer or container for complex window layouts. The only features of a frame are its background color and an optional 3-D border to make the frame appear raised or sunken. - .SH "WIDGET COMMAND" .PP The \fBframe\fR command creates a new Tcl command whose @@ -128,14 +126,11 @@ modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. \fIOption\fR may have any of the values accepted by the \fBframe\fR command. - .SH BINDINGS .PP When a new frame is created, it has no default event bindings: frames are not intended to be interactive. - .SH "SEE ALSO" -labelframe(n), toplevel(n), ttk_frame(n) - +labelframe(n), toplevel(n), ttk::frame(n) .SH KEYWORDS frame, widget diff --git a/doc/getOpenFile.n b/doc/getOpenFile.n index 0b80056..8faa713 100644 --- a/doc/getOpenFile.n +++ b/doc/getOpenFile.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: getOpenFile.n,v 1.15.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: getOpenFile.n,v 1.15.2.3 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH tk_getOpenFile n 4.2 Tk "Tk Built-In Commands" @@ -13,11 +13,11 @@ .SH NAME tk_getOpenFile, tk_getSaveFile \- pop up a dialog box for the user to select a file to open or save. .SH SYNOPSIS +.nf \fBtk_getOpenFile \fR?\fIoption value ...\fR? -.br \fBtk_getSaveFile \fR?\fIoption value ...\fR? +.fi .BE - .SH DESCRIPTION .PP The procedures \fBtk_getOpenFile\fR and \fBtk_getSaveFile\fR pop up a @@ -70,16 +70,16 @@ application default directory. Specifies a filename to be displayed in the dialog when it pops up. This option is ignored on the Macintosh platform. .TP -\fB\-multiple\fR \fIboolean\fR -Allows the user to choose multiple files from the Open dialog. -On the Macintosh, this is only available when Navigation Services are -installed. -.TP \fB\-message\fR \fIstring\fR Specifies a message to include in the client area of the dialog. This is only available on the Macintosh, and only when Navigation Services are installed. .TP +\fB\-multiple\fR \fIboolean\fR +Allows the user to choose multiple files from the Open dialog. +On the Macintosh, this is only available when Navigation Services are +installed. +.TP \fB\-parent\fR \fIwindow\fR Makes \fIwindow\fR the logical parent of the file dialog. The file dialog is displayed on top of its parent window. @@ -93,7 +93,7 @@ The variable \fIvariableName\fR is used to preselect which filter is used from \fIfilterList\fR when the dialog box is opened and is updated when the dialog box is closed, to the last selected filter. The variable is read once at the beginning to select the -appropriate filter. If the variable does not exist, or it's value does +appropriate filter. If the variable does not exist, or its value does not match any filter typename, or is empty (\fB{}\fR), the dialog box will revert to the default behavior of selecting the first filter in the list. If the dialog is canceled, the variable is not modified. @@ -102,7 +102,7 @@ If the user selects a file, both \fBtk_getOpenFile\fR and \fBtk_getSaveFile\fR return the full pathname of this file. If the user cancels the operation, both commands return the empty string. .SH "SPECIFYING FILE PATTERNS" - +.PP The \fIfilePatternList\fR value given by the \fB\-filetypes\fR option is a list of file patterns. Each file pattern is a list of the form @@ -132,7 +132,7 @@ sample code matches with files that have a \fB\.c\fR extension AND belong to the \fImacType\fR \fBTEXT\fR. To use the OR rule instead, you can use two file patterns, one with the \fIextensions\fR only and the other with the \fImacType\fR only. The \fBGIF Files\fR file type -in the sample code matches files that EITHER have a \fB\.gif\fR +in the sample code matches files that \fIeither\fR have a \fB\.gif\fR extension OR belong to the \fImacType\fR \fBGIFF\fR. .PP On the Unix and Windows platforms, a file matches a file pattern @@ -143,18 +143,27 @@ the file pattern. The \fImacType\fRs are ignored. On the Unix and Macintosh platforms, extensions are matched using glob-style pattern matching. On the Windows platforms, extensions are matched by the underlying operating system. The types of possible -extensions are: (1) the special extension * matches any -file; (2) the special extension "" matches any files that -do not have an extension (i.e., the filename contains no full stop -character); (3) any character string that does not contain any wild -card characters (* and ?). +extensions are: +.IP (1) +the special extension +.QW * +matches any file; +.IP (2) +the special extension +.MT +matches any files that do not have an extension (i.e., the filename +contains no full stop character); +.IP (3) +any character string that does not contain any wild card characters (* +and ?). .PP Due to the different pattern matching rules on the various platforms, to ensure portability, wild card characters are not allowed in the -extensions, except as in the special extension *. Extensions -without a full stop character (e.g. ~) are allowed but may not -work on all platforms. - +extensions, except as in the special extension +.QW * . +Extensions without a full stop character (e.g. +.QW ~ ) +are allowed but may not work on all platforms. .SH EXAMPLE .CS set types { @@ -165,15 +174,13 @@ set types { {{GIF Files} {} GIFF} {{All Files} * } } -set filename [tk_getOpenFile -filetypes $types] +set filename [tk_getOpenFile \-filetypes $types] if {$filename != ""} { # Open the file ... } .CE - .SH "SEE ALSO" tk_chooseDirectory - .SH KEYWORDS file selection dialog @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: grab.n,v 1.4 2004/10/28 10:22:51 dkf Exp $ +'\" RCS: @(#) $Id: grab.n,v 1.4.2.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH grab n "" Tk "Tk Built-In Commands" @@ -32,8 +32,9 @@ and all events will be reported in the normal fashion. When the pointer is outside \fIwindow\fR's tree, button presses and releases and mouse motion events are reported to \fIwindow\fR, and window entry -and window exit events are ignored. -The grab subtree ``owns'' the pointer: +and window exit events are ignored. The grab subtree +.QW owns +the pointer: windows outside the grab subtree will be visible on the screen but they will be insensitive until the grab is released. The tree of windows underneath the grab window can include top-level @@ -111,7 +112,7 @@ events and not providing any mechanism for releasing the grab). Take .PP It took an incredibly complex and gross implementation to produce the simple grab effect described above. -Given the current implementation, it isn't safe for applications +Given the current implementation, it is not safe for applications to use the Xlib grab facilities at all except through the Tk grab procedures. If applications try to manipulate X's grab mechanisms directly, @@ -120,7 +121,7 @@ things will probably break. If a single process is managing several different Tk applications, only one of those applications can have a local grab for a given display at any given time. If the applications are in different -processes, this restriction doesn't exist. +processes, this restriction does not exist. .SH EXAMPLE Set a grab so that only one button may be clicked out of a group. The other buttons are unresponsive to the mouse until the middle button is @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: grid.n,v 1.15 2006/11/15 13:29:17 dkf Exp $ +'\" RCS: @(#) $Id: grid.n,v 1.15.2.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH grid n 8.5 Tk "Tk Built-In Commands" @@ -15,7 +15,6 @@ grid \- Geometry manager that arranges widgets in a grid .SH SYNOPSIS \fBgrid \fIoption arg \fR?\fIarg ...\fR? .BE - .SH DESCRIPTION .PP The \fBgrid\fR command is used to communicate with the grid @@ -54,7 +53,7 @@ indicated is returned. Query or set the column properties of the \fIindex\fR column of the geometry master, \fImaster\fR. The valid options are \fB\-minsize\fR, \fB\-weight\fR, \fB\-uniform\fR -and \fB-pad\fR. +and \fB\-pad\fR. If one or more options are provided, then \fIindex\fR may be given as a list of column indices to which the configuration options will operate on. .VS 8.5 @@ -72,19 +71,21 @@ columns. A weight of zero (0) indicates the column will not deviate from its requested size. A column whose weight is two will grow at twice the rate as a column of weight one when extra space is allocated to the layout. -The \fB-uniform\fR option, when a non-empty value is supplied, places +The \fB\-uniform\fR option, when a non-empty value is supplied, places the column in a \fIuniform group\fR with other columns that have the -same value for \fB-uniform\fR. The space for columns belonging to a +same value for \fB\-uniform\fR. The space for columns belonging to a uniform group is allocated so that their sizes are always in strict -proportion to their \fB-weight\fR values. See +proportion to their \fB\-weight\fR values. See \fBTHE GRID ALGORITHM\fR below for further details. -The \fB-pad\fR option specifies the number of screen units that will be +The \fB\-pad\fR option specifies the number of screen units that will be added to the largest window contained completely in that column when the grid geometry manager requests a size from the containing window. If only an option is specified, with no value, the current value of that option is returned. If only the master window and index is specified, all the current settings -are returned in a list of "-option value" pairs. +are returned in a list of +.QW "\-option value" +pairs. .TP \fBgrid configure \fIslave \fR?\fIslave ...\fR? ?\fIoptions\fR? The arguments consist of the names of one or more slave windows @@ -101,7 +102,9 @@ The following options are supported: Insert the slave so that it occupies the \fIn\fRth column in the grid. Column numbers start with 0. If this option is not supplied, then the slave is arranged just to the right of previous slave specified on this -call to \fIgrid\fR, or column "0" if it is the first slave. For each +call to \fBgrid\fR, or column +.QW 0 +if it is the first slave. For each \fBx\fR that immediately precedes the \fIslave\fR, the column position is incremented by one. Thus the \fBx\fR represents a blank column for this row in the grid. @@ -166,12 +169,15 @@ option may be used to position (or stretch) the slave within its cell. \fBn\fR, \fBs\fR, \fBe\fR or \fBw\fR. 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 slave will "stick" to. If both \fBn\fR and \fBs\fR (or -\fBe\fR and \fBw\fR) are specified, the slave will be stretched to fill the entire +east, or west) that the slave will +.QW stick +to. If both \fBn\fR and \fBs\fR (or \fBe\fR and \fBw\fR) are +specified, the slave will be stretched to fill the entire height (or width) of its cavity. The \fBsticky\fR option subsumes the combination of \fB\-anchor\fR and \fB\-fill\fR that is used by \fBpack\fR. -The default is \fB{}\fR, which causes the slave to be centered in its cavity, -at its requested size. +The default is +.QW "" , +which causes the slave to be centered in its cavity, at its requested size. .LP If any of the slaves are already managed by the geometry manager then any unspecified options for them retain their previous values rather @@ -190,13 +196,15 @@ default settings are used. Returns a list whose elements are the current configuration state of the slave given by \fIslave\fR in the same option-value form that might be specified to \fBgrid configure\fR. -The first two elements of the list are ``\fB\-in \fImaster\fR'' where -\fImaster\fR is the slave's master. +The first two elements of the list are +.QW "\fB\-in \fImaster\fR" +where \fImaster\fR is the slave's master. .TP \fBgrid location \fImaster x y\fR Given \fIx\fR and \fIy\fR values in screen units relative to the master window, the column and row number at that \fIx\fR and \fIy\fR location is returned. -For locations that are above or to the left of the grid, \fB-1\fR is returned. +For locations that are above or to the left of the grid, \fB\-1\fR is +returned. .TP \fBgrid propagate \fImaster\fR ?\fIboolean\fR? If \fIboolean\fR has a true boolean value such as \fB1\fR or \fBon\fR @@ -214,7 +222,7 @@ Propagation is enabled by default. Query or set the row properties of the \fIindex\fR row of the geometry master, \fImaster\fR. The valid options are \fB\-minsize\fR, \fB\-weight\fR, \fB\-uniform\fR -and \fB-pad\fR. +and \fB\-pad\fR. If one or more options are provided, then \fIindex\fR may be given as a list of row indices to which the configuration options will operate on. .VS 8.5 @@ -232,19 +240,21 @@ rows. A weight of zero (0) indicates the row will not deviate from its requested size. A row whose weight is two will grow at twice the rate as a row of weight one when extra space is allocated to the layout. -The \fB-uniform\fR option, when a non-empty value is supplied, places +The \fB\-uniform\fR option, when a non-empty value is supplied, places the row in a \fIuniform group\fR with other rows that have the -same value for \fB-uniform\fR. The space for rows belonging to a +same value for \fB\-uniform\fR. The space for rows belonging to a uniform group is allocated so that their sizes are always in strict -proportion to their \fB-weight\fR values. See +proportion to their \fB\-weight\fR values. See \fBTHE GRID ALGORITHM\fR below for further details. -The \fB-pad\fR option specifies the number of screen units that will be +The \fB\-pad\fR option specifies the number of screen units that will be added to the largest window contained completely in that row when the grid geometry manager requests a size from the containing window. If only an option is specified, with no value, the current value of that option is returned. If only the master window and index is specified, all the current settings -are returned in a list of "-option value" pairs. +are returned in a list of +.QW "-option value" +pairs. .TP \fBgrid remove \fIslave \fR?\fIslave ...\fR? Removes each of the \fIslave\fRs from grid for its @@ -327,11 +337,11 @@ equally. When multiple rows or columns belong to a uniform group, the space allocated to them is always in proportion to their weights. (A weight of zero is considered to be 1.) In other words, a row or column -configured with \fB-weight 1 -uniform a\fR will have exactly the same -size as any other row or column configured with \fB-weight 1 -uniform -a\fR. A row or column configured with \fB-weight 2 -uniform b\fR will -be exactly twice as large as one that is configured with \fB-weight 1 --uniform b\fR. +configured with \fB\-weight 1 \-uniform a\fR will have exactly the same +size as any other row or column configured with \fB\-weight 1 \-uniform +a\fR. A row or column configured with \fB\-weight 2 \-uniform b\fR will +be exactly twice as large as one that is configured with \fB\-weight 1 +\-uniform b\fR. .PP More technically, each row or column in the group will have a size equal to \fIk*weight\fR for some constant \fIk\fR. The constant @@ -379,7 +389,7 @@ In addition, all slaves in one call to \fBgrid\fR must have the same master. If the master for a slave is not its parent then you must make sure that the slave is higher in the stacking order than the master. Otherwise the master will obscure the slave and it will appear as -if the slave hasn't been managed correctly. +if the slave has not been managed correctly. The easiest way to make sure the slave is higher than the master is to create the master window first: the most recently created window will be highest in the stacking order. @@ -404,7 +414,9 @@ scrollbar .t.h \-orient horizontal \-command {.t.txt xview} \fBgrid columnconfigure\fR .t .t.txt \-weight 1 .CE .PP -Three widgets of equal width, despite their different "natural" widths: +Three widgets of equal width, despite their different +.QW natural +widths: .CS button .b \-text "Foo" entry .e \-variable foo @@ -412,9 +424,7 @@ label .l \-text "This is a fairly long piece of text" \fBgrid\fR .b .e .l \-sticky ew \fBgrid columnconfigure\fR . "all" \-uniform allTheSame .CE - .SH "SEE ALSO" pack(n), place(n) - .SH KEYWORDS geometry manager, location, grid, cell, propagation, size, pack diff --git a/doc/image.n b/doc/image.n index 813d6d5..1c3f446 100644 --- a/doc/image.n +++ b/doc/image.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: image.n,v 1.7 2004/06/15 22:44:42 dkf Exp $ +'\" RCS: @(#) $Id: image.n,v 1.7.2.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH image n 4.0 Tk "Tk Built-In Commands" @@ -45,7 +45,7 @@ name wisely. It is recommended to use a separate namespace for image names \fBimage delete \fR?\fIname name\fR ...? Deletes each of the named images and returns an empty string. If there are instances of the images displayed in widgets, -the images won't actually be deleted until all of the instances +the images will not actually be deleted until all of the instances are released. However, the association between the instances and the image manager will be dropped. diff --git a/doc/label.n b/doc/label.n index 93710e5..e8ea234 100644 --- a/doc/label.n +++ b/doc/label.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: label.n,v 1.9 2006/12/13 23:04:32 hobbs Exp $ +'\" RCS: @(#) $Id: label.n,v 1.9.2.1 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH label n 4.0 Tk "Tk Built-In Commands" @@ -31,7 +31,7 @@ Specifies a desired height for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in lines of text. -If this option isn't specified, the label's desired height is computed +If this option is not specified, the label's desired height is computed from the size of the image or bitmap or text being displayed in it. .OP \-state state State Specifies one of three states for the label: \fBnormal\fR, \fBactive\fR, @@ -46,10 +46,9 @@ Specifies a desired width for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in characters. -If this option isn't specified, the label's desired width is computed +If this option is not specified, the label's desired width is computed from the size of the image or bitmap or text being displayed in it. .BE - .SH DESCRIPTION .PP The \fBlabel\fR command creates a new window (given by the @@ -112,8 +111,8 @@ labels are not intended to be interactive. # Make the widgets \fBlabel\fR .t \-text "This widget is at the top" \-bg red \fBlabel\fR .b \-text "This widget is at the bottom" \-bg green -\fBlabel\fR .l \-text "Left\\nHand\\nSide" -\fBlabel\fR .r \-text "Right\\nHand\\nSide" +\fBlabel\fR .l \-text "Left\enHand\enSide" +\fBlabel\fR .r \-text "Right\enHand\enSide" text .mid \.mid insert end "This layout is like Java's BorderLayout" # Lay them out @@ -123,9 +122,7 @@ pack .l \-side left \-fill y pack .r \-side right \-fill y pack .mid \-expand 1 \-fill both .CE - .SH "SEE ALSO" -labelframe(n), button(n), ttk_label(n) - +labelframe(n), button(n), ttk::label(n) .SH KEYWORDS label, widget diff --git a/doc/labelframe.n b/doc/labelframe.n index 93345bf..635f14f 100644 --- a/doc/labelframe.n +++ b/doc/labelframe.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: labelframe.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: labelframe.n,v 1.3.2.3 2007/11/01 16:37:14 dgp Exp $ '\" .so man.macros .TH labelframe n 8.4 Tk "Tk Built-In Commands" @@ -85,7 +85,6 @@ acceptable to \fBTk_GetPixels\fR. If this option is less than or equal to zero then the window will not request any size at all. .BE - .SH DESCRIPTION .PP The \fBlabelframe\fR command creates a new window (given by the @@ -143,10 +142,10 @@ This shows how to build part of a GUI for a hamburger vendor. The the kinds of things that the choices are being made over. .PP .CS -grid [\fBlabelframe\fR .burger -text "Burger"] \\ - [\fBlabelframe\fR .bun -text "Bun"] -sticky news -grid [\fBlabelframe\fR .cheese -text "Cheese Option"] \\ - [\fBlabelframe\fR .pickle -text "Pickle Option"] -sticky news +grid [\fBlabelframe\fR .burger \-text "Burger"] \e + [\fBlabelframe\fR .bun \-text "Bun"] \-sticky news +grid [\fBlabelframe\fR .cheese \-text "Cheese Option"] \e + [\fBlabelframe\fR .pickle \-text "Pickle Option"] \-sticky news foreach {type name val} { burger Beef beef burger Lamb lamb @@ -160,7 +159,7 @@ foreach {type name val} { cheese Cheddar cheddar cheese Edam edam cheese Brie brie - cheese Gruy\\u00e8re gruyere + cheese Gruy\eu00e8re gruyere cheese "Monterey Jack" jack pickle None none @@ -168,18 +167,16 @@ foreach {type name val} { pickle Onions onion pickle Chili chili } { - set w [radiobutton .$type.$val -text $name -anchor w \\ - -variable $type -value $val] - pack $w -side top -fill x + set w [radiobutton .$type.$val \-text $name \-anchor w \e + \-variable $type \-value $val] + pack $w \-side top \-fill x } set burger beef set bun white set cheese none set pickle none .CE - .SH "SEE ALSO" -frame(n), label(n), ttk_labelframe(n) - +frame(n), label(n), ttk::labelframe(n) .SH KEYWORDS labelframe, widget diff --git a/doc/listbox.n b/doc/listbox.n index 4c76839..1d75a21 100644 --- a/doc/listbox.n +++ b/doc/listbox.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: listbox.n,v 1.12 2005/04/06 21:11:54 dkf Exp $ +'\" RCS: @(#) $Id: listbox.n,v 1.12.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH listbox n 8.4 Tk "Tk Built-In Commands" @@ -51,13 +51,13 @@ or \fBextended\fR; the default value is \fBbrowse\fR. .OP \-state state State Specifies one of two states for the listbox: \fBnormal\fR or \fBdisabled\fR. If the listbox is disabled then items may not be inserted or deleted, -items are drawn in the \fB-disabledforeground\fR color, and selection +items are drawn in the \fB\-disabledforeground\fR color, and selection cannot be modified and is not shown (though selection information is retained). .OP \-width width Width Specifies the desired width for the window in characters. -If the font doesn't have a uniform width then the width of the -character ``0'' is used in translating from character units to -screen units. +If the font does not have a uniform width then the width of the character +.QW 0 +is used in translating from character units to screen units. If zero or less, then the desired width for the window is made just large enough to hold all the elements in the listbox. .BE @@ -195,7 +195,7 @@ string is returned. \fIpathName \fBdelete \fIfirst \fR?\fIlast\fR? Deletes one or more elements of the listbox. \fIFirst\fR and \fIlast\fR are indices specifying the first and last elements in the range -to delete. If \fIlast\fR isn't specified it defaults to +to delete. If \fIlast\fR is not specified it defaults to \fIfirst\fR, i.e. a single element is deleted. .TP \fIpathName \fBget \fIfirst\fR ?\fIlast\fR? @@ -313,7 +313,7 @@ this range. .TP \fIpathName \fBselection includes \fIindex\fR Returns 1 if the element indicated by \fIindex\fR is currently -selected, 0 if it isn't. +selected, 0 if it is not. .TP \fIpathName \fBselection set \fIfirst \fR?\fIlast\fR? Selects all of the elements in the range between @@ -420,6 +420,10 @@ In both modes, clicking button 1 on an element selects it and deselects any other selected item. In \fBbrowse\fR mode it is also possible to drag the selection with button 1. +.VS 8.5 +On button 1, the listbox will also take focus if it has a \fBnormal\fR +state and \fB\-takefocus\fR is true. +.VE 8.5 .PP If the selection mode is \fBmultiple\fR or \fBextended\fR, any number of elements may be selected at once, including discontiguous @@ -452,7 +456,7 @@ the button down. In \fBextended\fR mode, pressing button 1 with the Control key down starts a toggle operation: the anchor is set to the element under the mouse, and its selection state is reversed. The selection state -of other elements isn't changed. +of other elements is not changed. If the mouse is dragged with button 1 down, then the selection state of all elements between the anchor and the element under the mouse is set to match that of the anchor element; the selection state of diff --git a/doc/loadTk.n b/doc/loadTk.n index 3af7b5c..5aa29a3 100644 --- a/doc/loadTk.n +++ b/doc/loadTk.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: loadTk.n,v 1.7 2005/01/05 16:40:39 dkf Exp $ +'\" RCS: @(#) $Id: loadTk.n,v 1.7.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH "Safe Tk" n 8.0 Tk "Tk Built-In Commands" @@ -31,14 +31,17 @@ The interpreter must have been created with \fB::safe::interpCreate\fR or have been initialized with \fB::safe::interpInit\fR. The command returns the name of the safe interpreter. If \fB\-use\fR is specified, the window identified by the specified system -dependent identifier \fIwindowId\fR is used to contain the ``.'' +dependent identifier \fIwindowId\fR is used to contain the +.QW . window of the safe interpreter; it can be any valid id, eventually referencing a window belonging to another application. As a convenience, if the window you plan to use is a Tk Window of the application you can use the window name (e.g. \fB.x.y\fR) instead of its window Id (\fB[winfo id .x.y]\fR). When \fB\-use\fR is not specified, -a new toplevel window is created for the ``.'' window of +a new toplevel window is created for the +.QW . +window of the safe interpreter. On X11 if you want the embedded window to use another display than the default one, specify it with \fB\-display\fR. @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: menu.n,v 1.15.2.1 2007/05/26 04:06:06 dgp Exp $ +'\" RCS: @(#) $Id: menu.n,v 1.15.2.2 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH menu n 4.1 Tk "Tk Built-In Commands" @@ -22,7 +22,6 @@ menu, tk_menuSetFocus \- Create and manipulate menu widgets \-activeborderwidth \-cursor \-relief \-activeforeground \-disabledforeground \-takefocus \-background \-font - .SE .SH "WIDGET-SPECIFIC OPTIONS" .OP \-postcommand postCommand Command @@ -49,9 +48,12 @@ to invoke whenever the menu is torn off. The actual command will consist of the value of this option, followed by a space, followed by the name of the menu window, followed by a space, followed by the name of the name of the torn off menu window. For example, if -the option's is ``\fBa b\fR'' and menu \fB.x.y\fR is torn off to +the option's is +.QW "\fBa b\fR" +and menu \fB.x.y\fR is torn off to create a new menu \fB.x.tearoff1\fR, then the command -``\fBa b .x.y .x.tearoff1\fR'' will be invoked. +.QW "\fBa b .x.y .x.tearoff1\fR" +will be invoked. .OP \-title title Title The string will be used to title the window created when this menu is torn off. If the title is NULL, then the window will have the title @@ -65,7 +67,6 @@ changed, this does not affect the menu widget's behavior. This is used by the cloning mechanism and is not normally set outside of the Tk library. .BE - .SH INTRODUCTION .PP The \fBmenu\fR command creates a new top-level window (given @@ -250,7 +251,8 @@ the Apple menu than Tk uses for its menus, and the system APIs do not fully support everything Tk tries to do, the menu item will only have its text displayed. No font attributes, images, bitmaps, or colors will be displayed. In addition, a menu with a tearoff item will have -the tearoff item displayed as "(TearOff)". +the tearoff item displayed as +.QW (TearOff) . .PP When Tk see a Help menu on the Macintosh, the menu's contents are appended to the standard help menu on the right of the user's menubar @@ -313,7 +315,9 @@ This form may not be abbreviated. Same as \fBend\fR. .TP 12 \fBnone\fR -Indicates ``no entry at all''; this is used most commonly with +Indicates +.QW "no entry at all" ; +this is used most commonly with the \fBactivate\fR option to deactivate all the entries in the menu. In most cases the specification of \fBnone\fR causes nothing to happen in the widget command. @@ -322,11 +326,12 @@ This form may not be abbreviated. \fB@\fInumber\fR In this form, \fInumber\fR is treated as a y-coordinate in the menu's window; the entry closest to that y-coordinate is used. -For example, ``\fB@0\fR'' indicates the top-most entry in the -window. +For example, +.QW \fB@0\fR +indicates the top-most entry in the window. .TP 12 \fIpattern\fR -If the index doesn't satisfy one of the above forms then this +If the index does not satisfy one of the above forms then this form is used. \fIPattern\fR is pattern-matched against the label of each entry in the menu, in order from the top down, until a matching entry is found. The rules of \fBTcl_StringMatch\fR @@ -611,8 +616,8 @@ returned without posting the menu. \fIpathName \fBpostcascade \fIindex\fR Posts the submenu associated with the cascade entry given by \fIindex\fR, and unposts any previously posted submenu. -If \fIindex\fR doesn't correspond to a cascade entry, -or if \fIpathName\fR isn't posted, +If \fIindex\fR does not correspond to a cascade entry, +or if \fIpathName\fR is not posted, the command has no effect except to unpost any currently posted submenu. .TP @@ -730,7 +735,7 @@ Otherwise, if the current menu was posted from a menubutton, then the current menubutton is unposted and the next menubutton to the right is posted. .PP -Disabled menu entries are non-responsive: they don't activate and +Disabled menu entries are non-responsive: they do not activate and they ignore mouse button presses and releases. .PP Several of the bindings make use of the command \fBtk_menuSetFocus\fR. @@ -741,12 +746,10 @@ The behavior of menus can be changed by defining new bindings for individual widgets or by redefining the class bindings. .SH BUGS .PP -At present it isn't possible to use the +At present it is not possible to use the option database to specify values for the options to individual entries. - .SH "SEE ALSO" -bind(n), menubutton(n), ttk_menubutton(n), toplevel(n) - +bind(n), menubutton(n), ttk::menubutton(n), toplevel(n) .SH KEYWORDS menu, widget diff --git a/doc/menubutton.n b/doc/menubutton.n index b3b42f7..9645045 100644 --- a/doc/menubutton.n +++ b/doc/menubutton.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: menubutton.n,v 1.7 2006/12/13 23:04:32 hobbs Exp $ +'\" RCS: @(#) $Id: menubutton.n,v 1.7.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH menubutton n 4.0 Tk "Tk Built-In Commands" @@ -39,7 +39,7 @@ Specifies a desired height for the menubutton. If an image or bitmap is being displayed in the menubutton then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in lines of text. -If this option isn't specified, the menubutton's desired height is computed +If this option is not specified, the menubutton's desired height is computed from the size of the image or bitmap or text being displayed in it. .OP \-indicatoron indicatorOn IndicatorOn The value must be a proper boolean value. If it is true then @@ -66,10 +66,9 @@ Specifies a desired width for the menubutton. If an image or bitmap is being displayed in the menubutton then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in characters. -If this option isn't specified, the menubutton's desired width is computed +If this option is not specified, the menubutton's desired width is computed from the size of the image or bitmap or text being displayed in it. .BE - .SH INTRODUCTION .PP The \fBmenubutton\fR command creates a new window (given by the @@ -107,7 +106,6 @@ new menubutton is posted instead. There are several interactions between menubuttons and menus; see the \fBmenu\fR manual entry for information on various menu configurations, such as pulldown menus and option menus. - .SH "WIDGET COMMAND" .PP The \fBmenubutton\fR command creates a new Tcl command whose @@ -140,7 +138,6 @@ modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. \fIOption\fR may have any of the values accepted by the \fBmenubutton\fR command. - .SH "DEFAULT BINDINGS" .PP Tk automatically creates class bindings for menubuttons that give them @@ -180,7 +177,7 @@ lower-case or upper-case equivalent), may be typed in any window under the menubutton's toplevel to post the menubutton. .IP [8] The F10 key may be typed in any window to post the first menubutton -under its toplevel window that isn't disabled. +under its toplevel window that is not disabled. .IP [9] If a menubutton has the input focus, the space and return keys post the menubutton. @@ -190,9 +187,7 @@ actions occur: the menubutton is completely non-responsive. .PP The behavior of menubuttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. - .SH "SEE ALSO" -ttk_menubutton(n), menu(n) - +ttk::menubutton(n), menu(n) .SH KEYWORDS menubutton, widget diff --git a/doc/message.n b/doc/message.n index df0e9fc..29c4e4d 100644 --- a/doc/message.n +++ b/doc/message.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: message.n,v 1.4 2004/08/17 22:37:24 dkf Exp $ +'\" RCS: @(#) $Id: message.n,v 1.4.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH message n 4.0 Tk "Tk Built-In Commands" @@ -32,7 +32,7 @@ be as wide as it is tall, 200 means the text should be twice as wide as it is tall, 50 means the text should be twice as tall as it is wide, and so on. Used to choose line length for text if \fBwidth\fR option -isn't specified. +is not specified. Defaults to 150. .OP \-justify justify Justify Specifies how to justify lines of text. @@ -98,10 +98,10 @@ are replaced with enough blank space to line up on the next characters (ASCII code less than 0x20) and characters not defined in the font are displayed as a four-character sequence \fB\ex\fIhh\fR where \fIhh\fR is the two-digit hexadecimal number corresponding to -the character. In the unusual case where the font doesn't contain -all of the characters in ``0123456789abcdef\ex'' then control -characters and undefined characters are not displayed at all. - +the character. In the unusual case where the font does not contain +all of the characters in +.QW 0123456789abcdef\ex +then control characters and undefined characters are not displayed at all. .SH "WIDGET COMMAND" .PP The \fBmessage\fR command creates a new Tcl command whose @@ -134,16 +134,13 @@ modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. \fIOption\fR may have any of the values accepted by the \fBmessage\fR command. - .SH "DEFAULT BINDINGS" .PP When a new message is created, it has no default event bindings: messages are intended for output purposes only. - .SH BUGS .PP -Tabs don't work very well with text that is centered or right-justified. +Tabs do not work very well with text that is centered or right-justified. The most common result is that the line is justified wrong. - .SH KEYWORDS message, widget diff --git a/doc/messageBox.n b/doc/messageBox.n index 78849fa..fc191c5 100644 --- a/doc/messageBox.n +++ b/doc/messageBox.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: messageBox.n,v 1.8 2004/10/28 10:22:51 dkf Exp $ +'\" RCS: @(#) $Id: messageBox.n,v 1.8.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH tk_messageBox n 4.2 Tk "Tk Built-In Commands" @@ -29,7 +29,10 @@ The following option-value pairs are supported: .TP \fB\-default\fR \fIname\fR \fIName\fR gives the symbolic name of the default button for -this message window ('ok', 'cancel', and so on). See \fB\-type\fR +this message window ( +.QW ok , +.QW cancel , +and so on). See \fB\-type\fR for a list of the symbolic names. If this option is not specified, the first button in the dialog will be made the default. .TP @@ -89,7 +92,7 @@ and \fBcancel\fR. set answer [\fBtk_messageBox\fR \-message "Really quit?" \e \-icon question \-type yesno \e \-detail "Select \e"Yes\e" to make the application exit"] -switch -- $answer { +switch \-\- $answer { yes exit no {\fBtk_messageBox\fR \-message "I know you like this application!" \e \-type ok} diff --git a/doc/option.n b/doc/option.n index 4d593d7..6048dfd 100644 --- a/doc/option.n +++ b/doc/option.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: option.n,v 1.5 2004/10/28 12:25:53 dkf Exp $ +'\" RCS: @(#) $Id: option.n,v 1.5.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH option n "" Tk "Tk Built-In Commands" @@ -78,7 +78,7 @@ the X server, or user-specific startup files. .TP \fBinteractive\fR Level 80. Used for options specified interactively after the application -starts running. If \fIpriority\fR isn't specified, it defaults to +starts running. If \fIpriority\fR is not specified, it defaults to this level. .LP Any of the above keywords may be abbreviated. In addition, priorities diff --git a/doc/optionMenu.n b/doc/optionMenu.n index b6d3257..6ba5f3f 100644 --- a/doc/optionMenu.n +++ b/doc/optionMenu.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: optionMenu.n,v 1.3 2004/06/21 14:48:04 dkf Exp $ +'\" RCS: @(#) $Id: optionMenu.n,v 1.3.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH tk_optionMenu n 4.0 Tk "Tk Built-In Commands" @@ -14,12 +14,11 @@ .SH NAME tk_optionMenu \- Create an option menubutton and its menu .SH SYNOPSIS -\fBtk_optionMenu \fIw varName value \fR?\fIvalue value ...\fR? +\fBtk_optionMenu \fIpathName varName value \fR?\fIvalue value ...\fR? .BE - .SH DESCRIPTION .PP -This procedure creates an option menubutton whose name is \fIw\fR, +This procedure creates an option menubutton whose name is \fIpathName\fR, plus an associated menu. Together they allow the user to select one of the values given by the \fIvalue\fR arguments. @@ -33,13 +32,12 @@ and appear in the option menubutton. The current value can also be changed by setting the variable. .PP The return value from \fBtk_optionMenu\fR is the name of the menu -associated with \fIw\fR, so that the caller can change its configuration -options or manipulate it in other ways. +associated with \fIpathName\fR, so that the caller can change its +configuration options or manipulate it in other ways. .SH EXAMPLE .CS tk_optionMenu .foo myVar Foo Bar Boo Spong Wibble pack .foo .CE - .SH KEYWORDS option menu diff --git a/doc/options.n b/doc/options.n index 4522293..4464b78 100644 --- a/doc/options.n +++ b/doc/options.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: options.n,v 1.11 2005/04/06 21:11:54 dkf Exp $ +'\" RCS: @(#) $Id: options.n,v 1.11.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH options n 4.4 Tk "Tk Built-In Commands" @@ -23,7 +23,9 @@ of the standard options supported by that widget), but if a widget does support an option with one of the names listed below, then the option has exactly the effect described below. .PP -In the descriptions below, ``Command-Line Name'' refers to the +In the descriptions below, +.QW "Command-Line Name" +refers to the switch used in class commands and \fBconfigure\fR widget commands to set this value. For example, if an option's command-line switch is \fB\-foreground\fR and there exists a widget \fB.a.b.c\fR, then the @@ -34,9 +36,10 @@ command may be used to specify the value \fBblack\fR for the option in the widget \fB.a.b.c\fR. Command-line switches may be abbreviated, as long as the abbreviation is unambiguous. -``Database Name'' refers to the option's name in the option database (e.g. -in .Xdefaults files). ``Database Class'' refers to the option's class value -in the option database. +.QW "Database Name" +refers to the option's name in the option database (e.g. in .Xdefaults files). +.QW "Database Class" +refers to the option's class value in the option database. .OP \-activebackground activeBackground Foreground Specifies background color to use when drawing active elements. An element (a widget or portion of a widget) is active if the @@ -153,12 +156,16 @@ of the 3-D border to draw around the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. .OP \-insertofftime insertOffTime OffTime Specifies a non-negative integer value indicating the number of -milliseconds the insertion cursor should remain ``off'' in each blink cycle. -If this option is zero then the cursor doesn't blink: it is on +milliseconds the insertion cursor should remain +.QW off +in each blink cycle. +If this option is zero then the cursor does not blink: it is on all the time. .OP \-insertontime insertOnTime OnTime Specifies a non-negative integer value indicating the number of -milliseconds the insertion cursor should remain ``on'' in each blink cycle. +milliseconds the insertion cursor should remain +.QW on +in each blink cycle. .OP \-insertwidth insertWidth InsertWidth Specifies a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. @@ -176,7 +183,9 @@ If the value is false, updates are made continuously as the slider is dragged. If the value is true, updates are delayed until the mouse button is released to end the drag; at that point a single notification -is made (the value ``jumps'' rather than changing smoothly). +is made (the value +.QW jumps +rather than changing smoothly). .OP \-justify justify Justify When there are multiple lines of text displayed in a widget, this option determines how the lines line up with each other. @@ -292,7 +301,7 @@ particular widget and may be determined by other options, such as .OP \-troughcolor troughColor Background Specifies the color to use for the rectangular trough areas in widgets such as scrollbars and scales. This option is ignored for -scrollbars on Windows (native widget doesn't recognize this option). +scrollbars on Windows (native widget does not recognize this option). .OP \-underline underline Underline Specifies the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard @@ -327,7 +336,11 @@ the information just after the last portion that is visible. The command is then passed to the Tcl interpreter for execution. Typically the \fBxScrollCommand\fR option consists of the path name of a scrollbar -widget followed by ``set'', e.g. ``.x.scrollbar set'': this will cause +widget followed by +.QW set , +e.g. +.QW ".x.scrollbar set" : +this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed. .OP \-yscrollcommand yScrollCommand ScrollCommand diff --git a/doc/pack-old.n b/doc/pack-old.n index 9de89b8..542880a 100644 --- a/doc/pack-old.n +++ b/doc/pack-old.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: pack-old.n,v 1.3 2004/11/19 10:22:06 rmax Exp $ +'\" RCS: @(#) $Id: pack-old.n,v 1.3.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH pack-old n 4.0 Tk "Tk Built-In Commands" @@ -63,7 +63,7 @@ the \fIoptions\fR argument following each \fIwindow\fR consists of a list of one or more fields that govern the placement of that window. In the discussion below, the term \fIcavity\fR refers to the space left in a parent when a particular child is placed -(i.e. all the space that wasn't claimed by earlier children in +(i.e. all the space that was not claimed by earlier children in the packing order). The term \fIparcel\fR refers to the space allocated to a particular child; this is not necessarily the same as the child window's final geometry. @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: pack.n,v 1.7 2004/10/28 12:25:53 dkf Exp $ +'\" RCS: @(#) $Id: pack.n,v 1.7.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH pack n 4.0 Tk "Tk Built-In Commands" @@ -27,14 +27,15 @@ on the \fIoption\fR argument: .TP \fBpack \fIslave \fR?\fIslave ...\fR? ?\fIoptions\fR? If the first argument to \fBpack\fR is a window name (any value -starting with ``.''), then the command is processed in the same -way as \fBpack configure\fR. +starting with +.QW . ), +then the command is processed in the same way as \fBpack configure\fR. .TP \fBpack configure \fIslave \fR?\fIslave ...\fR? ?\fIoptions\fR? The arguments consist of the names of one or more slave windows followed by pairs of arguments that specify how to manage the slaves. -See ``THE PACKER ALGORITHM'' below for details on how the options +See \fBTHE PACKER ALGORITHM\fR below for details on how the options are used by the packer. The following options are supported: .RS @@ -136,13 +137,14 @@ The slaves will no longer be managed by the packer. Returns a list whose elements are the current configuration state of the slave given by \fIslave\fR in the same option-value form that might be specified to \fBpack configure\fR. -The first two elements of the list are ``\fB\-in \fImaster\fR'' where -\fImaster\fR is the slave's master. +The first two elements of the list are +.QW "\fB\-in \fImaster\fR" +where \fImaster\fR is the slave's master. .TP \fBpack propagate \fImaster\fR ?\fIboolean\fR? If \fIboolean\fR has a true boolean value such as \fB1\fR or \fBon\fR then propagation is enabled for \fImaster\fR, which must be a window -name (see ``GEOMETRY PROPAGATION'' below). +name (see \fBGEOMETRY PROPAGATION\fR below). If \fIboolean\fR has a false boolean value then propagation is disabled for \fImaster\fR. In either of these cases an empty string is returned. @@ -184,7 +186,7 @@ For the left or right side the height of the parcel is the height of the cavity and the width is the requested width of the slave plus the \fB\-ipadx\fR and \fB\-padx\fR options. The parcel may be enlarged further because of the \fB\-expand\fR -option (see ``EXPANSION'' below) +option (see \fBEXPANSION\fR below) .IP [2] The packer chooses the dimensions of the slave. The width will normally be the slave's requested width plus @@ -208,7 +210,7 @@ slave and the edges of the parcel. Once a given slave has been packed, the area of its parcel is subtracted from the cavity, leaving a smaller rectangular cavity for the next slave. -If a slave doesn't use all of its parcel, the unused space +If a slave does not use all of its parcel, the unused space in the parcel will not be used by subsequent slaves. If the cavity should become too small to meet the needs of a slave then the slave will be given whatever space is @@ -252,7 +254,7 @@ visible without danger of the slave being clipped by its parent. If the master for a slave is not its parent then you must make sure that the slave is higher in the stacking order than the master. Otherwise the master will obscure the slave and it will appear as -if the slave hasn't been packed correctly. +if the slave has not been packed correctly. The easiest way to make sure the slave is higher than the master is to create the master window first: the most recently created window will be highest in the stacking order. @@ -263,8 +265,8 @@ the stacking order of either the master or the slave. # Make the widgets label .t \-text "This widget is at the top" \-bg red label .b \-text "This widget is at the bottom" \-bg green -label .l \-text "Left\\nHand\\nSide" -label .r \-text "Right\\nHand\\nSide" +label .l \-text "Left\enHand\enSide" +label .r \-text "Right\enHand\enSide" text .mid \.mid insert end "This layout is like Java's BorderLayout" # Lay them out diff --git a/doc/palette.n b/doc/palette.n index 3d77282..aa44360 100644 --- a/doc/palette.n +++ b/doc/palette.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: palette.n,v 1.2 1998/09/14 18:22:58 stanton Exp $ +'\" RCS: @(#) $Id: palette.n,v 1.2.32.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH tk_setPalette n 4.0 Tk "Tk Built-In Commands" @@ -42,7 +42,7 @@ background highlightColor selectForeground disabledForeground insertBackground troughColor\fR .DE \fBtk_setPalette\fR tries to compute reasonable defaults for any -options that you don't specify. You can specify options other +options that you do not specify. You can specify options other than the above ones and Tk will change those options on widgets as well. This feature may be useful if you are using custom widgets with additional color options. @@ -66,7 +66,8 @@ from the .Xdefaults file or options specified on the command-line that creates a widget. .PP The procedure \fBtk_bisque\fR is provided for backward compatibility: -it restores the application's colors to the light brown (``bisque'') +it restores the application's colors to the light brown +.PQ bisque color scheme used in Tk 3.6 and earlier versions. .SH KEYWORDS diff --git a/doc/panedwindow.n b/doc/panedwindow.n index b9f6e03..4b9be3f 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -5,7 +5,7 @@ '\" 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.10 2006/12/13 23:04:32 hobbs Exp $ +'\" RCS: @(#) $Id: panedwindow.n,v 1.10.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH panedwindow n 8.4 Tk "Tk Built-In Commands" @@ -48,7 +48,6 @@ Specifies the width of each sash. May be any value accepted by Specifies whether sash handles should be shown. May be any valid Tcl boolean value. .BE - .SH DESCRIPTION .PP The \fBpanedwindow\fR command creates a new window (given by the @@ -200,7 +199,7 @@ it will still be maintained in the list of panes. \fB\-minsize \fIn\fR Specifies that the size of the window cannot be made less than \fIn\fR. This constraint only affects the size of the widget in the -paned dimension -- the x dimension for horizontal panedwindows, the y +paned dimension \(em the x dimension for horizontal panedwindows, the y dimension for vertical panedwindows. May be any value accepted by \fBTk_GetPixels\fR. .TP @@ -221,7 +220,9 @@ within its pane. \fIStyle\fR is a string that contains zero or more of the characters \fBn\fR, \fBs\fR, \fBe\fR or \fBw\fR. 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 \fBn\fR and \fBs\fR (or \fBe\fR and \fBw\fR) +will +.QW stick +to. If both \fBn\fR and \fBs\fR (or \fBe\fR and \fBw\fR) are specified, the window will be stretched to fill the entire height (or width) of its cavity. .TP @@ -267,7 +268,6 @@ panedwindow. \fISize\fR may be any value accepted by \fBTk_GetPixels\fR. .TP \fIpathName \fBpanes\fR Returns an ordered list of the widgets managed by \fIpathName\fR. - .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 @@ -278,9 +278,7 @@ adjusted. 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 "SEE ALSO" -ttk_panedwindow(n) - +ttk::panedwindow(n) .SH KEYWORDS panedwindow, widget, geometry management diff --git a/doc/photo.n b/doc/photo.n index 4b14c58..2fb1e95 100644 --- a/doc/photo.n +++ b/doc/photo.n @@ -9,7 +9,7 @@ '\" Department of Computer Science, '\" Australian National University. '\" -'\" RCS: @(#) $Id: photo.n,v 1.19.2.1 2007/06/05 14:11:23 dgp Exp $ +'\" RCS: @(#) $Id: photo.n,v 1.19.2.2 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH photo n 4.0 Tk "Tk Built-In Commands" @@ -370,7 +370,7 @@ When reading an image file or processing string data specified with the \fB\-data\fR configuration option, the photo image code invokes each handler in turn until one is found that claims to be able to read the data in the file or string. -Usually this will find the correct handler, but if it doesn't, the +Usually this will find the correct handler, but if it does not, the user may give a format name with the \fB\-format\fR option to specify which handler to use. In fact the photo image code will try those handlers whose names begin with the string specified for the @@ -427,7 +427,7 @@ Load an image from a file and tile it to the size of a window, which is useful for producing a tiled background: .CS # These lines should be called once -\fBimage create photo\fR untiled -file "theFile.ppm" +\fBimage create photo\fR untiled \-file "theFile.ppm" \fBimage create photo\fR tiled # These lines should be called whenever .someWidget changes diff --git a/doc/place.n b/doc/place.n index c2fb9de..0d87117 100644 --- a/doc/place.n +++ b/doc/place.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: place.n,v 1.7 2004/08/20 10:56:36 dkf Exp $ +'\" RCS: @(#) $Id: place.n,v 1.7.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH place n "" Tk "Tk Built-In Commands" @@ -104,7 +104,7 @@ In addition, \fImaster\fR and \fIwindow\fR must both be descendants of the same top-level window. These restrictions are necessary to guarantee that \fIwindow\fR is visible whenever \fImaster\fR is visible. -If this option isn't specified then the master defaults to +If this option is not specified then the master defaults to \fIwindow\fR's parent. .TP \fB\-relheight \fIsize\fR @@ -182,7 +182,7 @@ the most recent option is used and the older one is ignored. \fBplace forget \fIwindow\fR Causes the placer to stop managing the geometry of \fIwindow\fR. As a side effect of this command \fIwindow\fR will be unmapped so that it -doesn't appear on the screen. If \fIwindow\fR isn't currently managed +does not appear on the screen. If \fIwindow\fR is not currently managed by the placer then the command has no effect. This command returns an empty string. .TP @@ -209,12 +209,15 @@ This feature is useful in at least two situations. First, for complex window layouts it means you can create a hierarchy of subwindows whose only purpose is to assist in the layout of the parent. -The ``real children'' of the parent (i.e. the windows that +The +.QW "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 +This means that the path names of the +.QW "real children" +do not reflect the geometry-management hierarchy and users can specify options for the real children without being aware of the structure of the geometry-management hierarchy. @@ -232,7 +235,7 @@ will be repositioned as well. .PP Unlike many other geometry managers (such as the packer) the placer does not make any attempt to manipulate the geometry of -the master windows or the parents of slave windows (i.e. it doesn't +the master windows or the parents of slave windows (i.e. it does not 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. @@ -240,7 +243,7 @@ frames and canvases that provide configuration options for this purpose. Make the label occupy the middle bit of the toplevel, no matter how it is resized: .CS -label .l \-text "In the\\nMiddle!" \-bg black \-fg white +label .l \-text "In the\enMiddle!" \-bg black \-fg white \fBplace\fR .l \-relwidth .3 \-relx .35 \-relheight .3 \-rely .35 .CE diff --git a/doc/radiobutton.n b/doc/radiobutton.n index 54307c0..42e4b6f 100644 --- a/doc/radiobutton.n +++ b/doc/radiobutton.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: radiobutton.n,v 1.11 2006/12/13 23:04:32 hobbs Exp $ +'\" RCS: @(#) $Id: radiobutton.n,v 1.11.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH radiobutton n 4.4 Tk "Tk Built-In Commands" @@ -36,7 +36,7 @@ Specifies a desired height for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in lines of text. -If this option isn't specified, the button's desired height is computed +If this option is not specified, the button's desired height is computed from the size of the image or bitmap or text being displayed in it. .OP \-indicatoron indicatorOn IndicatorOn Specifies whether or not the indicator should be drawn. Must be a @@ -55,8 +55,12 @@ If specified as an empty string then no special color is used for displaying when the widget is selected. .OP \-offrelief offRelief OffRelief Specifies the relief for the checkbutton when the indicator is not drawn and -the checkbutton is off. The default value is "raised". By setting this option -to "flat" and setting -indicatoron to false and -overrelief to raised, +the checkbutton is off. The default value is +.QW raised . +By setting this option to +.QW flat +and setting \fB\-indicatoron\fR to false and \fB\-overrelief\fR to +.QW raised , the effect is achieved of having a flat button that raises on mouse-over and which is depressed when activated. This is the behavior typically exhibited by @@ -95,7 +99,8 @@ specified. .OP \-tristatevalue tristateValue Value .VS 8.5 Specifies the value that causes the radiobutton to display the multi-value -selection, also known as the tri-state mode. Defaults to ``""'' +selection, also known as the tri-state mode. Defaults to +.QW "" . .VE 8.5 .OP \-value value Value Specifies value to store in the button's associated variable whenever @@ -110,10 +115,9 @@ Specifies a desired width for the button. If an image or bitmap is being displayed in the button, the value is in screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR); for text it is in characters. -If this option isn't specified, the button's desired width is computed +If this option is not specified, the button's desired width is computed from the size of the image or bitmap or text being displayed in it. .BE - .SH DESCRIPTION .PP The \fBradiobutton\fR command creates a new window (given by the @@ -255,9 +259,7 @@ actions occur: the radiobutton is completely non-responsive. .PP The behavior of radiobuttons can be changed by defining new bindings for individual widgets or by redefining the class bindings. - .SH "SEE ALSO" -checkbutton(n), labelframe(n), listbox(n), options(n), scale(n), ttk_radiobutton(n) - +checkbutton(n), labelframe(n), listbox(n), options(n), scale(n), ttk::radiobutton(n) .SH KEYWORDS radiobutton, widget diff --git a/doc/raise.n b/doc/raise.n index 0591a50..34c7731 100644 --- a/doc/raise.n +++ b/doc/raise.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: raise.n,v 1.3 2004/06/18 21:58:37 dkf Exp $ +'\" RCS: @(#) $Id: raise.n,v 1.3.2.1 2007/11/01 16:37:15 dgp Exp $ '\" .so man.macros .TH raise n 3.3 Tk "Tk Built-In Commands" @@ -36,11 +36,11 @@ it. This is is often necessary when building GUIs in the style where you create your activity widgets first before laying them out on the display: .CS -button .b -text "Hi there!" -pack [frame .f -background blue] -pack [label .f.l1 -text "This is above"] -pack .b -in .f -pack [label .f.l2 -text "This is below"] +button .b \-text "Hi there!" +pack [frame .f \-background blue] +pack [label .f.l1 \-text "This is above"] +pack .b \-in .f +pack [label .f.l2 \-text "This is below"] \fBraise\fR .b .CE diff --git a/doc/scale.n b/doc/scale.n index c0ce831..f942e50 100644 --- a/doc/scale.n +++ b/doc/scale.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: scale.n,v 1.6 2004/10/28 12:25:53 dkf Exp $ +'\" RCS: @(#) $Id: scale.n,v 1.6.2.1 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH scale n 4.1 Tk "Tk Built-In Commands" @@ -25,7 +25,8 @@ scale \- Create and manipulate scale widgets .SH "WIDGET-SPECIFIC OPTIONS" .OP \-bigincrement bigIncrement BigIncrement Some interactions with the scale cause its value to change by -``large'' increments; this option specifies the size of the +.QW large +increments; this option specifies the size of the large increments. If specified as 0, the large increments default to 1/10 the range of the scale. .OP \-command command Command @@ -73,7 +74,7 @@ or \fBsunken\fR. Specifies one of three states for the scale: \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. If the scale is disabled then the value may not be changed and the scale -won't activate. +will not activate. If the scale is active, the slider is displayed using the color specified by the \fBactiveBackground\fR option. .OP \-tickinterval tickInterval TickInterval @@ -188,7 +189,7 @@ the slider; \fBtrough1\fR means that the point is over the portion of the slider above or to the left of the slider; and \fBtrough2\fR means that the point is over the portion of the slider below or to the right of the slider. -If the point isn't over one of these elements, an empty string +If the point is not over one of these elements, an empty string is returned. .TP \fIpathName \fBset\fR \fIvalue\fR diff --git a/doc/scrollbar.n b/doc/scrollbar.n index f370ac6..d9fec32 100644 --- a/doc/scrollbar.n +++ b/doc/scrollbar.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: scrollbar.n,v 1.7 2006/12/13 23:04:32 hobbs Exp $ +'\" RCS: @(#) $Id: scrollbar.n,v 1.7.2.1 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH scrollbar n 4.1 Tk "Tk Built-In Commands" @@ -39,7 +39,7 @@ name of a widget and either \fBxview\fR (if the scrollbar is for horizontal scrolling) or \fByview\fR (for vertical scrolling). All scrollable widgets have \fBxview\fR and \fByview\fR commands that take exactly the additional arguments appended by the scrollbar -as described in SCROLLING COMMANDS below. +as described in \fBSCROLLING COMMANDS\fR below. .OP \-elementborderwidth elementBorderWidth BorderWidth Specifies the width of borders drawn around the internal elements of the scrollbar (the two arrows and the slider). The value may @@ -53,7 +53,6 @@ scrollbars this will be the width and for horizontal scrollbars this will be the height. The value may have any of the forms acceptable to \fBTk_GetPixels\fR. .BE - .SH DESCRIPTION .PP The \fBscrollbar\fR command creates a new window (given by the @@ -282,7 +281,7 @@ If the button is held down, the action auto-repeats. .IP [3] Pressing button 1 over the slider and dragging causes the view to drag with the slider. -If the \fBjump\fR option is true, then the view doesn't drag along +If the \fBjump\fR option is true, then the view does not drag along with the slider; it changes only when the mouse button is released. .IP [4] Pressing button 1 over \fBtrough2\fR causes the view in the @@ -334,15 +333,13 @@ The End key adjusts the view to the bottom (right edge) of the document. Create a window with a scrollable \fBtext\fR widget: .CS toplevel .tl -text .tl.t -yscrollcommand {.tl.s set} -\fBscrollbar\fR .tl.s -command {.tl.t yview} -grid .tl.t .tl.s -sticky nsew -grid columnconfigure .tl 0 -weight 1 -grid rowconfigure .tl 0 -weight 1 +text .tl.t \-yscrollcommand {.tl.s set} +\fBscrollbar\fR .tl.s \-command {.tl.t yview} +grid .tl.t .tl.s \-sticky nsew +grid columnconfigure .tl 0 \-weight 1 +grid rowconfigure .tl 0 \-weight 1 .CE - .SH "SEE ALSO" -ttk_scrollbar(n) - +ttk:scrollbar(n) .SH KEYWORDS scrollbar, widget diff --git a/doc/selection.n b/doc/selection.n index 9a99426..67b032d 100644 --- a/doc/selection.n +++ b/doc/selection.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: selection.n,v 1.7 2005/04/06 21:11:54 dkf Exp $ +'\" RCS: @(#) $Id: selection.n,v 1.7.2.1 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH selection n 8.1 Tk "Tk Built-In Commands" @@ -37,35 +37,44 @@ so that no window owns the selection anymore. \fISelection\fR specifies the X selection that should be cleared, and should be an atom name such as PRIMARY or CLIPBOARD; see the Inter-Client Communication Conventions Manual for complete details. -\fISelection\fR defaults to PRIMARY and \fIwindow\fR defaults to ``.''. +\fISelection\fR defaults to PRIMARY and \fIwindow\fR defaults to +.QW . . Returns an empty string. .TP \fBselection get\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-selection\fR \fIselection\fR? ?\fB\-type\fR \fItype\fR? Retrieves the value of \fIselection\fR from \fIwindow\fR's display and returns it as a result. \fISelection\fR defaults to PRIMARY and -\fIwindow\fR defaults to ``.''. +\fIwindow\fR defaults to +.QW . . \fIType\fR specifies the form in which the selection is to be returned -(the desired ``target'' for conversion, in ICCCM terminology), and +(the desired +.QW target +for conversion, in ICCCM terminology), and should be an atom name such as STRING or FILE_NAME; see the Inter-Client Communication Conventions Manual for complete details. \fIType\fR defaults to STRING. The selection owner may choose to return the selection in any of several different representation -formats, such as STRING, ATOM, INTEGER, etc. (this format is different +formats, such as STRING, UTF8_STRING, ATOM, INTEGER, etc. (this format +is different than the selection type; see the ICCCM for all the confusing details). If the selection is returned in a non-string format, such as INTEGER or ATOM, the \fBselection\fR command converts it to string format as a collection of fields separated by spaces: atoms are converted to their textual names, and anything else is converted to hexadecimal integers. +Note that \fBselection get\fR does not retrieve the selection in the +UTF8_STRING format unless told to. .TP -\fBselection handle\fR ?\fB\-selection\fR \fIselection\fR? ?\fB\-type\fR \fItype\fR? ?\fB\-format\fR \fIformat\fR? \fIwindow command\fR +\fBselection handle\fR ?\fB\-selection\fR \fIs\fR? ?\fB\-type\fR \fIt\fR? ?\fB\-format\fR \fIf\fR? \fIwindow command\fR Creates a handler for selection requests, such that \fIcommand\fR will -be executed whenever \fIselection\fR is owned by \fIwindow\fR and -someone attempts to retrieve it in the form given by \fItype\fR -(e.g. \fItype\fR is specified in the \fBselection get\fR command). -\fISelection\fR defaults to PRIMARY, \fItype\fR defaults to STRING, and -\fIformat\fR defaults to STRING. If \fIcommand\fR is an empty string -then any existing handler for \fIwindow\fR, \fItype\fR, and -\fIselection\fR is removed. +be executed whenever selection \fIs\fR is owned by \fIwindow\fR and +someone attempts to retrieve it in the form given by type \fIt\fR +(e.g. \fIt\fR is specified in the \fBselection get\fR command). +\fIS\fR defaults to PRIMARY, \fIt\fR defaults to STRING, and +\fIf\fR defaults to STRING. If \fIcommand\fR is an empty string +then any existing handler for \fIwindow\fR, \fIt\fR, and +\fIs\fR is removed. +Note that when the selection is handled as type STRING it is also +automatically handled as type UTF8_STRING as well. .RS .PP When \fIselection\fR is requested, \fIwindow\fR is the selection owner, @@ -88,13 +97,15 @@ returns a result shorter than \fImaxChars\fR. The value of \fImaxChars\fR will always be relatively large (thousands of characters). .PP If \fIcommand\fR returns an error then the selection retrieval is rejected -just as if the selection didn't exist at all. +just as if the selection did not exist at all. .PP The \fIformat\fR argument specifies the representation that should be used to transmit the selection to the requester (the second column of Table 2 of the ICCCM), and defaults to STRING. If \fIformat\fR is STRING, the selection is transmitted as 8-bit ASCII characters (i.e. -just in the form returned by \fIcommand\fR). If \fIformat\fR is +just in the form returned by \fIcommand\fR, in the system \fBencoding\fR; +the UTF8_STRING format always uses UTF-8 as its encoding). +If \fIformat\fR is ATOM, then the return value from \fIcommand\fR is divided into fields separated by white space; each field is converted to its atom value, and the 32-bit atom value is transmitted instead of the atom name. @@ -104,7 +115,7 @@ converted to a 32-bit integer; an array of integers is transmitted to the selection requester. .PP The \fIformat\fR argument is needed only for compatibility with -selection requesters that don't use Tk. If Tk is being +selection requesters that do not use Tk. If Tk is being used to retrieve the selection then the value is converted back to a string at the requesting end, so \fIformat\fR is irrelevant. @@ -117,7 +128,8 @@ The first form of \fBselection own\fR returns the path name of the window in this application that owns \fIselection\fR on the display containing \fIwindow\fR, or an empty string if no window in this application owns the selection. \fISelection\fR defaults to PRIMARY and -\fIwindow\fR defaults to ``.''. +\fIwindow\fR defaults to +.QW . . .PP The second form of \fBselection own\fR causes \fIwindow\fR to become the new owner of \fIselection\fR on \fIwindow\fR's display, returning @@ -160,9 +172,7 @@ proc lost {} { puts "Lost selection" } .CE - .SH "SEE ALSO" clipboard(n) - .SH KEYWORDS clear, format, handler, ICCCM, own, selection, target, type @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: send.n,v 1.5 2005/04/06 21:11:54 dkf Exp $ +'\" RCS: @(#) $Id: send.n,v 1.5.2.1 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH send n 4.0 Tk "Tk Built-In Commands" @@ -30,9 +30,9 @@ contained entirely within the \fIcmd\fR argument. If one or more \fIarg\fRs are present, they are concatenated to form the command to be executed, just as for the \fBeval\fR command. .PP -If the initial arguments of the command begin with ``\-'' -they are treated as options. The following options are -currently defined: +If the initial arguments of the command begin with +.QW \- +they are treated as options. The following options are currently defined: .TP \fB\-async\fR Requests asynchronous invocation. In this case the \fBsend\fR @@ -49,7 +49,8 @@ the application's main window. .TP \fB\-\|\-\fR Serves no purpose except to terminate the list of options. This -option is needed only if \fIapp\fR could contain a leading ``\-'' +option is needed only if \fIapp\fR could contain a leading +.QW \- character. .SH "APPLICATION NAMES" @@ -94,7 +95,7 @@ This script fragment can be used to make an application that only runs once on a particular display. .CS if {[tk appname FoobarApp] ne "FoobarApp"} { - \fBsend\fR -async FoobarApp RemoteStart $argv + \fBsend\fR \-async FoobarApp RemoteStart $argv exit } # The command that will be called remotely, which raises diff --git a/doc/spinbox.n b/doc/spinbox.n index 0aa9103..5bf3a64 100644 --- a/doc/spinbox.n +++ b/doc/spinbox.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: spinbox.n,v 1.4 2004/08/17 22:37:24 dkf Exp $ +'\" RCS: @(#) $Id: spinbox.n,v 1.4.2.1 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH spinbox n 8.4 Tk "Tk Built-In Commands" @@ -80,7 +80,7 @@ contents of the widget may still be selected. If the spinbox is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the spinbox may be displayed in a different color, depending on the values of the -\fB-disabledforeground\fR and \fB-disabledbackground\fR options. +\fB\-disabledforeground\fR and \fB\-disabledbackground\fR options. .OP \-to to To A floating-point value corresponding to the highest value for the spinbox, to be used in conjunction with \fB\-from\fR and \fB\-increment\fR. When @@ -114,7 +114,6 @@ size just large enough to hold its current text. Must be a proper boolean value. If on, the spinbox will wrap around the values of data in the widget. .BE - .SH DESCRIPTION .PP The \fBspinbox\fR command creates a new window (given by the @@ -147,7 +146,6 @@ may be used to change the view in the window. Spinboxes use the standard \fBxScrollCommand\fR mechanism for interacting with scrollbars (see the description of the \fBxScrollCommand\fR option for details). They also support scanning, as described below. - .SH VALIDATION .PP Validation works by setting the \fBvalidateCommand\fR @@ -174,9 +172,9 @@ following substitutions are recognized: .PP .IP \fB%d\fR 5 Type of action: 1 for \fBinsert\fR, 0 for \fBdelete\fR, -or -1 for focus, forced or textvariable validation. +or \-1 for focus, forced or textvariable validation. .IP \fB%i\fR 5 -Index of char string to be inserted/deleted, if any, otherwise -1. +Index of char string to be inserted/deleted, if any, otherwise \-1. .IP \fB%P\fR 5 The value of the spinbox should edition occur. If you are configuring the spinbox widget to have a new textvariable, this will be the value of that @@ -214,13 +212,12 @@ validated. If you wish to edit the value of the widget during validation and still have the \fBvalidate\fR option set, you should include the command .CS - \fI%W config -validate %v\fR + \fI%W config \-validate %v\fR .CE in the \fBvalidateCommand\fR or \fBinvalidCommand\fR (whichever one you were editing the spinbox widget from). It is also recommended to not set an associated \fBtextVariable\fR during validation, as that can cause the spinbox widget to become out of sync with the \fBtextVariable\fR. - .SH "WIDGET COMMAND" .PP The \fBspinbox\fR command creates a new Tcl command whose @@ -231,6 +228,7 @@ operations on the widget. It has the following general form: .CE \fIOption\fR and the \fIarg\fRs determine the exact behavior of the command. +.SS INDICES .PP Many of the widget commands for spinboxes take one or more indices as arguments. An index specifies a particular character in the spinbox's @@ -255,22 +253,27 @@ insertion cursor. .TP 12 \fBsel.first\fR Indicates the first character in the selection. It is an error to -use this form if the selection isn't in the spinbox window. +use this form if the selection is not in the spinbox window. .TP 12 \fBsel.last\fR Indicates the character just after the last one in the selection. -It is an error to use this form if the selection isn't in the +It is an error to use this form if the selection is not in the spinbox window. .TP 12 \fB@\fInumber\fR In this form, \fInumber\fR is treated as an x-coordinate in the spinbox's window; the character spanning that x-coordinate is used. -For example, ``\fB@0\fR'' indicates the left-most character in the -window. +For example, +.QW \fB@0\fR +indicates the left-most character in the window. .LP -Abbreviations may be used for any of the forms above, e.g. ``\fBe\fR'' -or ``\fBsel.f\fR''. In general, out-of-range indices are automatically -rounded to the nearest legal value. +Abbreviations may be used for any of the forms above, e.g. +.QW \fBe\fR +or +.QW \fBsel.f\fR . +In general, out-of-range indices are automatically rounded to the +nearest legal value. +.SS SUBCOMMANDS .PP The following commands are possible for spinbox widgets: .TP @@ -309,7 +312,7 @@ Delete one or more elements of the spinbox. \fIFirst\fR is the index of the first character to delete, and \fIlast\fR is the index of the character just after the last one to delete. -If \fIlast\fR isn't specified it defaults to \fIfirst\fR+1, +If \fIlast\fR is not specified it defaults to \fIfirst\fR+1, i.e. a single character is deleted. This command returns an empty string. .TP @@ -368,14 +371,14 @@ Locate the end of the selection nearest to the character given by (i.e. including but not going beyond \fIindex\fR). The other end of the selection is made the anchor point for future \fBselect to\fR commands. If the selection -isn't currently in the spinbox, then a new selection is created to +is not currently in the spinbox, then a new selection is created to include the characters between \fIindex\fR and the most recent selection anchor point, inclusive. Returns an empty string. .TP \fIpathName \fBselection clear\fR Clear the selection if it is currently in this widget. If the -selection isn't in this widget then the command has no effect. +selection is not in this widget then the command has no effect. Returns an empty string. .TP \fIpathName \fBselection element\fR ?\fIelement\fR? @@ -384,7 +387,7 @@ is specified, it will be displayed depressed. .TP \fIpathName \fBselection from \fIindex\fR Set the selection anchor point to just before the character -given by \fIindex\fR. Doesn't change the selection. +given by \fIindex\fR. Does not change the selection. Returns an empty string. .TP \fIpathName \fBselection present\fR @@ -408,7 +411,7 @@ to the characters from the anchor point up to but not including \fIindex\fR. The anchor point is determined by the most recent \fBselect from\fR or \fBselect adjust\fR command in this widget. -If the selection isn't in this widget then a new selection is +If the selection is not in this widget then a new selection is created using the most recent anchor point specified for the widget. Returns an empty string. .RE @@ -467,9 +470,11 @@ become visible. .PP Tk automatically creates class bindings for spinboxes that give them the following default behavior. -In the descriptions below, ``word'' refers to a contiguous group -of letters, digits, or ``_'' characters, or any single character -other than these. +In the descriptions below, +.QW word +refers to a contiguous group of letters, digits, or +.QW _ +characters, or any single character other than these. .IP [1] Clicking mouse button 1 positions the insertion cursor just before the character underneath the mouse cursor, sets the @@ -530,7 +535,7 @@ Shift-End moves the cursor to the end and extends the selection to that point. .IP [12] The Select key and Control-Space set the selection anchor to the position -of the insertion cursor. They don't affect the current selection. +of the insertion cursor. They do not affect the current selection. Shift-Select and Control-Shift-Space adjust the selection to the current position of the insertion cursor, selecting from the anchor to the insertion cursor if there was not any selection previously. @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: text.n,v 1.43.2.3 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: text.n,v 1.43.2.4 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH text n 8.5 Tk "Tk Built-In Commands" @@ -53,7 +53,7 @@ at the very last line in the textual data store. Specifies the desired height for the window, in units of characters in the font given by the \fB\-font\fR option. Must be at least one. -.OP \-inactiveselectionbackground inactiveSelectionBackground Foreground +.OP \-inactiveselectbackground inactiveSelectBackground Foreground .VS 8.5 Specifies the colour to use for the selection (the \fBsel\fR tag) when the window does not have the input focus. If empty, \fB{}\fR, then no @@ -115,9 +115,12 @@ at the tab position; if there is no decimal point then the least significant digit of the number is positioned just to the left of the tab position; if there is no number in the text then the text is right-justified at the tab position. -For example, \fB\-tabs {2c left 4c 6c center}\fR creates three -tab stops at two-centimeter intervals; the first two use left +For example, +.QW "\fB\-tabs {2c left 4c 6c center}\fR" +creates three tab stops at two-centimeter intervals; the first two use left justification and the third uses center justification. +.RS +.PP If the list of tab stops does not have enough elements to cover all of the tabs in a text line, then Tk extrapolates new tab stops using the spacing and alignment from the last tab stop in the list. Tab @@ -125,19 +128,22 @@ distances must be strictly positive, and must always increase from one tab stop to the next (if not, an error is thrown). The value of the \fBtabs\fR option may be overridden by \fB\-tabs\fR options in tags. +.PP If no \fB\-tabs\fR option is specified, or if it is specified as an empty list, then Tk uses default tabs spaced every eight (average size) characters. To achieve a different standard spacing, for example every 4 characters, simply configure the widget with -\fB\-tabs "[expr {4 * [font measure $font 0]}] left" -tabstyle wordprocessor\fR. +.QW "\fB\-tabs \N'34'[expr {4 * [font measure $font 0]}] left\N'34' \-tabstyle wordprocessor\fR" . +.RE .OP \-tabstyle tabStyle TabStyle Specifies how to interpret the relationship between tab stops on a line and tabs in the text of that line. The value must be \fBtabular\fR (the default) or \fBwordprocessor\fR. Note that tabs are interpreted as they are encountered in the text. If the tab style is \fBtabular\fR then the -n'th tab character in the line's text will be associated with the n'th +\fIn\fR'th tab character in the line's text will be associated with +the \fIn\fR'th tab stop defined for that line. If the tab character's x coordinate -falls to the right of the n'th tab stop, then a gap of a single space +falls to the right of the \fIn\fR'th tab stop, then a gap of a single space will be inserted as a fallback. If the tab style is \fBwordprocessor\fR then any tab character being laid out will use (and be defined by) the first tab stop to the right of the preceding characters already laid out @@ -149,15 +155,15 @@ not. .OP \-width width Width Specifies the desired width for the window in units of characters in the font given by the \fB\-font\fR option. -If the font doesn't have a uniform width then the width of the -character ``0'' is used in translating from character units to -screen units. +If the font does not have a uniform width then the width of the character +.QW 0 +is used in translating from character units to screen units. .OP \-wrap wrap Wrap Specifies how to handle lines in the text that are too long to be displayed in a single line of the text's window. The value must be \fBnone\fR or \fBchar\fR or \fBword\fR. A wrap mode of \fBnone\fR means that each line of text appears as -exactly one line on the screen; extra characters that don't fit +exactly one line on the screen; extra characters that do not fit on the screen are not displayed. In the other modes each line of text will be broken up into several screen lines if necessary to keep all the characters visible. @@ -188,7 +194,8 @@ and mouse button presses occur in particular ranges of the text. See \fBTAGS\fR below for more details. .PP The second form of annotation consists of floating markers in the text -called "marks". +called +.QW marks . Marks are used to keep track of various interesting positions in the text as it is edited. See \fBMARKS\fR below for more details. @@ -233,9 +240,10 @@ submodifier and the following \fImodifier\fR. Typically the \fBdisplay\fR submodifier adjusts the meaning of the following \fImodifier\fR to make it refer to visual or non-elided units rather than logical units, but this is explained for each relevant case below. Lastly, where \fIcount\fR -is used as part of a modifier, it can be positive or negative, so '\fIbase\fR -\- \-3 lines' is perfectly valid (and equivalent to '\fIbase\fR -+3lines'). +is used as part of a modifier, it can be positive or negative, so +.QW "\fIbase\fR \- \-3 lines" +is perfectly valid (and equivalent to +.QW "\fIbase\fR +3lines" ). .VE 8.5 .PP The \fIbase\fR for an index must have one of the following forms: @@ -410,14 +418,18 @@ submodifier is given, this only examines non-elided characters, otherwise all characters (elided or not) are examined. .PP If more than one modifier is present then they are applied in -left-to-right order. For example, the index ``\fBend \- 1 chars\fR'' +left-to-right order. For example, the index +.QW "\fBend \- 1 chars\fR" refers to the next-to-last character in the text and -``\fBinsert wordstart \- 1 c\fR'' refers to the character just before +.QW "\fBinsert wordstart \- 1 c\fR" +refers to the character just before the first one in the word containing the insertion cursor. Modifiers are applied one by one in this left to right order, and after each step the resulting index is constrained to be a valid index in the text -widget. So, for example, the index ``\fB1.0 -1c +1c\fR'' refers to the -index ``\fB2.0\fR''. +widget. So, for example, the index +.QW "\fB1.0 \-1c +1c\fR" +refers to the index +.QW \fB2.0\fR . .PP Where modifiers result in index changes by display lines, display chars or display indices, and the \fIbase\fR refers to an index inside an @@ -431,9 +443,11 @@ The first form of annotation in text widgets is a tag. A tag is a textual string that is associated with some of the characters in a text. Tags may contain arbitrary characters, but it is probably best to -avoid using the characters `` '' (space), \fB+\fR, or \fB\-\fR: +avoid using the characters +.QW " " +(space), \fB+\fR, or \fB\-\fR: these characters have special meaning in indices, so tags containing -them can't be used as indices. +them cannot be used as indices. There may be any number of tags associated with characters in a text. Each tag may refer to a single character, a range of characters, or @@ -446,7 +460,9 @@ When a tag is defined (by associating it with characters or setting its display options or binding commands to it), it is given a priority higher than any existing tag. The priority order of tags may be redefined using the -``\fIpathName \fBtag raise\fR'' and ``\fIpathName \fBtag lower\fR'' +.QW "\fIpathName \fBtag raise\fR" +and +.QW "\fIpathName \fBtag lower\fR" widget commands. .PP Tags serve three purposes in text widgets. @@ -455,7 +471,9 @@ By default, characters are displayed as determined by the \fB\-background\fR, \fB\-font\fR, and \fB\-foreground\fR options for the text widget. However, display options may be associated with individual tags -using the ``\fIpathName \fBtag configure\fR'' widget command. +using the +.QW "\fIpathName \fBtag configure\fR" +widget command. If a character has been tagged, then the display options associated with the tag override the default display style. The following options are currently supported for tags: @@ -469,7 +487,7 @@ It may have any of the forms accepted by \fBTk_GetColor\fR. \fIBitmap\fR specifies a bitmap that is used as a stipple pattern for the background. It may have any of the forms accepted by \fBTk_GetBitmap\fR. -If \fIbitmap\fR hasn't been specified, or if it is specified +If \fIbitmap\fR has not been specified, or if it is specified as an empty string, then a solid fill will be used for the background. .TP @@ -493,7 +511,7 @@ as normal data. when drawing text and other foreground information such as underlines. It may have any of the forms accepted by \fBTk_GetBitmap\fR. -If \fIbitmap\fR hasn't been specified, or if it is specified +If \fIbitmap\fR has not been specified, or if it is specified as an empty string, then a solid fill will be used. .TP \fB\-font \fIfontName\fR @@ -625,7 +643,7 @@ for the text widget. If a character has several tags associated with it, and if their display options conflict, then the options of the highest priority tag are used. -If a particular display option hasn't been specified for a +If a particular display option has not been specified for a particular tag, or if it is specified as an empty string, then that option will never be used; the next-highest-priority tag's option will used instead. @@ -640,8 +658,9 @@ Tcl command will be executed. Tag bindings can be used to give behaviors to ranges of characters; among other things, this allows hypertext-like features to be implemented. -For details, see the description of the ``\fIpathName \fBtag bind\fR'' widget -command below. +For details, see the description of the +.QW "\fIpathName \fBtag bind\fR" +widget command below. .VS 8.5 Tag bindings are shared between all peer widgets (including any bindings for the special \fBsel\fR tag). @@ -661,7 +680,7 @@ any tag bindings to \fBsel\fR are shared). The second form of annotation in text widgets is a mark. Marks are used for remembering particular places in a text. They are something like tags, in that they have names and -they refer to places in the file, but a mark isn't associated +they refer to places in the file, but a mark is not associated with particular characters. Instead, a mark is associated with the gap between two characters. Only a single position may be associated with a mark at any given @@ -671,12 +690,15 @@ remain; it will just have new neighbor characters. In contrast, if the characters containing a tag are deleted then the tag will no longer have an association with characters in the file. -Marks may be manipulated with the ``\fIpathName \fBmark\fR'' widget +Marks may be manipulated with the +.QW "\fIpathName \fBmark\fR" +widget command, and their current locations may be determined by using the mark name as an index in widget commands. .PP -Each mark also has a "gravity", which is either \fBleft\fR or -\fBright\fR. +Each mark also has a +.QW gravity , +which is either \fBleft\fR or \fBright\fR. The gravity for a mark specifies what happens to the mark when text is inserted at the point of the mark. If a mark has left gravity, then the mark is treated as if it @@ -887,7 +909,8 @@ Whenever the \fBsel\fR tag range changes a virtual event \fB<<Selection>>\fR is generated. .PP The \fBsel\fR tag is automatically defined when a text widget is -created, and it may not be deleted with the ``\fIpathName \fBtag delete\fR'' +created, and it may not be deleted with the +.QW "\fIpathName \fBtag delete\fR" widget command. Furthermore, the \fBselectBackground\fR, \fBselectBorderWidth\fR, and \fBselectForeground\fR options for the text widget are tied to the \fB\-background\fR, @@ -896,11 +919,11 @@ tag: changes in either will automatically be reflected in the other. .VS 8.5 Also the -\fB\-inactiveselectionbackground\fR option for the text widget is used +\fB\-inactiveselectbackground\fR option for the text widget is used instead of \fB\-selectbackground\fR when the text widget does not have the focus. This allows programmatic control over the visualization of the \fBsel\fR tag for foreground and background windows, or to have -\fBsel\fR not shown at all (when \fB\-inactiveselectionbackground\fR is +\fBsel\fR not shown at all (when \fB\-inactiveselectbackground\fR is empty) for background windows. Each peer text widget has its own \fBsel\fR tag which can be separately configured and set. .VE 8.5 @@ -908,8 +931,9 @@ empty) for background windows. Each peer text widget has its own .PP The mark named \fBinsert\fR has special significance in text widgets. It is defined automatically when a text widget is created and it -may not be unset with the ``\fIpathName \fBmark unset\fR'' widget -command. +may not be unset with the +.QW "\fIpathName \fBmark unset\fR" +widget command. The \fBinsert\fR mark represents the position of the insertion cursor, and the insertion cursor will automatically be drawn at this point whenever the text widget has the input focus. @@ -926,7 +950,9 @@ The text widget has an unlimited undo and redo mechanism (when the \fB\-undo\fR widget option is true) which records every insert and delete action on a stack. .PP -Boundaries (called "separators") are inserted between edit actions. The +Boundaries (called +.QW separators ) +are inserted between edit actions. The purpose of these separators is to group inserts, deletes and replaces into one compound edit action. When undoing a change everything between two separators will be undone. The undone changes are then moved to the @@ -990,7 +1016,10 @@ is impossible for new lines to be inserted. The peer will simply become an empty shell on which the background can be configured, but which will never show any content (without manual reconfiguration of the start and end lines). Note that a peer which does not contain all of the -underlying data store still has indices numbered from "1.0" to "end". +underlying data store still has indices numbered from +.QW 1.0 +to +.QW end . It is simply that those indices reflect a subset of the total data, and data outside the contained range is not accessible to the peer. This means that the command \fIpeerName \fBindex end\fR may return quite different @@ -1000,8 +1029,10 @@ to the peer. The configuration options \fB\-startline\fR and \fB\-endline\fR may be used to control how much of the underlying data is contained in any given text widget. .PP -Note that peers are really peers. Deleting the 'original' text widget -will not cause any other peers to be deleted, or otherwise affected. +Note that peers are really peers. Deleting the +.QW original +text widget will not cause any other peers to be deleted, or otherwise +affected. .PP See below for the \fIpathName \fBpeer\fR widget command that controls the creation of peer widgets. @@ -1041,7 +1072,7 @@ command. \fIpathName \fBcompare\fR \fIindex1 op index2\fR Compares the indices given by \fIindex1\fR and \fIindex2\fR according to the relational operator given by \fIop\fR, and returns 1 if -the relationship is satisfied and 0 if it isn't. +the relationship is satisfied and 0 if it is not. \fIOp\fR must be one of the operators <, <=, ==, >=, >, or !=. If \fIop\fR is == then 1 is returned if the two indices refer to the same character, if \fIop\fR is < then 1 is returned if \fIindex1\fR @@ -1109,21 +1140,24 @@ count the number of horizontal pixels from the first pixel of the first index to (but not including) the first pixel of the second index. To count the total desired width of the text widget (assuming wrapping is not enabled), first find the longest line and then -use '.text count \-xpixels "${line}.0" "${line}.0 lineend"'. +use +.QW ".text count \-xpixels \N'34'${line}.0\N'34' \N'34'${line}.0 lineend\N'34'" . .IP \fB\-ypixels\fR count the number of vertical pixels from the first pixel of the first index to (but not including) the first pixel of the second index. If both indices are on the same display line, zero will be returned. To count the total number of vertical pixels in the text -widget, use '.text count \-ypixels 1.0 end', and to ensure this is up to -date, use '.text count \-update \-ypixels 1.0 end'. +widget, use +.QW ".text count \-ypixels 1.0 end" , +and to ensure this is up to date, use +.QW ".text count \-update \-ypixels 1.0 end" . .PP The command returns a positive or negative integer corresponding to the number of items counted between the two indices. One such integer is returned for each counting option given, so a list is returned if more -than one option was supplied. For example '.text count \-xpixels -\-ypixels 1.3 4.5' is perfectly valid and will return a list of two -elements. +than one option was supplied. For example +.QW ".text count \-xpixels \-ypixels 1.3 4.5" +is perfectly valid and will return a list of two elements. .RE .VE 8.5 .TP @@ -1155,9 +1189,9 @@ If both \fIindex1\fR and \fIindex2\fR are specified, then delete all the characters starting with the one given by \fIindex1\fR and stopping just before \fIindex2\fR (i.e. the character at \fIindex2\fR is not deleted). -If \fIindex2\fR doesn't specify a position later in the text +If \fIindex2\fR does not specify a position later in the text than \fIindex1\fR then no characters are deleted. -If \fIindex2\fR isn't specified then the single character at +If \fIindex2\fR is not specified then the single character at \fIindex1\fR is deleted. It is not allowable to delete characters in a way that would leave the text without a newline as the last character. @@ -1422,13 +1456,14 @@ An empty string is returned if there are no marks before \fIindex\fR. Sets the mark named \fImarkName\fR to a position just before the character at \fIindex\fR. If \fImarkName\fR already exists, it is moved from its old position; -if it doesn't exist, a new mark is created. +if it does not exist, a new mark is created. This command returns an empty string. .TP \fIpathName \fBmark unset \fImarkName \fR?\fImarkName markName ...\fR? Remove the mark corresponding to each of the \fImarkName\fR arguments. The removed marks will not be usable in indices and will not be -returned by future calls to ``\fIpathName \fBmark names\fR''. +returned by future calls to +.QW "\fIpathName \fBmark names\fR" . This command returns an empty string. .RE .TP @@ -1458,11 +1493,13 @@ arguments, and the section on \fIpathName \fBdelete\fR for an explanation of the handling of the indices. If \fIindex2\fR corresponds to an index earlier in the text than \fIindex1\fR, an error will be generated. -.br +.RS +.PP The deletion and insertion are arranged so that no unnecessary scrolling of the window or movement of insertion cursor occurs. In addition the undo/redo stack are correctly modified, if undo operations are active in the text widget. The command returns an empty string. +.RE .VE 8.5 .TP \fIpathName \fBscan\fR \fIoption args\fR @@ -1535,7 +1572,8 @@ This allows \fI.\fR and \fI[^\fR sequences to match the newline character \fI\en\fR, which they will otherwise not do (see the \fBregexp\fR command for details). This option is only meaningful if \fB\-regexp\fR is also given, and an error will be thrown otherwise. For example, -to match the entire text, use 'search \-nolinestop \-regexp ".*" 1.0'. +to match the entire text, use +.QW "\fIpathName \fBsearch \-nolinestop \-regexp\fR \N'34'.*\N'34' 1.0" . .VE 8.5 .TP \fB\-nocase\fR @@ -1560,10 +1598,15 @@ elements of this list may be different, if there are embedded images, windows or hidden text. Searches with \fB\-all\fR behave very similarly to the Tcl command \fBregexp \-all\fR, in that overlapping matches are not normally returned. For example, applying an -\fB\-all\fR search -of the pattern '\\w+' against 'hello there' will just match twice, once -for each word, and matching 'Z[a\-z]+Z' against 'ZooZooZoo' will just -match once. +\fB\-all\fR search of the pattern +.QW \ew+ +against +.QW "hello there" +will just match twice, once for each word, and matching +.QW "Z[a\-z]+Z" +against +.QW ZooZooZoo +will just match once. .VE 8.5 .TP \fB\-overlap\fR @@ -1572,9 +1615,16 @@ When performing \fB\-all\fR searches, the normal behaviour is that matches which overlap an already-found match will not be returned. This switch changes that behaviour so that all matches which are not totally enclosed within another match are returned. For example, applying an -\fB\-overlap\fR search of the pattern '\\w+' against 'hello there' will -just match twice (i.e. no different to just \fB\-all\fR), -but matching 'Z[a\-z]+Z' against 'ZooZooZoo' will now match twice. +\fB\-overlap\fR search of the pattern +.QW \ew+ +against +.QW "hello there" +will just match twice (i.e. no different to just \fB\-all\fR), +but matching +.QW Z[a\-z]+Z +against +.QW ZooZooZoo +will now match twice. An error will be thrown if this switch is used without \fB\-all\fR. .VE 8.5 .TP @@ -1600,7 +1650,8 @@ with \fB\-\fR. The matching range may be within a single line of text, or run across multiple lines (if parts of the pattern can match a new-line). For regular expression matching one can use the various newline-matching -features such as \fB$\fR to match the end of a line, and to control +features such as \fB$\fR to match the end of a line, \fB^\fR to match +the beginning of a line, and to control whether \fB.\fR is allowed to match a new-line. .VE 8.5 If \fIstopIndex\fR is specified, the search stops at that index: @@ -1637,7 +1688,7 @@ supported: \fIpathName \fBtag add \fItagName index1 \fR?\fIindex2 index1 index2 ...\fR? Associate the tag \fItagName\fR with all of the characters starting with \fIindex1\fR and ending just before -\fIindex2\fR (the character at \fIindex2\fR isn't tagged). +\fIindex2\fR (the character at \fIindex2\fR is not tagged). A single command may contain any number of \fIindex1\fR\-\fIindex2\fR pairs. If the last \fIindex2\fR is omitted then the single character at @@ -1659,8 +1710,9 @@ on the syntax of \fIsequence\fR and the substitutions performed on \fIscript\fR before invoking it. If all arguments are specified then a new binding is created, replacing any existing binding for the same \fIsequence\fR and \fItagName\fR -(if the first character of \fIscript\fR is ``+'' then \fIscript\fR -augments an existing binding rather than replacing it). +(if the first character of \fIscript\fR is +.QW + +then \fIscript\fR augments an existing binding rather than replacing it). In this case the return value is an empty string. If \fIscript\fR is omitted then the command returns the \fIscript\fR associated with \fItagName\fR and \fIsequence\fR (an error occurs @@ -1745,10 +1797,11 @@ Returns a list whose elements are the names of all the tags that are active at the character position given by \fIindex\fR. If \fIindex\fR is omitted, then the return value will describe all of the tags that exist for the text (this includes all tags -that have been named in a ``\fIpathName \fBtag\fR'' widget -command but haven't been deleted by a ``\fIpathName \fBtag delete\fR'' -widget command, even if no characters are currently marked with -the tag). +that have been named in a +.QW "\fIpathName \fBtag\fR" +widget command but have not been deleted by a +.QW "\fIpathName \fBtag delete\fR" +widget command, even if no characters are currently marked with the tag). The list will be sorted in order from lowest priority to highest priority. .TP @@ -1804,11 +1857,11 @@ empty string is returned. \fIpathName \fBtag remove \fItagName index1 \fR?\fIindex2 index1 index2 ...\fR? Remove the tag \fItagName\fR from all of the characters starting at \fIindex1\fR and ending just before -\fIindex2\fR (the character at \fIindex2\fR isn't affected). +\fIindex2\fR (the character at \fIindex2\fR is not affected). A single command may contain any number of \fIindex1\fR\-\fIindex2\fR pairs. -If the last \fIindex2\fR is omitted then the single character at -\fIindex1\fR is tagged. +If the last \fIindex2\fR is omitted then the tag is removed from the +single character at \fIindex1\fR. If there are no characters in the specified range (e.g. \fIindex1\fR is past the end of the file or \fIindex2\fR is less than or equal to \fIindex1\fR) then the command has no effect. @@ -1891,7 +1944,11 @@ This command shifts the view in the window left or right according to .VS 8.5 If \fIwhat\fR is \fBunits\fR or \fBpages\fR then \fInumber\fR must be an integer, otherwise number may be specified in any of the forms acceptable -to \fBTk_GetPixels\fR, such as ``2.0c'' or ``1i'' (the result is rounded +to \fBTk_GetPixels\fR, such as +.QW 2.0c +or +.QW 1i +(the result is rounded to the nearest integer value. If no units are given, pixels are assumed). If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by \fInumber\fR average-width characters on the display; if it is @@ -1944,7 +2001,11 @@ This command adjust the view in the window up or down according to .VS 8.5 If \fIwhat\fR is \fBunits\fR or \fBpages\fR then \fInumber\fR must be an integer, otherwise number may be specified in any of the forms acceptable -to \fBTk_GetPixels\fR, such as ``2.0c'' or ``1i'' (the result is rounded +to \fBTk_GetPixels\fR, such as +.QW 2.0c +or +.QW 1i +(the result is rounded to the nearest integer value. If no units are given, pixels are assumed). If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by \fInumber\fR lines on the display; if it is \fBpages\fR then the view @@ -1957,7 +2018,7 @@ become visible. .TP \fIpathName \fByview \fR?\fB\-pickplace\fR? \fIindex\fR Changes the view in the widget's window to make \fIindex\fR visible. -If the \fB\-pickplace\fR option isn't specified then \fIindex\fR will +If the \fB\-pickplace\fR option is not specified then \fIindex\fR will appear at the top of the window. If \fB\-pickplace\fR is specified then the widget chooses where \fIindex\fR appears in the window: @@ -1989,8 +2050,10 @@ This command used to be used for scrolling, but now it is obsolete. .PP Tk automatically creates class bindings for texts that give them the following default behavior. -In the descriptions below, ``word'' is dependent on the value of -the \fBtcl_wordchars\fR variable. See tclvars(n). +In the descriptions below, +.QW word +is dependent on the value of +the \fBtcl_wordchars\fR variable. See \fBtclvars\fR(n). .IP [1] Clicking mouse button 1 positions the insertion cursor just before the character underneath the mouse cursor, sets the @@ -2083,7 +2146,7 @@ Control-Shift-End moves the cursor to the end of the text and extends the selection to that point. .IP [17] The Select key and Control-Space set the selection anchor to the position -of the insertion cursor. They don't affect the current selection. +of the insertion cursor. They do not affect the current selection. Shift-Select and Control-Shift-Space adjust the selection to the current position of the insertion cursor, selecting from the anchor to the insertion cursor if there was not any selection previously. @@ -2154,15 +2217,28 @@ individual widgets or by redefining the class bindings. .SS "ISSUES CONCERNING CHARS AND INDICES" .VS 8.5 .PP -Before Tk 8.5, the widget used the string "chars" to refer to index -positions (which included characters, embedded windows and embedded -images). As of Tk 8.5 the text widget deals separately and correctly -with "chars" and "indices". For backwards compatibility, however, the -index modifiers "+N chars" and "\-N chars" continue to refer to indices. -One must use any of the full forms "+N any chars" or "\-N any chars" etc -to refer to actual character indices. This confusion may be fixed in a -future release by making the widget correctly interpret "+N chars" as a -synonym for "+N any chars". +Before Tk 8.5, the widget used the string +.QW chars +to refer to index positions (which included characters, embedded +windows and embedded images). As of Tk 8.5 the text widget deals +separately and correctly with +.QW chars +and +.QW indices . +For backwards compatibility, however, the index modifiers +.QW "+N chars" +and +.QW "\-N chars" +continue to refer to indices. +One must use any of the full forms +.QW "+N any chars" +or +.QW "\-N any chars" +etc. to refer to actual character indices. This confusion may be fixed in a +future release by making the widget correctly interpret +.QW "+N chars" +as a synonym for +.QW "+N any chars" . .VE 8.5 .SS "PERFORMANCE ISSUES" .PP @@ -2218,11 +2294,12 @@ match, the text widget will return the wrong result. In practice this is a rare problem, but it can occur, for example: .CS pack [text .t] -\.t insert 1.0 "aaaa\\nbbbb\\ncccc\\nbbbb\\naaaa\\n" -\.t search \-regexp \-\- {(a+|b+\\nc+\\nb+)+\\na+} 1.0 +\.t insert 1.0 "aaaa\enbbbb\encccc\enbbbb\enaaaa\en" +\.t search \-regexp \-\- {(a+|b+\enc+\enb+)+\ena+} 1.0 .CE will not find a match when one exists of 19 -characters starting from the first 'b'. +characters starting from the first +.QW b . .PP Whenever one possible match is fully enclosed in another, the search command will attempt to ensure only the larger match is returned. @@ -2235,18 +2312,24 @@ possible match which might cover large portions of the widget. For example: .CS pack [text .t] -\.t insert 1.0 "aaaa\\nbbbb\\nbbbb\\nbbbb\\nbbbb\\n" -\.t search \-regexp \-backward \-\- {b+\\n|a+\\n(b+\\n)+} end +\.t insert 1.0 "aaaa\enbbbb\enbbbb\enbbbb\enbbbb\\n" +\.t search \-regexp \-backward \-\- {b+\en|a+\en(b+\en)+} end .CE -matches at '5.0' when a true greedy match would match at '1.0'. -Similarly if we add \fB\-all\fR to this case, it matches at -all of '5.0', '4.0', '3.0' and '1.0', -when really it should only match at '1.0' since that match -encloses all the others. +matches at +.QW 5.0 +when a true greedy match would match at +.QW 1.0 . +Similarly if we add \fB\-all\fR to this case, it matches at all of +.QW 5.0 , +.QW 4.0 , +.QW 3.0 +and +.QW 1.0 , +when really it should only match at +.QW 1.0 +since that match encloses all the others. .VE 8.5 - .SH "SEE ALSO" entry(n), scrollbar(n) - .SH KEYWORDS text, widget, tkvars @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tk.n,v 1.12.2.1 2007/09/04 17:44:21 dgp Exp $ +'\" RCS: @(#) $Id: tk.n,v 1.12.2.2 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH tk n 8.4 Tk "Tk Built-In Commands" @@ -29,13 +29,16 @@ depending on the \fIoption\fR argument. The legal forms are: .TP \fBtk appname \fR?\fInewName\fR? . -If \fInewName\fR isn't specified, this command returns the name +If \fInewName\fR is not specified, this command returns the name of the application (the name that may be used in \fBsend\fR commands to communicate with the application). If \fInewName\fR is specified, then the name of the application is changed to \fInewName\fR. If the given name is already in use, then a suffix of the form -``\fB #2\fR'' or ``\fB #3\fR'' is appended in order to make the name unique. +.QW "\fB #2\fR" +or +.QW "\fB #3\fR" +is appended in order to make the name unique. The command's result is the name actually chosen. \fInewName\fR should not start with a capital letter. This will interfere with option processing, since names starting with @@ -67,7 +70,9 @@ omitted, it defaults to the main window. If the \fInumber\fR argument is omitted, the current value of the scaling factor is returned. .RS .PP -A ``point'' is a unit of measurement equal to 1/72 inch. A scaling factor +A +.QW point +is a unit of measurement equal to 1/72 inch. A scaling factor of 1.0 corresponds to 1 pixel per point, which is equivalent to a standard 72 dpi monitor. A scaling factor of 1.25 would mean 1.25 pixels per point, which is the setting for a 90 dpi monitor; setting the scaling factor to @@ -83,18 +88,20 @@ accommodate the new scaling factor. \fBtk inactive \fR?\fB\-displayof \fIwindow\fR? ?\fBreset\fR? . Returns a positive integer, the number of milliseconds since the last -time the user interacted with the system. If the \fB-displayof\fR +time the user interacted with the system. If the \fB\-displayof\fR option is given then the return value refers to the display of \fIwindow\fR; otherwise it refers to the display of the application's main window. - -\fBtk inactive\fR will return -1, if querying the user inactive time +.RS +.PP +\fBtk inactive\fR will return \-1, if querying the user inactive time is not supported by the system, and in safe interpreters. - +.PP If the literal string \fBreset\fR is given as an additional argument, the timer is reset and an empty string is returned. Resetting the inactivity time is forbidden in safe interpreters and will throw and error if tried. +.RE .TP \fBtk useinputmethods \fR?\fB\-displayof \fIwindow\fR? ?\fIboolean\fR? . diff --git a/doc/tkvars.n b/doc/tkvars.n index 4c6451d..35c1106 100644 --- a/doc/tkvars.n +++ b/doc/tkvars.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tkvars.n,v 1.3 2001/08/01 16:21:11 dgp Exp $ +'\" RCS: @(#) $Id: tkvars.n,v 1.3.10.1 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH tkvars n 4.1 Tk "Tk Built-In Commands" @@ -31,7 +31,7 @@ an interpreter; this is done by searching several different directories until one is found that contains an appropriate Tk startup script. If the \fBTK_LIBRARY\fR environment variable exists, then the directory it names is checked first. -If \fBTK_LIBRARY\fR isn't set or doesn't refer to an appropriate +If \fBTK_LIBRARY\fR is not set or does not refer to an appropriate directory, then Tk checks several other directories based on a compiled-in default location, the location of the Tcl library directory, the location of the binary containing the application, and the current diff --git a/doc/toplevel.n b/doc/toplevel.n index dbf20f7..7dd5dc9 100644 --- a/doc/toplevel.n +++ b/doc/toplevel.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: toplevel.n,v 1.7 2005/01/05 16:40:39 dkf Exp $ +'\" RCS: @(#) $Id: toplevel.n,v 1.7.2.1 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH toplevel n 8.4 Tk "Tk Built-In Commands" @@ -74,7 +74,7 @@ This option is special in that it may not be specified via the option database, and it may not be modified with the \fBconfigure\fR widget command. .OP \-use use Use -This option is used for embedding. If the value isn't an empty string, +This option is used for embedding. If the value is not an empty string, it must be the window identifier of a container window, specified as a hexadecimal string like the ones returned by the \fBwinfo id\fR command. The toplevel widget will be created as a child of the given diff --git a/doc/ttk_Geometry.3 b/doc/ttk_Geometry.3 index 7617d6a..fd36a97 100644 --- a/doc/ttk_Geometry.3 +++ b/doc/ttk_Geometry.3 @@ -1,7 +1,7 @@ '\" '\" Copyright (c) 2004 Joe English '\" -'\" RCS: @(#) $Id: ttk_Geometry.3,v 1.2 2006/11/15 13:29:17 dkf Exp $ +'\" RCS: @(#) $Id: ttk_Geometry.3,v 1.2.2.1 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH Geometry 3 8.5 Tk "Tk Themed Widget" @@ -196,15 +196,15 @@ If it is \fBTK_RELIEF_RAISED\fR, adds two pixels at the bottom and right so the inner region is shifted up and to the right. Otherwise, adds 1 pixel on all sides. -This is typically used in element geometry procedures to simulate -a "pressed-in" look for pushbuttons. - +This is typically used in element geometry procedures to simulate a +.QW pressed-in +look for pushbuttons. .SH "CONVERSION ROUTINES" \fBTtk_GetPaddingFromObj\fR converts the string in \fIobjPtr\fR to a \fBTtk_Padding\fR structure. The string representation is a list of up to four length specifications -\fI"left top right bottom"\fR. +.QW "\fIleft top right bottom\fR" . If fewer than four elements are specified, \fIbottom\fR defaults to \fItop\fR, \fIright\fR defaults to \fIleft\fR, and @@ -218,9 +218,7 @@ except that the lengths are specified as integers \fBTtk_GetStickyFromObj\fR converts the string in \fIobjPtr\fR to a \fIsticky\fR bitmask. The string contains zero or more of the characters \fBn\fR, \fBs\fR, \fBe\fR, or \fBw\fR. - .SH "SEE ALSO" Tk_GetReliefFromObj(3), Tk_GetPixelsFromObj(3), Tk_GetAnchorFromObj(3) - .SH "KEYWORDS" geometry, padding, margins, box, region, sticky, relief diff --git a/doc/ttk_button.n b/doc/ttk_button.n index abb9056..2f357de 100644 --- a/doc/ttk_button.n +++ b/doc/ttk_button.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_button.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_button.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_button n 8.5 Tk "Tk Themed Widget" +.TH ttk::button n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_button \- Widget that issues a command when pressed +ttk::button \- Widget that issues a command when pressed .SH SYNOPSIS \fBttk::button\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION A \fBttk::button\fR widget displays a textual label and/or image, and evaluates a command when pressed. @@ -24,36 +22,38 @@ and evaluates a command when pressed. \-state \-style \-takefocus \-text \-textvariable \-underline \-width .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-command command Command A script to evaluate when the widget is invoked. .OP \-default default Default May be set to one of \fBnormal\fR, \fBactive\fR, or \fBdisabled\fR. -In a dialog box, one button may be designated the "default" button -(meaning, roughly, "the one that gets invoked when the user presses <Enter>"). +In a dialog box, one button may be designated the +.QW default +button (meaning, roughly, +.QW "the one that gets invoked when the user presses <Enter>" ). \fBactive\fR indicates that this is currently the default button; \fBnormal\fR means that it may become the default button, and \fBdisabled\fR means that it is not defaultable. The default is \fBnormal\fR. -.br +.RS +.PP Depending on the theme, the default button may be displayed with an extra highlight ring, or with a different border color. +.RE .OP \-width width Width If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used. -Note that some themes may specify a non-zero \fB-width\fR +Note that some themes may specify a non-zero \fB\-width\fR in the style. -'\" Not documented -- may go away -'\" .OP \-padding padding Padding -'\" .OP \-foreground foreground Foreground -'\" .OP \-font font Font -'\" .OP \-anchor anchor Anchor -'\" .OP \-padding padding Padding -'\" .OP \-relief relief Relief - +.\" Not documented -- may go away +.\" .OP \-padding padding Padding +.\" .OP \-foreground foreground Foreground +.\" .OP \-font font Font +.\" .OP \-anchor anchor Anchor +.\" .OP \-padding padding Padding +.\" .OP \-relief relief Relief .SH "WIDGET COMMAND" .TP \fIpathName \fBinvoke\fR @@ -66,18 +66,15 @@ Invokes the command associated with the button. \fIpathName \fBinstate \fIstateSpec\fR ?\fIscript\fR? .TP \fIpathName \fBstate\fR ?\fIstateSpec\fR? -See \fIttk_widget(n)\fR - +See \fIttk::widget(n)\fR .SH "COMPATIBILITY OPTIONS" .OP \-state state State -May be set to \fBnormal\fR or \fBdisabled\fR -to control the \fBdisabled\fR state bit. -This is a ``write-only'' option: setting it changes the -widget state, but the \fBstate\fR widget command does -not affect the state option. - +May be set to \fBnormal\fR or \fBdisabled\fR to control the +\fBdisabled\fR state bit. This is a +.QW write-only +option: setting it changes the widget state, but the \fBstate\fR +widget command does not affect the state option. .SH "SEE ALSO" -ttk_widget(n), button(n) - +ttk::widget(n), button(n) .SH "KEYWORDS" widget, button, default, command diff --git a/doc/ttk_checkbutton.n b/doc/ttk_checkbutton.n index b4035e0..77ad2ec 100644 --- a/doc/ttk_checkbutton.n +++ b/doc/ttk_checkbutton.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_checkbutton.n,v 1.4.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_checkbutton.n,v 1.4.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_checkbutton n 8.5 Tk "Tk Themed Widget" +.TH ttk::checkbutton n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_checkbutton \- On/off widget +ttk::checkbutton \- On/off widget .SH SYNOPSIS \fBttk::checkbutton\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION A \fBttk::checkbutton\fR widget is used to show or change a setting. It has two states, selected and deselected. @@ -25,49 +23,47 @@ The state of the checkbutton may be linked to a Tcl variable. \-state \-style \-takefocus \-text \-textvariable \-underline \-width .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-command command Command A Tcl script to execute whenever the widget is invoked. .OP \-offvalue offValue OffValue -The value to store in the associated \fI-variable\fR +The value to store in the associated \fB\-variable\fR when the widget is deselected. Defaults to \fB0\fR. .OP \-onvalue onValue OnValue -The value to store in the associated \fI-variable\fR +The value to store in the associated \fB\-variable\fR when the widget is selected. Defaults to \fB1\fR. .OP \-variable variable Variable The name of a global variable whose value is linked to the widget. Defaults to the widget pathname if not specified. - .SH "WIDGET COMMAND" In addition to the standard \fBcget\fR, \fBconfigure\fR, \fBinstate\fR, and \fBstate\fR commands, checkbuttons support the following additional widget commands: .TP -\fIpathname\fR invoke +\fIpathname\fB invoke\fR Toggles between the selected and deselected states -and evaluates the associated \fI-command\fR. -If the widget is currently selected, sets the \fI-variable\fR -to the \fI-offvalue\fR and deselects the widget; -otherwise, sets the \fI-variable\fR to the \fI-onvalue\fR -Returns the result of the \fI-command\fR. +and evaluates the associated \fB\-command\fR. +If the widget is currently selected, sets the \fB\-variable\fR +to the \fB\-offvalue\fR and deselects the widget; +otherwise, sets the \fB\-variable\fR to the \fB\-onvalue\fR +Returns the result of the \fB\-command\fR. .\" Missing: select, deselect, toggle .\" Are these useful? They don't invoke the -command .\" Missing: flash. This is definitely not useful. - .SH "WIDGET STATES" The widget does not respond to user input if the \fBdisabled\fR state is set. The widget sets the \fBselected\fR state whenever -the linked \fB-variable\fR is set to the widget's \fB-onvalue\fR, +the linked \fB\-variable\fR is set to the widget's \fB\-onvalue\fR, and clears it otherwise. The widget sets the \fBalternate\fR state whenever the -linked \fB-variable\fR is unset. -(The \fBalternate\fR state may be used to indicate a ``tri-state'' -or ``indeterminate'' selection.) - +linked \fB\-variable\fR is unset. +(The \fBalternate\fR state may be used to indicate a +.QW tri-state +or +.QW indeterminate +selection.) .SH "SEE ALSO" -ttk_widget(n), ttk_radiobutton(n), checkbutton(n) - +ttk::widget(n), ttk::radiobutton(n), checkbutton(n) .SH "KEYWORDS" widget, button, toggle, check, option diff --git a/doc/ttk_combobox.n b/doc/ttk_combobox.n index 85b83d2..c2ea88e 100644 --- a/doc/ttk_combobox.n +++ b/doc/ttk_combobox.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_combobox.n,v 1.4.2.3 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_combobox.n,v 1.4.2.4 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_combobox n 8.5 Tk "Tk Themed Widget" +.TH ttk::combobox n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_combobox \- text field with popdown selection list +ttk::combobox \- text field with popdown selection list .SH SYNOPSIS \fBttk::combobox\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION A \fBttk::combobox\fR combines a text field with a pop-down list of values; the user may select the value of the text field from among the @@ -24,7 +22,6 @@ values in the list. \-class \-cursor \-takefocus \-style .SE .\" ALSO: Other entry widget options - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-exportselection exportSelection ExportSelection Boolean value. @@ -36,12 +33,12 @@ One of \fBleft\fR, \fBcenter\fR, or \fBright\fR. Specifies the height of the pop-down listbox, in rows. .OP \-postcommand postCommand PostCommand A Tcl script to evaluate immediately before displaying the listbox. -The \fB-postcommand\fR script may specify the \fB-values\fR to display. +The \fB\-postcommand\fR script may specify the \fB\-values\fR to display. .OP \-state state State One of \fBnormal\fR, \fBreadonly\fR, or \fBdisabled\fR. In the \fBreadonly\fR state, the value may not be edited directly, and -the user can only select one of the \fB-values\fR from the +the user can only select one of the \fB\-values\fR from the dropdown list. In the \fBnormal\fR state, the text field is directly editable. @@ -57,22 +54,21 @@ Specifies the list of values to display in the drop-down listbox. Specifies an integer value indicating the desired width of the entry window, in average-size characters of the widget's font. .BE - .SH "WIDGET COMMAND" .TP \fIpathName \fBcget\fR \fIoption\fR Returns the current value of the specified \fIoption\fR. -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR? Modify or query widget options. -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP \fIpathName \fBcurrent\fR ?\fInewIndex\fR? If \fInewIndex\fR is supplied, sets the combobox value -to the element at position \fInewIndex\fR in the list of \fB-values\fR. -Otherwise, returns the index of the current value in the list of \fB-values\fR -or \fB-1\fR if the current value does not appear in the list. +to the element at position \fInewIndex\fR in the list of \fB\-values\fR. +Otherwise, returns the index of the current value in the list of +\fB\-values\fR or \fB\-1\fR if the current value does not appear in the list. .TP \fIpathName \fBget\fR Returns the current value of the combobox. @@ -83,30 +79,28 @@ or the empty string if the coordinates are outside the window. .TP \fIpathName \fBinstate \fIstateSpec\fR ?\fIscript\fR? Test the widget state. -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP \fIpathName \fBset\fR \fIvalue\fR Sets the value of the combobox to \fIvalue\fR. .TP \fIpathName \fBstate\fR ?\fIstateSpec\fR? Modify or query the widget state. -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .PP The combobox widget also supports the following \fIttk::entry\fR -widget commands (see \fIttk_entry(n)\fR for details): +widget commands (see \fIttk::entry(n)\fR for details): .DS .ta 5.5c 11c bbox delete icursor index insert selection xview .DE - .SH "VIRTUAL EVENTS" The combobox widget generates a \fB<<ComboboxSelected>>\fR virtual event when the user selects an element from the list of values. This event is generated after the listbox is unposted. - .SH "SEE ALSO" -ttk_widget(n), ttk_entry(n) +ttk::widget(n), ttk::entry(n) .SH KEYWORDS choice, entry, list box, text box, widget diff --git a/doc/ttk_entry.n b/doc/ttk_entry.n index f5e3d1a..e30423e 100644 --- a/doc/ttk_entry.n +++ b/doc/ttk_entry.n @@ -7,31 +7,28 @@ '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" '\" SOURCE: entry.n, r1.12 -'\" RCS: @(#) $Id: ttk_entry.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_entry.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_entry n 8.5 Tk "Tk Themed Widget" +.TH ttk::entry n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_entry \- Editable text field widget +ttk::entry \- Editable text field widget .SH SYNOPSIS \fBttk::entry\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION .PP An \fBttk::entry\fR widget displays a one-line text string and allows that string to be edited by the user. The value of the string may be linked to a Tcl variable -with the \fB-textvariable\fR option. +with the \fB\-textvariable\fR option. Entry widgets support horizontal scrolling with the -standard \fB-xscrollcommand\fR option and \fBxview\fR widget command. +standard \fB\-xscrollcommand\fR option and \fBxview\fR widget command. .SO \-class \-cursor \-style \-takefocus \-xscrollcommand .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-exportselection exportSelection ExportSelection A boolean value specifying whether or not @@ -57,14 +54,16 @@ One of \fBleft\fR, \fBcenter\fR, or \fBright\fR. If this option is specified, then the true contents of the entry are not displayed in the window. Instead, each character in the entry's value will be displayed as -the first character in the value of this option, such as ``*''. +the first character in the value of this option, such as +.QW * +or a bullet. This is useful, for example, if the entry is to be used to enter a password. If characters in the entry are selected and copied elsewhere, the information copied will be what is displayed, not the true contents of the entry. .OP \-state state State -Compatibility option; see \fIttk_widget(n)\fR for details. +Compatibility option; see \fIttk::widget(n)\fR for details. Specifies one of three states for the entry, \fBnormal\fR, \fBdisabled\fR, or \fBreadonly\fR. See \fBWIDGET STATES\fR, below. @@ -89,7 +88,6 @@ in average-size characters of the widget's font. .\" Not in ttk: If the value is less than or equal to zero, the widget picks a .\" Not in ttk: size just large enough to hold its current text. .BE - .SH NOTES A portion of the entry may be selected as described below. If an entry is exporting its selection (see the \fBexportSelection\fR @@ -107,7 +105,6 @@ may be used to change the view in the window. Entries use the standard \fBxScrollCommand\fR mechanism for interacting with scrollbars (see the description of the \fBxScrollCommand\fR option for details). - .SH "INDICES" Many of the \fBentry\fR widget commands take one or more indices as arguments. An index specifies a particular character in the entry's @@ -118,8 +115,9 @@ to the first character in the string. .IP \fB@\fInumber\fR In this form, \fInumber\fR is treated as an x-coordinate in the entry's window; the character spanning that x-coordinate is used. -For example, ``\fB@0\fR'' indicates the left-most character in the -window. +For example, +.QW \fB@0\fR +indicates the left-most character in the window. .IP \fBend\fR Indicates the character just after the last one in the entry's string. This is equivalent to specifying a numerical index equal to the length @@ -129,16 +127,18 @@ Indicates the character adjacent to and immediately following the insert cursor. .IP \fBsel.first\fR Indicates the first character in the selection. It is an error to -use this form if the selection isn't in the entry window. +use this form if the selection is not in the entry window. .IP \fBsel.last\fR Indicates the character just after the last one in the selection. -It is an error to use this form if the selection isn't in the +It is an error to use this form if the selection is not in the entry window. .LP -Abbreviations may be used for any of the forms above, e.g. ``\fBe\fR'' -or ``\fBsel.f\fR''. In general, out-of-range indices are automatically -rounded to the nearest legal value. - +Abbreviations may be used for any of the forms above, e.g. +.QW \fBe\fR +or +.QW \fBsel.f\fR . +In general, out-of-range indices are automatically rounded to the +nearest legal value. .SH "WIDGET COMMAND" .PP The following commands are possible for entry widgets: @@ -155,18 +155,18 @@ of the window. .TP \fIpathName \fBcget\fR \fIoption\fR Returns the current value of the specified \fIoption\fR. -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR? Modify or query widget options. -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP \fIpathName \fBdelete \fIfirst \fR?\fIlast\fR? Delete one or more elements of the entry. \fIFirst\fR is the index of the first character to delete, and \fIlast\fR is the index of the character just after the last one to delete. -If \fIlast\fR isn't specified it defaults to \fIfirst\fR+1, +If \fIlast\fR is not specified it defaults to \fIfirst\fR+1, i.e. a single character is deleted. This command returns the empty string. .TP @@ -190,7 +190,7 @@ indicated by \fIindex\fR. Returns the empty string. .TP \fIpathName \fBinstate \fIstatespec\fR ?\fIscript\fR? Test the widget state. -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP \fIpathName \fBselection \fIoption arg\fR This command is used to adjust the selection within an entry. It @@ -199,7 +199,7 @@ has several forms, depending on \fIoption\fR: .TP \fIpathName \fBselection clear\fR Clear the selection if it is currently in this widget. -If the selection isn't in this widget then the command has no effect. +If the selection is not in this widget then the command has no effect. Returns the empty string. .TP \fIpathName \fBselection present\fR @@ -216,11 +216,11 @@ earlier one, then the entry's selection is cleared. .TP \fIpathName \fBstate\fR ?\fIstateSpec\fR? Modify or query the widget state. -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP \fIpathName \fBvalidate\fR Force revalidation, independent of the conditions specified -by the \fB-validate\fR option. +by the \fB\-validate\fR option. Returns 0 if validation fails, 1 if it succeeds. Sets or clears the \fBinvalid\fR state accordingly. .TP @@ -262,19 +262,18 @@ If \fInumber\fR is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible. .RE - .SH VALIDATION -The \fB-validate\fR, \fB-validatecommand\fR, and \fB-invalidcommand\fR +The \fB\-validate\fR, \fB\-validatecommand\fR, and \fB\-invalidcommand\fR options are used to enable entry widget validation. .SS "VALIDATION MODES" There are two main validation modes: \fIprevalidation\fR, -in which the \fB-validatecommand\fR is evaluated prior to each edit +in which the \fB\-validatecommand\fR is evaluated prior to each edit and the return value is used to determine whether to accept or reject the change; -and \fIrevalidation\fR, in which the \fB-validatecommand\fR is +and \fIrevalidation\fR, in which the \fB\-validatecommand\fR is evaluated to determine whether the current value is valid. .PP -The \fB-validate\fR option determines when validation occurs; +The \fB\-validate\fR option determines when validation occurs; it may be set to any of the following values: .IP \fBnone\fR Default. This means validation will only occur when @@ -293,30 +292,30 @@ The entry is revalidated when the entry loses focus. .IP \fBall\fR Validation is performed for all above conditions. .PP -The \fB-invalidcommand\fR is evaluated whenever -the \fB-validatecommand\fR returns a false value. +The \fB\-invalidcommand\fR is evaluated whenever +the \fB\-validatecommand\fR returns a false value. .PP -The \fB-validatecommand\fR and \fB-invalidcommand\fR +The \fB\-validatecommand\fR and \fB\-invalidcommand\fR may modify the entry widget's value via the widget \fBinsert\fR or \fBdelete\fR commands, -or by setting the linked \fB-textvariable\fR. +or by setting the linked \fB\-textvariable\fR. If either does so during prevalidation, then the edit is rejected -regardless of the value returned by the \fB-validatecommand\fR. +regardless of the value returned by the \fB\-validatecommand\fR. .PP -If \fB-validatecommand\fR is empty (the default), +If \fB\-validatecommand\fR is empty (the default), validation always succeeds. .SS "VALIDATION SCRIPT SUBSTITUTIONS" It is possible to perform percent substitutions on the -\fB-validatecommand\fR and \fBinvalidCommand\fR, +\fB\-validatecommand\fR and \fBinvalidCommand\fR, just as in a \fBbind\fR script. The following substitutions are recognized: .IP \fB%d\fR Type of action: 1 for \fBinsert\fR prevalidation, 0 for \fBdelete\fR prevalidation, -or -1 for revalidation. +or \-1 for revalidation. .IP \fB%i\fR -Index of character string to be inserted/deleted, if any, otherwise -1. +Index of character string to be inserted/deleted, if any, otherwise \-1. .IP \fB%P\fR In prevalidation, the new value of the entry if the edit is accepted. In revalidation, the current value of the entry. @@ -325,7 +324,7 @@ The current value of entry prior to editing. .IP \fB%S\fR The text string being inserted/deleted, if any, {} otherwise. .IP \fB%v\fR -The current value of the \fB-validate\fR option. +The current value of the \fB\-validate\fR option. .IP \fB%V\fR The validation condition that triggered the callback (\fBkey\fR, \fBfocusin\fR, \fBfocusout\fR, or \fBforced\fR). @@ -334,23 +333,24 @@ The name of the entry widget. .SS "DIFFERENCES FROM TK ENTRY WIDGET VALIDATION" .IP \(bu The standard Tk entry widget automatically disables validation -(by setting \fB-validate\fR to \fBnone\fR) -if the \fB-validatecommand\fR or \fB-invalidcommand\fR modifies +(by setting \fB\-validate\fR to \fBnone\fR) +if the \fB\-validatecommand\fR or \fB\-invalidcommand\fR modifies the entry's value. The Tk themed entry widget only disables validation if one -of the validation scripts raises an error, or if \fB-validatecommand\fR +of the validation scripts raises an error, or if \fB\-validatecommand\fR does not return a valid boolean value. (Thus, it is not necessary to reenable validation after modifying the entry value in a validation script). .IP \(bu The standard entry widget invokes validation whenever the linked -\fB-textvariable\fR is modified; the Tk themed entry widget does not. - +\fB\-textvariable\fR is modified; the Tk themed entry widget does not. .SH "DEFAULT BINDINGS" The entry widget's default bindings enable the following behavior. -In the descriptions below, ``word'' refers to a contiguous group -of letters, digits, or ``_'' characters, or any single character -other than these. +In the descriptions below, +.QW word +refers to a contiguous group of letters, digits, or +.QW _ +characters, or any single character other than these. .IP \(bu Clicking mouse button 1 positions the insert cursor just before the character underneath the mouse cursor, sets the @@ -425,7 +425,6 @@ Control-d deletes the character to the right of the insert cursor. .IP \(bu Control-k deletes all the characters to the right of the insertion cursor. - .SH "WIDGET STATES" In the \fBdisabled\fR state, the entry cannot be edited and the text cannot be selected. @@ -436,17 +435,17 @@ the entry cannot be edited The \fBdisabled\fR state is the same as \fBreadonly\fR, and in addition text cannot be selected. .PP -Note that changes to the linked \fB-textvariable\fR will +Note that changes to the linked \fB\-textvariable\fR will still be reflected in the entry, even if it is disabled or readonly. .PP -Typically, the text is "grayed-out" in the \fBdisabled\fR state, +Typically, the text is +.QW grayed-out +in the \fBdisabled\fR state, and a different background is used in the \fBreadonly\fR state. .PP The entry widget sets the \fBinvalid\fR state if revalidation fails, and clears it whenever validation succeeds. - .SH "SEE ALSO" -ttk_widget(n), entry(n) - +ttk::widget(n), entry(n) .SH KEYWORDS entry, widget, text field diff --git a/doc/ttk_frame.n b/doc/ttk_frame.n index 05b2567..f0070ed 100644 --- a/doc/ttk_frame.n +++ b/doc/ttk_frame.n @@ -4,55 +4,48 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_frame.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_frame.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_frame n 8.5 Tk "Tk Themed Widget" +.TH ttk::frame n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_frame \- Simple container widget +ttk::frame \- Simple container widget .SH SYNOPSIS \fBttk::frame\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION A \fBttk::frame\fR widget is a container, used to group other widgets together. .SO \-class \-cursor \-takefocus \-style .SE - .SH "WIDGET-SPECIFIC OPTIONS" -.OP -borderwidth borderWidth BorderWidth +.OP \-borderwidth borderWidth BorderWidth The desired width of the widget border. Defaults to 0. -.OP -relief relief Relief +.OP \-relief relief Relief One of the standard Tk border styles: \fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR, \fBsolid\fR, or \fBsunken\fR. Defaults to \fBflat\fR. -.OP -padding padding Padding +.OP \-padding padding Padding Additional padding to include inside the border. -.OP -width width Width +.OP \-width width Width If specified, the widget's requested width in pixels. -.OP -height height Height +.OP \-height height Height If specified, the widget's requested height in pixels. - .SH "WIDGET COMMAND" Supports the standard widget commands \fBconfigure\fR, \fBcget\fR, \fBinstate\fR, and \fBstate\fR; -see \fIttk_widget(n)\fR. - +see \fIttk::widget(n)\fR. .SH "NOTES" Note that if the \fBpack\fR, \fBgrid\fR, or other geometry managers are used to manage the children of the \fBframe\fR, by the GM's requested size will normally take precedence -over the \fBframe\fR widget's \fB-width\fR and \fB-height\fR options. -[\fBpack propagate\fR] and [\fBgrid propagate\fR] can be used +over the \fBframe\fR widget's \fB\-width\fR and \fB\-height\fR options. +\fBpack propagate\fR and \fBgrid propagate\fR can be used to change this. - .SH "SEE ALSO" -ttk_widget(n), ttk_labelframe(n), frame(n) - +ttk::widget(n), ttk::labelframe(n), frame(n) .SH "KEYWORDS" widget, frame, container diff --git a/doc/ttk_image.n b/doc/ttk_image.n index a85fc76..80a9ae1 100644 --- a/doc/ttk_image.n +++ b/doc/ttk_image.n @@ -4,17 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_image.n,v 1.6.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_image.n,v 1.6.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_image n 8.5 Tk "Tk Themed Widget" +.TH ttk::image n 8.5 Tk "Tk Themed Widget" .BS .SH NAME -ttk_image \- Define an element based on an image +ttk::image \- Define an element based on an image .SH SYNOPSIS \fBttk::style element create \fIname\fR \fBimage\fR \fIimageSpec\fR ?\fIoptions\fR? .BE - .SH DESCRIPTION The \fIimage\fR element factory creates a new element in the current theme whose visual appearance is determined @@ -24,55 +23,55 @@ The first element is the default image name. The rest of the list is a sequence of \fIstatespec / value\fR pairs specifying other images to use when the element is in a particular state or combination of states. - .SH OPTIONS Valid \fIoptions\fR are: .TP -\fB-border\fR \fIpadding\fR +\fB\-border\fR \fIpadding\fR \fIpadding\fR is a list of up to four integers, specifying the left, top, right, and bottom borders, respectively. See \fBIMAGE STRETCHING\fR, below. .TP -\fB-height \fIheight\fR +\fB\-height \fIheight\fR Specifies a minimum height for the element. If less than zero, the base image's height is used as a default. .TP -\fB-padding\fR \fIpadding\fR +\fB\-padding\fR \fIpadding\fR Specifies the element's interior padding. Defaults to -\fI-border\fR if not specified. +\fB\-border\fR if not specified. .TP -\fB-sticky\fR \fIspec\fR +\fB\-sticky\fR \fIspec\fR Specifies how the image is placed within the final parcel. -\fIspec\fR contains zero or more characters "n", "s", "w", or "e". +\fIspec\fR contains zero or more characters +.QW n , +.QW s , +.QW w , +or +.QW e . .TP -\fB-width \fIwidth\fR +\fB\-width \fIwidth\fR Specifies a minimum width for the element. If less than zero, the base image's width is used as a default. - .SH "IMAGE STRETCHING" If the element's allocated parcel is larger than the image, -the image will be placed in the parcel based on the \fB-sticky\fR option. -If the image needs to stretch horizontally (i.e., \fB-sticky ew\fR) -or vertically (\fB-sticky ns\fR), +the image will be placed in the parcel based on the \fB\-sticky\fR option. +If the image needs to stretch horizontally (i.e., \fB\-sticky ew\fR) +or vertically (\fB\-sticky ns\fR), subregions of the image are replicated to fill the parcel -based on the \fB-border\fR option. -The \fB-border\fR divides the image into 9 regions: +based on the \fB\-border\fR option. +The \fB\-border\fR divides the image into 9 regions: four fixed corners, top and left edges (which may be tiled horizontally), left and right edges (which may be tiled vertically), and the central area (which may be tiled in both directions). - .SH "EXAMPLE" .CS -set img1 [image create photo -file button.png] -set img2 [image create photo -file button-pressed.png] -set img3 [image create photo -file button-active.png] +set img1 [image create photo \-file button.png] +set img2 [image create photo \-file button-pressed.png] +set img3 [image create photo \-file button-active.png] style element create Button.button image \e [list $img1 pressed $img2 active $img3] \e - -border {2 4} -sticky we + \-border {2 4} \-sticky we .CE - .SH "SEE ALSO" image(n), photo(n) - .SH KEYWORDS pixmap theme, image diff --git a/doc/ttk_intro.n b/doc/ttk_intro.n index 663e7a9..771d7b1 100644 --- a/doc/ttk_intro.n +++ b/doc/ttk_intro.n @@ -4,15 +4,14 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_intro.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_intro.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_intro n 8.5 Tk "Tk Themed Widget" +.TH ttk::intro n 8.5 Tk "Tk Themed Widget" .BS .SH NAME -ttk_intro \- Introduction to the Tk theme engine +ttk::intro \- Introduction to the Tk theme engine .BE - .SH "OVERVIEW" The Tk themed widget set is based on a revised and enhanced version of TIP #48 (http://tip.tcl.tk/48) specified style engine. @@ -23,7 +22,6 @@ the code implementing its appearance. Widget class bindings are primarily responsible for maintaining the widget state and invoking callbacks; all aspects of the widgets appearance is - .SH "THEMES" A \fItheme\fR is a collection of elements and styles that determine the look and feel of the widget set. @@ -35,12 +33,12 @@ Adapt to display limitations (low-color, grayscale, monochrome, tiny screens) .IP \(bu Accessibility (high contrast, large type) .IP \(bu -Application suite "branding" +Application suite +.QW branding .IP \(bu Blend in with the rest of the desktop (Gnome, KDE, Java) .IP \(bu And, of course: eye candy. - .SH "ELEMENTS" An \fIelement\fR displays an individual part of a widget. For example, a vertical scrollbar widget contains \fBuparrow\fR, @@ -59,8 +57,8 @@ Like widgets, elements have \fIoptions\fR which specify what to display and how to display it. For example, the \fBtext\fR element (which displays a text string) has -\fB-text\fR, \fB-font\fR, \fB-foreground\fR, \fB-background\fR, -\fB-underline\fR, and \fB-width\fR options. +\fB\-text\fR, \fB\-font\fR, \fB\-foreground\fR, \fB\-background\fR, +\fB\-underline\fR, and \fB\-width\fR options. The value of an element resource is taken from: .IP \(bu A dynamic setting specified by \fBstyle map\fR and the current state; @@ -76,25 +74,24 @@ and how they are arranged. The layout engine uses a simplified version of the \fBpack\fR algorithm: starting with an initial cavity equal to the size of the widget, elements are allocated a parcel within the cavity along -the side specified by the \fB-side\fR option, -and placed within the parcel according to the \fB-sticky\fR +the side specified by the \fB\-side\fR option, +and placed within the parcel according to the \fB\-sticky\fR option. For example, the layout for a horizontal scrollbar .CS style layout Horizontal.TScrollbar { - Scrollbar.trough -children { - Scrollbar.leftarrow -side left -sticky w - Scrollbar.rightarrow -side right -sticky e - Scrollbar.thumb -side left -expand true -sticky ew + Scrollbar.trough \-children { + Scrollbar.leftarrow \-side left \-sticky w + Scrollbar.rightarrow \-side right \-sticky e + Scrollbar.thumb \-side left \-expand true \-sticky ew } } .CE By default, the layout for a widget is the same as its class name. Some widgets may override this (for example, the \fBscrollbar\fR -widget chooses different layouts based on the \fB-orient\fR option). - +widget chooses different layouts based on the \fB\-orient\fR option). .SH "STATES" -In standard Tk, many widgets have a \fB-state\fR option +In standard Tk, many widgets have a \fB\-state\fR option which (in most cases) is either \fBnormal\fR or \fBdisabled\fR. Some widgets support additional states, such as the \fBentry\fR widget which has a \fBreadonly\fR state @@ -104,9 +101,9 @@ The themed Tk widgets generalizes this idea: every widget has a bitmap of independent state flags. Widget state flags include \fBactive\fR, \fBdisabled\fR, \fBpressed\fR, \fBfocus\fR, etc., -(see \fIttk_widget(n)\fR for the full list of state flags). +(see \fIttk::widget(n)\fR for the full list of state flags). .PP -Instead of a \fB-state\fR option, every widget now has +Instead of a \fB\-state\fR option, every widget now has a \fBstate\fR widget command which is used to set or query the state. A \fIstate specification\fR is a list of symbolic state names @@ -132,13 +129,12 @@ In addition, the button unpresses if pointer is dragged outside the widget while Button-1 is held down, and represses if it's dragged back in. Finally, when the mouse button is released, the widget's -\fB-command\fR is invoked, but only if the button is currently +\fB\-command\fR is invoked, but only if the button is currently in the \fBpressed\fR state. (The actual bindings are a little more complicated than the above, but not by much). .PP \fINote to self: rewrite that paragraph. It's horrible.\fR - .SH "STYLES" Each widget is associated with a \fIstyle\fR, which specifies values for element resources. @@ -147,9 +143,9 @@ by default, widgets use the class name to look up a style in the current theme. For example: .CS style default TButton \e - -background #d9d9d9 \e - -foreground black \e - -relief raised \e + \-background #d9d9d9 \e + \-foreground black \e + \-relief raised \e ; .CE Many elements are displayed differently depending on the widget state. @@ -159,11 +155,10 @@ The \fBstyle map\fR command specifies dynamic resources for a particular style: .CS style map TButton \e - -background [list disabled #d9d9d9 active #ececec] \e - -foreground [list disabled #a3a3a3] \e - -relief [list {pressed !disabled} sunken] \e + \-background [list disabled #d9d9d9 active #ececec] \e + \-foreground [list disabled #a3a3a3] \e + \-relief [list {pressed !disabled} sunken] \e ; .CE - .SH "SEE ALSO" -ttk_widget(n), ttk_style(n) +ttk::widget(n), ttk::style(n) diff --git a/doc/ttk_label.n b/doc/ttk_label.n index abb294b..95d45f3 100644 --- a/doc/ttk_label.n +++ b/doc/ttk_label.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_label.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_label.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_label n 8.5 Tk "Tk Themed Widget" +.TH ttk::label n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_label \- Display a text string and/or image +ttk::label \- Display a text string and/or image .SH SYNOPSIS \fBttk::label\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION A \fBttk::label\fR widget displays a textual label and/or image. The label may be linked to a Tcl variable @@ -25,14 +23,13 @@ to automatically change the displayed text. \-style \-takefocus \-text \-textvariable \-underline \-width .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-anchor anchor Anchor Specifies how the information in the widget is positioned relative to the inner margins. Legal values are \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, and \fBcenter\fR. -See also \fB-justify\fR. +See also \fB\-justify\fR. .OP \-background frameColor FrameColor The widget's background color. If unspecified, the theme default is used. @@ -45,7 +42,7 @@ If unspecified, the theme default is used. If there are multiple lines of text, specifies how the lines are laid out relative to one another. One of \fBleft\fR, \fBcenter\fR, or \fBright\fR. -See also \fB-anchor\fR. +See also \fB\-anchor\fR. .OP \-padding padding Padding Specifies the amount of extra space to allocate for the widget. The padding is a list of up to four length specifications @@ -62,14 +59,13 @@ Valid values are and \fBsunken\fR. .OP \-text text Text Specifies a text string to be displayed inside the widget -(unless overridden by \fB-textvariable\fR). +(unless overridden by \fB\-textvariable\fR). .OP \-wraplength wrapLength WrapLength Specifies the maximum line length (in pixels). If this option is less than or equal to zero, then automatic wrapping is not performed; otherwise the text is split into lines such that no line is longer than the specified value. - .SH "WIDGET COMMAND" .TP \fIpathName \fBcget\fR \fIoption\fR @@ -79,7 +75,6 @@ than the specified value. \fIpathName \fBinstate \fIstateSpec\fR ?\fIscript\fR? .TP \fIpathName \fBstate\fR ?\fIstateSpec\fR? -See \fIttk_widget(n)\fR - +See \fIttk::widget(n)\fR .SH "SEE ALSO" -ttk_widget(n), label(n) +ttk::widget(n), label(n) diff --git a/doc/ttk_labelframe.n b/doc/ttk_labelframe.n index 758b2dd..ef6498c 100644 --- a/doc/ttk_labelframe.n +++ b/doc/ttk_labelframe.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_labelframe.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_labelframe.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_labelframe n 8.5 Tk "Tk Themed Widget" +.TH ttk::labelframe n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_labelframe \- Container widget with optional label +ttk::labelframe \- Container widget with optional label .SH SYNOPSIS \fBttk::labelframe\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION A \fBttk::labelframe\fR widget is a container used to group other widgets together. It has an optional label, which may be a plain text string or @@ -23,55 +21,52 @@ another widget. .SO \-class \-cursor \-takefocus \-style .SE - .SH "WIDGET-SPECIFIC OPTIONS" -'\" XXX: Currently included, but may go away: -'\" XXX: .OP -borderwidth borderWidth BorderWidth -'\" XXX: The desired width of the widget border. Default is theme-dependent. -'\" XXX: .OP -relief relief Relief -'\" XXX: One of the standard Tk border styles: -'\" XXX: \fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR, -'\" XXX: \fBsolid\fR, or \fBsunken\fR. -'\" XXX: Default is theme-dependent. -.OP -labelanchor labelAnchor LabelAnchor +.\" XXX: Currently included, but may go away: +.\" XXX: .OP -borderwidth borderWidth BorderWidth +.\" XXX: The desired width of the widget border. Default is theme-dependent. +.\" XXX: .OP -relief relief Relief +.\" XXX: One of the standard Tk border styles: +.\" XXX: \fBflat\fR, \fBgroove\fR, \fBraised\fR, \fBridge\fR, +.\" XXX: \fBsolid\fR, or \fBsunken\fR. +.\" XXX: Default is theme-dependent. +.OP \-labelanchor labelAnchor LabelAnchor Specifies where to place the label. Allowed values are (clockwise from the top upper left corner): \fBnw\fR, \fBn\fR, \fBne\fR, \fBen\fR, \fBe\fR, \fBes\fR, \fBse\fR, \fBs\fR,\fBsw\fR, \fBws\fR, \fBw\fR and \fBwn\fR. The default value is theme-dependent. -'\" Alternate explanation: The first character must be one of n, s, e, or w -'\" and specifies which side the label should be placed on; -'\" the remaining characters specify how the label is aligned on that side. -'\" NOTE: Now allows other values as well; leave this undocumented for now -.OP -text text Text +.\" Alternate explanation: The first character must be one of n, s, e, or w +.\" and specifies which side the label should be placed on; +.\" the remaining characters specify how the label is aligned on that side. +.\" NOTE: Now allows other values as well; leave this undocumented for now +.OP \-text text Text Specifies the text of the label. -.OP -underline underline Underline +.OP \-underline underline Underline If set, specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation. Mnemonic activation for a \fBttk::labelframe\fR sets the keyboard focus to the first child of the \fBttk::labelframe\fR widget. -.OP -padding padding Padding +.OP \-padding padding Padding Additional padding to include inside the border. -.OP -labelwidget labelWidget LabelWidget +.OP \-labelwidget labelWidget LabelWidget The name of a widget to use for the label. -If set, overrides the \fB-text\fR option. -The \fB-labelwidget\fR must be a child of the \fBlabelframe\fR widget +If set, overrides the \fB\-text\fR option. +The \fB\-labelwidget\fR must be a child of the \fBlabelframe\fR widget or one of the \fBlabelframe\fR's ancestors, and must belong to the same top-level widget as the \fBlabelframe\fR. -.OP -width width Width +.OP \-width width Width If specified, the widget's requested width in pixels. -.OP -height height Height +.OP \-height height Height If specified, the widget's requested height in pixels. -(See \fIttk_frame(n)\fR for further notes on \fB-width\fR and \fB-height\fR). - +(See \fIttk::frame(n)\fR for further notes on \fB\-width\fR and +\fB\-height\fR). .SH "WIDGET COMMAND" Supports the standard widget commands \fBconfigure\fR, \fBcget\fR, \fBinstate\fR, and \fBstate\fR; -see \fIttk_widget(n)\fR. - +see \fIttk::widget(n)\fR. .SH "SEE ALSO" -ttk_widget(n), ttk_frame(n), labelframe(n) - +ttk::widget(n), ttk::frame(n), labelframe(n) .SH "KEYWORDS" widget, frame, container, label, groupbox diff --git a/doc/ttk_menubutton.n b/doc/ttk_menubutton.n index 120f7e5..2711e1f 100644 --- a/doc/ttk_menubutton.n +++ b/doc/ttk_menubutton.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_menubutton.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_menubutton.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_menubutton n 8.5 Tk "Tk Themed Widget" +.TH ttk::menubutton n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_menubutton \- Widget that pops down a menu when pressed +ttk::menubutton \- Widget that pops down a menu when pressed .SH SYNOPSIS \fBttk::menubutton\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION A \fBttk::menubutton\fR widget displays a textual label and/or image, and displays a menu when pressed. @@ -24,14 +22,13 @@ and displays a menu when pressed. \-state \-style \-takefocus \-text \-textvariable \-underline \-width .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-direction direction Direction Specifies where the menu is to be popped up relative to the menubutton. -One of: \fIabove\fR, \fIbelow\fR, \fIleft\fR, \fIright\fR, -or \fIflush\fR. The default is \fIbelow\fR. -\fIflush\fR pops the menu up directly over the menubutton. +One of: \fBabove\fR, \fBbelow\fR, \fBleft\fR, \fBright\fR, +or \fBflush\fR. The default is \fBbelow\fR. +\fBflush\fR pops the menu up directly over the menubutton. .OP \-menu menu Menu Specifies the path name of the menu associated with the menubutton. To be on the safe side, the menu ought to be a direct child of the @@ -39,14 +36,11 @@ menubutton. .\" not documented: may go away: .\" .OP \-anchor anchor Anchor .\" .OP \-padding padding Pad - .SH "WIDGET COMMAND" Menubutton widgets support the standard \fBcget\fR, \fBconfigure\fR, \fBinstate\fR, and \fBstate\fR methods. No other widget methods are used. - .SH "SEE ALSO" -ttk_widget(n), menu(n), menubutton(n) - +ttk::widget(n), menu(n), menubutton(n) .SH "KEYWORDS" widget, button, menu diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n index 8ce1e77..7247a96 100644 --- a/doc/ttk_notebook.n +++ b/doc/ttk_notebook.n @@ -4,21 +4,21 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_notebook.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_notebook.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_notebook n 8.5 Tk "Tk Themed Widget" +.TH ttk::notebook n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_notebook \- Multi-paned container widget +ttk::notebook \- Multi-paned container widget .SH SYNOPSIS +.nf \fBttk::notebook\fR \fIpathName \fR?\fIoptions\fR? .br \fIpathName \fBadd\fR \fIpathName\fR.\fIsubwindow\fR ?\fIoptions...\fR? \fIpathName \fBinsert\fR \fIindex\fR \fIpathName\fR.\fIsubwindow\fR ?\fIoptions...\fR? +.fi .BE - .SH DESCRIPTION A \fBttk::notebook\fR widget manages a collection of subpanes and displays a single one at a time. @@ -27,7 +27,6 @@ may select to change the currently-displayed pane. .SO \-class \-cursor \-takefocus \-style .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-height height Height If present and greater than zero, @@ -59,11 +58,12 @@ Specifies how the child pane is positioned within the pane area. Value is a string containing zero or more of the characters \fBn, s, e,\fR or \fBw\fR. Each letter refers to a side (north, south, east, or west) -that the child window will "stick" to, -as per the \fBgrid\fR geometry manager. +that the child window will +.QW stick +to, as per the \fBgrid\fR geometry manager. .OP \-padding padding Padding Specifies the amount of extra space to add between the notebook and this pane. -Syntax is the same as for the widget \fB-padding\fR option. +Syntax is the same as for the widget \fB\-padding\fR option. .OP \-text text Text Specifies a string to be displayed in the tab. .OP \-image image Image @@ -71,14 +71,13 @@ Specifies an image to display in the tab, which must have been created with the \fBimage create\fR command. .OP \-compound compound Compound Specifies how to display the image relative to the text, -in the case both \fB-text\fR and \fB-image\fR are present. +in the case both \fB\-text\fR and \fB\-image\fR are present. See \fIlabel(n)\fR for legal values. .OP \-underline underline Underline Specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation if \fBttk::notebook::enableTraversal\fR is called. - .SH "WIDGET COMMAND" .TP \fIpathname \fBadd \fIchild\fR ?\fIoptions...\fR? @@ -89,10 +88,10 @@ will be displayed. See \fBTAB OPTIONS\fR for the list of available \fIoptions\fR. .TP \fIpathname \fBconfigure\fR ?\fIoptions\fR? -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP \fIpathname \fBcget\fR \fIoption\fR -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP \fIpathname \fBforget\fR \fItabid\fR Removes the tab specified by \fItabid\fR, @@ -100,7 +99,8 @@ unmaps and unmanages the associated child window. .TP \fIpathname \fBindex\fR \fItabid\fR Returns the numeric index of the tab specified by \fItabid\fR, -or the total number of tabs if \fItabid\fR is the string "\fBend\fR". +or the total number of tabs if \fItabid\fR is the string +.QW \fBend\fR . .TP \fIpathname \fBinsert\fR \fIpos\fR \fIsubwindow\fR \fIoptions...\fR Inserts a pane at the specified position. @@ -111,7 +111,7 @@ moves it to the specified position. See \fBTAB OPTIONS\fR for the list of available options. .TP \fIpathname \fBinstate\fR \fIstatespec \fR?\fIscript...\fR? -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP \fIpathname \fBselect\fR ?\fItabid\fR? Selects the specified tab. The associated child pane will be displayed, @@ -120,19 +120,19 @@ If \fItabid\fR is omitted, returns the widget name of the currently selected pane. .TP \fIpathname \fBstate\fR ?\fIstatespec\fR? -See \fIttk_widget(n)\fR. +See \fIttk::widget(n)\fR. .TP -\fIpathname \fBtab\fR \fItabid\fR ?\fI-options \fR?\fIvalue ...\fR +\fIpathname \fBtab\fR \fItabid\fR ?\fI\-options \fR?\fIvalue ...\fR Query or modify the options of the specific tab. -If no \fI-option\fR is specified, returns a dictionary of the tab option values. -If one \fI-option\fR is specified, returns the value of that \fIoption\fR. -Otherwise, sets the \fI-option\fRs to the corresponding \fIvalue\fRs. +If no \fI\-option\fR is specified, returns a dictionary of the tab +option values. +If one \fI\-option\fR is specified, returns the value of that \fIoption\fR. +Otherwise, sets the \fI\-option\fRs to the corresponding \fIvalue\fRs. See \fBTAB OPTIONS\fR for the available options. .TP \fIpathname \fBtabs\fR Returns a list of all windows managed by the widget. .\" Perhaps "panes" is a better name for this command? - .SH "KEYBOARD TRAVERSAL" To enable keyboard traversal for a toplevel window containing a notebook widget \fI$nb\fR, call: @@ -154,7 +154,6 @@ Multiple notebooks in a single toplevel may be enabled for traversal, including nested notebooks. However, notebook traversal only works properly if all panes are direct children of the notebook. - .SH "TAB IDENTIFIERS" The \fItabid\fR argument to the above commands may take any of the following forms: @@ -163,31 +162,31 @@ An integer between zero and the number of tabs; .IP \(bu The name of a child pane window; .IP \(bu -A positional specification of the form "@\fIx\fR,\fIy\fR", +A positional specification of the form +.QW @\fIx\fR,\fIy\fR , which identifies the tab .IP \(bu -The literal string "\fBcurrent\fR", +The literal string +.QW \fBcurrent\fR , which identifies the currently-selected tab; or: .IP \(bu -The literal string "\fBend\fR", +The literal string +.QW \fBend\fR , which returns the number of tabs -(only valid for "\fIpathname \fBindex\fR"). - +(only valid for +.QW "\fIpathname \fBindex\fR" ). .SH "VIRTUAL EVENTS" The notebook widget generates a \fB<<NotebookTabChanged>>\fR virtual event after a new tab is selected. - .SH "EXAMPLE" .CS -notebook .nb -\.nb add [frame .nb.f1] -text "First tab" -\.nb add [frame .nb.f2] -text "Second tab" +pack [\fBttk::notebook\fR .nb] +\.nb add [frame .nb.f1] \-text "First tab" +\.nb add [frame .nb.f2] \-text "Second tab" \.nb select .nb.f2 ttk::notebook::enableTraversal .nb .CE - .SH "SEE ALSO" -ttk_widget(n), grid(n) - +ttk::widget(n), grid(n) .SH "KEYWORDS" pane, tab diff --git a/doc/ttk_panedwindow.n b/doc/ttk_panedwindow.n index ff2a799..9840e64 100644 --- a/doc/ttk_panedwindow.n +++ b/doc/ttk_panedwindow.n @@ -4,14 +4,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_panedwindow.n,v 1.4.2.3 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_panedwindow.n,v 1.4.2.4 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_panedwindow n 8.5 Tk "Tk Themed Widget" +.TH ttk::panedwindow n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_panedwindow \- Multi-pane container window +ttk::panedwindow \- Multi-pane container window .SH SYNOPSIS .nf \fBttk::panedwindow\fR \fIpathName \fR?\fIoptions\fR? @@ -20,7 +19,6 @@ ttk_panedwindow \- Multi-pane container window \fIpathName \fBinsert\fR \fIindex\fR \fIpathName.subwindow\fR ?\fIoptions...\fR? .fi .BE - .SH DESCRIPTION A \fBttk::panedwindow\fR widget displays a number of subwindows, stacked either vertically or horizontally. The user may adjust the relative sizes @@ -28,7 +26,6 @@ of the subwindows by dragging the sash between panes. .SO \-class \-cursor \-takefocus \-style .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-orient orient Orient Specifies the orientation of the window. @@ -44,17 +41,15 @@ If present and greater than zero, specifies the desired height of the widget in pixels. Otherwise, the requested height is determined by the height of the managed windows. - .SH "PANE OPTIONS" The following options may be specified for each pane: .OP \-weight weight Weight An integer specifying the relative stretchability of the pane. When the paned window is resized, the extra space is added -or subtracted to each pane proportionally to its \fB-weight\fR. - +or subtracted to each pane proportionally to its \fB\-weight\fR. .SH "WIDGET COMMAND" Supports the standard \fBconfigure\fR, \fBcget\fR, \fBstate\fR, -and \fBinstate\fR commands; see \fIttk_widget(n)\fR for details. +and \fBinstate\fR commands; see \fIttk::widget(n)\fR for details. Additional commands: .TP \fIpathname \fBadd\fR \fIsubwindow\fR \fIoptions...\fR @@ -74,13 +69,13 @@ If \fIsubwindow\fR is already managed by the paned window, moves it to the specified position. See \fBPANE OPTIONS\fR for the list of available options. .TP -\fIpathname \fBpane\fR \fIpane -option \fR?\fIvalue \fR?\fI-option value...\fR +\fIpathname \fBpane\fR \fIpane \-option \fR?\fIvalue \fR?\fI\-option value...\fR Query or modify the options of the specified \fIpane\fR, where \fIpane\fR is either an integer index or the name of a managed subwindow. -If no \fI-option\fR is specified, returns a dictionary of the pane +If no \fI\-option\fR is specified, returns a dictionary of the pane option values. -If one \fI-option\fR is specified, returns the value of that \fIoption\fR. -Otherwise, sets the \fI-option\fRs to the corresponding \fIvalue\fRs. +If one \fI\-option\fR is specified, returns the value of that \fIoption\fR. +Otherwise, sets the \fI\-option\fRs to the corresponding \fIvalue\fRs. .TP \fIpathname\fR \fBsashpos\fR \fIindex\fR ?\fInewpos\fR? If \fInewpos\fR is specified, sets the position @@ -98,6 +93,5 @@ Returns the new position of sash number \fIindex\fR. \fIpathname\fR \fBidentify\fR \fIx y\fR Returns the index of the sash at point \fIx,y\fR, or the empty string if \fIx,y\fR is not over a sash. - .SH "SEE ALSO" -ttk_widget(n), ttk_notebook(n), panedwindow(n) +ttk::widget(n), ttk::notebook(n), panedwindow(n) diff --git a/doc/ttk_progressbar.n b/doc/ttk_progressbar.n index 4f40414..8631fbb 100644 --- a/doc/ttk_progressbar.n +++ b/doc/ttk_progressbar.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_progressbar.n,v 1.3.2.2 2007/10/27 04:23:14 dgp Exp $ +'\" RCS: @(#) $Id: ttk_progressbar.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_progressbar n 8.5 Tk "Tk Themed Widget" +.TH ttk::progressbar n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_progressbar \- Provide progress feedback +ttk::progressbar \- Provide progress feedback .SH SYNOPSIS \fBttk::progressbar\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION A \fBttk::progressbar\fR widget shows the status of a long-running operation. They can operate in two modes: \fIdeterminate\fR mode shows the @@ -25,7 +23,6 @@ that something is happening. .SO \-class \-cursor \-takefocus \-style .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-orient orient Orient One of \fBhorizontal\fR or \fBvertical\fR. @@ -36,37 +33,37 @@ Specifies the length of the long axis of the progress bar .OP \-mode mode Mode One of \fBdeterminate\fR or \fBindeterminate\fR. .OP \-maximum maximum Maximum -A floating point number specifying the maximum \fB-value\fR. +A floating point number specifying the maximum \fB\-value\fR. Defaults to 100. .OP \-value value Value The current value of the progress bar. In \fIdeterminate\fR mode, this represents the amount of work completed. -In \fIindeterminate\fR mode, it is interpreted modulo \fB-maximum\fR; -that is, the progress bar completes one "cycle" when -the \fB-value\fR increases by \fB-maximum\fR. +In \fIindeterminate\fR mode, it is interpreted modulo \fB\-maximum\fR; +that is, the progress bar completes one +.QW cycle +when the \fB\-value\fR increases by \fB\-maximum\fR. .OP \-variable variable Variable -The name of a Tcl variable which is linked to the \fB-value\fR. -If specified, the \fB-value\fR of the progress bar is +The name of a Tcl variable which is linked to the \fB\-value\fR. +If specified, the \fB\-value\fR of the progress bar is automatically set to the value of the variable whenever the latter is modified. .OP \-phase phase Phase Read-only option. The widget periodically increments the value of this option -whenever the \fB-value\fR is greater than 0 and, -in \fIdeterminate\fR mode, less than \fB-maximum\fR. +whenever the \fB\-value\fR is greater than 0 and, +in \fIdeterminate\fR mode, less than \fB\-maximum\fR. This option may be used by the current theme to provide additional animation effects. - .SH "WIDGET COMMAND" .TP \fIpathName \fBcget\fR \fIoption\fR -Returns the current value of the specified \fIoption\fR; see \fIttk_widget(n)\fR. +Returns the current value of the specified \fIoption\fR; see \fIttk::widget(n)\fR. .TP \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR? -Modify or query widget options; see \fIttk_widget(n)\fR. +Modify or query widget options; see \fIttk::widget(n)\fR. .TP \fIpathName \fBinstate \fIstatespec\fR ?\fIscript\fR? -Test the widget state; see \fIttk_widget(n)\fR. +Test the widget state; see \fIttk::widget(n)\fR. .TP \fIpathName \fBstart\fR ?\fIinterval\fR? Begin autoincrement mode: @@ -75,15 +72,14 @@ every \fIinterval\fR milliseconds. If omitted, \fIinterval\fR defaults to 50 milliseconds (20 steps/second). .TP \fIpathName \fBstate\fR ?\fIstateSpec\fR? -Modify or query the widget state; see \fIttk_widget(n)\fR. +Modify or query the widget state; see \fIttk::widget(n)\fR. .TP \fIpathName \fBstep\fR ?\fIamount\fR? -Increments the \fB-value\fR by \fIamount\fR. +Increments the \fB\-value\fR by \fIamount\fR. \fIamount\fR defaults to 1.0 if omitted. .TP \fIpathName \fBstop\fR Stop autoincrement mode: cancels any recurring timer event initiated by \fIpathName \fBstart\fR. - .SH "SEE ALSO" -ttk_widget(n) +ttk::widget(n) diff --git a/doc/ttk_radiobutton.n b/doc/ttk_radiobutton.n index cfaa188..7b04271 100644 --- a/doc/ttk_radiobutton.n +++ b/doc/ttk_radiobutton.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_radiobutton.n,v 1.3.2.2 2007/10/27 04:23:15 dgp Exp $ +'\" RCS: @(#) $Id: ttk_radiobutton.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_radiobutton n 8.5 Tk "Tk Themed Widget" +.TH ttk::radiobutton n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_radiobutton \- Mutually exclusive option widget +ttk::radiobutton \- Mutually exclusive option widget .SH SYNOPSIS \fBttk::radiobutton\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION \fBttk::radiobutton\fR widgets are used in groups to show or change a set of mutually-exclusive options. @@ -27,43 +25,41 @@ it sets the variable to its associated value. \-state \-style \-takefocus \-text \-textvariable \-underline \-width .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-command command Command A Tcl script to evaluate whenever the widget is invoked. .OP \-value Value Value -The value to store in the associated \fI-variable\fR +The value to store in the associated \fI\-variable\fR when the widget is selected. .OP \-variable variable Variable The name of a global variable whose value is linked to the widget. Default value is \fB::selectedButton\fR. - .SH "WIDGET COMMAND" In addition to the standard \fBcget\fR, \fBconfigure\fR, \fBinstate\fR, and \fBstate\fR commands, radiobuttons support the following additional widget commands: .TP -\fIpathname\fR invoke -Sets the \fI-variable\fR to the \fI-value\fR, selects the widget, -and evaluates the associated \fI-command\fR. -Returns the result of the \fI-command\fR, or the empty -string if no \fI-command\fR is specified. +\fIpathname\fB invoke\fR +Sets the \fB\-variable\fR to the \fB\-value\fR, selects the widget, +and evaluates the associated \fB\-command\fR. +Returns the result of the \fB\-command\fR, or the empty +string if no \fB\-command\fR is specified. .\" Missing: select, deselect. Useful? .\" Missing: flash. This is definitely not useful. - .SH "WIDGET STATES" The widget does not respond to user input if the \fBdisabled\fR state is set. The widget sets the \fBselected\fR state whenever -the linked \fB-variable\fR is set to the widget's \fB-value\fR, +the linked \fB\-variable\fR is set to the widget's \fB\-value\fR, and clears it otherwise. The widget sets the \fBalternate\fR state whenever the -linked \fB-variable\fR is unset. -(The \fBalternate\fR state may be used to indicate a ``tri-state'' -or ``indeterminate'' selection.) - +linked \fB\-variable\fR is unset. +(The \fBalternate\fR state may be used to indicate a +.QW tri-state +or +.QW indeterminate +selection.) .SH "SEE ALSO" -ttk_widget(n), ttk_checkbutton(n), radiobutton(n) - +ttk::widget(n), ttk::checkbutton(n), radiobutton(n) .SH "KEYWORDS" widget, button, option diff --git a/doc/ttk_scrollbar.n b/doc/ttk_scrollbar.n index 1eb81ae..76a77ba 100644 --- a/doc/ttk_scrollbar.n +++ b/doc/ttk_scrollbar.n @@ -6,18 +6,16 @@ '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" '\" SOURCE: tk/doc/scrollbar.n, r1.4 -'\" RCS: @(#) $Id: ttk_scrollbar.n,v 1.3.2.2 2007/10/27 04:23:15 dgp Exp $ +'\" RCS: @(#) $Id: ttk_scrollbar.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_scrollbar n 8.5 Tk "Tk Themed Widget" +.TH ttk::scrollbar n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_scrollbar \- Control the viewport of a scrollable widget +ttk::scrollbar \- Control the viewport of a scrollable widget .SH SYNOPSIS \fBttk::scrollbar\fR \fIpathName \fR?\fIoptions...\fR? .BE - .SH DESCRIPTION \fBttk::scrollbar\fR widgets are typically linked to an associated window that displays a document of some sort, such as a file being edited or a @@ -31,7 +29,6 @@ these are used to scroll the visible region in discrete units. .SO \-class \-cursor \-style \-takefocus .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-command command Command A Tcl script prefix to evaluate @@ -39,40 +36,40 @@ to change the view in the widget associated with the scrollbar. Additional arguments are appended to the value of this option, as described in \fBSCROLLING COMMANDS\fR below, whenever the user requests a view change by manipulating the scrollbar. -.br +.RS +.PP This option typically consists of a two-element list, containing the name of a scrollable widget followed by either \fBxview\fR (for horizontal scrollbars) or \fByview\fR (for vertical scrollbars). +.RE .OP \-orient orient Orient One of \fBhorizontal\fR or \fBvertical\fR. Specifies the orientation of the scrollbar. .BE - .SH "WIDGET COMMAND" .TP \fIpathName \fBcget\fR \fIoption\fR -Returns the current value of the specified \fIoption\fR; see \fIttk_widget(n)\fR. +Returns the current value of the specified \fIoption\fR; see \fIttk::widget(n)\fR. .TP \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR? -Modify or query widget options; see \fIttk_widget(n)\fR. +Modify or query widget options; see \fIttk::widget(n)\fR. .TP \fIpathName \fBget\fR Returns the scrollbar settings in the form of a list whose elements are the arguments to the most recent \fBset\fR widget command. .TP \fIpathName \fBinstate \fIstatespec\fR ?\fIscript\fR? -Test the widget state; see \fIttk_widget(n)\fR. +Test the widget state; see \fIttk::widget(n)\fR. .TP \fIpathName \fBset\fR \fIfirst last\fR This command is normally invoked by the scrollbar's associated widget -from an \fB-xscrollcommand\fR or \fB-yscrollcommand\fR callback. +from an \fB\-xscrollcommand\fR or \fB\-yscrollcommand\fR callback. Specifies the visible range to be displayed. \fIfirst\fR and \fIlast\fR are real fractions between 0 and 1. .TP \fIpathName \fBstate\fR ?\fIstateSpec\fR? -Modify or query the widget state; see \fIttk_widget(n)\fR. - +Modify or query the widget state; see \fIttk::widget(n)\fR. .SH "INTERNAL COMMANDS" The following widget commands are used internally by the TScrollbar widget class bindings. @@ -103,7 +100,6 @@ Returns the name of the element under the point given by \fIx\fR and \fIy\fR, or an empty string if the point does not lie in any element of the scrollbar. \fIX\fR and \fIy\fR are pixel coordinates relative to the scrollbar widget. - .SH "SCROLLING COMMANDS" When the user interacts with the scrollbar, for example by dragging the thumb, the scrollbar notifies the associated widget that it @@ -139,29 +135,25 @@ is a slight overlap between the old and new views. \fINumber\fR is either 1, which means the next page should become visible, or \-1, which means that the previous page should become visible. - .SH "WIDGET STATES" The scrollbar automatically sets the \fBdisabled\fR state bit. when the entire range is visible (range is 0.0 to 1.0), and clears it otherwise. It also sets the \fBactive\fR and \fBpressed\fR state flags of individual elements, based on the position and state of the mouse pointer. - .SH EXAMPLE .CS set f [frame .f] -ttk::scrollbar $f.hsb -orient horizontal -command [list $f.t xview] -ttk::scrollbar $f.vsb -orient vertical -command [list $f.t yview] -text $f.t -xscrollcommand [list $f.hsb set] -yscrollcommand [list $f.vsb set] -grid $f.t -row 0 -column 0 -sticky nsew -grid $f.vsb -row 0 -column 1 -sticky nsew -grid $f.hsb -row 1 -column 0 -sticky nsew -grid columnconfigure $f 0 -weight 1 -grid rowconfigure $f 0 -weight 1 +ttk::scrollbar $f.hsb \-orient horizontal \-command [list $f.t xview] +ttk::scrollbar $f.vsb \-orient vertical \-command [list $f.t yview] +text $f.t \-xscrollcommand [list $f.hsb set] \-yscrollcommand [list $f.vsb set] +grid $f.t \-row 0 \-column 0 \-sticky nsew +grid $f.vsb \-row 0 \-column 1 \-sticky nsew +grid $f.hsb \-row 1 \-column 0 \-sticky nsew +grid columnconfigure $f 0 \-weight 1 +grid rowconfigure $f 0 \-weight 1 .CE - .SH "SEE ALSO" -ttk_widget(n), scrollbar(n) - +ttk::widget(n), scrollbar(n) .SH KEYWORDS scrollbar, widget diff --git a/doc/ttk_separator.n b/doc/ttk_separator.n index 52d8ef3..aa1e5d1 100644 --- a/doc/ttk_separator.n +++ b/doc/ttk_separator.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_separator.n,v 1.3.2.2 2007/10/27 04:23:15 dgp Exp $ +'\" RCS: @(#) $Id: ttk_separator.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_separator n 8.5 Tk "Tk Themed Widget" +.TH ttk::separator n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_separator \- Separator bar +ttk::separator \- Separator bar .SH SYNOPSIS \fBttk::separator\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION A \fBttk::separator\fR widget displays a horizontal or vertical separator bar. @@ -23,19 +21,15 @@ bar. \-class \-cursor \-state \-style \-takefocus .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-orient orient Orient One of \fBhorizontal\fR or \fBvertical\fR. Specifies the orientation of the separator. - .SH "WIDGET COMMAND" Separator widgets support the standard \fBcget\fR, \fBconfigure\fR, \fBinstate\fR, and \fBstate\fR methods. No other widget methods are used. - .SH "SEE ALSO" -ttk_widget(n) - +ttk::widget(n) .SH "KEYWORDS" widget, separator diff --git a/doc/ttk_sizegrip.n b/doc/ttk_sizegrip.n index 1f1e5f0..ae0fb37 100644 --- a/doc/ttk_sizegrip.n +++ b/doc/ttk_sizegrip.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_sizegrip.n,v 1.3.2.4 2007/10/27 04:23:15 dgp Exp $ +'\" RCS: @(#) $Id: ttk_sizegrip.n,v 1.3.2.5 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_sizegrip n 8.5 Tk "Tk Themed Widget" +.TH ttk::sizegrip n 8.5 Tk "Tk Themed Widget" .BS -.\" Use _ instead of :: as the name becomes a filename on install .SH NAME -ttk_sizegrip \- Bottom-right corner resize widget +ttk::sizegrip \- Bottom-right corner resize widget .SH SYNOPSIS \fBttk::sizegrip\fR \fIpathName \fR?\fIoptions\fR? .BE - .SH DESCRIPTION A \fBttk::sizegrip\fR widget (also known as a \fIgrow box\fR) allows the user to resize the containing toplevel window @@ -24,41 +22,43 @@ by pressing and dragging the grip. \-class \-cursor \-state \-style \-takefocus .SE - .SH "WIDGET COMMAND" Sizegrip widgets support the standard \fBcget\fR, \fBconfigure\fR, \fBinstate\fR, and \fBstate\fR methods. No other widget methods are used. - .SH "PLATFORM-SPECIFIC NOTES" On Mac OSX, toplevel windows automatically include a built-in size grip by default. -Adding an \fBttk::sizegrip\fR there is harmless, since +Adding a \fBttk::sizegrip\fR there is harmless, since the built-in grip will just mask the widget. .SH EXAMPLES +.PP +Using pack: +.CS +pack [ttk::frame $top.statusbar] \-side bottom \-fill x +pack [\fBttk::sizegrip\fR $top.statusbar.grip] \-side right \-anchor se +.CE +.PP +Using grid: .CS -# Using pack: -pack [ttk::frame $top.statusbar] -side bottom -fill x -pack [ttk::sizegrip $top.statusbar.grip] -side right -anchor se - -# Using grid: -grid [ttk::sizegrip $top.statusbar.grip] \ - -row $lastRow -column $lastColumn -sticky se +grid [\fBttk::sizegrip\fR $top.statusbar.grip] \e + \-row $lastRow \-column $lastColumn \-sticky se # ... optional: add vertical scrollbar in $lastColumn, # ... optional: add horizontal scrollbar in $lastRow .CE - .SH "BUGS" If the containing toplevel's position was specified relative to the right or bottom of the screen -(e.g., \fB[wm geometry ... \fIw\fBx\fIh\fB-\fIx\fB-\fIy\fB]\fR -instead of \fB[wm geometry ... \fIw\fBx\fIh\fB+\fIx\fB+\fIy\fB]\fR), +(e.g., +.QW "\fBwm geometry ... \fIw\fBx\fIh\fB\-\fIx\fB\-\fIy\fR" +instead of +.QW "\fBwm geometry ... \fIw\fBx\fIh\fB+\fIx\fB+\fIy\fR" ), the sizegrip widget will not resize the window. .PP -ttk::sizegrip widgets only support "southeast" resizing. - +\fBttk::sizegrip\fR widgets only support +.QW southeast +resizing. .SH "SEE ALSO" -ttk_widget(n) - +ttk::widget(n) .SH "KEYWORDS" widget, sizegrip, grow box diff --git a/doc/ttk_style.n b/doc/ttk_style.n index 0bf7dcf..a5dd626 100644 --- a/doc/ttk_style.n +++ b/doc/ttk_style.n @@ -4,23 +4,21 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_style.n,v 1.3.2.2 2007/10/27 04:23:15 dgp Exp $ +'\" RCS: @(#) $Id: ttk_style.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_style n 8.5 Tk "Tk Themed Widget" +.TH ttk::style n 8.5 Tk "Tk Themed Widget" .BS .SH NAME -ttk_style \- Control overall look and feel of widgets +ttk::style \- Control overall look and feel of widgets .SH SYNOPSIS \fBttk::style\fR \fIoption\fR ?\fIargs\fR? .BE - .SH NOTES .PP This manpage has not been written yet. Please see the Tcl'2004 conference presentation, available at http://tktable.sourceforge.net/tile/tile-tcl2004.pdf - .SH DEFINITIONS .PP Each widget is assigned a \fIstyle\fR, @@ -28,34 +26,36 @@ which specifies the set of elements making up the widget and how they are arranged, along with dynamic and default settings for element resources. By default, the style name is the same as the widget's class; -this may be overridden by the \fB-style\fR option. +this may be overridden by the \fB\-style\fR option. .PP A \fItheme\fR is a collection of elements and styles which controls the overall look and feel of an application. .SH DESCRIPTION The \fBttk::style\fR command takes the following arguments: .TP -\fBttk::style configure \fIstyle\fR ?\fI-option \fR?\fIvalue option value...\fR? ? +\fBttk::style configure \fIstyle\fR ?\fI\-option\fR? ?\fIvalue option value...\fR? Sets the default value of the specified option(s) in \fIstyle\fR. .TP -\fBttk::style map \fIstyle\fR ?\fI-option\fR { \fIstatespec value\fR } ... ? +\fBttk::style map \fIstyle\fR ?\fI\-option\fB { \fIstatespec value\fB }\fR ... ? Sets dynamic values of the specified option(s) in \fIstyle\fR. Each \fIstatespec / value\fR pair is examined in order; the value corresponding to the first matching \fIstatespec\fR is used. .TP -\fBttk::style lookup \fIstyle\fR \fI-option \fR?\fIstate \fR?\fIdefault\fR?? -Returns the value specified for \fI-option\fR in style \fIstyle\fR +\fBttk::style lookup \fIstyle\fR \fI\-option \fR?\fIstate \fR?\fIdefault\fR?? +Returns the value specified for \fI\-option\fR in style \fIstyle\fR in state \fIstate\fR, using the standard lookup rules for element options. \fIstate\fR is a list of state names; if omitted, -it defaults to all bits off (the ``normal'' state). +it defaults to all bits off (the +.QW normal +state). If the \fIdefault\fR argument is present, it is used as a fallback -value in case no specification for \fI-option\fR is found. -.\" Otherwise -- signal error? return empty string? Leave unspecified for now. +value in case no specification for \fI\-option\fR is found. +.\" Otherwise -- signal error? return empty string? Leave unspecified for now. .TP \fBttk::style layout \fIstyle\fR ?\fIlayoutSpec\fR? Define the widget layout for style \fIstyle\fR. -See "\fBLAYOUTS\fR" below for the format of \fIlayoutSpec\fR. +See \fBLAYOUTS\fR below for the format of \fIlayoutSpec\fR. If \fIlayoutSpec\fR is omitted, return the layout specification for style \fIstyle\fR. .TP @@ -71,11 +71,11 @@ Returns the list of elements defined in the current theme. \fBttk::style element options \fIelement\fR Returns the list of \fIelement\fR's options. .TP -\fBttk::style theme create\fR \fIthemeName\fR ?\fB-parent \fIbasedon\fR? ?\fB-settings \fIscript...\fR ? +\fBttk::style theme create\fR \fIthemeName\fR ?\fB\-parent \fIbasedon\fR? ?\fB\-settings \fIscript...\fR ? Creates a new theme. It is an error if \fIthemeName\fR already exists. -If \fI-parent\fR is specified, the new theme will inherit -styles, elements, and layouts from the parent theme \fIbasedon\fB. -If \fI-settings\fR is present, \fIscript\fR is evaluated in the +If \fB\-parent\fR is specified, the new theme will inherit +styles, elements, and layouts from the parent theme \fIbasedon\fR. +If \fB\-settings\fR is present, \fIscript\fR is evaluated in the context of the new theme as per \fBttk::style theme settings\fR. .TP \fBttk::style theme settings \fIthemeName\fR \fIscript\fR @@ -89,7 +89,6 @@ Returns a list of the available themes. .TP \fBttk::style theme use\fR \fIthemeName\fR Sets the current theme to \fIthemeName\fR, and refreshes all widgets. - .SH LAYOUTS A \fIlayout\fR specifies a list of elements, each followed by one or more options specifying how to arrange the element. @@ -98,31 +97,29 @@ geometry manager: given an initial cavity, each element is allocated a parcel. Valid options are: .TP -\fB-side \fIside\fR +\fB\-side \fIside\fR Specifies which side of the cavity to place the element; one of \fBleft\fR, \fBright\fR, \fBtop\fR, or \fBbottom\fR. If omitted, the element occupies the entire cavity. .TP -\fB-sticky \fI[nswe]\fR +\fB\-sticky [\fInswe\fB]\fR Specifies where the element is placed inside its allocated parcel. .TP -\fB-children \fI{ sublayout... }\fR +\fB\-children {\fIsublayout... \fB}\fR Specifies a list of elements to place inside the element. .\" Also: -border, -unit, -expand: may go away. .PP For example: .CS ttk::style layout Horizontal.TScrollbar { - Scrollbar.trough -children { - Scrollbar.leftarrow -side left - Scrollbar.rightarrow -side right - Horizontal.Scrollbar.thumb -side left -sticky ew + Scrollbar.trough \-children { + Scrollbar.leftarrow \-side left + Scrollbar.rightarrow \-side right + Horizontal.Scrollbar.thumb \-side left \-sticky ew } } .CE - .SH "SEE ALSO" -ttk_intro(n), ttk_widget(n), photo(n) - +ttk::intro(n), ttk::widget(n), photo(n) .SH KEYWORDS style, theme, appearance diff --git a/doc/ttk_treeview.n b/doc/ttk_treeview.n index e31199c..be324a4 100644 --- a/doc/ttk_treeview.n +++ b/doc/ttk_treeview.n @@ -4,17 +4,15 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_treeview.n,v 1.5.2.2 2007/10/27 04:23:15 dgp Exp $ +'\" RCS: @(#) $Id: ttk_treeview.n,v 1.5.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_treeview n 8.5 Tk "Tk Themed Widget" -.\" Use _ instead of :: as the name becomes a filename on install +.TH ttk::treeview n 8.5 Tk "Tk Themed Widget" .SH NAME -ttk_treeview \- hierarchical multicolumn data display widget +ttk::treeview \- hierarchical multicolumn data display widget .SH SYNOPSIS \fBttk::treeview\fR \fIpathname \fR?\fIoptions\fR? .BE - .SH DESCRIPTION The \fBttk::treeview\fR widget displays a hierarchical collection of items. Each item has a textual label, an optional image, @@ -23,10 +21,10 @@ The data values are displayed in successive columns after the tree label. .PP The order in which data values are displayed may be controlled -by setting the \fB-displaycolumns\fR widget option. +by setting the \fB\-displaycolumns\fR widget option. The tree widget can also display column headings. Columns may be accessed by number or by symbolic names -listed in the \fB-columns\fR widget option; +listed in the \fB\-columns\fR widget option; see \fBCOLUMN IDENTIFIERS\fR. .PP Each item is identified by a unique name. @@ -42,13 +40,12 @@ and control the appearance of the item. .\" @@@HERE: describe selection, focus item .PP Treeview widgets support horizontal and vertical scrolling with the -standard \fB-[xy]scrollcommand\fR options -and \fB[xyview\fR widget commands. +standard \fB\-\fR[\fBxy\fR]\fBscrollcommand\fR options +and [\fBxy\fR]\fBview\fR widget commands. .SO \-class \-cursor \-takefocus \-style \-xscrollcommand \-yscrollcommand .SE - .SH "WIDGET-SPECIFIC OPTIONS" .OP \-columns columns Columns A list of column identifiers, @@ -60,8 +57,11 @@ A list of column identifiers specifying which data columns are displayed and the order in which they appear, or the string \fB#all\fP. -.br -If set to \fB#all\fP (the default), all columns are shown in the order given. +.RS +.PP +If set to \fB#all\fP (the default), all columns are shown in the order +given. +.RE .OP \-height height Height Specifies the number of rows which should be visible. Note: @@ -73,13 +73,15 @@ see \fBTtk_GetPaddingFromObj()\fR for details. .OP \-selectmode selectMode SelectMode Controls how the built-in class bindings manage the selection. One of \fBextended\fR, \fBbrowse\fR, or \fBnone\fR. -.br +.RS +.PP If set to \fBextended\fR (the default), multiple items may be selected. If \fBbrowse\fR, only a single item will be selected at a time. If \fBnone\fR, the selection will not be changed. -.br +.PP Note that application code and tag bindings can set the selection -however they wish, regardless of the value of \fB-selectmode\fR. +however they wish, regardless of the value of \fB\-selectmode\fR. +.RE .OP \-show show Show A list containing zero or more of the following values, specifying which elements of the tree to display. @@ -92,9 +94,8 @@ Display the heading row. The default is \fBtree headings\fR, i.e., show all elements. .PP \fBNOTE:\fR Column #0 always refers to the tree column, -even if \fB-show tree\fR is not specified. +even if \fB\-show tree\fR is not specified. .RE - .SH "WIDGET COMMAND" .TP \fIpathname \fBbbox\fR \fIitem\fR ?\fIcolumn\fR? @@ -107,51 +108,54 @@ If the \fIitem\fR is not visible returns the empty list. .TP \fIpathname \fBcget\fR \fIoption\fR -Returns the current value of the specified \fIoption\fR; see \fIttk_widget(n)\fR. +Returns the current value of the specified \fIoption\fR; see \fIttk::widget(n)\fR. .TP \fIpathname \fBchildren\fR \fIitem\fR ?\fInewchildren\fR? If \fInewchildren\fR is not specified, returns the list of children belonging to \fIitem\fR. -.br +.RS +.PP If \fInewchildren\fR is specified, replaces \fIitem\fR's child list with \fInewchildren\fR. Items in the old child list not present in the new child list are detached from the tree. None of the items in \fInewchildren\fR may be an ancestor of \fIitem\fR. +.RE .TP -\fIpathname \fBcolumn\fR \fIcolumn\fR ?\fI-option \fR?\fIvalue -option value...\fR? +\fIpathname \fBcolumn\fR \fIcolumn\fR ?\fI\-option \fR?\fIvalue \-option value...\fR? Query or modify the options for the specified \fIcolumn\fR. -If no \fI-option\fR is specified, +If no \fI\-option\fR is specified, returns a dictionary of option/value pairs. -If a single \fI-option\fR is specified, +If a single \fI\-option\fR is specified, returns the value of that option. Otherwise, the options are updated with the specified values. The following options may be set on each column: .RS .TP -\fB-id \fIname\fR +\fB\-id \fIname\fR The column name. This is a read-only option. -For example, [\fI$pathname \fBcolumn #\fIn \fB-id\fR] +For example, +.QW \fI$pathname \fBcolumn #\fIn \fB\-id\fR] returns the data column associated with data column #\fIn\fR. .TP -\fB-anchor\fR +\fB\-anchor\fR Specifies how the text in this column should be aligned with respect to the cell. One of \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR. .TP -\fB-minwidth\fR +\fB\-minwidth\fR The minimum width of the column in pixels. The treeview widget will not make the column any smaller than -\fB-minwidth\fR when the widget is resized or the user drags a +\fB\-minwidth\fR when the widget is resized or the user drags a column separator. .TP -\fB-stretch\fR +\fB\-stretch\fR Specifies whether or not the column's width should be adjusted when the widget is resized. .TP -\fB-width \fIw\fR +\fB\-width \fIw\fR The width of the column in pixels. Default is something reasonable, probably 200 or so. .PP @@ -159,7 +163,7 @@ Use \fIpathname column #0\fR to configure the tree column. .RE .TP \fIpathname \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR? -Modify or query widget options; see \fIttk_widget(n)\fR. +Modify or query widget options; see \fIttk::widget(n)\fR. .TP \fIpathname \fBdelete\fR \fIitemList\fR Deletes each of the items in \fIitemList\fR and all of their descendants. @@ -183,22 +187,22 @@ If \fIitem\fR is specified, sets the focus item to \fIitem\fR. Otherwise, returns the current focus item, or \fB{}\fR if there is none. .\" Need: way to clear the focus item. {} works for this... .TP -\fIpathname \fBheading\fR \fIcolumn\fR ?\fI-option \fR?\fIvalue -option value...\fR? +\fIpathname \fBheading\fR \fIcolumn\fR ?\fI\-option \fR?\fIvalue \-option value...\fR? Query or modify the heading options for the specified \fIcolumn\fR. Valid options are: .RS .TP -\fB-text \fItext\fR +\fB\-text \fItext\fR The text to display in the column heading. .TP -\fB-image \fIimageName\fR +\fB\-image \fIimageName\fR Specifies an image to display to the right of the column heading. .TP -\fB-anchor \fIanchor\fR +\fB\-anchor \fIanchor\fR Specifies how the heading text should be aligned. One of the standard Tk anchor values. .TP -\fB-command \fIscript\fR +\fB\-command \fIscript\fR A script to evaluate when the heading label is pressed. .PP Use \fIpathname heading #0\fR to configure the tree column heading. @@ -225,7 +229,7 @@ and data columns. \fIpathname \fBindex \fIitem\fR Returns the integer index of \fIitem\fR within its parent's list of children. .TP -\fIpathname \fBinsert\fR \fIparent\fR \fIindex\fR ?\fB-id \fIid\fR? \fIoptions...\fR +\fIpathname \fBinsert\fR \fIparent\fR \fIindex\fR ?\fB\-id \fIid\fR? \fIoptions...\fR Creates a new item. \fIparent\fR is the item ID of the parent item, or the empty string \fB{}\fR @@ -236,22 +240,24 @@ If \fIindex\fR is less than or equal to zero, the new node is inserted at the beginning; if \fIindex\fR is greater than or equal to the current number of children, it is inserted at the end. -If \fB-id\fR is specified, it is used as the item identifier; +If \fB\-id\fR is specified, it is used as the item identifier; \fIid\fR must not already exist in the tree. Otherwise, a new unique identifier is generated. -.br +.RS +.PP \fIpathname \fBinsert\fR returns the item identifier of the newly created item. See \fBITEM OPTIONS\fR for the list of available options. +.RE .TP \fIpathname \fBinstate \fIstatespec\fR ?\fIscript\fR? -Test the widget state; see \fIttk_widget(n)\fR. +Test the widget state; see \fIttk::widget(n)\fR. .TP -\fIpathname \fBitem\fR \fIitem\fR ?\fI-option \fR?\fIvalue -option value...\fR? +\fIpathname \fBitem\fR \fIitem\fR ?\fI\-option \fR?\fIvalue \-option value...\fR? Query or modify the options for the specified \fIitem\fR. -If no \fI-option\fR is specified, +If no \fI\-option\fR is specified, returns a dictionary of option/value pairs. -If a single \fI-option\fR is specified, +If a single \fI\-option\fR is specified, returns the value of that option. Otherwise, the item's options are updated with the specified values. See \fBITEM OPTIONS\fR for the list of available options. @@ -259,10 +265,12 @@ See \fBITEM OPTIONS\fR for the list of available options. \fIpathname \fBmove \fIitem parent index\fR Moves \fIitem\fR to position \fIindex\fR in \fIparent\fR's list of children. It is illegal to move an item under one of its descendants. -.br +.RS +.PP If \fIindex\fR is less than or equal to zero, \fIitem\fR is moved to the beginning; if greater than or equal to the number of children, -it's moved to the end. +it is moved to the end. +.RE .TP \fIpathname \fBnext \fIitem\fR Returns the identifier of \fIitem\fR's next sibling, @@ -278,7 +286,7 @@ or \fB{}\fR if \fIitem\fR is the first child of its parent. .TP \fIpathname \fBsee\fR \fIitem\fR Ensure that \fIitem\fR is visible: -sets all of \fIitem\fR's ancestors to \fB-open true\fR, +sets all of \fIitem\fR's ancestors to \fB\-open true\fR, and scrolls the widget if necessary so that \fIitem\fR is within the visible portion of the tree. .TP @@ -300,7 +308,7 @@ Remove \fIitemList\fR from the selection Toggle the selection state of each item in \fIitemList\fR. .RE .TP -\fIpathname \fBset\fR \fIitem\fR ?\fIcolumn\fR ?\fIvalue\fR?? +\fIpathname \fBset\fR \fIitem\fR ?\fIcolumn\fR? ?\fIvalue\fR? With one argument, returns a dictionary of column/value pairs for the specified \fIitem\fR. With two arguments, returns the current value of the specified \fIcolumn\fR. @@ -309,25 +317,27 @@ in item \fIitem\fR to the specified \fIvalue\fR. See also \fBCOLUMN IDENTIFIERS\fR. .TP \fIpathname \fBstate\fR ?\fIstateSpec\fR? -Modify or query the widget state; see \fIttk_widget(n)\fR. +Modify or query the widget state; see \fIttk::widget(n)\fR. .TP \fIpathName \fBtag \fIargs...\fR .RS .TP -\fIpathName \fBtag bind \fItagName \fR?\fIsequence \fR?\fIscript\fR?? +\fIpathName \fBtag bind \fItagName \fR?\fIsequence\fR? ?\fIscript\fR? Add a Tk binding script for the event sequence \fIsequence\fR to the tag \fItagName\fR. When an X event is delivered to an item, -binding scripts for each of the item's \fB-tags\fR are evaluated +binding scripts for each of the item's \fB\-tags\fR are evaluated in order as per \fIbindtags(n)\fR. -.br +.RS +.PP \fB<KeyPress>\fR, \fB<KeyRelease>\fR, and virtual events are sent to the focus item. \fB<ButtonPress>\fR, \fB<ButtonRelease>\fR, and \fB<Motion>\fR events are sent to the item under the mouse pointer. No other event types are supported. -.br +.PP The binding \fIscript\fR undergoes \fB%\fR-substitutions before evaluation; see \fBbind(n)\fR for details. +.RE .TP \fIpathName \fBtag configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR? Query or modify the options for the specified \fItagName\fR. @@ -345,9 +355,7 @@ See \fBTAG OPTIONS\fR for the list of available options. Standard command for horizontal scrolling; see \fIwidget(n)\fR. .TP \fIpathName \fByview \fIargs\fR -Standard command for vertical scrolling; see \fIttk_widget(n)\fR. - -.PP +Standard command for vertical scrolling; see \fIttk::widget(n)\fR. .SH "ITEM OPTIONS" The following item options may be specified for items in the \fBinsert\fR and \fBitem\fR widget commands. @@ -357,38 +365,39 @@ The textual label to display for the item. A Tk image, displayed to the left of the label. .OP \-values values Values The list of values associated with the item. -.br +.RS +.PP Each item should have the same number of values as -the \fB-columns\fR widget option. +the \fB\-columns\fR widget option. If there are fewer values than columns, the remaining values are assumed empty. If there are more values than columns, the extra values are ignored. +.RE .OP \-open open Open A boolean value indicating whether the item's children -should be displayed (\fB-open true\fR) or hidden (\fB-open false\fR). +should be displayed (\fB\-open true\fR) or hidden (\fB\-open false\fR). .OP \-tags tags Tags A list of tags associated with this item. .SH "TAG OPTIONS" The following options may be specified on tags: -.IP \-foreground +.IP \fB\-foreground\fR Specifies the text foreground color. -.IP \-background +.IP \fB\-background\fR Specifies the cell or item background color. -.IP \-font +.IP \fB\-font\fR Specifies the font to use when drawing text. .\" ??? Maybe: .IP \-anchor .\" ??? Maybe: .IP \-padding .\" ??? Maybe: .IP \-text -.IP \-image -Specifies the item image, in case the item's \fB-image\fR option is empty. +.IP \fB\-image\fR +Specifies the item image, in case the item's \fB\-image\fR option is empty. .PP \fI(@@@ TODO: sort out order of precedence for options)\fR - .SH "COLUMN IDENTIFIERS" Column identifiers take any of the following forms: .IP \(bu -A symbolic name from the list of \fB-columns\fR. +A symbolic name from the list of \fB\-columns\fR. .IP \(bu An integer \fIn\fR, specifying the \fIn\fRth data column. .IP \(bu @@ -396,17 +405,17 @@ A string of the form \fB#\fIn\fR, where \fIn\fR is an integer, specifying the \fIn\fRth display column. .PP \fBNOTE:\fR -Item \fB-values\fR may be displayed in a different order than +Item \fB\-values\fR may be displayed in a different order than the order in which they are stored. .PP \fBNOTE:\fR Column #0 always refers to the tree column, -even if \fB-show tree\fR is not specified. +even if \fB\-show tree\fR is not specified. .PP -A \fIdata column number\fR is an index into an item's \fB-values\fR list; +A \fIdata column number\fR is an index into an item's \fB\-values\fR list; a \fIdisplay column number\fR is the column number in the tree where the values are displayed. Tree labels are displayed in column #0. -If \fB-displaycolumns\fR is not set, +If \fB\-displaycolumns\fR is not set, then data column \fIn\fR is displayed in display column \fB#\fIn+1\fR. Again, \fBcolumn #0 always refers to the tree column\fR. .SH "VIRTUAL EVENTS" @@ -414,14 +423,13 @@ The treeview widget generates the following virtual events. .IP <<TreeviewSelect>> Generated whenever the selection changes. .IP <<TreeviewOpen>> -Generated just before setting the focus item to \fB-open true\fR. +Generated just before setting the focus item to \fB\-open true\fR. .IP <<TreeviewClose>> -Generated just after setting the focus item to \fB-open false\fR. +Generated just after setting the focus item to \fB\-open false\fR. .PP The \fBfocus\fR and \fBselection\fR widget commands can be used to determine the affected item or items. -In Tk 8.5, the affected item is also passed as the \fB-detail\fR field +In Tk 8.5, the affected item is also passed as the \fB\-detail\fR field of the virtual event. - .SH "SEE ALSO" -ttk_widget(n), listbox(n), image(n), bind(n) +ttk::widget(n), listbox(n), image(n), bind(n) diff --git a/doc/ttk_widget.n b/doc/ttk_widget.n index 3d93e74..ffc5979 100644 --- a/doc/ttk_widget.n +++ b/doc/ttk_widget.n @@ -4,18 +4,16 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_widget.n,v 1.3.2.2 2007/10/27 04:23:15 dgp Exp $ +'\" RCS: @(#) $Id: ttk_widget.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros -.TH ttk_widget n 8.5 Tk "Tk Themed Widget" +.TH ttk::widget n 8.5 Tk "Tk Themed Widget" .BS .SH NAME -ttk_widget \- Standard options and commands supported by Tk themed widgets +ttk::widget \- Standard options and commands supported by Tk themed widgets .BE - .SH DESCRIPTION This manual describes common widget options and commands. - .SH "STANDARD OPTIONS" The following options are supported by all Tk themed widgets: .OP \-class undefined undefined @@ -41,7 +39,6 @@ or the empty string. See \fIoptions(n)\fR in the Tk reference manual for the full description. .OP \-style style Style May be used to specify a custom widget style. - .SH "SCROLLABLE WIDGET OPTIONS" .PP The following options are supported by widgets that @@ -49,7 +46,8 @@ are controllable by a scrollbar. See \fIscrollbar(n)\fR for more information .OP \-xscrollcommand xScrollCommand ScrollCommand A command prefix, used to communicate with horizontal scrollbars. -.br +.RS +.PP When the view in the widget's window changes, the widget will generate a Tcl command by concatenating the scroll command and two numbers. @@ -59,27 +57,30 @@ and 1 indicates the end. The first fraction indicates the first information in the widget that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. -.br +.PP Typically the \fBxScrollCommand\fR option consists of the path name -of a \fBscrollbar\fR widget followed by ``set'', e.g. ``.x.scrollbar set''. +of a \fBscrollbar\fR widget followed by +.QW set , +e.g. +.QW ".x.scrollbar set" . This will cause the scrollbar to be updated whenever the view in the window changes. -.br +.PP If this option is set to the empty string (the default), then no command is be executed. +.RE .OP \-yscrollcommand yScrollCommand ScrollCommand A command prefix, used to communicate with vertical scrollbars. -See the description of \fB-xscrollcommand\fR above for details. - +See the description of \fB\-xscrollcommand\fR above for details. .SH "LABEL OPTIONS" The following options are supported by labels, buttons, and other button-like widgets: .OP \-text text Text Specifies a text string to be displayed inside the widget -(unless overridden by \fB-textvariable\fR). +(unless overridden by \fB\-textvariable\fR). .OP \-textvariable textVariable Variable Specifies the name of variable whose value will be used -in place of the \fB-text\fR resource. +in place of the \fB\-text\fR resource. .OP \-underline underline Underline If set, specifies the integer index (0-based) of a character to underline in the text string. @@ -94,7 +95,7 @@ the widget is in a particular state or combination of states. All images in the list should have the same size. .OP \-compound compound Compound Specifies how to display the image relative to the text, -in the case both \fB-text\fR and \fB-image\fR are present. +in the case both \fB\-text\fR and \fB\-image\fR are present. Valid values are: .RS .IP text @@ -116,15 +117,14 @@ If greater than zero, specifies how much space, in character widths, to allocate for the text label. If less than zero, specifies a minimum width. If zero or unspecified, the natural width of the text label is used. - .SH "COMPATIBILITY OPTIONS" .OP \-state state State May be set to \fBnormal\fR or \fBdisabled\fR to control the \fBdisabled\fR state bit. -This is a ``write-only'' option: setting it changes the -widget state, but the \fBstate\fR widget command does -not affect the state option. - +This is a +.QW write-only +option: setting it changes the widget state, but the \fBstate\fR +widget command does not affect the state option. .SH COMMANDS .TP \fIpathName \fBcget\fR \fIoption\fR @@ -174,24 +174,37 @@ Widget state flags include: .TP \fBactive\fR The mouse cursor is over the widget -and pressing a mouse button will cause some action to occur. -(aka "prelight" (Gnome), "hot" (Windows), "hover"). +and pressing a mouse button will cause some action to occur. (aka +.QW prelight +(Gnome), +.QW hot +(Windows), +.QW hover ). .TP \fBdisabled\fR -Widget is disabled under program control -(aka "unavailable", "inactive") +Widget is disabled under program control (aka +.QW unavailable , +.QW inactive ) .TP \fBfocus\fR Widget has keyboard focus .TP \fBpressed\fR -Widget is being pressed (aka "armed" in Motif). +Widget is being pressed (aka +.QW armed +in Motif). .TP \fBselected\fR -"On", "true", or "current" for things like checkbuttons and radiobuttons. +.QW On , +.QW true , +or +.QW current +for things like checkbuttons and radiobuttons. .TP \fBbackground\fR -Windows and the Mac have a notion of an "active" or foreground window. +Windows and the Mac have a notion of an +.QW active +or foreground window. The \fBbackground\fR state is set for widgets in a background window, and cleared for those in the foreground window. .TP @@ -200,9 +213,11 @@ Widget should not allow user modification. .TP \fBalternate\fR A widget-specific alternate display format. -For example, used for checkbuttons and radiobuttons -in the "tristate" or "mixed" state, -and for buttons with \fB-default active\fR. +For example, used for checkbuttons and radiobuttons in the +.QW tristate +or +.QW mixed +state, and for buttons with \fB\-default active\fR. .TP \fBinvalid\fR The widget's value is invalid. @@ -212,23 +227,20 @@ entry widget value failed validation.) A \fIstate specification\fR or \fIstateSpec\fR is a list of state names, optionally prefixed with an exclamation point (!) indicating that the bit is off. - .SH EXAMPLES .CS set b [ttk::button .b] # Disable the widget: -$b state disabled +$b state disabled # Invoke the widget only if it is currently pressed and enabled: -$b instate {pressed !disabled} { .b invoke } +$b instate {pressed !disabled} { .b invoke } # Reenable widget: -$b state !disabled +$b state !disabled .CE - .SH "SEE ALSO" -ttk_intro(n), style(n) - +ttk::intro(n), style(n) .SH KEYWORDS state, configure, option diff --git a/doc/winfo.n b/doc/winfo.n index 43bb69c..267926f 100644 --- a/doc/winfo.n +++ b/doc/winfo.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: winfo.n,v 1.8 2005/04/06 21:11:54 dkf Exp $ +'\" RCS: @(#) $Id: winfo.n,v 1.8.2.1 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH winfo n 4.3 Tk "Tk Built-In Commands" @@ -57,9 +57,11 @@ Returns the class name for \fIwindow\fR. .TP \fBwinfo colormapfull \fIwindow\fR Returns 1 if the colormap for \fIwindow\fR is known to be full, 0 -otherwise. The colormap for a window is ``known'' to be full if the last +otherwise. The colormap for a window is +.QW known +to be full if the last attempt to allocate a new color on that window failed and this -application hasn't freed any colors in the colormap since the +application has not freed any colors in the colormap since the failed allocation. .TP \fBwinfo containing \fR?\fB\-displayof \fIwindow\fR? \fIrootX rootY\fR @@ -90,7 +92,10 @@ window exists. Returns a floating-point value giving the number of pixels in \fIwindow\fR corresponding to the distance given by \fInumber\fR. \fINumber\fR may be specified in any of the forms acceptable -to \fBTk_GetScreenMM\fR, such as ``2.0c'' or ``1i''. +to \fBTk_GetScreenMM\fR, such as +.QW 2.0c +or +.QW 1i . The return value may be fractional; for an integer value, use \fBwinfo pixels\fR. .TP @@ -128,7 +133,7 @@ Returns \fB1\fR if \fIwindow\fR is currently mapped, \fB0\fR otherwise. \fBwinfo manager \fIwindow\fR Returns the name of the geometry manager currently responsible for \fIwindow\fR, or an empty string if \fIwindow\fR -isn't managed by any geometry manager. +is not managed by any geometry manager. The name is usually the name of the Tcl command for the geometry manager, such as \fBpack\fR or \fBplace\fR. If the geometry manager is a widget, such as canvases or text, the @@ -155,7 +160,10 @@ the display of the application's main window. Returns the number of pixels in \fIwindow\fR corresponding to the distance given by \fInumber\fR. \fINumber\fR may be specified in any of the forms acceptable -to \fBTk_GetPixels\fR, such as ``2.0c'' or ``1i''. +to \fBTk_GetPixels\fR, such as +.QW 2.0c +or +.QW 1i . The result is rounded to the nearest integer value; for a fractional result, use \fBwinfo fpixels\fR. .TP @@ -164,7 +172,7 @@ If the mouse pointer is on the same screen as \fIwindow\fR, returns the pointer's x coordinate, measured in pixels in the screen's root window. If a virtual root window is in use on the screen, the position is measured in the virtual root. -If the mouse pointer isn't on the same screen as \fIwindow\fR then +If the mouse pointer is not on the same screen as \fIwindow\fR then -1 is returned. .TP \fBwinfo pointerxy \fIwindow\fR @@ -173,15 +181,15 @@ with two elements, which are the pointer's x and y coordinates measured in pixels in the screen's root window. If a virtual root window is in use on the screen, the position is computed in the virtual root. -If the mouse pointer isn't on the same screen as \fIwindow\fR then -both of the returned coordinates are -1. +If the mouse pointer is not on the same screen as \fIwindow\fR then +both of the returned coordinates are \-1. .TP \fBwinfo pointery \fIwindow\fR If the mouse pointer is on the same screen as \fIwindow\fR, returns the pointer's y coordinate, measured in pixels in the screen's root window. If a virtual root window is in use on the screen, the position is computed in the virtual root. -If the mouse pointer isn't on the same screen as \fIwindow\fR then +If the mouse pointer is not on the same screen as \fIwindow\fR then -1 is returned. .TP \fBwinfo reqheight \fIwindow\fR @@ -252,7 +260,8 @@ in pixels. Returns a string containing information about the server for \fIwindow\fR's display. The exact format of this string may vary from platform to platform. For X servers the string -has the form ``\fBX\fImajor\fBR\fIminor vendor vendorVersion\fR'' +has the form +.QW "\fBX\fImajor\fBR\fIminor vendor vendorVersion\fR" where \fImajor\fR and \fIminor\fR are the version and revision numbers provided by the server (e.g., \fBX11R5\fR), \fIvendor\fR is the name of the vendor for the server, and \fIvendorRelease\fR @@ -331,7 +340,7 @@ has no border). Print where the mouse pointer is and what window it is currently over: .CS lassign [\fBwinfo pointerxy\fR .] x y -puts -nonewline "Mouse pointer at ($x,$y) which is " +puts \-nonewline "Mouse pointer at ($x,$y) which is " set win [\fBwinfo containing\fR $x $y] if {$win eq ""} { puts "over no window" @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: wish.1,v 1.5 2004/09/09 12:17:11 dkf Exp $ +'\" RCS: @(#) $Id: wish.1,v 1.5.2.1 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH wish 1 8.0 Tk "Tk Applications" @@ -14,7 +14,7 @@ .SH NAME wish \- Simple windowing shell .SH SYNOPSIS -\fBwish\fR ?-encoding \fIname\fR? ?\fIfileName arg arg ...\fR? +\fBwish\fR ?\fB\-encoding \fIname\fR? ?\fIfileName arg arg ...\fR? .SH OPTIONS .IP "\fB\-encoding \fIname\fR" 20 .VS 8.5 @@ -58,7 +58,6 @@ variable without interpreting them. This provides a mechanism for passing arguments such as \fB\-name\fR to a script instead of having \fBwish\fR interpret them. .BE - .SH DESCRIPTION .PP \fBWish\fR is a simple program consisting of the Tcl command @@ -66,19 +65,21 @@ language, the Tk toolkit, and a main program that reads commands from standard input or from a file. It creates a main window and then processes Tcl commands. If \fBwish\fR is invoked with arguments, then the first few -arguments, ?\fB-encoding \fIname\fR? ?\fIfileName\fR? specify the +arguments, ?\fB\-encoding \fIname\fR? ?\fIfileName\fR? specify the name of a script file, and, optionally, the encoding of the text data stored in that script file. A value for \fIfileName\fR is recognized if the appropriate argument -does not start with ``\-''. +does not start with +.QW \- . .PP If there are no arguments, or the arguments do not specify a \fIfileName\fR, then wish reads Tcl commands interactively from standard input. It will continue processing commands until all windows have been deleted or until end-of-file is reached on standard input. -If there exists a file \fB.wishrc\fR in the home directory of -the user, \fBwish\fR evaluates the file as a Tcl script -just before reading the first command from standard input. +If there exists a file +.QW \fB.wishrc\fR +in the home directory of the user, \fBwish\fR evaluates the file as a +Tcl script just before reading the first command from standard input. .PP If arguments to \fBwish\fR do specify a \fIfileName\fR, then \fIfileName\fR is treated as the name of a script file. @@ -86,25 +87,31 @@ If arguments to \fBwish\fR do specify a \fIfileName\fR, then presumably creates a user interface), then it will respond to events until all windows have been deleted. Commands will not be read from standard input. -There is no automatic evaluation of \fB.wishrc\fR when the name -of a script file is presented on the \fBwish\fR command line, +There is no automatic evaluation of +.QW \fB.wishrc\fR +when the name of a script file is presented on the \fBwish\fR command line, but the script file can always \fBsource\fR it if desired. - -.SH "OPTIONS" +.PP +Note that on Windows, the \fBwish\fIversion\fB.exe\fR program varies +from the \fBtclsh\fIversion\fB.exe\fR program in an additional +important way: it does not connect to a standard Windows console and +is instead a windowed program. Because of this, it additionally +provides access to its own \fBconsole\fR command. +.SH "OPTION PROCESSING" .PP \fBWish\fR automatically processes all of the command-line options described in the \fBOPTIONS\fR summary above. Any other command-line arguments besides these are passed through to the application using the \fBargc\fR and \fBargv\fR variables described later. - .SH "APPLICATION NAME AND CLASS" .PP The name of the application, which is used for purposes such as \fBsend\fR commands, is taken from the \fB\-name\fR option, if it is specified; otherwise it is taken from \fIfileName\fR, if it is specified, or from the command name by which -\fBwish\fR was invoked. In the last two cases, if the name contains a ``/'' +\fBwish\fR was invoked. In the last two cases, if the name contains a +.QW / character, then only the characters after the last slash are used as the application name. .PP @@ -112,7 +119,6 @@ The class of the application, which is used for purposes such as specifying options with a \fBRESOURCE_MANAGER\fR property or .Xdefaults file, is the same as its name except that the first letter is capitalized. - .SH "VARIABLES" .PP \fBWish\fR sets the following Tcl variables: @@ -123,8 +129,8 @@ not including the options described above. .TP 15 \fBargv\fR Contains a Tcl list whose elements are the \fIarg\fR arguments -that follow a \fB\-\|\-\fR option or don't match any of the -options described in OPTIONS above, in order, or an empty string +that follow a \fB\-\|\-\fR option or do not match any of the +options described in \fBOPTIONS\fR above, in order, or an empty string if there are no such arguments. .TP 15 \fBargv0\fR @@ -142,7 +148,6 @@ window's geometry. Contains 1 if \fBwish\fR is reading commands interactively (\fIfileName\fR was not specified and standard input is a terminal-like device), 0 otherwise. - .SH "SCRIPT FILES" .PP If you create a Tcl script in a file whose first line is @@ -152,8 +157,8 @@ If you create a Tcl script in a file whose first line is then you can invoke the script file directly from your shell if you mark it as executable. This assumes that \fBwish\fR has been installed in the default -location in /usr/local/bin; if it's installed somewhere else -then you'll have to modify the above line to match. +location in /usr/local/bin; if it is installed somewhere else +then you will have to modify the above line to match. Many UNIX systems do not allow the \fB#!\fR line to exceed about 30 characters in length, so be sure that the \fBwish\fR executable can be accessed with a short file name. @@ -166,7 +171,7 @@ following three lines: exec wish "$0" "$@"\fR .CE This approach has three advantages over the approach in the previous -paragraph. First, the location of the \fBwish\fR binary doesn't have +paragraph. First, the location of the \fBwish\fR binary does not have to be hard-wired into the script: it can be anywhere in your shell search path. Second, it gets around the 30-character file name limit in the previous approach. @@ -185,24 +190,30 @@ since the backslash at the end of the second line causes the third line to be treated as part of the comment on the second line. .PP The end of a script file may be marked either by the physical end of -the medium, or by the character, '\\032' ('\\u001a', control-Z). +the medium, or by the character, +.QW \e032 +.PQ \eu001a ", control-Z" . If this character is present in the file, the \fBwish\fR application will read text up to but not including the character. An application that requires this character in the file may encode it as -``\\032'', ``\\x1a'', or ``\\u001a''; or may generate it by use of commands -such as \fBformat\fR or \fBbinary\fR. +.QW \e032 , +.QW \ex1a , +or +.QW \eu001a ; +or may generate it by use of commands such as \fBformat\fR or \fBbinary\fR. .SH PROMPTS .PP When \fBwish\fR is invoked interactively it normally prompts for each -command with ``\fB% \fR''. You can change the prompt by setting the +command with +.QW "\fB% \fR" . +You can change the prompt by setting the variables \fBtcl_prompt1\fR and \fBtcl_prompt2\fR. If variable \fBtcl_prompt1\fR exists then it must consist of a Tcl script to output a prompt; instead of outputting a prompt \fBwish\fR will evaluate the script in \fBtcl_prompt1\fR. The variable \fBtcl_prompt2\fR is used in a similar way when -a newline is typed but the current command isn't yet complete; -if \fBtcl_prompt2\fR isn't set then no prompt is output for +a newline is typed but the current command is not yet complete; +if \fBtcl_prompt2\fR is not set then no prompt is output for incomplete commands. - .SH KEYWORDS shell, toolkit @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: wm.n,v 1.29.2.3 2007/10/27 04:23:15 dgp Exp $ +'\" RCS: @(#) $Id: wm.n,v 1.29.2.4 2007/11/01 16:37:16 dgp Exp $ '\" .so man.macros .TH wm n 8.5 Tk "Tk Built-In Commands" @@ -16,7 +16,6 @@ wm \- Communicate with window manager .SH SYNOPSIS \fBwm\fR \fIoption window \fR?\fIargs\fR? .BE - .SH DESCRIPTION .PP The \fBwm\fR command is used to interact with window managers in @@ -55,42 +54,51 @@ with a window. The first form returns a list of the platform specific flags and their values. The second form returns the value for the specific option. The third form sets one or more of the values. The values are as follows: -.PP -On Windows, the following attributes may be set. .RS +.PP +All platforms support the following attributes (though X11 users +should see the notes below): .TP -\fB\-disabled\fR -Specifies whether the window is in a disabled state. -.TP -\fB\-toolwindow\fR -Specifies a toolwindow style window (as defined in the MSDN). +\fB\-fullscreen\fR +Places the window in a mode that takes up the entire screen, has no +borders, and covers the general use area (i.e. Start menu and taskbar on +Windows, dock and menubar on OSX, general window decorations on X11). .TP \fB\-topmost\fR Specifies whether this is a topmost window (displays above all other windows). -.VS 8.5 +.PP +On Windows, the following attributes may be set. .TP \fB\-alpha\fR +.VS 8.5 Specifies the alpha transparency level of the toplevel. It accepts a value from \fB0.0\fR (fully transparent) to \fB1.0\fR (opaque). Values outside that range will be constrained. This is supported on Windows 2000/XP+. Where not supported, the \fB\-alpha\fR value remains at \fB1.0\fR. +.VE 8.5 +.TP +\fB\-disabled\fR +Specifies whether the window is in a disabled state. +.TP +\fB\-toolwindow\fR +Specifies a toolwindow style window (as defined in the MSDN). .TP \fB\-transparentcolor\fR +.VS 8.5 Specifies the transparent color index of the toplevel. It takes any color value accepted by \fBTk_GetColor\fR. If the empty string is specified (default), no transparent color is used. This is supported on Windows 2000/XP+. Where not supported, the \fB\-transparentcolor\fR value remains at \fB{}\fR. -.TP -\fB\-fullscreen\fR -Places the window in a mode that takes up the entire screen, has no -borders, and covers the Start menu and taskbar. -.RE .VE 8.5 .PP On Mac OS X, the following attributes may be set. -.RS +.TP +\fB\-alpha\fR +Specifies the alpha transparency level of the window. +It accepts a value from \fB0.0\fR (fully transparent) to \fB1.0\fR (opaque), +values outside that range will be constrained. .TP \fB\-modified\fR Specifies the modification state of the window (determines whether the @@ -101,49 +109,27 @@ proxy icon is draggable). Specifies the path of the file referenced as the window proxy icon (which can be dragged and dropped in lieu of the file's finder icon). .TP -\fB\-alpha\fR -Specifies the alpha transparency level of the window. -It accepts a value from \fB0.0\fR (fully transparent) to \fB1.0\fR (opaque), -values outside that range will be constrained. -.TP -\fB\-topmost\fR -Specifies whether this is a topmost window (displays above all other windows). -.TP \fB\-transparent\fR Makes the window content area transparent and turns off the window shadow. For the transparency to be effecive, the toplevel background needs to be set to a -color with some alpha, e.g. "systemTransparent". -.TP -\fB\-fullscreen\fR -Places the window in a mode that takes up the entire main screen and hides -the dock and menu bar. -.RE +color with some alpha, e.g. +.QW systemTransparent . .PP On X11, the following attributes may be set. These are not supported by all window managers, and will have no effect under older WMs. .\" See http://www.freedesktop.org/Standards/wm-spec -.RS -.TP -\fB-topmost\fR -Requests that this window should be kept above -all other windows that do not also have the \fB-topmost\fR -attribute set. .TP -\fB-zoomed\fR +\fB\-zoomed\fR Requests that the window should be maximized. -This is the same as \fB[wm state zoomed]\fR on Windows and Mac OS X. -.TP -\fB-fullscreen\fR -Requests that the window should fill the entire screen -and have no window decorations. -.RE +This is the same as \fBwm state zoomed\fR on Windows and Mac OS X. .PP On X11, changes to window attributes are performed asynchronously. Querying the value of an attribute returns the current state, which will not be the same as the value most recently set if the window manager has not yet processed the request or if it does not support the attribute. +.RE .TP \fBwm client \fIwindow\fR ?\fIname\fR? If \fIname\fR is specified, this command stores \fIname\fR (which @@ -152,7 +138,7 @@ the host on which the application is executing) in \fIwindow\fR's \fBWM_CLIENT_MACHINE\fR property for use by the window manager or session manager. The command returns an empty string in this case. -If \fIname\fR isn't specified, the command returns the last name +If \fIname\fR is not specified, the command returns the last name set in a \fBwm client\fR command for \fIwindow\fR. If \fIname\fR is specified as an empty string, the command deletes the \fBWM_CLIENT_MACHINE\fR property from \fIwindow\fR. @@ -161,7 +147,9 @@ If \fIname\fR is specified as an empty string, the command deletes the This command is used to manipulate the \fBWM_COLORMAP_WINDOWS\fR property, which provides information to the window managers about windows that have private colormaps. -If \fIwindowList\fR isn't specified, the command returns a list +.RS +.PP +If \fIwindowList\fR is not specified, the command returns a list whose elements are the names of the windows in the \fBWM_COLORMAP_WINDOWS\fR property. If \fIwindowList\fR is specified, it consists of a list of window @@ -170,6 +158,7 @@ property with the given windows and returns an empty string. The \fBWM_COLORMAP_WINDOWS\fR property should normally contain a list of the internal windows within \fIwindow\fR whose colormaps differ from their parents. +.PP The order of the windows in the property indicates a priority order: the window manager will attempt to install as many colormaps as possible from the head of this list when \fIwindow\fR gets the colormap focus. @@ -182,6 +171,7 @@ whose colormaps differ from their parents, followed by the top-level itself; the order of the internal windows is undefined. See the ICCCM documentation for more information on the \fBWM_COLORMAP_WINDOWS\fR property. +.RE .TP \fBwm command \fIwindow\fR ?\fIvalue\fR? If \fIvalue\fR is specified, this command stores \fIvalue\fR in \fIwindow\fR's @@ -189,7 +179,7 @@ If \fIvalue\fR is specified, this command stores \fIvalue\fR in \fIwindow\fR's session manager and returns an empty string. \fIValue\fR must have proper list structure; the elements should contain the words of the command used to invoke the application. -If \fIvalue\fR isn't specified then the command returns the last value +If \fIvalue\fR is not specified then the command returns the last value set in a \fBwm command\fR command for \fIwindow\fR. If \fIvalue\fR is specified as an empty string, the command deletes the \fBWM_COMMAND\fR property from \fIwindow\fR. @@ -209,6 +199,8 @@ to the command, then it specifies the focus model for \fIwindow\fR. In this case the command returns an empty string. If no additional argument is supplied, then the command returns the current focus model for \fIwindow\fR. +.RS +.PP An \fBactive\fR focus model means that \fIwindow\fR will claim the input focus for itself or its descendants, even at times when the focus is currently in some other application. \fBPassive\fR means that @@ -218,12 +210,13 @@ once the focus has been given to \fIwindow\fR or one of its descendants, the application may re-assign the focus among \fIwindow\fR's descendants. The focus model defaults to \fBpassive\fR, and Tk's \fBfocus\fR command assumes a passive model of focusing. +.RE .TP \fBwm forget \fIwindow\fR The \fIwindow\fR will be unmapped from the screen and will no longer be managed by \fBwm\fR. Windows created with the \fBtoplevel\fR command will be treated like \fBframe\fR windows once they are no -longer managed by \fBwm\fR, however, the -menu configuration will be +longer managed by \fBwm\fR, however, the \fB\-menu\fR configuration will be remembered and the menus will return once the widget is managed again. .TP \fBwm frame \fIwindow\fR @@ -231,7 +224,7 @@ If \fIwindow\fR has been reparented by the window manager into a decorative frame, the command returns the platform specific window identifier for the outermost frame that contains \fIwindow\fR (the window whose parent is the root or virtual root). If \fIwindow\fR -hasn't been reparented by the window manager then the command returns +has not been reparented by the window manager then the command returns the platform specific window identifier for \fIwindow\fR. .TP \fBwm geometry \fIwindow\fR ?\fInewGeometry\fR? @@ -244,9 +237,12 @@ the form \fB=\fIwidth\fBx\fIheight\fB\(+-\fIx\fB\(+-\fIy\fR, where any of \fB=\fR, \fIwidth\fBx\fIheight\fR, or \fB\(+-\fIx\fB\(+-\fIy\fR may be omitted. \fIWidth\fR and \fIheight\fR are positive integers specifying the desired dimensions of \fIwindow\fR. If \fIwindow\fR -is gridded (see GRIDDED GEOMETRY MANAGEMENT below) then the dimensions +is gridded (see \fBGRIDDED GEOMETRY MANAGEMENT\fR below) then the dimensions are specified in grid units; otherwise they are specified in pixel -units. \fIX\fR and \fIy\fR specify the desired location of +units. +.RS +.PP +\fIX\fR and \fIy\fR specify the desired location of \fIwindow\fR on the screen, in pixels. If \fIx\fR is preceded by \fB+\fR, it specifies the number of pixels between the left edge of the screen and the left @@ -258,10 +254,12 @@ number of pixels between the top of the screen and the top of \fIwindow\fR's border; if \fIy\fR is preceded by \fB\-\fR then it specifies the number of pixels between the bottom of \fIwindow\fR's border and the bottom of the screen. +.PP If \fInewGeometry\fR is specified as an empty string then any existing user-specified geometry for \fIwindow\fR is cancelled, and the window will revert to the size requested internally by its widgets. +.RE .TP \fBwm grid \fIwindow\fR ?\fIbaseWidth baseHeight widthInc heightInc\fR? This command indicates that \fIwindow\fR is to be managed as a @@ -278,20 +276,25 @@ that are non-negative integers. Tk will pass this information to the window manager; during manual resizing, the window manager will restrict the window's size to one of these acceptable sizes. +.RS +.PP Furthermore, during manual resizing the window manager will display the window's current size in terms of grid units rather than pixels. If \fIbaseWidth\fR etc. are all specified as empty strings, then \fIwindow\fR will no longer be managed as a gridded window. If \fIbaseWidth\fR etc. are specified then the return value is an empty string. +.PP Otherwise the return value is a Tcl list containing four elements corresponding to the current \fIbaseWidth\fR, \fIbaseHeight\fR, \fIwidthInc\fR, and \fIheightInc\fR; if \fIwindow\fR is not currently gridded, then an empty string is returned. +.PP Note: this command should not be needed very often, since the \fBTk_SetGrid\fR library procedure and the \fBsetGrid\fR option provide easier access to the same functionality. +.RE .TP \fBwm group \fIwindow\fR ?\fIpathName\fR? If \fIpathName\fR is specified, it gives the path name for the leader of @@ -301,7 +304,7 @@ leader is iconified. \fIPathName\fR may be specified as an empty string to remove \fIwindow\fR from any group association. If \fIpathName\fR is specified then the command returns an empty string; otherwise it returns the path name of \fIwindow\fR's current group leader, or an empty -string if \fIwindow\fR isn't part of any group. +string if \fIwindow\fR is not part of any group. .TP \fBwm iconbitmap \fIwindow\fR ?\fIbitmap\fR? If \fIbitmap\fR is specified, then it names a bitmap in the standard @@ -315,7 +318,9 @@ Otherwise it returns the name of the current icon bitmap associated with \fIwindow\fR, or an empty string if \fIwindow\fR has no icon bitmap. On the Windows operating system, an additional flag is supported: -\fBwm iconbitmap \fIwindow\fR ?\fB\-default\fR? ?\fIimage\fR?. +.RS +.TP +\fBwm iconbitmap \fIwindow\fR ?\fB\-default\fR? ?\fIimage\fR? If the \fB\-default\fR flag is given, the icon is applied to all toplevel windows (existing and future) to which no other specific icon has yet been applied. @@ -326,9 +331,10 @@ file for which the shell has assigned an icon. Tcl will first test if the file contains an icon, then if it has an assigned icon, and finally, if that fails, test for a bitmap. +.RE .TP \fBwm iconify \fIwindow\fR -Arrange for \fIwindow\fR to be iconified. It \fIwindow\fR hasn't +Arrange for \fIwindow\fR to be iconified. It \fIwindow\fR has not yet been mapped for the first time, this command will arrange for it to appear in the iconified state when it is eventually mapped. .TP @@ -350,7 +356,7 @@ returns the name of the current icon mask associated with If \fInewName\fR is specified, then it is passed to the window manager; the window manager should display \fInewName\fR inside the icon associated with \fIwindow\fR. In this case an empty -string is returned as result. If \fInewName\fR isn't specified +string is returned as result. If \fInewName\fR is not specified then the command returns the current icon name for \fIwindow\fR, or an empty string if no icon name has been specified (in this case the window manager will normally display the window's title, @@ -358,7 +364,6 @@ as specified with the \fBwm title\fR command). .VS 8.5 .TP \fBwm iconphoto \fIwindow\fR ?\fB\-default\fR? \fIimage1\fR ?\fIimage2 ...\fR? -.RS Sets the titlebar icon for \fIwindow\fR based on the named photo images. If \fB\-default\fR is specified, this is applied to all future created toplevels as well. The data in the images is taken as a snapshot at the @@ -366,6 +371,7 @@ time of invocation. If the images are later changed, this is not reflected to the titlebar icons. Multiple images are accepted to allow different images sizes (e.g., 16x16 and 32x32) to be provided. The window manager may scale provided icons to an appropriate size. +.RS .PP On Windows, the images are packed into a Windows icon structure. This will override an ico specified to \fBwm iconbitmap\fR, and @@ -401,8 +407,9 @@ returned. Otherwise the command returns the path name of the current icon window for \fIwindow\fR, or an empty string if there is no icon window currently specified for \fIwindow\fR. Button press events are disabled for \fIwindow\fR as long as it is -an icon window; this is needed in order to allow window managers -to ``own'' those events. +an icon window; this is needed in order to allow window managers to +.QW own +those events. Note: not all window managers support the notion of an icon window. .TP \fBwm manage \fIwidget\fR @@ -463,7 +470,8 @@ If \fIwho\fR is specified, then the command returns an empty string. Otherwise it returns \fBuser\fR or \fBprogram\fR to indicate the source of the window's current position, or an empty string if no source has been specified yet. Most window managers interpret -``no source'' as equivalent to \fBprogram\fR. +.QW "no source" +as equivalent to \fBprogram\fR. Tk will automatically set the position source to \fBuser\fR when a \fBwm geometry\fR command is invoked, unless the source has been set explicitly to \fBprogram\fR. @@ -482,7 +490,7 @@ protocol handler for \fIname\fR, and \fIcommand\fR will be invoked in the future whenever the window manager sends a message to the client for that protocol. In this case the command returns an empty string. -If \fIname\fR is specified but \fIcommand\fR isn't, then the current +If \fIname\fR is specified but \fIcommand\fR is not, then the current command for \fIname\fR is returned, or an empty string if there is no handler defined for \fIname\fR. If \fIcommand\fR is specified as an empty string then the current @@ -495,8 +503,8 @@ are currently defined for \fIwindow\fR. .RS .PP Tk always defines a protocol handler for \fBWM_DELETE_WINDOW\fR, even if -you haven't asked for one with \fBwm protocol\fR. -If a \fBWM_DELETE_WINDOW\fR message arrives when you haven't defined +you have not asked for one with \fBwm protocol\fR. +If a \fBWM_DELETE_WINDOW\fR message arrives when you have not defined a handler, then Tk handles the message by destroying the window for which it was received. .RE @@ -530,18 +538,19 @@ If \fIwho\fR is specified, then the command returns an empty string. Otherwise it returns \fBuser\fR or \fBwindow\fR to indicate the source of the window's current size, or an empty string if no source has been specified yet. Most window managers interpret -``no source'' as equivalent to \fBprogram\fR. +.QW "no source" +as equivalent to \fBprogram\fR. .TP -\fBwm stackorder \fIwindow\fR ?\fIisabove|isbelow window\fR? -The stackorder command returns a list of toplevel windows +\fBwm stackorder \fIwindow\fR ?\fBisabove\fR|\fBisbelow \fIwindow\fR? +The \fBstackorder\fR command returns a list of toplevel windows in stacking order, from lowest to highest. When a single toplevel window is passed, the returned list recursively includes all of the window's children that are toplevels. Only those toplevels that are currently mapped to the screen are returned. -The stackorder command can also be used to determine if one +The \fBstackorder\fR command can also be used to determine if one toplevel is positioned above or below a second toplevel. -When two window arguments separated by either \fIisabove\fR or -\fIisbelow\fR are passed, a boolean result indicates whether +When two window arguments separated by either \fBisabove\fR or +\fBisbelow\fR are passed, a boolean result indicates whether or not the first window is currently above or below the second window in the stacking order. .TP @@ -560,7 +569,7 @@ iconwindow\fR command). The \fBicon\fR state cannot be set. If \fIstring\fR is specified, then it will be passed to the window manager for use as the title for \fIwindow\fR (the window manager should display this string in \fIwindow\fR's title bar). In this -case the command returns an empty string. If \fIstring\fR isn't +case the command returns an empty string. If \fIstring\fR is not specified then the command returns the current title for the \fIwindow\fR. The title for a window defaults to its name. .TP @@ -572,7 +581,7 @@ path name for a top-level window). If \fImaster\fR is specified as an empty string then \fIwindow\fR is marked as not being a transient window any more. Otherwise the command returns the path name of \fIwindow\fR's current master, or an -empty string if \fIwindow\fR isn't currently a transient window. +empty string if \fIwindow\fR is not currently a transient window. A transient window will mirror state changes in the master and inherit the state of the master when initially mapped. It is an error to attempt to make a window a transient of itself. @@ -620,7 +629,7 @@ The \fBwm manage\fR and \fBwm forget\fR commands may be used to perform undocking and docking of windows. After a widget is managed by \fBwm manage\fR command, all other \fBwm\fR subcommands may be used with the widget. Only widgets created using the toplevel command may -have an attached menu via the -menu configure option. A toplevel +have an attached menu via the \fB\-menu\fR configure option. A toplevel widget may be used as a frame and managed with any of the other geometry managers after using the \fBwm forget\fR command. Any menu associated with a toplevel widget will be hidden when managed by @@ -666,7 +675,7 @@ rather than pixels. .SH BUGS .PP Most existing window managers appear to have bugs that affect the -operation of the \fBwm\fR command. For example, some changes won't +operation of the \fBwm\fR command. For example, some changes will not take effect if the window is already active: the window will have to be withdrawn and de-iconified in order to make the change happen. .SH EXAMPLES diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index fbc3a7a..9f980c5 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -17,7 +17,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.69.2.2 2007/09/07 01:25:35 dgp Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.69.2.3 2007/11/01 16:37:17 dgp Exp $ */ #include "tkInt.h" @@ -646,7 +646,7 @@ ImgPhotoCmd( "blank", "cget", "configure", "copy", "data", "get", "put", "read", "redither", "transparency", "write", NULL }; - enum options { + enum PhotoOptions { PHOTO_BLANK, PHOTO_CGET, PHOTO_CONFIGURE, PHOTO_COPY, PHOTO_DATA, PHOTO_GET, PHOTO_PUT, PHOTO_READ, PHOTO_REDITHER, PHOTO_TRANS, PHOTO_WRITE @@ -681,7 +681,7 @@ ImgPhotoCmd( return proc(clientData, interp, objc, objv); } - switch ((enum options) index) { + switch ((enum PhotoOptions) index) { case PHOTO_BLANK: /* * photo blank command - just call Tk_PhotoBlank. @@ -4424,6 +4424,9 @@ Tk_PhotoPutBlock( */ for (hLeft = height; hLeft > 0;) { + int pixelSize = blockPtr->pixelSize; + int compRuleSet = (compRule == TK_PHOTO_COMPOSITE_SET); + srcLinePtr = blockPtr->pixelPtr + blockPtr->offset[0]; hCopy = MIN(hLeft, blockPtr->height); hLeft -= hCopy; @@ -4434,10 +4437,10 @@ Tk_PhotoPutBlock( * much faster. */ - if ((blockPtr->pixelSize == 4) && (greenOffset == 1) + if ((pixelSize == 4) && (greenOffset == 1) && (blueOffset == 2) && (alphaOffset == 3) && (width <= blockPtr->width) - && (compRule == TK_PHOTO_COMPOSITE_SET)) { + && compRuleSet) { memcpy(destLinePtr, srcLinePtr, (size_t) (width * 4)); srcLinePtr += blockPtr->pitch; destLinePtr += pitch; @@ -4453,35 +4456,56 @@ Tk_PhotoPutBlock( wCopy = MIN(wLeft, blockPtr->width); wLeft -= wCopy; srcPtr = srcLinePtr; - for (; wCopy>0 ; --wCopy, srcPtr+=blockPtr->pixelSize) { - int alpha = srcPtr[alphaOffset]; + /* + * But we might be lucky and be able to use fairly fast loops. + * It's worth checking... + */ + + if (alphaOffset == 0) { /* - * In the easy case, we can just copy. + * This is the non-alpha case, so can still be fairly + * fast. Note that in the non-alpha-source case, the + * compositing rule doesn't apply. */ - if (!alphaOffset || (alpha == 255)) { - /* - * New solid part of the image. - */ - + for (; wCopy>0 ; --wCopy, srcPtr+=pixelSize) { *destPtr++ = srcPtr[0]; *destPtr++ = srcPtr[greenOffset]; *destPtr++ = srcPtr[blueOffset]; *destPtr++ = 255; - continue; } - + continue; + } else if (compRuleSet) { /* - * Combine according to the compositing rule. + * This is the SET compositing rule, which just replaces + * what was there before with the new data. This is + * another fairly fast case. No point in doing a memcpy(); + * the order of channels is probably wrong. */ - if ((compRule == TK_PHOTO_COMPOSITE_SET) || !destPtr[3]) { + for (; wCopy>0 ; --wCopy, srcPtr+=pixelSize) { + *destPtr++ = srcPtr[0]; + *destPtr++ = srcPtr[greenOffset]; + *destPtr++ = srcPtr[blueOffset]; + *destPtr++ = srcPtr[alphaOffset]; + } + continue; + } + + /* + * Bother; need to consider the alpha value of each pixel to + * know what to do. + */ + + for (; wCopy>0 ; --wCopy, srcPtr+=pixelSize) { + int alpha = srcPtr[alphaOffset]; + + if (alpha == 255 || !destPtr[3]) { /* - * Either this is the SET rule (we overwrite whatever - * is there) or the destination is entirely blank. In - * both cases, we just set the destination to the - * source. + * Either the source is 100% opaque, or the + * destination is entirely blank. In all cases, we + * just set the destination to the source. */ *destPtr++ = srcPtr[0]; @@ -4491,12 +4515,20 @@ Tk_PhotoPutBlock( continue; } + /* + * Can still skip doing work if the source is 100% + * transparent at this point. + */ + if (alpha) { int Alpha = destPtr[3]; /* - * This implements the Porter-Duff Source-Over - * compositing rule. + * OK, there's real work to be done. Luckily, there's + * a substantial literature on what to do in this + * case. In particular, Porter and Duff have done a + * taxonomy of compositing rules, and the right one is + * the "Source Over" rule. This code implements that. */ destPtr[0] = PD_SRC_OVER(srcPtr[0], alpha, destPtr[0], @@ -4508,10 +4540,6 @@ Tk_PhotoPutBlock( destPtr[3] = PD_SRC_OVER_ALPHA(alpha, Alpha); } - /* - * else should be empty space - */ - destPtr += 4; } } diff --git a/generic/tkObj.c b/generic/tkObj.c index 4c117c8..5871fa8 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkObj.c,v 1.16.2.1 2007/10/15 18:38:33 dgp Exp $ + * RCS: @(#) $Id: tkObj.c,v 1.16.2.2 2007/11/01 16:37:20 dgp Exp $ */ #include "tkInt.h" @@ -154,7 +154,7 @@ Tk_GetPixelsFromObj( double d; PixelRep *pixelPtr; static double bias[] = { - 1.0, 10.0, 25.4, 25.4 / 72.0 + 1.0, 10.0, 25.4, 0.35278 /*25.4 / 72.0*/ }; if (objPtr->typePtr != &pixelObjType) { @@ -390,7 +390,7 @@ Tk_GetMMFromObj( double d; MMRep *mmPtr; static double bias[] = { - 10.0, 25.4, 1.0, 25.4 / 72.0 + 10.0, 25.4, 1.0, 0.35278 /*25.4 / 72.0*/ }; if (objPtr->typePtr != &mmObjType) { @@ -513,7 +513,7 @@ UpdateStringOfMM( } Tcl_PrintDouble(NULL, mmPtr->value, buffer); - len = strlen(buffer); + len = (int)strlen(buffer); objPtr->bytes = (char *) ckalloc((unsigned) len + 1); strcpy(objPtr->bytes, buffer); diff --git a/generic/tkTrig.c b/generic/tkTrig.c index 3138361..8408b37 100644 --- a/generic/tkTrig.c +++ b/generic/tkTrig.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTrig.c,v 1.7.2.1 2007/09/07 01:25:36 dgp Exp $ + * RCS: @(#) $Id: tkTrig.c,v 1.7.2.2 2007/11/01 16:37:20 dgp Exp $ */ #include <stdio.h> @@ -1599,7 +1599,11 @@ TkGetMiterPoints( double deltaX, deltaY; /* X and y offsets cooresponding to dist * (fudge factors for bounding box). */ double p1x, p1y, p2x, p2y, p3x, p3y; - static double elevenDegrees = (11.0*2.0*PI)/360.0; +#ifndef _MSC_VER + static const double elevenDegrees = (11.0*2.0*PI)/360.0; +#else /* msvc8 with -fp:strict requires it this way */ + static const double elevenDegrees = 0.19198621771937624; +#endif /* * Round the coordinates to integers to mimic what happens when the line diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index 6fbb53b..b8736da 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -1,8 +1,7 @@ -/* $Id: ttkWidget.c,v 1.7 2007/04/23 21:15:19 das Exp $ +/* $Id: ttkWidget.c,v 1.7.2.1 2007/11/01 16:37:20 dgp Exp $ * Copyright (c) 2003, Joe English * - * Ttk widget implementation, core widget utilities. - * + * Core widget utilities. */ #include <string.h> @@ -20,13 +19,13 @@ /* UpdateLayout -- * Call the widget's get-layout hook to recompute corePtr->layout. - * Returns TCL_OK if successful, returns TCL_ERROR and leaves + * Returns TCL_OK if successful, returns TCL_ERROR and leaves * the layout unchanged otherwise. */ static int UpdateLayout(Tcl_Interp *interp, WidgetCore *corePtr) { Ttk_Theme themePtr = Ttk_GetCurrentTheme(interp); - Ttk_Layout newLayout = + Ttk_Layout newLayout = corePtr->widgetSpec->getLayoutProc(interp, themePtr,corePtr); if (newLayout) { @@ -52,83 +51,78 @@ static void SizeChanged(WidgetCore *corePtr) } } -/* - * RedisplayWidget -- - * Redraw a widget. Called as an idle handler. +#ifndef TK_NO_DOUBLE_BUFFERING + +/* BeginDrawing -- + * Returns a Drawable for drawing the widget contents. + * This is normally an off-screen Pixmap, copied to + * the window by EndDrawing(). */ +static Drawable BeginDrawing(Tk_Window tkwin) +{ + return Tk_GetPixmap(Tk_Display(tkwin), Tk_WindowId(tkwin), + Tk_Width(tkwin), Tk_Height(tkwin), + DefaultDepthOfScreen(Tk_Screen(tkwin))); +} -static void RedisplayWidget(ClientData recordPtr) +/* EndDrawing -- + * Copy the drawable contents to the screen and release resources. + */ +static void EndDrawing(Tk_Window tkwin, Drawable d) { - WidgetCore *corePtr = (WidgetCore *)recordPtr; - Tk_Window tkwin = corePtr->tkwin; - Drawable d; -#ifndef TK_NO_DOUBLE_BUFFERING XGCValues gcValues; GC gc; -#endif /* TK_NO_DOUBLE_BUFFERING */ - corePtr->flags &= ~REDISPLAY_PENDING; - if (!Tk_IsMapped(tkwin)) { - return; - } - -#ifndef TK_NO_DOUBLE_BUFFERING - /* - * Get a Pixmap for drawing in the background: - */ - d = Tk_GetPixmap(Tk_Display(tkwin), Tk_WindowId(tkwin), - Tk_Width(tkwin), Tk_Height(tkwin), - DefaultDepthOfScreen(Tk_Screen(tkwin))); - - /* - * Get a GC for blitting the pixmap to the display: - */ gcValues.function = GXcopy; gcValues.graphics_exposures = False; - gc = Tk_GetGC(corePtr->tkwin, GCFunction|GCGraphicsExposures, &gcValues); -#else - d = Tk_WindowId(tkwin); -#endif /* TK_NO_DOUBLE_BUFFERING */ - - /* - * Recompute layout and draw widget contents: - */ - corePtr->widgetSpec->layoutProc(recordPtr); - corePtr->widgetSpec->displayProc(recordPtr, d); + gc = Tk_GetGC(tkwin, GCFunction|GCGraphicsExposures, &gcValues); -#ifndef TK_NO_DOUBLE_BUFFERING - /* - * Copy to the screen. - */ XCopyArea(Tk_Display(tkwin), d, Tk_WindowId(tkwin), gc, 0, 0, (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin), 0, 0); - /* - * Release resources - */ Tk_FreePixmap(Tk_Display(tkwin), d); Tk_FreeGC(Tk_Display(tkwin), gc); -#endif /* TK_NO_DOUBLE_BUFFERING */ +} +#else +/* No double-buffering: draw directly into the window. */ +static Drawable BeginDrawing(Tk_Window tkwin) { return Tk_WindowId(tkwin); } +static void EndDrawing(Tk_Window tkwin, Drawable d) { } +#endif + +/* DrawWidget -- + * Redraw a widget. Called as an idle handler. + */ +static void DrawWidget(ClientData recordPtr) +{ + WidgetCore *corePtr = recordPtr; + + corePtr->flags &= ~REDISPLAY_PENDING; + if (Tk_IsMapped(corePtr->tkwin)) { + Drawable d = BeginDrawing(corePtr->tkwin); + corePtr->widgetSpec->layoutProc(recordPtr); + corePtr->widgetSpec->displayProc(recordPtr, d); + EndDrawing(corePtr->tkwin, d); + } } -/* TtkRedisplayWidget -- +/* TtkRedisplayWidget -- * Schedule redisplay as an idle handler. */ -void TtkRedisplayWidget(WidgetCore *corePtr) +void TtkRedisplayWidget(WidgetCore *corePtr) { if (corePtr->flags & WIDGET_DESTROYED) { return; } if (!(corePtr->flags & REDISPLAY_PENDING)) { - Tcl_DoWhenIdle(RedisplayWidget, (ClientData) corePtr); + Tcl_DoWhenIdle(DrawWidget, (ClientData) corePtr); corePtr->flags |= REDISPLAY_PENDING; } } /* TtkResizeWidget -- - * Recompute widget size, schedule geometry propagation and redisplay. + * Recompute widget size, schedule geometry propagation and redisplay. */ void TtkResizeWidget(WidgetCore *corePtr) { @@ -240,7 +234,7 @@ WidgetCleanup(char *memPtr) * * For Deactivate/Activate pseudo-events, clear/set the background state flag. * - * <<NOTE-REALIZED>> On the first ConfigureNotify event + * <<NOTE-REALIZED>> On the first ConfigureNotify event * (which indicates that the window has just been created), * update the layout. This is to work around two problems: * (1) Virtual events aren't delivered to unrealized widgets @@ -286,7 +280,7 @@ static void CoreEventProc(ClientData clientData, XEvent *eventPtr) CoreEventMask,CoreEventProc,clientData); if (corePtr->flags & REDISPLAY_PENDING) { - Tcl_CancelIdleCall(RedisplayWidget, clientData); + Tcl_CancelIdleCall(DrawWidget, clientData); } corePtr->widgetSpec->cleanupProc(corePtr); @@ -484,7 +478,7 @@ Ttk_Layout TtkWidgetGetLayout( WidgetCore *corePtr = recordPtr; const char *styleName = 0; - if (corePtr->styleObj) + if (corePtr->styleObj) styleName = Tcl_GetString(corePtr->styleObj); if (!styleName || *styleName == '\0') @@ -496,8 +490,8 @@ Ttk_Layout TtkWidgetGetLayout( /* * TtkWidgetGetOrientedLayout -- - * Helper routine. Same as TtkWidgetGetLayout, but prefixes - * "Horizontal." or "Vertical." to the style name, depending + * Helper routine. Same as TtkWidgetGetLayout, but prefixes + * "Horizontal." or "Vertical." to the style name, depending * on the value of the 'orient' option. */ Ttk_Layout TtkWidgetGetOrientedLayout( @@ -511,18 +505,17 @@ Ttk_Layout TtkWidgetGetOrientedLayout( Tcl_DStringInit(&styleName); - /* Prefix: + /* Prefix: */ Ttk_GetOrientFromObj(NULL, orientObj, &orient); if (orient == TTK_ORIENT_HORIZONTAL) Tcl_DStringAppend(&styleName, "Horizontal.", -1); - else + else Tcl_DStringAppend(&styleName, "Vertical.", -1); - /* Add base style name: */ - if (corePtr->styleObj) + if (corePtr->styleObj) baseStyleName = Tcl_GetString(corePtr->styleObj); if (!baseStyleName || *baseStyleName == '\0') baseStyleName = corePtr->widgetSpec->className; @@ -531,7 +524,7 @@ Ttk_Layout TtkWidgetGetOrientedLayout( /* Create layout: */ - layout= Ttk_CreateLayout(interp, themePtr, Tcl_DStringValue(&styleName), + layout= Ttk_CreateLayout(interp, themePtr, Tcl_DStringValue(&styleName), recordPtr, corePtr->optionTable, corePtr->tkwin); Tcl_DStringFree(&styleName); @@ -784,7 +777,7 @@ int TtkWidgetIdentifyCommand( || Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK) return TCL_ERROR; - node = Ttk_LayoutIdentify(corePtr->layout, x, y); + node = Ttk_LayoutIdentify(corePtr->layout, x, y); if (node) { const char *elementName = Ttk_LayoutNodeName(node); Tcl_SetObjResult(interp,Tcl_NewStringObj(elementName,-1)); diff --git a/library/bgerror.tcl b/library/bgerror.tcl index 8d47167..745974b 100644 --- a/library/bgerror.tcl +++ b/library/bgerror.tcl @@ -7,10 +7,10 @@ # Donal K. Fellows. # # Copyright (c) 1998-2000 by Ajuba Solutions. -# All rights reserved. +# Copyright (c) 2007 by ActiveState Software Inc. # -# RCS: @(#) $Id: bgerror.tcl,v 1.33.2.1 2007/05/30 13:47:42 dgp Exp $ -# $Id: bgerror.tcl,v 1.33.2.1 2007/05/30 13:47:42 dgp Exp $ +# RCS: @(#) $Id: bgerror.tcl,v 1.33.2.2 2007/11/01 16:37:20 dgp Exp $ +# $Id: bgerror.tcl,v 1.33.2.2 2007/11/01 16:37:20 dgp Exp $ namespace eval ::tk::dialog::error { namespace import -force ::tk::msgcat::* @@ -18,6 +18,7 @@ namespace eval ::tk::dialog::error { option add *ErrorDialog.function.text [mc "Save To Log"] \ widgetDefault option add *ErrorDialog.function.command [namespace code SaveToLog] + option add *ErrorDialog*Label.font TkCaptionFont widgetDefault if {[tk windowingsystem] eq "aqua"} { option add *ErrorDialog*background systemAlertBackgroundActive \ widgetDefault @@ -42,7 +43,7 @@ proc ::tk::dialog::error::Details {} { if { ($caption eq "") || ($command eq "") } { grid forget $w.function } - lappend command [.bgerrorDialog.top.info.text get 1.0 end-1c] + lappend command [$w.top.info.text get 1.0 end-1c] $w.function configure -text $caption -command $command grid $w.top.info - -sticky nsew -padx 3m -pady 3m } @@ -96,18 +97,11 @@ proc ::tk::dialog::error::bgerror err { # we use the default dialog then : set windowingsystem [tk windowingsystem] if {$windowingsystem eq "aqua"} { - set ok [mc Ok] - set messageFont system - set textRelief flat - set textHilight 0 + set ok [mc Ok] } else { - set ok [mc OK] - set messageFont {Times -18} - set textRelief sunken - set textHilight 1 + set ok [mc OK] } - # Truncate the message if it is too wide (>maxLine characters) or # too tall (>4 lines). Truncation occurs at the first point at # which one of those conditions is met. @@ -128,47 +122,40 @@ proc ::tk::dialog::error::bgerror err { incr lines } - set w .bgerrorDialog set title [mc "Application Error"] set text [mc "Error: %1\$s" $displayedErr] set buttons [list ok $ok dismiss [mc "Skip Messages"] \ - function [mc "Details >>"]] + function [mc "Details >>"]] # 1. Create the top-level window and divide it into top # and bottom parts. - destroy .bgerrorDialog - toplevel .bgerrorDialog -class ErrorDialog - wm withdraw .bgerrorDialog - wm title .bgerrorDialog $title - wm iconname .bgerrorDialog ErrorDialog - wm protocol .bgerrorDialog WM_DELETE_WINDOW { } + set dlg .bgerrorDialog + destroy $dlg + toplevel $dlg -class ErrorDialog + wm withdraw $dlg + wm title $dlg $title + wm iconname $dlg ErrorDialog + wm protocol $dlg WM_DELETE_WINDOW { } if {$windowingsystem eq "aqua"} { - ::tk::unsupported::MacWindowStyle style .bgerrorDialog moveableAlert {} + ::tk::unsupported::MacWindowStyle style $dlg moveableAlert {} } - frame .bgerrorDialog.bot - frame .bgerrorDialog.top + frame $dlg.bot + frame $dlg.top if {$windowingsystem eq "x11"} { - .bgerrorDialog.bot configure -relief raised -bd 1 - .bgerrorDialog.top configure -relief raised -bd 1 + $dlg.bot configure -relief raised -bd 1 + $dlg.top configure -relief raised -bd 1 } - pack .bgerrorDialog.bot -side bottom -fill both - pack .bgerrorDialog.top -side top -fill both -expand 1 - - set W [frame $w.top.info] - text $W.text \ - -yscrollcommand [list $W.scroll set]\ - -setgrid true \ - -width 40 \ - -height 10 \ - -state normal \ - -relief $textRelief \ - -highlightthickness $textHilight \ - -wrap char - if {$windowingsystem eq "aqua"} { - $W.text configure -width 80 -background white + pack $dlg.bot -side bottom -fill both + pack $dlg.top -side top -fill both -expand 1 + + set W [frame $dlg.top.info] + text $W.text -setgrid true -height 10 -wrap char \ + -yscrollcommand [list $W.scroll set] + if {$windowingsystem ne "aqua"} { + $W.text configure -width 40 } scrollbar $W.scroll -command [list $W.text yview] @@ -182,80 +169,68 @@ proc ::tk::dialog::error::bgerror err { # 2. Fill the top part with bitmap and message # Max-width of message is the width of the screen... - set wrapwidth [winfo screenwidth .bgerrorDialog] + set wrapwidth [winfo screenwidth $dlg] # ...minus the width of the icon, padding and a fudge factor for # the window manager decorations and aesthetics. - set wrapwidth [expr {$wrapwidth-60-[winfo pixels .bgerrorDialog 9m]}] - label .bgerrorDialog.msg -justify left -text $text -font $messageFont \ - -wraplength $wrapwidth + set wrapwidth [expr {$wrapwidth-60-[winfo pixels $dlg 9m]}] + label $dlg.msg -justify left -text $text -wraplength $wrapwidth if {$windowingsystem eq "aqua"} { # On the Macintosh, use the stop bitmap - label .bgerrorDialog.bitmap -bitmap stop + label $dlg.bitmap -bitmap stop } else { # On other platforms, make the error icon - canvas .bgerrorDialog.bitmap -width 32 -height 32 -highlightthickness 0 - .bgerrorDialog.bitmap create oval 0 0 31 31 -fill red -outline black - .bgerrorDialog.bitmap create line 9 9 23 23 -fill white -width 4 - .bgerrorDialog.bitmap create line 9 23 23 9 -fill white -width 4 + canvas $dlg.bitmap -width 32 -height 32 -highlightthickness 0 + $dlg.bitmap create oval 0 0 31 31 -fill red -outline black + $dlg.bitmap create line 9 9 23 23 -fill white -width 4 + $dlg.bitmap create line 9 23 23 9 -fill white -width 4 } - grid .bgerrorDialog.bitmap .bgerrorDialog.msg \ - -in .bgerrorDialog.top \ - -row 0 \ - -padx 3m \ - -pady 3m - grid configure .bgerrorDialog.msg -sticky nsw -padx {0 3m} - grid rowconfigure .bgerrorDialog.top 1 -weight 1 - grid columnconfigure .bgerrorDialog.top 1 -weight 1 + grid $dlg.bitmap $dlg.msg -in $dlg.top -row 0 -padx 3m -pady 3m + grid configure $dlg.msg -sticky nsw -padx {0 3m} + grid rowconfigure $dlg.top 1 -weight 1 + grid columnconfigure $dlg.top 1 -weight 1 # 3. Create a row of buttons at the bottom of the dialog. set i 0 foreach {name caption} $buttons { - button .bgerrorDialog.$name \ - -text $caption \ - -default normal \ + button $dlg.$name -text $caption -default normal \ -command [namespace code [list set button $i]] - grid .bgerrorDialog.$name \ - -in .bgerrorDialog.bot \ - -column $i \ - -row 0 \ - -sticky ew \ - -padx 10 - grid columnconfigure .bgerrorDialog.bot $i -weight 1 + grid $dlg.$name -in $dlg.bot -column $i -row 0 -sticky ew -padx 10 + grid columnconfigure $dlg.bot $i -weight 1 # We boost the size of some Mac buttons for l&f if {$windowingsystem eq "aqua"} { if {($name eq "ok") || ($name eq "dismiss")} { - grid columnconfigure .bgerrorDialog.bot $i -minsize 90 + grid columnconfigure $dlg.bot $i -minsize 90 } - grid configure .bgerrorDialog.$name -pady 7 + grid configure $dlg.$name -pady 7 } incr i } # The "OK" button is the default for this dialog. - .bgerrorDialog.ok configure -default active + $dlg.ok configure -default active - bind .bgerrorDialog <Return> [namespace code Return] - bind .bgerrorDialog <Destroy> [namespace code [list Destroy %W]] - .bgerrorDialog.function configure -command [namespace code Details] + bind $dlg <Return> [namespace code Return] + bind $dlg <Destroy> [namespace code [list Destroy %W]] + $dlg.function configure -command [namespace code Details] # 6. Place the window (centered in the display) and deiconify it. - ::tk::PlaceWindow .bgerrorDialog + ::tk::PlaceWindow $dlg # 7. Ensure that we are topmost. - raise .bgerrorDialog + raise $dlg if {$tcl_platform(platform) eq "windows"} { # Place it topmost if we aren't at the top of the stacking # order to ensure that it's seen - if {[lindex [wm stackorder .] end] ne ".bgerrorDialog"} { - wm attributes .bgerrorDialog -topmost 1 + if {[lindex [wm stackorder .] end] ne "$dlg"} { + wm attributes $dlg -topmost 1 } } # 8. Set a grab and claim the focus too. - ::tk::SetFocusGrab .bgerrorDialog .bgerrorDialog.ok + ::tk::SetFocusGrab $dlg $dlg.ok # 9. Wait for the user to respond, then restore the focus and # return the index of the selected button. Restore the focus @@ -266,7 +241,7 @@ proc ::tk::dialog::error::bgerror err { vwait [namespace which -variable button] set copy $button; # Save a copy... - ::tk::RestoreFocusGrab .bgerrorDialog .bgerrorDialog.ok destroy + ::tk::RestoreFocusGrab $dlg $dlg.ok destroy if {$copy == 1} { return -code break diff --git a/library/choosedir.tcl b/library/choosedir.tcl index 35cb4e8..87988b9 100644 --- a/library/choosedir.tcl +++ b/library/choosedir.tcl @@ -5,7 +5,7 @@ # Copyright (c) 1998-2000 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: choosedir.tcl,v 1.20 2007/05/16 18:10:35 dgp Exp $ +# RCS: @(#) $Id: choosedir.tcl,v 1.20.2.1 2007/11/01 16:37:20 dgp Exp $ # Make sure the tk::dialog namespace, in which all dialogs should live, exists namespace eval ::tk::dialog {} @@ -60,6 +60,15 @@ proc ::tk::dialog::file::chooseDir:: {args} { grid remove $data(hiddenBtn) } + # When using -mustexist, manage the OK button state for validity + $data(okBtn) configure -state normal + if {$data(-mustexist)} { + $data(ent) configure -validate key \ + -validatecommand [list ::tk::dialog::file::chooseDir::IsOK? $w %P] + } else { + $data(ent) configure -validate none + } + # Dialog boxes should be transient with respect to their parent, # so that they will always stay on top of their parent window. However, # some window managers will create the window as withdrawn if the parent @@ -238,6 +247,18 @@ proc ::tk::dialog::file::chooseDir::OkCmd {w} { return } +# Change state of OK button to match -mustexist correctness of entry +# +proc ::tk::dialog::file::chooseDir::IsOK? {w text} { + upvar ::tk::dialog::file::[winfo name $w] data + + set ok [file isdirectory $text] + $data(okBtn) configure -state [expr {$ok ? "normal" : "disabled"}] + + # always return 1 + return 1 +} + proc ::tk::dialog::file::chooseDir::DblClick {w} { upvar ::tk::dialog::file::[winfo name $w] data set selection [tk::IconList_CurSelection $data(icons)] @@ -250,7 +271,7 @@ proc ::tk::dialog::file::chooseDir::DblClick {w} { return } } -} +} # Gets called when user browses the IconList widget (dragging mouse, arrow # keys, etc) @@ -282,10 +303,8 @@ proc ::tk::dialog::file::chooseDir::Done {w {selectFilePath ""}} { if {$selectFilePath eq ""} { set selectFilePath $data(selectPath) } - if {$data(-mustexist)} { - if {![file exists $selectFilePath] || ![file isdir $selectFilePath]} { - return - } + if {$data(-mustexist) && ![file isdirectory $selectFilePath]} { + return } set Priv(selectFilePath) $selectFilePath } diff --git a/library/demos/entry3.tcl b/library/demos/entry3.tcl index 95b9418..f5a8388 100644 --- a/library/demos/entry3.tcl +++ b/library/demos/entry3.tcl @@ -4,7 +4,7 @@ # permitted input is constrained in some way. It also shows off a # password entry. # -# RCS: @(#) $Id: entry3.tcl,v 1.4.2.1 2007/10/19 14:35:33 dgp Exp $ +# RCS: @(#) $Id: entry3.tcl,v 1.4.2.2 2007/11/01 16:37:21 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -22,7 +22,7 @@ positionWindow $w label $w.msg -font $font -wraplength 5i -justify left -text "Four different\ entries are displayed below. You can add characters by pointing,\ clicking and typing, though each is constrained in what it will\ - accept. The first only accepts integers or the empty string\ + accept. The first only accepts 32-bit integers or the empty string\ (checking when focus leaves it) and will flash to indicate any\ problem. The second only accepts strings with fewer than ten\ characters and sounds the bell when an attempt to go over the limit\ @@ -64,6 +64,8 @@ proc focusAndFlash {W fg bg {count 9}} { } labelframe $w.l1 -text "Integer Entry" +# Alternatively try using {string is digit} for arbitrary length numbers, +# and not just 32-bit ones. entry $w.l1.e -validate focus -vcmd {string is integer %P} $w.l1.e configure -invalidcommand \ "focusAndFlash %W [$w.l1.e cget -fg] [$w.l1.e cget -bg]" diff --git a/library/demos/floor.tcl b/library/demos/floor.tcl index 5784db3..9352e2f 100644 --- a/library/demos/floor.tcl +++ b/library/demos/floor.tcl @@ -3,7 +3,7 @@ # This demonstration script creates a canvas widet that displays the # floorplan for DEC's Western Research Laboratory. # -# RCS: @(#) $Id: floor.tcl,v 1.6 2004/12/21 11:56:35 dkf Exp $ +# RCS: @(#) $Id: floor.tcl,v 1.6.2.1 2007/11/01 16:37:21 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -1309,28 +1309,26 @@ pack $btns -side bottom -fill x set f [frame $w.frame] pack $f -side top -fill both -expand yes -set h [scrollbar $f.hscroll -highlightthickness 0 -orient horizontal] -set v [scrollbar $f.vscroll -highlightthickness 0 -orient vertical] -set f1 [frame $f.f1 -bd 2 -relief sunken] -set c [canvas $f1.c -width 900 -height 500 -borderwidth 0 \ - -highlightthickness 0 -xscrollcommand "$h set" -yscrollcommand "$v set"] +set h [scrollbar $f.hscroll -orient horizontal] +set v [scrollbar $f.vscroll -orient vertical] +set f1 [frame $f.f1 -borderwidth 2 -relief sunken] +set c [canvas $f1.c -width 900 -height 500 -highlightthickness 0 \ + -xscrollcommand [list $h set] \ + -yscrollcommand [list $v set]] pack $c -expand yes -fill both -grid $f1 -padx 1 -pady 1 \ - -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news -grid $v -padx 1 -pady 1 \ - -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news -grid $h -padx 1 -pady 1 \ - -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news +grid $f1 -padx 1 -pady 1 -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news +grid $v -padx 1 -pady 1 -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news +grid $h -padx 1 -pady 1 -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news grid rowconfig $f 0 -weight 1 -minsize 0 grid columnconfig $f 0 -weight 1 -minsize 0 pack $f -expand yes -fill both -padx 1 -pady 1 -$v config -command "$c yview" -$h config -command "$c xview" +$v configure -command [list $c yview] +$h configure -command [list $c xview] # Create an entry for displaying and typing in current room. -entry $c.entry -width 10 -relief sunken -bd 2 -textvariable currentRoom +entry $c.entry -width 10 -textvariable currentRoom # Choose colors, then fill in the floorplan. diff --git a/library/demos/image2.tcl b/library/demos/image2.tcl index 916551e..9eb10ad 100644 --- a/library/demos/image2.tcl +++ b/library/demos/image2.tcl @@ -3,7 +3,7 @@ # This demonstration script creates a simple collection of widgets # that allow you to select and view images in a Tk label. # -# RCS: @(#) $Id: image2.tcl,v 1.9 2004/12/21 11:56:35 dkf Exp $ +# RCS: @(#) $Id: image2.tcl,v 1.9.2.1 2007/11/01 16:37:22 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -22,7 +22,7 @@ proc loadDir w { global dirName $w.f.list delete 0 end - foreach i [lsort [glob -directory $dirName *]] { + foreach i [lsort [glob -type f -directory $dirName *]] { $w.f.list insert end [file tail $i] } } @@ -57,7 +57,12 @@ proc loadImage {w x y} { global dirName set file [file join $dirName [$w.f.list get @$x,$y]] - image2a configure -file $file + if {[catch { + image2a configure -file $file + }]} then { + # Mark the file as not loadable + $w.f.list itemconfigure @$x,$y -bg \#c00000 -selectbackground \#ff0000 + } } set w .image2 diff --git a/library/demos/rmt b/library/demos/rmt index 0e14cdb..2fc68ea 100644 --- a/library/demos/rmt +++ b/library/demos/rmt @@ -7,7 +7,7 @@ exec wish "$0" "$@" # Tk applications. It allows you to select an application and # then type commands to that application. # -# RCS: @(#) $Id: rmt,v 1.4 2003/09/30 14:54:30 dkf Exp $ +# RCS: @(#) $Id: rmt,v 1.4.4.1 2007/11/01 16:37:22 dgp Exp $ package require Tcl 8.4 package require Tk @@ -45,7 +45,7 @@ menu .menu.file.apps -postcommand fillAppsMenu # Create text window and scrollbar. -text .t -relief sunken -bd 2 -yscrollcommand ".s set" -setgrid true +text .t -yscrollcommand ".s set" -setgrid true scrollbar .s -command ".t yview" grid .t .s -sticky nsew grid rowconfigure . 0 -weight 1 diff --git a/library/demos/tcolor b/library/demos/tcolor index c94d459..795aa9b 100644 --- a/library/demos/tcolor +++ b/library/demos/tcolor @@ -7,7 +7,7 @@ exec wish "$0" "$@" # create colors using either the RGB, HSB, or CYM color spaces # and apply the color to existing applications. # -# RCS: @(#) $Id: tcolor,v 1.4 2003/09/30 14:54:30 dkf Exp $ +# RCS: @(#) $Id: tcolor,v 1.4.4.1 2007/11/01 16:37:22 dgp Exp $ package require Tk 8.4 wm title . "Color Editor" @@ -42,10 +42,6 @@ set updating 0 set autoUpdate 1 set name "" -if {$tcl_platform(platform) eq "unix"} { - option add *Entry.background white -} - # Create the menu bar at the top of the window. . configure -menu [menu .menu] @@ -69,8 +65,7 @@ menu .menu.file # with the update button. labelframe .command -text "Command:" -padx {1m 0} -entry .command.e -relief sunken -borderwidth 2 -textvariable command \ - -font {Courier 12} +entry .command.e -textvariable command button .command.update -text Update -command doUpdate pack .command.update -side right -pady .1c -padx {.25c 0} pack .command.e -expand yes -fill x -ipadx 0.25c @@ -96,12 +91,11 @@ foreach i { grid .names -row 0 -column 0 -sticky nsew -padx .15c -pady .15c -rowspan 2 grid columnconfigure . 0 -weight 1 listbox .names.lb -width 20 -height 12 -yscrollcommand ".names.s set" \ - -relief sunken -borderwidth 2 -exportselection false + -exportselection false bind .names.lb <Double-1> { tc_loadNamedColor [.names.lb get [.names.lb curselection]] } - scrollbar .names.s -orient vertical -command ".names.lb yview" \ - -relief sunken -borderwidth 2 + scrollbar .names.s -orient vertical -command ".names.lb yview" pack .names.lb .names.s -side left -fill y -expand 1 while {[gets $f line] >= 0} { if {[regexp {^\s*\d+\s+\d+\s+\d+\s+(\S+)$} $line -> col]} { @@ -127,8 +121,7 @@ foreach i {1 2 3} { grid .adjust -row 0 -column 1 -sticky nsew -padx .15c -pady .15c labelframe .name -text "Name:" -padx 1m -pady 1m -entry .name.e -relief sunken -borderwidth 2 -textvariable name -width 10 \ - -font {Courier 12} +entry .name.e -textvariable name -width 10 pack .name.e -side right -expand 1 -fill x bind .name.e <Return> {tc_loadNamedColor $name} grid .name -column 1 -row 1 -sticky nsew -padx .15c -pady .15c diff --git a/library/demos/text.tcl b/library/demos/text.tcl index 4bb1155..ac895b7 100644 --- a/library/demos/text.tcl +++ b/library/demos/text.tcl @@ -3,7 +3,7 @@ # This demonstration script creates a text widget that describes # the basic editing functions. # -# RCS: @(#) $Id: text.tcl,v 1.6 2004/12/21 11:56:35 dkf Exp $ +# RCS: @(#) $Id: text.tcl,v 1.6.2.1 2007/11/01 16:37:22 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -22,9 +22,9 @@ positionWindow $w set btns [addSeeDismiss $w.buttons $w] pack $btns -side bottom -fill x -text $w.text -relief sunken -bd 2 -yscrollcommand "$w.scroll set" -setgrid 1 \ +text $w.text -yscrollcommand [list $w.scroll set] -setgrid 1 \ -height 30 -undo 1 -autosep 1 -scrollbar $w.scroll -command "$w.text yview" +scrollbar $w.scroll -command [list $w.text yview] pack $w.scroll -side right -fill y pack $w.text -expand yes -fill both $w.text insert 0.0 \ diff --git a/library/demos/twind.tcl b/library/demos/twind.tcl index b569d9a..b6da5fb 100644 --- a/library/demos/twind.tcl +++ b/library/demos/twind.tcl @@ -3,7 +3,7 @@ # This demonstration script creates a text widget with a bunch of # embedded windows. # -# RCS: @(#) $Id: twind.tcl,v 1.8.2.1 2007/10/16 04:03:54 dgp Exp $ +# RCS: @(#) $Id: twind.tcl,v 1.8.2.2 2007/11/01 16:37:23 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -22,7 +22,7 @@ positionWindow $w set btns [addSeeDismiss $w.buttons $w] pack $btns -side bottom -fill x -frame $w.f -highlightthickness 2 -borderwidth 2 -relief sunken +frame $w.f -highlightthickness 1 -borderwidth 1 -relief sunken set t $w.f.text text $t -yscrollcommand "$w.scroll set" -setgrid true -font $font -width 70 \ -height 35 -wrap word -highlightthickness 0 -borderwidth 0 @@ -301,8 +301,9 @@ proc textMakePeer {parent} { while {[winfo exists .peer$n]} { incr n } set w [toplevel .peer$n] wm title $w "Text Peer #$n" - frame $w.f -highlightthickness 2 -borderwidth 2 -relief sunken - set t [$parent peer create $w.f.text -yscrollcommand "$w.scroll set"] + frame $w.f -highlightthickness 1 -borderwidth 1 -relief sunken + set t [$parent peer create $w.f.text -yscrollcommand "$w.scroll set" \ + -borderwidth 0 -highlightthickness 0] pack $t -expand yes -fill both scrollbar $w.scroll -command "$t yview" pack $w.scroll -side right -fill y diff --git a/library/demos/unicodeout.tcl b/library/demos/unicodeout.tcl index bd9738c..9849d3e 100644 --- a/library/demos/unicodeout.tcl +++ b/library/demos/unicodeout.tcl @@ -3,7 +3,7 @@ # This demonstration script shows how you can produce output (in label # widgets) using many different alphabets. # -# RCS: @(#) $Id: unicodeout.tcl,v 1.5 2006/03/22 00:21:17 das Exp $ +# RCS: @(#) $Id: unicodeout.tcl,v 1.5.2.1 2007/11/01 16:37:23 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -55,7 +55,7 @@ set oldCursor [$w cget -cursor] $w conf -cursor watch update -if {[tk windowingsystem] eq "x11"} { +if {[tk windowingsystem] in {x11 win32}} { # Using presentation forms (pre-layouted) addSample $w Arabic \ "\uFE94\uFEF4\uFE91\uFEAE\uFECC\uFEDF\uFE8D " \ @@ -71,7 +71,7 @@ addSample $w "Simpl. Chinese" "\u6C49\u8BED" addSample $w Greek \ "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AE " \ "\u03B3\u03BB\u03CE\u03C3\u03C3\u03B1" -if {[tk windowingsystem] eq "x11"} { +if {[tk windowingsystem] in {x11 win32}} { # Visual order (pre-layouted) addSample $w Hebrew \ "\u05DD\u05D9\u05DC\u05E9\u05D5\u05E8\u05D9 " \ diff --git a/library/demos/widget b/library/demos/widget index f3be2c5..12c4b8a 100644 --- a/library/demos/widget +++ b/library/demos/widget @@ -10,7 +10,7 @@ exec wish "$0" "$@" # separate ".tcl" files is this directory, which are sourced by this script as # needed. # -# RCS: @(#) $Id: widget,v 1.29.2.5 2007/10/24 12:59:33 dgp Exp $ +# RCS: @(#) $Id: widget,v 1.29.2.6 2007/11/01 16:37:23 dgp Exp $ package require Tcl 8.5 package require Tk 8.5 @@ -35,7 +35,7 @@ if {[tk windowingsystem] eq "x11"} { if {"defaultFont" ni [font names]} { # TIP #145 defines some standard named fonts if {"TkDefaultFont" in [font names] && "TkFixedFont" in [font names]} { - # FIX ME: the following tecnique of cloning the font to copy it works + # FIX ME: the following technique of cloning the font to copy it works # fine but means that if the system font is changed by Tk # cannot update the copied font. font alias might be useful # here -- or fix the app to use TkDefaultFont etc. @@ -144,20 +144,22 @@ if {[tk windowingsystem] ne "aqua"} { } pack .statusBar -side bottom -fill x -pady 2 +set textheight 30 +catch {set textheight [expr {([winfo screenheight .] - 100) / + [font metrics mainFont -displayof . -linespace]}]} + ttk::frame .textFrame -scrollbar .s -orient vertical -command {.t yview} -highlightthickness 0 \ - -takefocus 1 -bd 1 +scrollbar .s -orient vertical -command {.t yview} -takefocus 1 pack .s -in .textFrame -side right -fill y -text .t -yscrollcommand {.s set} -wrap word -width 70 -height 30 \ - -font mainFont -setgrid 1 -highlightthickness 0 \ - -padx 4 -pady 2 -takefocus 0 -bd 1 +text .t -yscrollcommand {.s set} -wrap word -width 70 -height $textheight \ + -font mainFont -setgrid 1 -highlightthickness 0 \ + -padx 4 -pady 2 -takefocus 0 pack .t -in .textFrame -expand y -fill both -padx 1 pack .textFrame -expand yes -fill both if {[tk windowingsystem] eq "aqua"} { pack configure .statusBar.lab -padx {10 18} -pady {4 6} pack configure .statusBar -pady 0 - .s configure -bd 0 - .t configure -padx 10 -pady 0 -bd 0 + .t configure -padx 10 -pady 0 } # Create a bunch of tags to use in the text widget, such as those for section @@ -263,7 +265,7 @@ proc addFormattedText {formattedText} { } demo { set description [lassign $values name] - .t insert end "[incr demoCount]. [mc $description]." \ + .t insert end "[incr demoCount]. [mc $description]" \ [list demo demo-$name] if {$new} { .t image create end -image ::img::new -padx 5 @@ -476,7 +478,7 @@ proc showVars {w args} { ttk::label $f.v$var -textvariable $var -anchor w grid $f.n$var $f.v$var -padx 2 -pady 2 -sticky w } - ttk::button $b.ok -width 8 -text [mc "OK"] \ + ttk::button $b.ok -text [mc "OK"] \ -command [list destroy $w] -default active bind $w <Return> [list $b.ok invoke] bind $w <Escape> [list $b.ok invoke] @@ -514,7 +516,7 @@ proc invoke index { .t configure -cursor watch update set demo [string range [lindex $tags $i] 5 end] - uplevel [list source [file join $tk_demoDirectory $demo.tcl]] + uplevel 1 [list source [file join $tk_demoDirectory $demo.tcl]] update .t configure -cursor $cursor @@ -569,17 +571,12 @@ proc showCode w { toplevel $top set t [frame $top.f] - set text [text $t.text -font fixedFont -height 30 -wrap word -bd 1 \ + set text [text $t.text -font fixedFont -height 24 -wrap word \ -xscrollcommand [list $t.xscroll set] \ -yscrollcommand [list $t.yscroll set] \ -setgrid 1 -highlightthickness 0 -pady 2 -padx 3] - scrollbar $t.xscroll -command [list $t.text xview] \ - -highlightthickness 0 -orient horizontal -bd 1 - scrollbar $t.yscroll -command [list $t.text yview] \ - -highlightthickness 0 -orient vertical -bd 1 - if {[tk windowingsystem] eq "aqua"} { - foreach i [list $t.text $t.xscroll $t.yscroll] {$i configure -bd 0} - } + scrollbar $t.xscroll -command [list $t.text xview] -orient horizontal + scrollbar $t.yscroll -command [list $t.text yview] -orient vertical grid $t.text $t.yscroll -sticky news #grid $t.xscroll @@ -721,9 +718,8 @@ proc PrintTextWin32 {filename} { # proc aboutBox {} { tk_messageBox -icon info -type ok -title [mc "About Widget Demo"] \ - -message "[mc {Tk widget demonstration application}] - -[mc {Copyright (c) %s} {1996-1997 Sun Microsystems, Inc.}] + -message [mc "Tk widget demonstration application"] -detail \ +"[mc {Copyright (c) %s} {1996-1997 Sun Microsystems, Inc.}] [mc {Copyright (c) %s} {1997-2000 Ajuba Solutions, Inc.}] [mc {Copyright (c) %s} {2001-2007 Donal K. Fellows}] [mc {Copyright (c) %s} {2002-2007 Daniel A. Steffen}]" diff --git a/library/dialog.tcl b/library/dialog.tcl index 374a2dc..345e745 100644 --- a/library/dialog.tcl +++ b/library/dialog.tcl @@ -3,7 +3,7 @@ # This file defines the procedure tk_dialog, which creates a dialog # box containing a bitmap, a message, and one or more buttons. # -# RCS: @(#) $Id: dialog.tcl,v 1.21.2.1 2007/05/30 13:47:42 dgp Exp $ +# RCS: @(#) $Id: dialog.tcl,v 1.21.2.2 2007/11/01 16:37:20 dgp Exp $ # # Copyright (c) 1992-1993 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -91,11 +91,7 @@ proc ::tk_dialog {w title text bitmap default args} { # overridden by the caller). option add *Dialog.msg.wrapLength 3i widgetDefault - if {$windowingsystem eq "aqua"} { - option add *Dialog.msg.font system widgetDefault - } else { - option add *Dialog.msg.font {Times 12} widgetDefault - } + option add *Dialog.msg.font TkCaptionFont widgetDefault label $w.msg -justify left -text $text pack $w.msg -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m diff --git a/library/entry.tcl b/library/entry.tcl index 32b1973..f1bda7e 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk entry widgets and provides # procedures that help in implementing those bindings. # -# RCS: @(#) $Id: entry.tcl,v 1.24 2005/07/25 09:06:00 dkf Exp $ +# RCS: @(#) $Id: entry.tcl,v 1.24.2.1 2007/11/01 16:37:20 dgp Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -60,7 +60,8 @@ bind Entry <<Paste>> { } } bind Entry <<Clear>> { - %W delete sel.first sel.last + # ignore if there is no selection + catch { %W delete sel.first sel.last } } bind Entry <<PasteSelection>> { if {$tk_strictMotif || ![info exists tk::Priv(mouseMoved)] diff --git a/library/listbox.tcl b/library/listbox.tcl index 27cb114..b882db4 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk listbox widgets # and provides procedures that help in implementing those bindings. # -# RCS: @(#) $Id: listbox.tcl,v 1.15 2005/09/10 14:53:20 das Exp $ +# RCS: @(#) $Id: listbox.tcl,v 1.15.2.1 2007/11/01 16:37:20 dgp Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. @@ -35,7 +35,7 @@ bind Listbox <1> { if {[winfo exists %W]} { - tk::ListboxBeginSelect %W [%W index @%x,%y] + tk::ListboxBeginSelect %W [%W index @%x,%y] 1 } } @@ -227,7 +227,7 @@ if {"x11" eq [tk windowingsystem]} { # el - The element for the selection operation (typically the # one under the pointer). Must be in numerical form. -proc ::tk::ListboxBeginSelect {w el} { +proc ::tk::ListboxBeginSelect {w el {focus 1}} { variable ::tk::Priv if {[$w cget -selectmode] eq "multiple"} { if {[$w selection includes $el]} { @@ -243,6 +243,10 @@ proc ::tk::ListboxBeginSelect {w el} { set Priv(listboxPrev) $el } event generate $w <<ListboxSelect>> + # check existence as ListboxSelect may destroy us + if {$focus && [winfo exists $w] && [$w cget -state] eq "normal"} { + focus $w + } } # ::tk::ListboxMotion -- diff --git a/library/msgbox.tcl b/library/msgbox.tcl index 17f34e7..fd9ee20 100644 --- a/library/msgbox.tcl +++ b/library/msgbox.tcl @@ -3,7 +3,7 @@ # Implements messageboxes for platforms that do not have native # messagebox support. # -# RCS: @(#) $Id: msgbox.tcl,v 1.30.2.1 2007/05/30 13:47:42 dgp Exp $ +# RCS: @(#) $Id: msgbox.tcl,v 1.30.2.2 2007/11/01 16:37:20 dgp Exp $ # # Copyright (c) 1994-1997 Sun Microsystems, Inc. # @@ -264,7 +264,7 @@ proc ::tk::MessageBox {args} { # if {[winfo viewable [winfo toplevel $data(-parent)]] } { wm transient $w $data(-parent) - } + } if {$windowingsystem eq "aqua"} { ::tk::unsupported::MacWindowStyle style $w moveableModal {} @@ -286,13 +286,8 @@ proc ::tk::MessageBox {args} { option add *Dialog.msg.wrapLength 3i widgetDefault option add *Dialog.dtl.wrapLength 3i widgetDefault - if {$windowingsystem eq "aqua"} { - option add *Dialog.msg.font system widgetDefault - option add *Dialog.dtl.font system widgetDefault - } else { - option add *Dialog.msg.font {Times 14} widgetDefault - option add *Dialog.dtl.font {Times 10} widgetDefault - } + option add *Dialog.msg.font TkCaptionFont widgetDefault + option add *Dialog.dtl.font TkDefaultFont widgetDefault label $w.msg -anchor nw -justify left -text $data(-message) \ -background $bg diff --git a/library/obsolete.tcl b/library/obsolete.tcl index 16a19a1..e593520 100644 --- a/library/obsolete.tcl +++ b/library/obsolete.tcl @@ -3,7 +3,7 @@ # This file contains obsolete procedures that people really shouldn't # be using anymore, but which are kept around for backward compatibility. # -# RCS: @(#) $Id: obsolete.tcl,v 1.2 1998/09/14 18:23:24 stanton Exp $ +# RCS: @(#) $Id: obsolete.tcl,v 1.2.32.1 2007/11/01 16:37:21 dgp Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. @@ -19,3 +19,160 @@ proc tk_menuBar args {} proc tk_bindForTraversal args {} + +# ::tk::classic::restore -- +# +# Restore the pre-8.5 (Tk classic) look as the widget defaults for classic +# Tk widgets. +# +# The value following an 'option add' call is the new 8.5 value. +# +namespace eval ::tk::classic { + # This may need to be adjusted for some window managers that are + # more aggressive with their own Xdefaults (like KDE and CDE) + variable prio "widgetDefault" +} + +proc ::tk::classic::restore {args} { + # Restore classic (8.4) look to classic Tk widgets + variable prio + + if {[llength $args]} { + foreach what $args { + ::tk::classic::restore_$what + } + } else { + foreach cmd [info procs restore_*] { + $cmd + } + } +} + +proc ::tk::classic::restore_font {args} { + # Many widgets were adjusted from hard-coded defaults to using the + # TIP#145 fonts defined in fonts.tcl (eg TkDefaultFont, TkFixedFont, ...) + # For restoring compatibility, we only correct size and weighting changes, + # as the fonts themselves remained mostly the same. + if {[tk windowingsystem] eq "x11"} { + font configure TkDefaultFont -weight bold ; # normal + font configure TkFixedFont -size -12 ; # -10 + } + # Add these with prio 21 to override value in dialog/msgbox.tcl + if {[tk windowingsystem] eq "aqua"} { + option add *Dialog.msg.font system 21; # TkCaptionFont + option add *Dialog.dtl.font system 21; # TkCaptionFont + option add *ErrorDialog*Label.font system 21; # TkCaptionFont + } else { + option add *Dialog.msg.font {Times 12} 21; # TkCaptionFont + option add *Dialog.dtl.font {Times 10} 21; # TkCaptionFont + option add *ErrorDialog*Label.font {Times -18} 21; # TkCaptionFont + } +} + +proc ::tk::classic::restore_button {args} { + variable prio + if {[tk windowingsystem] eq "x11"} { + foreach cls {Button Radiobutton Checkbutton} { + option add *$cls.borderWidth 2 $prio; # 1 + } + } +} + +proc ::tk::classic::restore_entry {args} { + variable prio + # Entry and Spinbox share core defaults + foreach cls {Entry Spinbox} { + if {[tk windowingsystem] ne "aqua"} { + option add *$cls.borderWidth 2 $prio; # 1 + } + if {[tk windowingsystem] eq "x11"} { + option add *$cls.background "#d9d9d9" $prio; # "white" + option add *$cls.selectBorderWidth 1 $prio; # 0 + } + } +} + +proc ::tk::classic::restore_listbox {args} { + variable prio + if {[tk windowingsystem] ne "win32"} { + option add *Listbox.background "#d9d9d9" $prio; # "white" + option add *Listbox.activeStyle "underline" $prio; # "dotbox" + } + if {[tk windowingsystem] ne "aqua"} { + option add *Listbox.borderWidth 2 $prio; # 1 + } + if {[tk windowingsystem] eq "x11"} { + option add *Listbox.selectBorderWidth 1 $prio; # 0 + } + # Remove focus into Listbox added for 8.5 + bind Listbox <1> { + if {[winfo exists %W]} { + tk::ListboxBeginSelect %W [%W index @%x,%y] + } + } +} + +proc ::tk::classic::restore_menu {args} { + variable prio + if {[tk windowingsystem] eq "x11"} { + option add *Menu.activeBorderWidth 2 $prio; # 1 + option add *Menu.borderWidth 2 $prio; # 1 + } + if {[tk windowingsystem] ne "aqua"} { + option add *Menu.font "TkDefaultFont" $prio; # "TkMenuFont" + } +} + +proc ::tk::classic::restore_menubutton {args} { + variable prio + option add *Menubutton.borderWidth 2 $prio; # 1 +} + +proc ::tk::classic::restore_message {args} { + variable prio + option add *Message.borderWidth 2 $prio; # 1 +} + +proc ::tk::classic::restore_panedwindow {args} { + variable prio + option add *Panedwindow.borderWidth 2 $prio; # 1 + option add *Panedwindow.sashWidth 2 $prio; # 3 + option add *Panedwindow.sashPad 2 $prio; # 0 + option add *Panedwindow.sashRelief raised $prio; # flat + option add *Panedwindow.opaqueResize 0 $prio; # 1 + if {[tk windowingsystem] ne "win32"} { + option add *Panedwindow.showHandle 1 $prio; # 0 + } +} + +proc ::tk::classic::restore_scale {args} { + variable prio + option add *Scale.borderWidth 2 $prio; # 1 + if {[tk windowingsystem] eq "x11"} { + option add *Scale.troughColor "#c3c3c3" $prio; # "#b3b3b3" + } +} + +proc ::tk::classic::restore_scrollbar {args} { + variable prio + if {[tk windowingsystem] eq "x11"} { + option add *Scrollbar.borderWidth 2 $prio; # 1 + option add *Scrollbar.highlightThickness 1 $prio; # 0 + option add *Scrollbar.width 15 $prio; # 11 + option add *Scrollbar.troughColor "#c3c3c3" $prio; # "#b3b3b3" + } +} + +proc ::tk::classic::restore_text {args} { + variable prio + if {[tk windowingsystem] ne "aqua"} { + option add *Text.borderWidth 2 $prio; # 1 + } + if {[tk windowingsystem] eq "win32"} { + option add *Text.font "TkDefaultFont" $prio; # "TkFixedFont" + } + if {[tk windowingsystem] eq "x11"} { + option add *Text.background "#d9d9d9" $prio; # white + option add *Text.selectBorderWidth 1 $prio; # 0 + } +} diff --git a/library/optMenu.tcl b/library/optMenu.tcl index 05b3a45..973ffbb 100644 --- a/library/optMenu.tcl +++ b/library/optMenu.tcl @@ -3,7 +3,7 @@ # This file defines the procedure tk_optionMenu, which creates # an option button and its associated menu. # -# RCS: @(#) $Id: optMenu.tcl,v 1.4 2001/08/01 16:21:11 dgp Exp $ +# RCS: @(#) $Id: optMenu.tcl,v 1.4.10.1 2007/11/01 16:37:21 dgp Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. @@ -34,7 +34,7 @@ proc ::tk_optionMenu {w varName firstValue args} { set var $firstValue } menubutton $w -textvariable $varName -indicatoron 1 -menu $w.menu \ - -relief raised -bd 2 -highlightthickness 2 -anchor c \ + -relief raised -highlightthickness 1 -anchor c \ -direction flush menu $w.menu -tearoff 0 $w.menu add radiobutton -label $firstValue -variable $varName diff --git a/library/tclIndex b/library/tclIndex index 2550b4e..e7f5b81 100644 --- a/library/tclIndex +++ b/library/tclIndex @@ -122,6 +122,7 @@ set auto_index(::tk::ensure_psenc_is_loaded) [list source [file join $dir mkpsen set auto_index(::tk::MessageBox) [list source [file join $dir msgbox.tcl]] set auto_index(tk_menuBar) [list source [file join $dir obsolete.tcl]] set auto_index(tk_bindForTraversal) [list source [file join $dir obsolete.tcl]] +set auto_index(::tk::classic::restore) [list source [file join $dir obsolete.tcl]] set auto_index(tk_optionMenu) [list source [file join $dir optMenu.tcl]] set auto_index(tk_setPalette) [list source [file join $dir palette.tcl]] set auto_index(::tk::RecolorTree) [list source [file join $dir palette.tcl]] diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index 14c1ebd..a1b8e3c 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -11,7 +11,7 @@ # files by clicking on the file icons or by entering a filename # in the "Filename:" entry. # -# RCS: @(#) $Id: tkfbox.tcl,v 1.59.2.1 2007/10/27 04:23:16 dgp Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.59.2.2 2007/11/01 16:37:21 dgp Exp $ # # Copyright (c) 1994-1998 Sun Microsystems, Inc. # @@ -222,7 +222,7 @@ proc ::tk::IconList_Create {w} { frame $w set data(sbar) [scrollbar $w.sbar -orient horizontal -takefocus 0] catch {$data(sbar) configure -highlightthickness 0} - set data(canvas) [canvas $w.canvas -bd 2 -relief sunken \ + set data(canvas) [canvas $w.canvas -borderwidth 1 -relief sunken \ -width 400 -height 120 -takefocus 1] pack $data(sbar) -side bottom -fill x -padx 2 pack $data(canvas) -expand yes -fill both @@ -1088,7 +1088,7 @@ static char updir_bits[] = { # f2: the frame with the OK button, cancel button, "file name" field # and file types field. # - set f2 [frame $w.f2 -bd 0] + set f2 [frame $w.f2] bind [::tk::AmpWidget label $f2.lab -text $fNameCaption -anchor e -pady 0]\ <<AltUnderlined>> [list focus $f2.ent] set data(ent) [entry $f2.ent] @@ -1104,8 +1104,7 @@ static char updir_bits[] = { set data(typeMenuBtn) [menubutton $f2.menu -indicatoron 1 \ -menu $f2.menu.m] set data(typeMenu) [menu $data(typeMenuBtn).m -tearoff 0] - $data(typeMenuBtn) configure -takefocus 1 -highlightthickness 2 \ - -relief raised -bd 2 -anchor w + $data(typeMenuBtn) configure -takefocus 1 -relief raised -anchor w bind $data(typeMenuLab) <<AltUnderlined>> [list \ focus $data(typeMenuBtn)] } diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl index 4953197..5800a14 100644 --- a/library/ttk/aquaTheme.tcl +++ b/library/ttk/aquaTheme.tcl @@ -1,5 +1,5 @@ # -# $Id: aquaTheme.tcl,v 1.2.2.3 2007/10/24 12:59:33 dgp Exp $ +# $Id: aquaTheme.tcl,v 1.2.2.4 2007/11/01 16:37:23 dgp Exp $ # # Aqua theme (OSX native look and feel) # @@ -17,7 +17,7 @@ namespace eval ttk::theme::aqua { -insertwidth 1 \ ; ttk::style map . \ - -foreground [list disabled "#a3a3a3" background "#a3a3a3"] \ + -foreground [list disabled "#7f7f7f" background "#7f7f7f"] \ -selectbackground [list background "#c3c3c3" !focus "#c3c3c3"] \ -selectforeground [list background "#a3a3a3" !focus "#000000"] \ ; @@ -35,11 +35,8 @@ namespace eval ttk::theme::aqua { ttk::style configure TNotebook -tabposition n -padding {20 12} ttk::style configure TNotebook.Tab -padding {10 2 10 2} - - # Adjust combobox post position to ensure the box is - # directly under 'entry square' - # - ttk::style configure TCombobox -postoffset {3 -2 -6 0} + # Combobox: + ttk::style configure TCombobox -postoffset {5 -2 -10 0} # Treeview: ttk::style configure Treeview -rowheight 18 diff --git a/library/ttk/combobox.tcl b/library/ttk/combobox.tcl index fb189b9..71b43bb 100644 --- a/library/ttk/combobox.tcl +++ b/library/ttk/combobox.tcl @@ -1,5 +1,5 @@ # -# $Id: combobox.tcl,v 1.3.2.2 2007/10/24 12:59:34 dgp Exp $ +# $Id: combobox.tcl,v 1.3.2.3 2007/11/01 16:37:23 dgp Exp $ # # Combobox bindings. # @@ -8,6 +8,32 @@ # is set to a namespace variable, which is used to synchronize the # combobox values with the listbox values. # +# <<NOTE-WM-TRANSIENT>>: +# +# Need to set [wm transient] just before mapping the popdown +# instead of when it's created, in case a containing frame +# has been reparented [#1818441]. +# +# On Windows: setting [wm transient] prevents the parent +# toplevel from becoming inactive when the popdown is posted +# (Tk 8.4.8+) +# +# On X11: WM_TRANSIENT_FOR on override-redirect windows +# may be used by compositing managers and by EWMH-aware +# window managers (even though the older ICCCM spec says +# it's meaningless). +# +# On OSX: [wm transient] does utterly the wrong thing. +# Instead, we use [MacWindowStyle "help" "noActivates hideOnSuspend"]. +# The "noActivates" attribute prevents the parent toplevel +# from deactivating when the popdown is posted, and is also +# necessary for "help" windows to receive mouse events. +# "hideOnSuspend" makes the popdown disappear (resp. reappear) +# when the parent toplevel is deactivated (resp. reactivated). +# (see [#1814778]). Also set [wm resizable 0 0], to prevent +# TkAqua from shrinking the scrollbar to make room for a grow box +# that isn't there. +# namespace eval ttk::combobox { variable Values ;# Values($cb) is -listvariable of listbox widget @@ -234,9 +260,8 @@ namespace eval ::ttk::combobox { proc ttk::combobox::PopdownWindow {cb} { variable scrollbar - set popdown $cb.popdown - if {![winfo exists $popdown]} { - PopdownToplevel $popdown + if {![winfo exists $cb.popdown]} { + set popdown [PopdownToplevel $cb.popdown] $scrollbar $popdown.sb \ -orient vertical -command [list $popdown.l yview] @@ -255,40 +280,15 @@ proc ttk::combobox::PopdownWindow {cb} { grid columnconfigure $popdown 0 -weight 1 grid rowconfigure $popdown 0 -weight 1 } - # to handle reparented frame/toplevel, recalculate transient each time - switch -- [tk windowingsystem] { - x11 { - wm transient $popdown [winfo toplevel [winfo parent $popdown]] - } - win32 { - wm transient $popdown [winfo toplevel [winfo parent $popdown]] - } - } - return $popdown + return $cb.popdown } ## PopdownToplevel -- Create toplevel window for the combobox popdown # -# NOTES: -# On Windows: setting [wm transient] prevents the parent -# toplevel from becoming inactive when the popdown is posted -# (Tk 8.4.8+) -# -# On X11: WM_TRANSIENT_FOR on override-redirect windows -# may be used by compositing managers and by EWMH-aware -# window managers (even though the older ICCCM spec says -# it's meaningless). -# -# On OSX: for MacWindowStyle "help", "noActivates" prevents -# the parent toplevel from deactivating when the popdown -# is posted, and is necessary for the popdown to receive -# mouse events. "hideOnSuspend" makes the popdown disappear -# (resp. reappear) when the parent toplevel is deactivated. -# +# See also <<NOTE-WM-TRANSIENT>> +# proc ttk::combobox::PopdownToplevel {w} { - if {![winfo exists $w]} { - toplevel $w -class ComboboxPopdown - } + toplevel $w -class ComboboxPopdown wm withdraw $w switch -- [tk windowingsystem] { default - @@ -304,6 +304,7 @@ proc ttk::combobox::PopdownToplevel {w} { $w configure -relief solid -borderwidth 0 tk::unsupported::MacWindowStyle style $w \ help {noActivates hideOnSuspend} + wm resizable $w 0 0 } } return $w @@ -379,6 +380,10 @@ proc ttk::combobox::Post {cb} { ConfigureListbox $cb update idletasks PlacePopdown $cb $popdown + # See <<NOTE-WM-TRANSIENT>> + switch -- [tk windowingsystem] { + x11 - win32 { wm transient $popdown [winfo toplevel $cb] } + } # Post the listbox: # @@ -391,7 +396,9 @@ proc ttk::combobox::Post {cb} { # Unpost the listbox. # proc ttk::combobox::Unpost {cb} { - wm withdraw $cb.popdown + if {[winfo exists $cb.popdown]} { + wm withdraw $cb.popdown + } grab release $cb.popdown ;# in case of stuck or unexpected grab [#1239190] } diff --git a/library/ttk/fonts.tcl b/library/ttk/fonts.tcl index 83e19b5..1c4fbb0 100644 --- a/library/ttk/fonts.tcl +++ b/library/ttk/fonts.tcl @@ -1,5 +1,5 @@ # -# $Id: fonts.tcl,v 1.4.2.2 2007/10/24 12:59:35 dgp Exp $ +# $Id: fonts.tcl,v 1.4.2.3 2007/11/01 16:37:23 dgp Exp $ # # Font specifications. # @@ -111,7 +111,7 @@ switch -- [tk windowingsystem] { set F(viewsize) 12 set F(smallsize) 11 set F(labelsize) 10 - set F(fixedsize) 9 + set F(fixedsize) 11 font configure TkDefaultFont -family $F(family) -size $F(size) font configure TkTextFont -family $F(family) -size $F(size) @@ -122,7 +122,7 @@ switch -- [tk windowingsystem] { font configure TkFixedFont -family $F(fixed) -size $F(fixedsize) font configure TkIconFont -family $F(family) -size $F(size) font configure TkMenuFont -family $F(family) -size $F(menusize) - font configure TkSmallCaptionFont -family $F(family) -size $F(labelsize) + font configure TkSmallCaptionFont -family $F(family) -size $F(labelsize) } default - x11 { @@ -136,7 +136,7 @@ switch -- [tk windowingsystem] { set F(size) -12 set F(ttsize) -10 set F(capsize) -14 - set F(fixedsize) -10 + set F(fixedsize) -12 font configure TkDefaultFont -family $F(family) -size $F(size) font configure TkTextFont -family $F(family) -size $F(size) diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c index 276e161..32b1e98 100644 --- a/macosx/tkMacOSXColor.c +++ b/macosx/tkMacOSXColor.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXColor.c,v 1.8.2.4 2007/07/03 02:28:13 dgp Exp $ + * RCS: @(#) $Id: tkMacOSXColor.c,v 1.8.2.5 2007/11/01 16:37:23 dgp Exp $ */ #include "tkMacOSXPrivate.h" @@ -253,9 +253,12 @@ GetThemeColor( } else if (textColor) { err = ChkErr(GetThemeTextColor, textColor, 32, true, c); } else { - c->red = ((pixel >> 16) & 0xff) << 8; - c->green = ((pixel >> 8) & 0xff) << 8; - c->blue = ((pixel ) & 0xff) << 8; + c->red = (pixel >> 16) & 0xff; + c->green = (pixel >> 8) & 0xff; + c->blue = (pixel ) & 0xff; + c->red |= c->red << 8; + c->green |= c->green << 8; + c->blue |= c->blue << 8; } return err; } diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index 0a997ec..7d11de7 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXDefault.h,v 1.12 2007/04/23 21:24:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXDefault.h,v 1.12.2.1 2007/11/01 16:37:23 dgp Exp $ */ #ifndef _TKMACDEFAULT @@ -63,7 +63,7 @@ #define DEF_BUTTON_DISABLED_FG_MONO "" #define DEF_BUTTON_FG "systemButtonText" #define DEF_CHKRAD_FG DEF_BUTTON_FG -#define DEF_BUTTON_FONT "system" +#define DEF_BUTTON_FONT "TkDefaultFont" #define DEF_BUTTON_HEIGHT "0" #define DEF_BUTTON_HIGHLIGHT_BG_COLOR DEF_BUTTON_BG_COLOR #define DEF_BUTTON_HIGHLIGHT_BG_MONO DEF_BUTTON_BG_MONO @@ -159,7 +159,7 @@ #define DEF_ENTRY_DISABLED_BG_MONO WHITE #define DEF_ENTRY_DISABLED_FG DISABLED #define DEF_ENTRY_EXPORT_SELECTION "1" -#define DEF_ENTRY_FONT "Helvetica 12" +#define DEF_ENTRY_FONT "TkTextFont" #define DEF_ENTRY_FG BLACK #define DEF_ENTRY_HIGHLIGHT_BG NORMAL_BG #define DEF_ENTRY_HIGHLIGHT BLACK @@ -220,7 +220,7 @@ #define DEF_LABELFRAME_CLASS "Labelframe" #define DEF_LABELFRAME_RELIEF "groove" #define DEF_LABELFRAME_FG "systemButtonText" -#define DEF_LABELFRAME_FONT "system" +#define DEF_LABELFRAME_FONT "TkDefaultFont" #define DEF_LABELFRAME_TEXT "" #define DEF_LABELFRAME_LABELANCHOR "nw" @@ -228,14 +228,14 @@ * Defaults for listboxes: */ -#define DEF_LISTBOX_ACTIVE_STYLE "underline" -#define DEF_LISTBOX_BG_COLOR NORMAL_BG +#define DEF_LISTBOX_ACTIVE_STYLE "dotbox" +#define DEF_LISTBOX_BG_COLOR WHITE #define DEF_LISTBOX_BG_MONO WHITE #define DEF_LISTBOX_BORDER_WIDTH "1" #define DEF_LISTBOX_CURSOR "" #define DEF_LISTBOX_DISABLED_FG DISABLED #define DEF_LISTBOX_EXPORT_SELECTION "1" -#define DEF_LISTBOX_FONT "application" +#define DEF_LISTBOX_FONT "TkTextFont" #define DEF_LISTBOX_FG BLACK #define DEF_LISTBOX_HEIGHT "10" #define DEF_LISTBOX_HIGHLIGHT_BG NORMAL_BG @@ -299,7 +299,7 @@ #define DEF_MENU_CURSOR "arrow" #define DEF_MENU_DISABLED_FG_COLOR "systemMenuDisabled" #define DEF_MENU_DISABLED_FG_MONO "" -#define DEF_MENU_FONT "menu" +#define DEF_MENU_FONT "menu" /* special: see tkMacOSXMenu.c */ #define DEF_MENU_FG "systemMenuText" #define DEF_MENU_POST_COMMAND "" #define DEF_MENU_RELIEF "flat" @@ -328,12 +328,12 @@ #define DEF_MENUBUTTON_BG_COLOR NORMAL_BG #define DEF_MENUBUTTON_BG_MONO WHITE #define DEF_MENUBUTTON_BITMAP "" -#define DEF_MENUBUTTON_BORDER_WIDTH "2" +#define DEF_MENUBUTTON_BORDER_WIDTH "1" #define DEF_MENUBUTTON_CURSOR "" #define DEF_MENUBUTTON_DIRECTION "below" #define DEF_MENUBUTTON_DISABLED_FG_COLOR DISABLED #define DEF_MENUBUTTON_DISABLED_FG_MONO "" -#define DEF_MENUBUTTON_FONT "menu" +#define DEF_MENUBUTTON_FONT "TkDefaultFont" #define DEF_MENUBUTTON_FG BLACK #define DEF_MENUBUTTON_HEIGHT "0" #define DEF_MENUBUTTON_HIGHLIGHT_BG_COLOR DEF_MENUBUTTON_BG_COLOR @@ -364,10 +364,10 @@ #define DEF_MESSAGE_ASPECT "150" #define DEF_MESSAGE_BG_COLOR NORMAL_BG #define DEF_MESSAGE_BG_MONO WHITE -#define DEF_MESSAGE_BORDER_WIDTH "2" +#define DEF_MESSAGE_BORDER_WIDTH "1" #define DEF_MESSAGE_CURSOR "" #define DEF_MESSAGE_FG BLACK -#define DEF_MESSAGE_FONT "system" +#define DEF_MESSAGE_FONT "TkDefaultFont" #define DEF_MESSAGE_HIGHLIGHT_BG NORMAL_BG #define DEF_MESSAGE_HIGHLIGHT BLACK #define DEF_MESSAGE_HIGHLIGHT_WIDTH "0" @@ -385,19 +385,19 @@ #define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG #define DEF_PANEDWINDOW_BG_MONO WHITE -#define DEF_PANEDWINDOW_BORDERWIDTH "2" +#define DEF_PANEDWINDOW_BORDERWIDTH "1" #define DEF_PANEDWINDOW_CURSOR "" #define DEF_PANEDWINDOW_HANDLEPAD "8" #define DEF_PANEDWINDOW_HANDLESIZE "8" #define DEF_PANEDWINDOW_HEIGHT "" -#define DEF_PANEDWINDOW_OPAQUERESIZE "0" +#define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" -#define DEF_PANEDWINDOW_SASHPAD "2" -#define DEF_PANEDWINDOW_SASHRELIEF "raised" -#define DEF_PANEDWINDOW_SASHWIDTH "2" -#define DEF_PANEDWINDOW_SHOWHANDLE "1" +#define DEF_PANEDWINDOW_SASHPAD "0" +#define DEF_PANEDWINDOW_SASHRELIEF "flat" +#define DEF_PANEDWINDOW_SASHWIDTH "3" +#define DEF_PANEDWINDOW_SHOWHANDLE "0" #define DEF_PANEDWINDOW_WIDTH "" /* @@ -424,11 +424,11 @@ #define DEF_SCALE_BG_COLOR NORMAL_BG #define DEF_SCALE_BG_MONO WHITE #define DEF_SCALE_BIG_INCREMENT "0" -#define DEF_SCALE_BORDER_WIDTH "2" +#define DEF_SCALE_BORDER_WIDTH "1" #define DEF_SCALE_COMMAND "" #define DEF_SCALE_CURSOR "" #define DEF_SCALE_DIGITS "0" -#define DEF_SCALE_FONT "system" +#define DEF_SCALE_FONT "TkDefaultFont" #define DEF_SCALE_FG_COLOR BLACK #define DEF_SCALE_FG_MONO BLACK #define DEF_SCALE_FROM "0" @@ -464,18 +464,15 @@ #define DEF_SCROLLBAR_ACTIVE_RELIEF "raised" #define DEF_SCROLLBAR_BG_COLOR NORMAL_BG #define DEF_SCROLLBAR_BG_MONO WHITE -/* #define DEF_SCROLLBAR_BORDER_WIDTH "2" */ #define DEF_SCROLLBAR_BORDER_WIDTH "0" #define DEF_SCROLLBAR_COMMAND "" #define DEF_SCROLLBAR_CURSOR "" #define DEF_SCROLLBAR_EL_BORDER_WIDTH "-1" #define DEF_SCROLLBAR_HIGHLIGHT_BG NORMAL_BG #define DEF_SCROLLBAR_HIGHLIGHT BLACK -/* #define DEF_SCROLLBAR_HIGHLIGHT_WIDTH "2" */ #define DEF_SCROLLBAR_HIGHLIGHT_WIDTH "0" #define DEF_SCROLLBAR_JUMP "0" #define DEF_SCROLLBAR_ORIENT "vertical" -/*#define DEF_SCROLLBAR_RELIEF "sunken" */ #define DEF_SCROLLBAR_RELIEF "flat" #define DEF_SCROLLBAR_REPEAT_DELAY "300" #define DEF_SCROLLBAR_REPEAT_INTERVAL "100" @@ -496,7 +493,7 @@ #define DEF_TEXT_CURSOR "xterm" #define DEF_TEXT_FG BLACK #define DEF_TEXT_EXPORT_SELECTION "1" -#define DEF_TEXT_FONT "Courier 12" +#define DEF_TEXT_FONT "TkFixedFont" #define DEF_TEXT_HEIGHT "24" #define DEF_TEXT_HIGHLIGHT_BG NORMAL_BG #define DEF_TEXT_HIGHLIGHT BLACK @@ -537,7 +534,7 @@ * Defaults for canvas text: */ -#define DEF_CANVTEXT_FONT "Helvetica 12" +#define DEF_CANVTEXT_FONT "TkDefaultFont" /* * Defaults for toplevels (most of the defaults for frames also apply diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index 8ad52e7..d6e5586 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -35,7 +35,7 @@ * that such fonts can not be used for controls, because controls * definitely require a family id (this assertion needs testing). * - * RCS: @(#) $Id: tkMacOSXFont.c,v 1.24.2.6 2007/10/24 12:59:35 dgp Exp $ + * RCS: @(#) $Id: tkMacOSXFont.c,v 1.24.2.7 2007/11/01 16:37:23 dgp Exp $ */ #include "tkMacOSXPrivate.h" @@ -348,12 +348,11 @@ InitSystemFonts( systemFont++; } fa.family = Tk_GetUid("monaco"); - fa.size = 9; + fa.size = 11; fa.weight = TK_FW_NORMAL; fa.slant = TK_FS_ROMAN; fa.underline = 0; CreateNamedSystemFont(interp, tkwin, "TkFixedFont", &fa); - } /* diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index da68c84..a3bab5f 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -19,15 +19,15 @@ * "Active" means different things in Mac and Tk terminology -- * On Aqua, widgets are "Active" if they belong to the foreground window, * "Inactive" if they are in a background window. - * Tk/ttk uses the term "active" to mean that the mouse cursor + * Tk uses the term "active" to mean that the mouse cursor * is over a widget; aka "hover", "prelight", or "hot-tracked". - * (Aqua doesn't use this kind of feedback). + * Aqua doesn't use this kind of feedback. * * The QuickDraw/Carbon coordinate system is relative to the * top-level window, not to the Tk_Window. BoxToRect() * accounts for this. * - * RCS: @(#) $Id: ttkMacOSXTheme.c,v 1.7.2.4 2007/10/27 04:23:16 dgp Exp $ + * RCS: @(#) $Id: ttkMacOSXTheme.c,v 1.7.2.5 2007/11/01 16:37:24 dgp Exp $ */ #include "tkMacOSXPrivate.h" @@ -408,56 +408,45 @@ static Ttk_ElementSpec EntryElementSpec = { }; /*---------------------------------------------------------------------- - * +++ Pop-up arrow (for comboboxes) - * NOTE: This isn't right at all, but I can't find the correct - * function in the Appearance Manager reference. + * +++ Combobox: + * + * NOTES: + * kThemeMetricComboBoxLargeDisclosureWidth -> 17 + * Padding and margins guesstimated by trial-and-error. */ -static void PopupArrowElementSize( - void *clientData, void *elementRecord, Tk_Window tkwin, +static Ttk_Padding ComboboxPadding = { 2, 3, 17, 1 }; +static Ttk_Padding ComboboxMargins = { 3, 3, 4, 4 }; + +static void ComboboxElementSize( + void *clientData, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { - *widthPtr = 12; /* wild-assed guess */ - *heightPtr = 12; /* wild-assed guess */ + *widthPtr = 0; + *heightPtr = 0; + *paddingPtr = Ttk_AddPadding(ComboboxMargins, ComboboxPadding); } -static void PopupArrowElementDraw( +static void ComboboxElementDraw( void *clientData, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, Ttk_State state) { - Rect bounds = BoxToRect(d, b); ThemeButtonParms *parms = clientData; + Rect bounds = BoxToRect(d, Ttk_PadBox(b, ComboboxMargins)); ThemeButtonDrawInfo info = computeButtonDrawInfo(parms, state); - bounds.left -= 6; - bounds.top -= 3; - bounds.right -= 6; - bounds.bottom -= 2; - BEGIN_DRAWING(d) - DrawThemeButton(&bounds, kThemeArrowButton, &info, + DrawThemeButton(&bounds, kThemeComboBox, &info, NULL/*prevInfo*/,NULL/*eraseProc*/,NULL/*labelProc*/,0/*userData*/); - - bounds = BoxToRect(d, Ttk_PadBox(b, ButtonMargins)); - bounds.top += 2; - bounds.bottom += 2; - bounds.left -= 2; - bounds.right -= 2; - - DrawThemePopupArrow(&bounds, - kThemeArrowDown, - kThemeArrow9pt, /* ??? */ - Ttk_StateTableLookup(ThemeStateTable, state), - NULL /*eraseProc*/,0/*eraseData*/); END_DRAWING } -static Ttk_ElementSpec PopupArrowElementSpec = { +static Ttk_ElementSpec ComboboxElementSpec = { TK_STYLE_VERSION_2, sizeof(NullElement), TtkNullElementOptions, - PopupArrowElementSize, - PopupArrowElementDraw + ComboboxElementSize, + ComboboxElementDraw }; /*---------------------------------------------------------------------- @@ -753,7 +742,7 @@ static Ttk_ElementSpec SizegripElementSpec = { }; /*---------------------------------------------------------------------- - * +++ Background element -- an experiment. + * +++ Background element. * * This isn't quite right: In Aqua, the correct background for * a control depends on what kind of container it belongs to, @@ -762,36 +751,24 @@ static Ttk_ElementSpec SizegripElementSpec = { * Also: patterned backgrounds should be aligned with the coordinate * system of the top-level window. If we're drawing into an * off-screen graphics port this leads to alignment glitches. - * - * Available kTheme constants: - * kThemeBackgroundTabPane, - * kThemeBackgroundPlacard, - * kThemeBackgroundWindowHeader, - * kThemeBackgroundListViewWindowHeader, - * kThemeBackgroundSecondaryGroupBox, - * - * SetThemeBackground() offers more kThemeBrush* choices. - * */ static void BackgroundElementDraw( void *clientData, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, Ttk_State state) { - ThemeBackgroundKind kind = kThemeBackgroundWindowHeader; + ThemeBrush brush + = (state & TTK_STATE_BACKGROUND) + ? kThemeBrushModelessDialogBackgroundInactive + : kThemeBrushModelessDialogBackgroundActive + ; + Rect bounds = BoxToRect(d, Ttk_WinBox(tkwin)); - SInt32 depth = 32; /* ??? */ + SInt32 depth = 32; /* ??? */ Boolean inColor = true; - /* Avoid kThemeStatePressed, which seems to give bad results - * for ApplyThemeBackground: - */ - state &= ~TTK_STATE_PRESSED; - BEGIN_DRAWING(d) - ApplyThemeBackground(kind, &bounds, - Ttk_StateTableLookup(ThemeStateTable, state), - depth, inColor); + SetThemeBackground(brush, depth, inColor); QDSetPatternOrigin(PatternOrigin(tkwin, d)); EraseRect(&bounds); END_DRAWING @@ -957,6 +934,12 @@ TTK_BEGIN_LAYOUT(MenubuttonLayout) TTK_NODE("Menubutton.label", TTK_PACK_LEFT))) TTK_END_LAYOUT +TTK_BEGIN_LAYOUT(ComboboxLayout) + TTK_GROUP("Combobox.button", TTK_PACK_TOP|TTK_FILL_X, + TTK_GROUP("Combobox.padding", TTK_FILL_BOTH, + TTK_NODE("Combobox.textarea", TTK_PACK_LEFT|TTK_FILL_X))) +TTK_END_LAYOUT + /* Notebook tabs -- no focus ring */ TTK_BEGIN_LAYOUT(TabLayout) TTK_GROUP("Notebook.tab", TTK_FILL_BOTH, @@ -1004,6 +987,8 @@ static int AquaTheme_Init(Tcl_Interp *interp) &ButtonElementSpec, &BevelButtonParms); Ttk_RegisterElementSpec(themePtr, "Menubutton.button", &ButtonElementSpec, &PopupButtonParms); + Ttk_RegisterElementSpec(themePtr, "Combobox.button", + &ComboboxElementSpec, 0); Ttk_RegisterElementSpec(themePtr, "Treeitem.indicator", &DisclosureElementSpec, &DisclosureParms); Ttk_RegisterElementSpec(themePtr, "Treeheading.cell", @@ -1015,10 +1000,6 @@ static int AquaTheme_Init(Tcl_Interp *interp) Ttk_RegisterElementSpec(themePtr, "Labelframe.border",&GroupElementSpec,0); Ttk_RegisterElementSpec(themePtr, "Entry.field",&EntryElementSpec,0); - Ttk_RegisterElementSpec(themePtr, "Combobox.field",&EntryElementSpec,0); - Ttk_RegisterElementSpec(themePtr, "Combobox.downarrow", - &PopupArrowElementSpec, 0); - Ttk_RegisterElementSpec(themePtr, "separator",&SeparatorElementSpec,0); Ttk_RegisterElementSpec(themePtr, "hseparator",&SeparatorElementSpec,0); Ttk_RegisterElementSpec(themePtr, "vseparator",&SeparatorElementSpec,0); @@ -1042,6 +1023,7 @@ static int AquaTheme_Init(Tcl_Interp *interp) Ttk_RegisterLayout(themePtr, "TCheckbutton", CheckbuttonLayout); Ttk_RegisterLayout(themePtr, "TRadiobutton", RadiobuttonLayout); Ttk_RegisterLayout(themePtr, "TMenubutton", MenubuttonLayout); + Ttk_RegisterLayout(themePtr, "TCombobox", ComboboxLayout); Ttk_RegisterLayout(themePtr, "TProgressbar", ProgressbarLayout); Ttk_RegisterLayout(themePtr, "TNotebook.Tab", TabLayout); Ttk_RegisterLayout(themePtr, "Heading", TreeHeadingLayout); @@ -1050,7 +1032,8 @@ static int AquaTheme_Init(Tcl_Interp *interp) return TCL_OK; } -MODULE_SCOPE int Ttk_MacOSXPlatformInit(Tcl_Interp *interp) +MODULE_SCOPE +int Ttk_MacOSXPlatformInit(Tcl_Interp *interp) { return AquaTheme_Init(interp); } diff --git a/tests/listbox.test b/tests/listbox.test index a3d43ea..b9dd6e3 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: listbox.test,v 1.26 2006/05/29 21:53:16 hobbs Exp $ +# RCS: @(#) $Id: listbox.test,v 1.26.2.1 2007/11/01 16:37:24 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -2127,20 +2127,20 @@ test listbox-27.1 {widget deletion while active} { } 0 test listbox-28.1 {listbox -activestyle} { - catch {destroy .l} + destroy .l listbox .l -activ non .l cget -activestyle } none test listbox-28.2 {listbox -activestyle} { - catch {destroy .l} + destroy .l listbox .l .l cget -activestyle -} underline +} dotbox test listbox-28.3 {listbox -activestyle} { - catch {destroy .l} - listbox .l -activestyle dot + destroy .l + listbox .l -activestyle und .l cget -activestyle -} dotbox +} underline test listbox-29.1 {listbox selection behavior, -state disabled} { destroy .l diff --git a/tests/panedwindow.test b/tests/panedwindow.test index fc278c7..5c77bd3 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: panedwindow.test,v 1.20 2005/05/31 05:23:44 hobbs Exp $ +# RCS: @(#) $Id: panedwindow.test,v 1.20.2.1 2007/11/01 16:37:24 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -1949,7 +1949,7 @@ test panedwindow-22.16 {ArrangePanes, last pane grows} { [winfo width .f4] [winfo width .p] } -cleanup {destroy .p .f1 .f2 .f3 .f4} - -result {50 150 1 1 222 50 150 1 78 300} + -result {50 150 1 1 211 50 150 1 89 300} } @@ -2282,7 +2282,7 @@ test panedwindow-24.29.1 {ConfigurePanes, -hide works} { [winfo width .f4] [winfo width .p] } -cleanup {destroy .p .f1 .f2 .f3 .f4} - -result {1 1 1 1 40 40 40 40 182 1 0 1 1 40 40 40 40 136} + -result {1 1 1 1 40 40 40 40 171 1 0 1 1 40 40 40 40 128} } test panedwindow-24.29.2 {ConfigurePanes, -hide works} { -body { @@ -2307,7 +2307,7 @@ test panedwindow-24.29.2 {ConfigurePanes, -hide works} { [winfo width .f4] [winfo width .p] } -cleanup {destroy .p .f1 .f2 .f3 .f4} - -result {1 1 1 0 28 40 40 1 130 1 0 1 1 40 40 40 34 130} + -result {1 1 1 0 39 40 40 1 130 1 0 1 1 40 40 40 42 130} } test panedwindow-24.29.3 {ConfigurePanes, -hide works, last pane stretches} { -body { @@ -2325,7 +2325,7 @@ test panedwindow-24.29.3 {ConfigurePanes, -hide works, last pane stretches} { lappend result [winfo width .f1] [winfo width .f2] [winfo width .f3] } -cleanup {destroy .p .f1 .f2 .f3} - -result {50 50 88 50 50 144} + -result {50 50 94 50 50 147} } test panedwindow-24.29.4 {ConfigurePanes, -hide works, last pane stretches} { -body { @@ -2344,7 +2344,7 @@ test panedwindow-24.29.4 {ConfigurePanes, -hide works, last pane stretches} { lappend result [winfo height .f1] [winfo height .f2] [winfo height .f3] } -cleanup {destroy .p .f1 .f2 .f3} - -result {50 50 88 50 50 144} + -result {50 50 94 50 50 147} } test panedwindow-24.30 {ConfigurePanes, -stretch first} { @@ -2366,7 +2366,7 @@ test panedwindow-24.30 {ConfigurePanes, -stretch first} { [winfo width .f4] } -cleanup {destroy .p .f1 .f2 .f3 .f4} - -result {40 40 40 40 86 40 40 40} + -result {51 40 40 40 94 40 40 40} } test panedwindow-24.31 {ConfigurePanes, -stretch middle} { -body { @@ -2387,7 +2387,7 @@ test panedwindow-24.31 {ConfigurePanes, -stretch middle} { [winfo width .f4] } -cleanup {destroy .p .f1 .f2 .f3 .f4} - -result {40 40 40 40 40 40 86 40} + -result {40 45 46 40 40 45 94 40} } test panedwindow-24.32 {ConfigurePanes, -stretch always} { -body { @@ -2408,7 +2408,7 @@ test panedwindow-24.32 {ConfigurePanes, -stretch always} { [winfo width .f4] } -cleanup {destroy .p .f1 .f2 .f3 .f4} - -result {40 40 40 40 55 40 55 56} + -result {42 43 43 43 58 43 58 58} } test panedwindow-24.33 {ConfigurePanes, -stretch never} { -body { diff --git a/tests/scrollbar.test b/tests/scrollbar.test index c88d15c..7dcfe34 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: scrollbar.test,v 1.18 2006/04/23 21:51:38 vincentdarley Exp $ +# RCS: @(#) $Id: scrollbar.test,v 1.18.2.1 2007/11/01 16:37:24 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -177,7 +177,7 @@ test scrollbar-3.13 {ScrollbarWidgetCmd procedure, "cget" option} win { } {0 0} test scrollbar-3.14 {ScrollbarWidgetCmd procedure, "cget" option} {unix notAqua} { list [catch {.s2 cget -highlightthickness} msg] $msg -} {0 1} +} {0 0} test scrollbar-3.14.1 {ScrollbarWidgetCmd procedure, "cget" option} aqua { list [catch {.s2 cget -highlightthickness} msg] $msg } {0 0} diff --git a/tests/unixWm.test b/tests/unixWm.test index c749efa..5ecd8bd 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: unixWm.test,v 1.42 2007/05/09 12:52:44 das Exp $ +# RCS: @(#) $Id: unixWm.test,v 1.42.2.1 2007/11/01 16:37:24 dgp Exp $ package require tcltest 2.2 eval tcltest::configure $argv @@ -34,7 +34,7 @@ proc makeToplevels {} { set i 1 foreach geom {+20+80 +80+20 +0+0} { - catch {destroy .t} + destroy .t test unixWm-1.$i {initial window position} unix { toplevel .t -width 200 -height 150 wm geom .t $geom @@ -50,7 +50,7 @@ foreach geom {+20+80 +80+20 +0+0} { # this just makes sure that things are consistent between moves. set i 1 -catch {destroy .t} +destroy .t toplevel .t -width 100 -height 150 wm geom .t +200+200 update @@ -99,7 +99,7 @@ foreach geom {+20+80 +100+40 +0+0} { } test unixWm-5.1 {compounded state changes} {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update @@ -108,7 +108,7 @@ test unixWm-5.1 {compounded state changes} {unix nonPortable} { list [winfo ismapped .t] [wm state .t] } {1 normal} test unixWm-5.2 {compounded state changes} {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update @@ -118,7 +118,7 @@ test unixWm-5.2 {compounded state changes} {unix nonPortable} { list [winfo ismapped .t] [wm state .t] } {0 withdrawn} test unixWm-5.3 {compounded state changes} {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update @@ -129,7 +129,7 @@ test unixWm-5.3 {compounded state changes} {unix nonPortable} { list [winfo ismapped .t] [wm state .t] } {1 normal} test unixWm-5.4 {compounded state changes} {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update @@ -139,7 +139,7 @@ test unixWm-5.4 {compounded state changes} {unix nonPortable} { list [winfo ismapped .t] [wm state .t] } {0 iconic} test unixWm-5.5 {compounded state changes} {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update @@ -148,7 +148,7 @@ test unixWm-5.5 {compounded state changes} {unix nonPortable} { list [winfo ismapped .t] [wm state .t] } {0 withdrawn} test unixWm-5.6 {compounded state changes} {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update @@ -158,7 +158,7 @@ test unixWm-5.6 {compounded state changes} {unix nonPortable} { list [winfo ismapped .t] [wm state .t] } {1 normal} test unixWm-5.7 {compounded state changes} {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 100 wm geometry .t +100+100 update @@ -167,7 +167,7 @@ test unixWm-5.7 {compounded state changes} {unix nonPortable} { list [winfo ismapped .t] [wm state .t] } {0 iconic} -catch {destroy .t} +destroy .t toplevel .t -width 200 -height 100 wm geom .t +10+10 wm minsize .t 1 1 @@ -218,7 +218,7 @@ test unixWm-6.4 {size changes} {unix nonPortable userInteraction} { sleep 200 test unixWm-6.5 {window initially iconic} {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 30 wm geometry .t +0+0 wm title .t 2 @@ -229,7 +229,7 @@ test unixWm-6.5 {window initially iconic} {unix nonPortable} { list [winfo ismapped .t] [wm state .t] } {1 normal} -catch {destroy .m} +destroy .m toplevel .m wm overrideredirect .m 1 foreach i {{Test label} Another {Yet another} {Last label}} j {1 2 3} { @@ -250,11 +250,11 @@ test unixWm-7.3 {override_redirect and Tk_MoveTopLevelWindow} unix { list [winfo ismapped .m] } 0 destroy .m -catch {destroy .t} +destroy .t test unixWm-8.1 {icon windows} unix { - catch {destroy .t} - catch {destroy .icon} + destroy .t + destroy .icon toplevel .t -width 100 -height 30 wm geometry .t +0+0 toplevel .icon -width 50 -height 50 -bg red @@ -262,18 +262,18 @@ test unixWm-8.1 {icon windows} unix { list [catch {wm withdraw .icon} msg] $msg } {1 {can't withdraw .icon: it is an icon for .t}} test unixWm-8.2 {icon windows} unix { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 30 list [catch {wm iconwindow} msg] $msg } {1 {wrong # args: should be "wm option window ?arg ...?"}} test unixWm-8.3 {icon windows} unix { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 30 list [catch {wm iconwindow .t b c} msg] $msg } {1 {wrong # args: should be "wm iconwindow window ?pathName?"}} test unixWm-8.4 {icon windows} unix { - catch {destroy .t} - catch {destroy .icon} + destroy .t + destroy .icon toplevel .t -width 100 -height 30 wm geom .t +0+0 set result [wm iconwindow .t] @@ -289,19 +289,19 @@ test unixWm-8.4 {icon windows} unix { lappend result [winfo ismapped .t] [winfo ismapped .icon] } {.icon icon {} withdrawn 1 0 0 0} test unixWm-8.5 {icon windows} unix { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 30 list [catch {wm iconwindow .t .gorp} msg] $msg } {1 {bad window path name ".gorp"}} test unixWm-8.6 {icon windows} unix { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 30 frame .t.icon -width 50 -height 50 -bg red list [catch {wm iconwindow .t .t.icon} msg] $msg } {1 {can't use .t.icon as icon window: not at top level}} test unixWm-8.7 {icon windows} unix { - catch {destroy .t} - catch {destroy .icon} + destroy .t + destroy .icon toplevel .t -width 100 -height 30 wm geom .t +0+0 toplevel .icon -width 50 -height 50 -bg red @@ -311,10 +311,10 @@ test unixWm-8.7 {icon windows} unix { wm iconwindow .t .icon2 lappend result [wm iconwindow .t] [wm state .icon] [wm state .icon2] } {.icon icon normal .icon2 withdrawn icon} -catch {destroy .icon2} +destroy .icon2 test unixWm-8.8 {icon windows} unix { - catch {destroy .t} - catch {destroy .icon} + destroy .t + destroy .icon toplevel .icon -width 50 -height 50 -bg red wm geom .icon +0+0 update @@ -330,8 +330,8 @@ test unixWm-8.9 {icon windows} {unix nonPortable} { # This test is non-portable because some window managers will # destroy an icon window when it's associated window is destroyed. - catch {destroy .t} - catch {destroy .icon} + destroy .t + destroy .icon toplevel .t -width 100 -height 30 toplevel .icon -width 50 -height 50 -bg red wm geom .t +0+0 @@ -373,7 +373,7 @@ test unixWm-8.10.2 {test for memory leaks} unix { } 1 test unixWm-9.1 {TkWmMapWindow procedure, client property} {unix testwrapper} { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 50 wm geom .t +0+0 wm client .t Test_String @@ -381,7 +381,7 @@ test unixWm-9.1 {TkWmMapWindow procedure, client property} {unix testwrapper} { testprop [testwrapper .t] WM_CLIENT_MACHINE } {Test_String} test unixWm-9.2 {TkWmMapWindow procedure, command property} {unix testwrapper} { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 50 wm geom .t +0+0 wm command .t "test command" @@ -391,7 +391,7 @@ test unixWm-9.2 {TkWmMapWindow procedure, command property} {unix testwrapper} { command } test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} unix { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 300 -bg blue wm geom .t +0+0 wm iconify .t @@ -399,7 +399,7 @@ test unixWm-9.3 {TkWmMapWindow procedure, iconic windows} unix { winfo ismapped .t } {0} test unixWm-9.4 {TkWmMapWindow procedure, icon windows} unix { - catch {destroy .t} + destroy .t sleep 500 toplevel .t -width 100 -height 50 -bg blue wm iconwindow . .t @@ -407,7 +407,7 @@ test unixWm-9.4 {TkWmMapWindow procedure, icon windows} unix { set result [winfo ismapped .t] } {0} test unixWm-9.5 {TkWmMapWindow procedure, normal windows} unix { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 20 wm geom .t +0+0 update @@ -415,7 +415,7 @@ test unixWm-9.5 {TkWmMapWindow procedure, normal windows} unix { } {1} test unixWm-10.1 {TkWmDeadWindow procedure, canceling UpdateGeometry idle handler} unix { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 50 wm geom .t +0+0 update @@ -423,8 +423,8 @@ test unixWm-10.1 {TkWmDeadWindow procedure, canceling UpdateGeometry idle handle destroy .t } {} test unixWm-10.2 {TkWmDeadWindow procedure, destroying menubar} {unix testmenubar} { - catch {destroy .t} - catch {destroy .f} + destroy .t + destroy .f toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 update @@ -447,13 +447,13 @@ test unixWm-11.3 {Tk_WmCmd procedure, miscellaneous errors} unix { list [catch {wm iconify bogus} msg] $msg } {1 {bad window path name "bogus"}} test unixWm-11.4 {Tk_WmCmd procedure, miscellaneous errors} unix { - catch {destroy .b} + destroy .b button .b -text hello list [catch {wm geometry .b} msg] $msg } {1 {window ".b" isn't a top-level window}} -catch {destroy .t} -catch {destroy .icon} +destroy .t +destroy .icon toplevel .t -width 100 -height 50 wm geom .t +0+0 @@ -512,7 +512,7 @@ test unixWm-13.2 {Tk_WmCmd procedure, "client" option} {unix testwrapper} { lappend result [wm client .t] [testprop [testwrapper .t] WM_CLIENT_MACHINE] } {{} Test_String New {} {}} test unixWm-13.3 {Tk_WmCmd procedure, "client" option, unmapped window} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 wm client .t2 Test_String wm client .t2 {} @@ -524,7 +524,7 @@ test unixWm-14.1 {Tk_WmCmd procedure, "colormapwindows" option} unix { list [catch {wm colormapwindows .t 12 13} msg] $msg } {1 {wrong # args: should be "wm colormapwindows window ?windowList?"}} test unixWm-14.2 {Tk_WmCmd procedure, "colormapwindows" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 200 -height 200 -colormap new wm geom .t2 +0+0 frame .t2.a -width 100 -height 30 @@ -544,7 +544,7 @@ test unixWm-14.4 {Tk_WmCmd procedure, "colormapwindows" option} unix { list [catch {wm colormapwindows . foo} msg] $msg } {1 {bad window path name "foo"}} test unixWm-14.5 {Tk_WmCmd procedure, "colormapwindows" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 200 -height 200 -colormap new wm geom .t2 +0+0 frame .t2.a -width 100 -height 30 @@ -555,7 +555,7 @@ test unixWm-14.5 {Tk_WmCmd procedure, "colormapwindows" option} unix { wm colormapwindows .t2 } {.t2.c .t2 .t2.a} test unixWm-14.6 {Tk_WmCmd procedure, "colormapwindows" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 200 -height 200 wm geom .t2 +0+0 frame .t2.a -width 100 -height 30 @@ -566,14 +566,14 @@ test unixWm-14.6 {Tk_WmCmd procedure, "colormapwindows" option} unix { wm colormapwindows .t2 } {.t2.b .t2.a} test unixWm-14.7 {Tk_WmCmd procedure, "colormapwindows" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 200 -height 200 -colormap new wm geom .t2 +0+0 set x [wm colormapwindows .t2] wm colormapwindows .t2 {} list $x [wm colormapwindows .t2] } {{} {}} -catch {destroy .t2} +destroy .t2 test unixWm-15.1 {Tk_WmCmd procedure, "command" option} unix { list [catch {wm command .t 12 13} msg] $msg @@ -594,7 +594,7 @@ test unixWm-15.3 {Tk_WmCmd procedure, "command" option} {unix testwrapper} { command } {new command} {} {}} test unixWm-15.4 {Tk_WmCmd procedure, "command" option, window not mapped} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 wm geom .t2 +0+0 wm command .t2 "test command" @@ -610,7 +610,7 @@ test unixWm-16.1 {Tk_WmCmd procedure, "deiconify" option} unix { list [catch {wm deiconify .t 12} msg] $msg } {1 {wrong # args: should be "wm deiconify window"}} test unixWm-16.2 {Tk_WmCmd procedure, "deiconify" option} unix { - catch {destroy .icon} + destroy .icon toplevel .icon -width 50 -height 50 -bg red wm iconwindow .t .icon set result [list [catch {wm deiconify .icon} msg] $msg] @@ -648,7 +648,7 @@ test unixWm-18.2 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} { expr [wm frame .t] == [winfo id .t] } {0} test unixWm-18.3 {Tk_WmCmd procedure, "frame" option} {unix nonPortable} { - catch {destroy .t2} + destroy .t2 toplevel .t2 wm geom .t2 +0+0 wm overrideredirect .t2 1 @@ -672,7 +672,7 @@ test unixWm-19.3 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} { wm geometry .t } {100x50+10-4} test unixWm-19.4 {Tk_WmCmd procedure, "geometry" option} {unix nonPortable} { - catch {destroy .t2} + destroy .t2 toplevel .t2 wm geom .t2 -5+10 listbox .t2.l -width 30 -height 12 -setgrid 1 @@ -734,8 +734,8 @@ test unixWm-20.11 {Tk_WmCmd procedure, "grid" option} unix { list [catch {wm grid .t 10 11 12 -1} msg] $msg } {1 {heightInc can't be <= 0}} -catch {destroy .t} -catch {destroy .icon} +destroy .t +destroy .icon toplevel .t -width 100 -height 50 wm geom .t +0+0 update @@ -759,7 +759,7 @@ test unixWm-21.3 {Tk_WmCmd procedure, "group" option} {unix testwrapper} { lappend result [wm group .t] $bit } {{} . 0x40 {} 0x0} test unixWm-21.4 {Tk_WmCmd procedure, "group" option, make window exist} {unix testwrapper} { - catch {destroy .t2} + destroy .t2 toplevel .t2 wm geom .t2 +0+0 wm group .t .t2 @@ -769,8 +769,8 @@ test unixWm-21.4 {Tk_WmCmd procedure, "group" option, make window exist} {unix t set result } {0} test unixWm-21.5 {Tk_WmCmd procedure, "group" option, create leader wrapper} {unix testwrapper} { - catch {destroy .t2} - catch {destroy .t3} + destroy .t2 + destroy .t3 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 toplevel .t3 -width 120 -height 300 @@ -805,7 +805,7 @@ test unixWm-23.1 {Tk_WmCmd procedure, "iconify" option} unix { list [catch {wm iconify .t 12} msg] $msg } {1 {wrong # args: should be "wm iconify window"}} test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 wm overrideredirect .t2 1 set result [list [catch {wm iconify .t2} msg] $msg] @@ -813,7 +813,7 @@ test unixWm-23.2 {Tk_WmCmd procedure, "iconify" option} unix { set result } {1 {can't iconify ".t2": override-redirect flag is set}} test unixWm-23.3 {Tk_WmCmd procedure, "iconify" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 wm geom .t2 +0+0 wm transient .t2 .t @@ -822,7 +822,7 @@ test unixWm-23.3 {Tk_WmCmd procedure, "iconify" option} unix { set result } {1 {can't iconify ".t2": it is a transient}} test unixWm-23.4 {Tk_WmCmd procedure, "iconify" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 wm geom .t2 +0+0 wm iconwindow .t .t2 @@ -831,7 +831,7 @@ test unixWm-23.4 {Tk_WmCmd procedure, "iconify" option} unix { set result } {1 {can't iconify .t2: it is an icon for .t}} test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 wm geom .t2 +0+0 update @@ -842,7 +842,7 @@ test unixWm-23.5 {Tk_WmCmd procedure, "iconify" option} unix { set result } {0} test unixWm-23.6 {Tk_WmCmd procedure, "iconify" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 wm geom .t2 -0+0 update @@ -875,7 +875,7 @@ test unixWm-24.3 {Tk_WmCmd procedure, "iconmask" option} unix { test unixWm-25.1 {Tk_WmCmd procedure, "iconname" option} unix { list [catch {wm icon .t} msg] $msg -} {1 {ambiguous option "icon": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}} +} {1 {ambiguous option "icon": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, forget, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, manage, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}} test unixWm-25.2 {Tk_WmCmd procedure, "iconname" option} unix { list [catch {wm iconname .t 12 13} msg] $msg } {1 {wrong # args: should be "wm iconname window ?newName?"}} @@ -917,7 +917,7 @@ test unixWm-27.1 {Tk_WmCmd procedure, "iconwindow" option} unix { list [catch {wm iconwindow .t 12 13} msg] $msg } {1 {wrong # args: should be "wm iconwindow window ?pathName?"}} test unixWm-27.2 {Tk_WmCmd procedure, "iconwindow" option} {unix testwrapper} { - catch {destroy .icon} + destroy .icon toplevel .icon -width 50 -height 50 -bg green set result {} lappend result [wm iconwindow .t] @@ -937,16 +937,16 @@ test unixWm-27.3 {Tk_WmCmd procedure, "iconwindow" option} unix { list [catch {wm iconwindow .t bogus} msg] $msg } {1 {bad window path name "bogus"}} test unixWm-27.4 {Tk_WmCmd procedure, "iconwindow" option} unix { - catch {destroy .b} + destroy .b button .b -text Help set result [list [catch {wm iconwindow .t .b} msg] $msg] destroy .b set result } {1 {can't use .b as icon window: not at top level}} test unixWm-27.5 {Tk_WmCmd procedure, "iconwindow" option} unix { - catch {destroy .icon} + destroy .icon toplevel .icon -width 50 -height 50 -bg green - catch {destroy .t2} + destroy .t2 toplevel .t2 wm geom .t2 -0+0 wm iconwindow .t2 .icon @@ -956,8 +956,8 @@ test unixWm-27.5 {Tk_WmCmd procedure, "iconwindow" option} unix { set result } {1 {.icon is already an icon for .t2}} test unixWm-27.6 {Tk_WmCmd procedure, "iconwindow" option, changing icons} unix { - catch {destroy .icon} - catch {destroy .icon2} + destroy .icon + destroy .icon2 toplevel .icon -width 50 -height 50 -bg green toplevel .icon2 -width 50 -height 50 -bg red set result {} @@ -969,7 +969,7 @@ test unixWm-27.6 {Tk_WmCmd procedure, "iconwindow" option, changing icons} unix set result } {icon normal withdrawn icon} test unixWm-27.7 {Tk_WmCmd procedure, "iconwindow" option, withdrawing icon} unix { - catch {destroy .icon} + destroy .icon toplevel .icon -width 50 -height 50 -bg green wm geometry .icon +0+0 update @@ -981,8 +981,8 @@ test unixWm-27.7 {Tk_WmCmd procedure, "iconwindow" option, withdrawing icon} uni set result } {normal 1 icon 0} -catch {destroy .t} -catch {destroy .icon} +destroy .t +destroy .icon toplevel .t -width 100 -height 50 wm geom .t +0+0 update @@ -1059,8 +1059,7 @@ test unixWm-29.3 {Tk_WmCmd procedure, "minsize" option, setting the format {%d %d} [lindex $hints 5] [lindex $hints 6] } {300 300} -catch {destroy .t} -catch {destroy .icon} +destroy .t .icon toplevel .t -width 100 -height 50 wm geom .t +0+0 update @@ -1168,7 +1167,7 @@ test unixWm-33.5 {Tk_WmCmd procedure, "resizable" option} unix { list [catch {wm resizable . 0 gorp} msg] $msg } {1 {expected boolean value but got "gorp"}} test unixWm-33.6 {Tk_WmCmd procedure, "resizable" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 200 -height 100 wm geom .t2 +0+0 set result "" @@ -1212,7 +1211,7 @@ test unixWm-35.2 {Tk_WmCmd procedure, "state" option} unix { } {1 {wrong # args: should be "wm state window ?state?"}} test unixWm-35.3 {Tk_WmCmd procedure, "state" option} unix { set result {} - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 lappend result [wm state .t2] @@ -1229,7 +1228,7 @@ test unixWm-35.3 {Tk_WmCmd procedure, "state" option} unix { } {normal normal withdrawn iconic normal} test unixWm-35.4 {Tk_WmCmd procedure, "state" option} unix { set result {} - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 lappend result [wm state .t2] @@ -1259,7 +1258,7 @@ test unixWm-36.2 {Tk_WmCmd procedure, "title" option} {unix testwrapper} { test unixWm-37.3 {Tk_WmCmd procedure, "transient" option} {unix testwrapper} { set result {} - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 update @@ -1275,9 +1274,9 @@ test unixWm-37.3 {Tk_WmCmd procedure, "transient" option} {unix testwrapper} { set result } {{} {} .t 0 {} {}} test unixWm-37.4 {TkWmDeadWindow, destroy on master should clear transient} {unix testwrapper} { - catch {destroy .t2} + destroy .t2 toplevel .t2 - catch {destroy .t3} + destroy .t3 toplevel .t3 wm transient .t2 .t3 update @@ -1286,8 +1285,8 @@ test unixWm-37.4 {TkWmDeadWindow, destroy on master should clear transient} {uni list [wm transient .t2] [testprop [testwrapper .t2] WM_TRANSIENT_FOR] } {{} {}} test unixWm-37.5 {Tk_WmCmd procedure, "transient" option, create master wrapper} {unix testwrapper} { - catch {destroy .t2} - catch {destroy .t3} + destroy .t2 + destroy .t3 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 toplevel .t3 -width 120 -height 300 @@ -1303,7 +1302,7 @@ test unixWm-38.1 {Tk_WmCmd procedure, "withdraw" option} unix { list [catch {wm withdraw .t 1} msg] $msg } {1 {wrong # args: should be "wm withdraw window"}} test unixWm-38.2 {Tk_WmCmd procedure, "withdraw" option} unix { - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 120 -height 300 wm geometry .t2 +0+0 wm iconwindow .t .t2 @@ -1321,13 +1320,12 @@ test unixWm-38.3 {Tk_WmCmd procedure, "withdraw" option} unix { test unixWm-39.1 {Tk_WmCmd procedure, miscellaneous} unix { list [catch {wm unknown .t} msg] $msg -} {1 {bad option "unknown": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}} +} {1 {bad option "unknown": must be aspect, attributes, client, colormapwindows, command, deiconify, focusmodel, forget, frame, geometry, grid, group, iconbitmap, iconify, iconmask, iconname, iconphoto, iconposition, iconwindow, manage, maxsize, minsize, overrideredirect, positionfrom, protocol, resizable, sizefrom, stackorder, state, title, transient, or withdraw}} -catch {destroy .t} -catch {destroy .icon} +destroy .t .icon test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on grid} {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t wm geometry .t 30x10+0+0 listbox .t.l -height 20 -width 20 -setgrid 1 @@ -1336,7 +1334,7 @@ test unixWm-40.1 {Tk_SetGrid procedure, set grid dimensions before turning on gr wm geometry .t } {30x10+0+0} test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already set} unix { - catch {destroy .t} + destroy .t toplevel .t wm geometry .t 200x100+0+0 listbox .t.l -height 20 -width 20 @@ -1348,7 +1346,7 @@ test unixWm-40.2 {Tk_SetGrid procedure, turning on grid when dimensions already } {20x20+0+0} test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} unix { - catch {destroy .t} + destroy .t toplevel .t -width 400 -height 150 wm geometry .t +0+0 tkwait visibility .t @@ -1359,7 +1357,7 @@ test unixWm-41.1 {ConfigureEvent procedure, internally generated size changes} u lappend result [winfo width .t] [winfo height .t] } {400 150 200 300} test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 update @@ -1384,7 +1382,7 @@ test unixWm-41.2 {ConfigureEvent procedure, menubars} {nonPortable testmenubar} [winfo width .t] [winfo height .t] } {{.t.m: 200x20} {.t: 200x300} 0 0 200 20 0 20 200 300} test unixWm-41.3 {ConfigureEvent procedure, synthesized Configure events} unix { - catch {destroy .t} + destroy .t toplevel .t -width 400 -height 150 wm geometry .t +0+0 tkwait visibility .t @@ -1395,7 +1393,7 @@ test unixWm-41.3 {ConfigureEvent procedure, synthesized Configure events} unix { set result } {configured: 400 150} test unixWm-41.4 {ConfigureEvent procedure, synthesized Configure events} unix { - catch {destroy .t} + destroy .t toplevel .t -width 400 -height 150 wm geometry .t +0+0 tkwait visibility .t @@ -1410,7 +1408,7 @@ test unixWm-41.4 {ConfigureEvent procedure, synthesized Configure events} unix { # out how to exercise these procedures reliably. test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} unix { - catch {destroy .t} + destroy .t toplevel .t -width 400 -height 150 wm geometry .t +0+0 tkwait visibility .t @@ -1426,7 +1424,7 @@ test unixWm-42.1 {WrapperEventProc procedure, map and unmap events} unix { } {unmapped 0 mapped 1} test unixWm-43.1 {TopLevelReqProc procedure, embedded in same process} unix { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 200 wm geom .t +0+0 frame .t.f -container 1 -bd 2 -relief raised @@ -1444,7 +1442,7 @@ test unixWm-43.1 {TopLevelReqProc procedure, embedded in same process} unix { } {70 120 70 120} test unixWm-43.2 {TopLevelReqProc procedure, resize causes window to move} \ {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 200 wm geom .t +0+0 update @@ -1459,7 +1457,7 @@ test unixWm-43.2 {TopLevelReqProc procedure, resize causes window to move} \ } {-100 50 300 150} test unixWm-44.1 {UpdateGeometryInfo procedure, width/height computation} unix { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 200 wm geometry .t +30+40 wm overrideredirect .t 1 @@ -1469,7 +1467,7 @@ test unixWm-44.1 {UpdateGeometryInfo procedure, width/height computation} unix { list [winfo width .t] [winfo height .t] } {180 20} test unixWm-44.2 {UpdateGeometryInfo procedure, width/height computation} unix { - catch {destroy .t} + destroy .t toplevel .t -width 80 -height 60 wm grid .t 5 4 10 12 wm geometry .t +30+40 @@ -1480,7 +1478,7 @@ test unixWm-44.2 {UpdateGeometryInfo procedure, width/height computation} unix { list [winfo width .t] [winfo height .t] } {130 36} test unixWm-44.3 {UpdateGeometryInfo procedure, width/height computation} unix { - catch {destroy .t} + destroy .t toplevel .t -width 80 -height 60 wm grid .t 5 4 10 12 wm geometry .t +30+40 @@ -1491,7 +1489,7 @@ test unixWm-44.3 {UpdateGeometryInfo procedure, width/height computation} unix { list [winfo width .t] [winfo height .t] } {40 132} test unixWm-44.4 {UpdateGeometryInfo procedure, width/height computation} unix { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 200 wm geometry .t +30+40 wm overrideredirect .t 1 @@ -1501,7 +1499,7 @@ test unixWm-44.4 {UpdateGeometryInfo procedure, width/height computation} unix { list [winfo width .t] [winfo height .t] } {300 150} test unixWm-44.5 {UpdateGeometryInfo procedure, negative width} unix { - catch {destroy .t} + destroy .t toplevel .t -width 80 -height 60 wm grid .t 18 7 10 12 wm geometry .t +30+40 @@ -1512,7 +1510,7 @@ test unixWm-44.5 {UpdateGeometryInfo procedure, negative width} unix { list [winfo width .t] [winfo height .t] } {1 72} test unixWm-44.6 {UpdateGeometryInfo procedure, negative height} unix { - catch {destroy .t} + destroy .t toplevel .t -width 80 -height 60 wm grid .t 18 7 10 12 wm geometry .t +30+40 @@ -1523,7 +1521,7 @@ test unixWm-44.6 {UpdateGeometryInfo procedure, negative height} unix { list [winfo width .t] [winfo height .t] } {100 1} -catch {destroy .t} +destroy .t toplevel .t -width 80 -height 60 test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} unix { wm geometry .t +5-10 @@ -1532,7 +1530,7 @@ test unixWm-44.7 {UpdateGeometryInfo procedure, computing position} unix { list [winfo x .t] [winfo y .t] } [list 5 [expr [winfo screenheight .t] - 70]] -catch {destroy .t} +destroy .t toplevel .t -width 80 -height 60 test unixWm-44.8 {UpdateGeometryInfo procedure, computing position} unix { wm geometry .t -30+2 @@ -1540,10 +1538,10 @@ test unixWm-44.8 {UpdateGeometryInfo procedure, computing position} unix { tkwait visibility .t list [winfo x .t] [winfo y .t] } [list [expr [winfo screenwidth .t] - 110] 2] -catch {destroy .t} +destroy .t test unixWm-44.9 {UpdateGeometryInfo procedure, updating fixed dimensions} {unix testwrapper} { - catch {destroy .t} + destroy .t toplevel .t -width 80 -height 60 wm resizable .t 0 0 wm geometry .t +0+0 @@ -1555,7 +1553,7 @@ test unixWm-44.9 {UpdateGeometryInfo procedure, updating fixed dimensions} {unix [expr [lindex $property 7]] [expr [lindex $property 8]] } {180 20 180 20} test unixWm-44.10 {UpdateGeometryInfo procedure, menubar changing} testmenubar { - catch {destroy .t} + destroy .t toplevel .t -width 80 -height 60 wm resizable .t 0 0 wm geometry .t +0+0 @@ -1570,7 +1568,7 @@ test unixWm-44.10 {UpdateGeometryInfo procedure, menubar changing} testmenubar { } {{} {}} test unixWm-45.1 {UpdateSizeHints procedure, grid information} {unix testwrapper} { - catch {destroy .t} + destroy .t toplevel .t -width 80 -height 60 wm grid .t 6 10 10 5 wm minsize .t 2 4 @@ -1583,7 +1581,7 @@ test unixWm-45.1 {UpdateSizeHints procedure, grid information} {unix testwrapper [expr [lindex $property 9]] [expr [lindex $property 10]] } {40 30 320 210 10 5} test unixWm-45.2 {UpdateSizeHints procedure} {unix testwrapper} { - catch {destroy .t} + destroy .t toplevel .t -width 80 -height 60 wm minsize .t 30 40 wm maxsize .t 200 500 @@ -1595,7 +1593,7 @@ test unixWm-45.2 {UpdateSizeHints procedure} {unix testwrapper} { [expr [lindex $property 9]] [expr [lindex $property 10]] } {30 40 200 500 1 1} test unixWm-45.3 {UpdateSizeHints procedure, grid with menu} {testmenubar testwrapper} { - catch {destroy .t} + destroy .t toplevel .t -width 80 -height 60 frame .t.menu -height 23 -width 50 testmenubar window .t .t.menu @@ -1611,7 +1609,7 @@ test unixWm-45.3 {UpdateSizeHints procedure, grid with menu} {testmenubar testwr [expr [lindex $property 9]] [expr [lindex $property 10]] } {60 40 53 320 233 10 5} test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenubar testwrapper} { - catch {destroy .t} + destroy .t toplevel .t -width 80 -height 60 frame .t.menu -height 23 -width 50 testmenubar window .t .t.menu @@ -1628,7 +1626,7 @@ test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenub # I don't know how to test WaitForConfigureNotify. test unixWm-46.1 {WaitForEvent procedure, use of modal timeout} unix { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 200 wm geom .t +0+0 update @@ -1642,7 +1640,7 @@ test unixWm-46.1 {WaitForEvent procedure, use of modal timeout} unix { } {no yes} test unixWm-47.1 {WaitRestrictProc procedure} {unix nonPortable} { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 frame .t.f -bd 2 -relief raised place .t.f -x 20 -y 30 -width 100 -height 20 @@ -1667,7 +1665,7 @@ test unixWm-47.1 {WaitRestrictProc procedure} {unix nonPortable} { # I don't know how to test WaitTimeoutProc, WaitForMapNotify, or UpdateHints. -catch {destroy .t} +destroy .t toplevel .t -width 300 -height 200 wm geometry .t +0+0 tkwait visibility .t @@ -1711,7 +1709,7 @@ test unixWm-48.12 {ParseGeometry procedure} unix { catch {wm geometry .t +30+-10} } {0} test unixWm-48.13 {ParseGeometry procedure, resize causes window to move} unix { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 200 wm geom .t +0+0 update @@ -1726,7 +1724,7 @@ test unixWm-48.13 {ParseGeometry procedure, resize causes window to move} unix { } {50 -100 150 300} test unixWm-49.1 {Tk_GetRootCoords procedure} unix { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 frame .t.f -width 150 -height 100 -bd 2 -relief raised place .t.f -x 150 -y 120 @@ -1738,7 +1736,7 @@ test unixWm-49.1 {Tk_GetRootCoords procedure} unix { list [winfo rootx .t.f.f] [winfo rooty .t.f.f] } {202 192} test unixWm-49.2 {Tk_GetRootCoords procedure, menubars} {unix testmenubar} { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 update @@ -1828,7 +1826,7 @@ test unixWm-50.3 { cleanupbg } -result {{} .x .t .t.f} test unixWm-50.4 {Tk_CoordsToWindow procedure, window in other application} unix { - catch {destroy .t} + destroy .t catch {interp delete slave} toplevel .t -width 200 -height 200 -bg green wm geometry .t +0+0 @@ -1881,7 +1879,7 @@ test unixWm-50.6 {Tk_CoordsToWindow procedure, embedding within one app.} unix { [winfo containing [expr $x +250] [expr $y +80]] } {.t .t2 .t2 .t} test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} unix { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 400 -bg green wm geom .t +0+0 frame .t.f -width 100 -height 200 -bd 2 -relief raised @@ -1898,7 +1896,7 @@ test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} unix { [winfo containing $x [expr $y + 450]] } {.t .t.f .t.f.f .t {}} test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix { - catch {destroy .t} + destroy .t toplevel .t -width 400 -height 300 -bg green wm geom .t +0+0 frame .t.f -width 200 -height 100 -bd 2 -relief raised @@ -1915,8 +1913,8 @@ test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix { [winfo containing [expr $x + 450] $y] } {.t .t.f .t.f.f .t {}} test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} unix { - catch {destroy .t} - catch {destroy .t2} + destroy .t + destroy .t2 sleep 500 ;# Give window manager time to catch up. toplevel .t -width 200 -height 200 -bg green wm geometry .t +0+0 @@ -1929,7 +1927,7 @@ test unixWm-50.9 {Tk_CoordsToWindow procedure, unmapped windows} unix { lappend result [winfo containing 100 100] } {.t2 .t} test unixWm-50.10 {Tk_CoordsToWindow procedure, unmapped windows} unix { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 200 -bg green wm geometry .t +0+0 frame .t.f -width 150 -height 150 -bd 2 -relief raised @@ -1999,18 +1997,18 @@ test unixWm-51.5 {TkWmRestackToplevel procedure, basic tests} {unix nonPortable} } {.raise1 .raise3} deleteWindows test unixWm-51.6 {TkWmRestackToplevel procedure, window to be stacked isn't mapped} unix { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 200 -bg green wm geometry .t +0+0 tkwait visibility .t - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 200 -height 200 -bg red wm geometry .t2 +0+0 winfo containing 100 100 } {.t} test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} unix { foreach w {.t .t2 .t3} { - catch {destroy $w} + destroy $w toplevel $w -width 200 -height 200 -bg green wm geometry $w +0+0 } @@ -2023,12 +2021,12 @@ test unixWm-51.7 {TkWmRestackToplevel procedure, other window isn't mapped} unix lappend result [winfo containing 100 100] } {.t3 .t} test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 200 -bg green wm overrideredirect .t 1 wm geometry .t +0+0 tkwait visibility .t - catch {destroy .t2} + destroy .t2 toplevel .t2 -width 200 -height 200 -bg red wm overrideredirect .t2 1 wm geometry .t2 +0+0 @@ -2049,7 +2047,7 @@ test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix } {.t2 .t .t2} test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} unix { foreach w {.t .t2 .t3} { - catch {destroy $w} + destroy $w toplevel $w -width 200 -height 200 -bg green wm overrideredirect $w 1 wm geometry $w +0+0 @@ -2092,14 +2090,14 @@ test unixWm-51.13 {TkWmRestackToplevel procedure, don't move window that's alrea } 1 test unixWm-52.1 {TkWmAddToColormapWindows procedure} unix { - catch {destroy .t} + destroy .t toplevel .t -width 200 -height 200 -colormap new -relief raised -bd 2 wm geom .t +0+0 update wm colormap .t } {} test unixWm-52.2 {TkWmAddToColormapWindows procedure} unix { - catch {destroy .t} + destroy .t toplevel .t -colormap new -relief raised -bd 2 wm geom .t +0+0 frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2 @@ -2108,7 +2106,7 @@ test unixWm-52.2 {TkWmAddToColormapWindows procedure} unix { wm colormap .t } {.t.f .t} test unixWm-52.3 {TkWmAddToColormapWindows procedure} unix { - catch {destroy .t} + destroy .t toplevel .t -colormap new wm geom .t +0+0 frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2 @@ -2119,7 +2117,7 @@ test unixWm-52.3 {TkWmAddToColormapWindows procedure} unix { wm colormap .t } {.t.f .t.f2 .t} test unixWm-52.4 {TkWmAddToColormapWindows procedure} unix { - catch {destroy .t} + destroy .t toplevel .t -colormap new wm geom .t +0+0 frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2 @@ -2133,7 +2131,7 @@ test unixWm-52.4 {TkWmAddToColormapWindows procedure} unix { } {.t.f} test unixWm-53.1 {TkWmRemoveFromColormapWindows procedure} unix { - catch {destroy .t} + destroy .t toplevel .t -colormap new wm geom .t +0+0 frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2 @@ -2145,7 +2143,7 @@ test unixWm-53.1 {TkWmRemoveFromColormapWindows procedure} unix { wm colormap .t } {.t.f .t} test unixWm-53.2 {TkWmRemoveFromColormapWindows procedure} unix { - catch {destroy .t} + destroy .t toplevel .t -colormap new wm geom .t +0+0 frame .t.f -width 100 -height 100 -colormap new -relief sunken -bd 2 @@ -2159,8 +2157,8 @@ test unixWm-53.2 {TkWmRemoveFromColormapWindows procedure} unix { } {} test unixWm-54.1 {TkpMakeMenuWindow procedure, setting save_under} {unix nonUnixUserInteraction} { - catch {destroy .t} - catch {destroy .m} + destroy .t + destroy .m toplevel .t -width 300 -height 200 -bd 2 -relief raised bind .t <Expose> {set x exposed} wm geom .t +0+0 @@ -2176,7 +2174,7 @@ test unixWm-54.1 {TkpMakeMenuWindow procedure, setting save_under} {unix nonUnix set x } {no event} test unixWm-54.2 {TkpMakeMenuWindow procedure, setting override_redirect} {unix nonUnixUserInteraction} { - catch {destroy .m} + destroy .m menu .m .m add command -label First .m add command -label Second @@ -2191,7 +2189,7 @@ test unixWm-54.2 {TkpMakeMenuWindow procedure, setting override_redirect} {unix # No tests for TkGetPointerCoords, CreateWrapper, or GetMaxSize. test unixWm-55.1 {TkUnixSetMenubar procedure} {unix testmenubar} { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 update @@ -2203,8 +2201,8 @@ test unixWm-55.1 {TkUnixSetMenubar procedure} {unix testmenubar} { [expr [winfo rooty .t] - [winfo rooty .t.f]] } {1 300x30+0+0 0 30} test unixWm-55.2 {TkUnixSetMenubar procedure, removing menubar} {unix testmenubar} { - catch {destroy .t} - catch {destroy .f} + destroy .t + destroy .f toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 update @@ -2222,7 +2220,7 @@ test unixWm-55.2 {TkUnixSetMenubar procedure, removing menubar} {unix testmenuba [expr [winfo rooty .] - [winfo rooty .f]] } {0 300x30+0+0 0 0 0 0} test unixWm-55.3 {TkUnixSetMenubar procedure, removing geometry manager} {unix testmenubar} { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 update @@ -2239,7 +2237,7 @@ test unixWm-55.3 {TkUnixSetMenubar procedure, removing geometry manager} {unix t lappend result [expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y] } {0 0 0 0} test unixWm-55.4 {TkUnixSetMenubar procedure, toplevel not yet created} {unix testmenubar} { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 -bd 2 -relief raised frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green testmenubar window .t .t.f @@ -2250,8 +2248,8 @@ test unixWm-55.4 {TkUnixSetMenubar procedure, toplevel not yet created} {unix te [expr [winfo rooty .t] - [winfo rooty .t.f]] } {1 300x30+0+0 0 30} test unixWm-55.5 {TkUnixSetMenubar procedure, changing menubar} {unix testmenubar} { - catch {destroy .t} - catch {destroy .f} + destroy .t + destroy .f toplevel .t -width 300 -height 200 -bd 2 -relief raised frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green wm geom .t +0+0 @@ -2269,7 +2267,7 @@ test unixWm-55.5 {TkUnixSetMenubar procedure, changing menubar} {unix testmenuba lappend result [expr [winfo rooty .f] - $y] } {0 1 0 1 0 0} test unixWm-55.6 {TkUnixSetMenubar procedure, changing menubar to self} {unix testmenubar} { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 -bd 2 -relief raised frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green testmenubar window .t .t.f @@ -2282,8 +2280,8 @@ test unixWm-55.6 {TkUnixSetMenubar procedure, changing menubar to self} {unix te [expr [winfo rooty .t] - [winfo rooty .t.f]] } {1 300x30+0+0 0 30} test unixWm-55.7 {TkUnixSetMenubar procedure, unsetting event handler} {unix testmenubar} { - catch {destroy .t} - catch {destroy .f} + destroy .t + destroy .f toplevel .t -width 300 -height 200 -bd 2 -relief raised frame .t.f -width 400 -height 30 -bd 2 -relief raised -bg green frame .f -width 400 -height 40 -bd 2 -relief raised -bg blue @@ -2302,7 +2300,7 @@ test unixWm-55.7 {TkUnixSetMenubar procedure, unsetting event handler} {unix tes } {30 40 40} test unixWm-56.1 {MenubarDestroyProc procedure} {unix testmenubar} { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 update @@ -2317,7 +2315,7 @@ test unixWm-56.1 {MenubarDestroyProc procedure} {unix testmenubar} { } {30 0} test unixWm-57.1 {MenubarReqProc procedure} {unix testmenubar} { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 update @@ -2332,7 +2330,7 @@ test unixWm-57.1 {MenubarReqProc procedure} {unix testmenubar} { lappend result [expr [winfo rootx .t] - $x] [expr [winfo rooty .t] - $y] } {0 10 0 100} test unixWm-57.2 {MenubarReqProc procedure} {unix testmenubar} { - catch {destroy .t} + destroy .t toplevel .t -width 300 -height 200 -bd 2 -relief raised wm geom .t +0+0 update @@ -2348,7 +2346,7 @@ test unixWm-57.2 {MenubarReqProc procedure} {unix testmenubar} { } {0 20 0 1} test unixWm-58.1 {UpdateCommand procedure, DString gets reallocated} {unix testwrapper} { - catch {destroy .t} + destroy .t toplevel .t -width 100 -height 50 wm geom .t +0+0 wm command .t "argumentNumber0 argumentNumber1 argumentNumber2 argumentNumber0 argumentNumber3 argumentNumber4 argumentNumber5 argumentNumber6 argumentNumber0 argumentNumber7 argumentNumber8 argumentNumber9 argumentNumber10 argumentNumber0 argumentNumber11 argumentNumber12 argumentNumber13 argumentNumber14 argumentNumber15 argumentNumber16 argumentNumber17 argumentNumber18" @@ -2489,6 +2487,6 @@ test unixWm-61.2 {Tk_WmCmd procedure, "iconphoto" option} unix { } {} # cleanup -catch {destroy .t} +destroy .t cleanupTests return diff --git a/tests/winfo.test b/tests/winfo.test index 1153b52..9f6438a 100644 --- a/tests/winfo.test +++ b/tests/winfo.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: winfo.test,v 1.13 2004/06/24 12:45:44 dkf Exp $ +# RCS: @(#) $Id: winfo.test,v 1.13.2.1 2007/11/01 16:37:24 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -122,6 +122,7 @@ test winfo-4.4 {"winfo containing" command} { list [catch {winfo containing -displayof geek 25 30} msg] $msg } {1 {bad window path name "geek"}} test winfo-4.5 {"winfo containing" command} { + raise .t winfo containing [winfo rootx .t.f] [winfo rooty .t.f] } .t.f test winfo-4.6 {"winfo containing" command} {nonPortable} { diff --git a/unix/installManPage b/unix/installManPage index 93fd925..98cd899 100755 --- a/unix/installManPage +++ b/unix/installManPage @@ -27,6 +27,7 @@ test -z "$S" && S="$DIR/" # n ;# Read next line # s/,//g ;# Remove all commas ... # s/\\\ //g ;# .. and backslash-escaped spaces. +# s/::/_/g ;# Convert '::' to '_' # s/ \\\-.*// ;# Delete from \- to the end of line # p ;# print the result # q ;# exit @@ -43,6 +44,7 @@ NAMES=`sed -n ' n s/,//g s/\\\ //g + s/::/_/g s/ \\\-.*// p q diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index 7ea67f5..d90aa5d 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixDefault.h,v 1.24 2006/09/06 22:39:28 hobbs Exp $ + * RCS: @(#) $Id: tkUnixDefault.h,v 1.24.2.1 2007/11/01 16:37:24 dgp Exp $ */ #ifndef _TKUNIXDEFAULT @@ -32,29 +32,12 @@ #define NORMAL_BG "#d9d9d9" #define ACTIVE_BG "#ececec" #define SELECT_BG "#c3c3c3" -#define TROUGH "#c3c3c3" +#define TROUGH "#b3b3b3" #define CHECK_INDICATOR WHITE #define MENU_INDICATOR BLACK #define DISABLED "#a3a3a3" /* - * The definitions below provide symbolic names for the default fonts. - * NORMAL_FONT - Normal font - * BOLD_FONT - Bold font - * FIXED_FONT - Fixed-width font - */ - -#if HAVE_XFT -# define NORMAL_FONT "sans-serif -12" -# define BOLD_FONT "sans-serif -12 bold" -# define FIXED_FONT "monospace -12" -#else -# define NORMAL_FONT "Helvetica -12" -# define BOLD_FONT "Helvetica -12 bold" -# define FIXED_FONT "Courier -12" -#endif - -/* * Defaults for labels, buttons, checkbuttons, and radiobuttons: */ @@ -67,7 +50,7 @@ #define DEF_BUTTON_BG_COLOR NORMAL_BG #define DEF_BUTTON_BG_MONO WHITE #define DEF_BUTTON_BITMAP "" -#define DEF_BUTTON_BORDER_WIDTH "2" +#define DEF_BUTTON_BORDER_WIDTH "1" #define DEF_BUTTON_CURSOR "" #define DEF_BUTTON_COMPOUND "none" #define DEF_BUTTON_COMMAND "" @@ -76,7 +59,7 @@ #define DEF_BUTTON_DISABLED_FG_MONO "" #define DEF_BUTTON_FG BLACK #define DEF_CHKRAD_FG DEF_BUTTON_FG -#define DEF_BUTTON_FONT BOLD_FONT +#define DEF_BUTTON_FONT "TkDefaultFont" #define DEF_BUTTON_HEIGHT "0" #define DEF_BUTTON_HIGHLIGHT_BG_COLOR DEF_BUTTON_BG_COLOR #define DEF_BUTTON_HIGHLIGHT_BG_MONO DEF_BUTTON_BG_MONO @@ -152,15 +135,15 @@ * Defaults for entries: */ -#define DEF_ENTRY_BG_COLOR NORMAL_BG +#define DEF_ENTRY_BG_COLOR WHITE #define DEF_ENTRY_BG_MONO WHITE -#define DEF_ENTRY_BORDER_WIDTH "2" +#define DEF_ENTRY_BORDER_WIDTH "1" #define DEF_ENTRY_CURSOR "xterm" #define DEF_ENTRY_DISABLED_BG_COLOR NORMAL_BG #define DEF_ENTRY_DISABLED_BG_MONO WHITE #define DEF_ENTRY_DISABLED_FG DISABLED #define DEF_ENTRY_EXPORT_SELECTION "1" -#define DEF_ENTRY_FONT NORMAL_FONT +#define DEF_ENTRY_FONT "TkTextFont" #define DEF_ENTRY_FG BLACK #define DEF_ENTRY_HIGHLIGHT_BG NORMAL_BG #define DEF_ENTRY_HIGHLIGHT BLACK @@ -178,7 +161,7 @@ #define DEF_ENTRY_SCROLL_COMMAND "" #define DEF_ENTRY_SELECT_COLOR SELECT_BG #define DEF_ENTRY_SELECT_MONO BLACK -#define DEF_ENTRY_SELECT_BD_COLOR "1" +#define DEF_ENTRY_SELECT_BD_COLOR "0" #define DEF_ENTRY_SELECT_BD_MONO "0" #define DEF_ENTRY_SELECT_FG_COLOR BLACK #define DEF_ENTRY_SELECT_FG_MONO WHITE @@ -219,7 +202,7 @@ #define DEF_LABELFRAME_CLASS "Labelframe" #define DEF_LABELFRAME_RELIEF "groove" #define DEF_LABELFRAME_FG BLACK -#define DEF_LABELFRAME_FONT BOLD_FONT +#define DEF_LABELFRAME_FONT "TkDefaultFont" #define DEF_LABELFRAME_TEXT "" #define DEF_LABELFRAME_LABELANCHOR "nw" @@ -227,14 +210,14 @@ * Defaults for listboxes: */ -#define DEF_LISTBOX_ACTIVE_STYLE "underline" -#define DEF_LISTBOX_BG_COLOR NORMAL_BG +#define DEF_LISTBOX_ACTIVE_STYLE "dotbox" +#define DEF_LISTBOX_BG_COLOR WHITE #define DEF_LISTBOX_BG_MONO WHITE -#define DEF_LISTBOX_BORDER_WIDTH "2" +#define DEF_LISTBOX_BORDER_WIDTH "1" #define DEF_LISTBOX_CURSOR "" #define DEF_LISTBOX_DISABLED_FG DISABLED #define DEF_LISTBOX_EXPORT_SELECTION "1" -#define DEF_LISTBOX_FONT BOLD_FONT +#define DEF_LISTBOX_FONT "TkDefaultFont" #define DEF_LISTBOX_FG BLACK #define DEF_LISTBOX_HEIGHT "10" #define DEF_LISTBOX_HIGHLIGHT_BG NORMAL_BG @@ -245,7 +228,7 @@ #define DEF_LISTBOX_LIST_VARIABLE "" #define DEF_LISTBOX_SELECT_COLOR SELECT_BG #define DEF_LISTBOX_SELECT_MONO BLACK -#define DEF_LISTBOX_SELECT_BD "1" +#define DEF_LISTBOX_SELECT_BD "0" #define DEF_LISTBOX_SELECT_FG_COLOR BLACK #define DEF_LISTBOX_SELECT_FG_MONO WHITE #define DEF_LISTBOX_SELECT_MODE "browse" @@ -289,16 +272,16 @@ #define DEF_MENU_ACTIVE_BG_COLOR ACTIVE_BG #define DEF_MENU_ACTIVE_BG_MONO BLACK -#define DEF_MENU_ACTIVE_BORDER_WIDTH "2" +#define DEF_MENU_ACTIVE_BORDER_WIDTH "1" #define DEF_MENU_ACTIVE_FG_COLOR BLACK #define DEF_MENU_ACTIVE_FG_MONO WHITE #define DEF_MENU_BG_COLOR NORMAL_BG #define DEF_MENU_BG_MONO WHITE -#define DEF_MENU_BORDER_WIDTH "2" +#define DEF_MENU_BORDER_WIDTH "1" #define DEF_MENU_CURSOR "arrow" #define DEF_MENU_DISABLED_FG_COLOR DISABLED #define DEF_MENU_DISABLED_FG_MONO "" -#define DEF_MENU_FONT BOLD_FONT +#define DEF_MENU_FONT "TkMenuFont" #define DEF_MENU_FG BLACK #define DEF_MENU_POST_COMMAND "" #define DEF_MENU_RELIEF "raised" @@ -322,12 +305,12 @@ #define DEF_MENUBUTTON_BG_COLOR NORMAL_BG #define DEF_MENUBUTTON_BG_MONO WHITE #define DEF_MENUBUTTON_BITMAP "" -#define DEF_MENUBUTTON_BORDER_WIDTH "2" +#define DEF_MENUBUTTON_BORDER_WIDTH "1" #define DEF_MENUBUTTON_CURSOR "" #define DEF_MENUBUTTON_DIRECTION "below" #define DEF_MENUBUTTON_DISABLED_FG_COLOR DISABLED #define DEF_MENUBUTTON_DISABLED_FG_MONO "" -#define DEF_MENUBUTTON_FONT BOLD_FONT +#define DEF_MENUBUTTON_FONT "TkDefaultFont" #define DEF_MENUBUTTON_FG BLACK #define DEF_MENUBUTTON_HEIGHT "0" #define DEF_MENUBUTTON_HIGHLIGHT_BG_COLOR DEF_MENUBUTTON_BG_COLOR @@ -357,10 +340,10 @@ #define DEF_MESSAGE_ASPECT "150" #define DEF_MESSAGE_BG_COLOR NORMAL_BG #define DEF_MESSAGE_BG_MONO WHITE -#define DEF_MESSAGE_BORDER_WIDTH "2" +#define DEF_MESSAGE_BORDER_WIDTH "1" #define DEF_MESSAGE_CURSOR "" #define DEF_MESSAGE_FG BLACK -#define DEF_MESSAGE_FONT BOLD_FONT +#define DEF_MESSAGE_FONT "TkDefaultFont" #define DEF_MESSAGE_HIGHLIGHT_BG NORMAL_BG #define DEF_MESSAGE_HIGHLIGHT BLACK #define DEF_MESSAGE_HIGHLIGHT_WIDTH "0" @@ -379,19 +362,19 @@ #define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG #define DEF_PANEDWINDOW_BG_MONO WHITE -#define DEF_PANEDWINDOW_BORDERWIDTH "2" +#define DEF_PANEDWINDOW_BORDERWIDTH "1" #define DEF_PANEDWINDOW_CURSOR "" #define DEF_PANEDWINDOW_HANDLEPAD "8" #define DEF_PANEDWINDOW_HANDLESIZE "8" #define DEF_PANEDWINDOW_HEIGHT "" -#define DEF_PANEDWINDOW_OPAQUERESIZE "0" +#define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" -#define DEF_PANEDWINDOW_SASHPAD "2" -#define DEF_PANEDWINDOW_SASHRELIEF "raised" -#define DEF_PANEDWINDOW_SASHWIDTH "2" -#define DEF_PANEDWINDOW_SHOWHANDLE "1" +#define DEF_PANEDWINDOW_SASHPAD "0" +#define DEF_PANEDWINDOW_SASHRELIEF "flat" +#define DEF_PANEDWINDOW_SASHWIDTH "3" +#define DEF_PANEDWINDOW_SHOWHANDLE "0" #define DEF_PANEDWINDOW_WIDTH "" /* @@ -418,11 +401,11 @@ #define DEF_SCALE_BG_COLOR NORMAL_BG #define DEF_SCALE_BG_MONO WHITE #define DEF_SCALE_BIG_INCREMENT "0" -#define DEF_SCALE_BORDER_WIDTH "2" +#define DEF_SCALE_BORDER_WIDTH "1" #define DEF_SCALE_COMMAND "" #define DEF_SCALE_CURSOR "" #define DEF_SCALE_DIGITS "0" -#define DEF_SCALE_FONT BOLD_FONT +#define DEF_SCALE_FONT "TkDefaultFont" #define DEF_SCALE_FG_COLOR BLACK #define DEF_SCALE_FG_MONO BLACK #define DEF_SCALE_FROM "0" @@ -458,13 +441,13 @@ #define DEF_SCROLLBAR_ACTIVE_RELIEF "raised" #define DEF_SCROLLBAR_BG_COLOR NORMAL_BG #define DEF_SCROLLBAR_BG_MONO WHITE -#define DEF_SCROLLBAR_BORDER_WIDTH "2" +#define DEF_SCROLLBAR_BORDER_WIDTH "1" #define DEF_SCROLLBAR_COMMAND "" #define DEF_SCROLLBAR_CURSOR "" #define DEF_SCROLLBAR_EL_BORDER_WIDTH "-1" #define DEF_SCROLLBAR_HIGHLIGHT_BG NORMAL_BG #define DEF_SCROLLBAR_HIGHLIGHT BLACK -#define DEF_SCROLLBAR_HIGHLIGHT_WIDTH "1" +#define DEF_SCROLLBAR_HIGHLIGHT_WIDTH "0" #define DEF_SCROLLBAR_JUMP "0" #define DEF_SCROLLBAR_ORIENT "vertical" #define DEF_SCROLLBAR_RELIEF "sunken" @@ -473,21 +456,21 @@ #define DEF_SCROLLBAR_TAKE_FOCUS (char *) NULL #define DEF_SCROLLBAR_TROUGH_COLOR TROUGH #define DEF_SCROLLBAR_TROUGH_MONO WHITE -#define DEF_SCROLLBAR_WIDTH "15" +#define DEF_SCROLLBAR_WIDTH "11" /* * Defaults for texts: */ #define DEF_TEXT_AUTO_SEPARATORS "1" -#define DEF_TEXT_BG_COLOR NORMAL_BG +#define DEF_TEXT_BG_COLOR WHITE #define DEF_TEXT_BG_MONO WHITE #define DEF_TEXT_BLOCK_CURSOR "0" -#define DEF_TEXT_BORDER_WIDTH "2" +#define DEF_TEXT_BORDER_WIDTH "1" #define DEF_TEXT_CURSOR "xterm" #define DEF_TEXT_FG BLACK #define DEF_TEXT_EXPORT_SELECTION "1" -#define DEF_TEXT_FONT FIXED_FONT +#define DEF_TEXT_FONT "TkFixedFont" #define DEF_TEXT_HEIGHT "24" #define DEF_TEXT_HIGHLIGHT_BG NORMAL_BG #define DEF_TEXT_HIGHLIGHT BLACK @@ -505,7 +488,7 @@ #define DEF_TEXT_INACTIVE_SELECT_COLOR SELECT_BG #define DEF_TEXT_SELECT_COLOR SELECT_BG #define DEF_TEXT_SELECT_MONO BLACK -#define DEF_TEXT_SELECT_BD_COLOR "1" +#define DEF_TEXT_SELECT_BD_COLOR "0" #define DEF_TEXT_SELECT_BD_MONO "0" #define DEF_TEXT_SELECT_FG_COLOR BLACK #define DEF_TEXT_SELECT_FG_MONO WHITE @@ -528,7 +511,7 @@ * Defaults for canvas text: */ -#define DEF_CANVTEXT_FONT NORMAL_FONT +#define DEF_CANVTEXT_FONT "TkDefaultFont" /* * Defaults for toplevels (most of the defaults for frames also apply diff --git a/win/Makefile.in b/win/Makefile.in index fb2a46c..516128c 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.73.2.2 2007/09/14 16:30:30 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.73.2.3 2007/11/01 16:37:25 dgp Exp $ TCLVERSION = @TCL_VERSION@ TCLPATCHL = @TCL_PATCH_LEVEL@ @@ -654,6 +654,11 @@ tkWinTest.$(OBJEXT): tkWinTest.c tkSquare.$(OBJEXT): tkSquare.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) +# Extra dependency info +tkConsole.$(OBJEXT): configure Makefile +tkMain.$(OBJEXT): configure Makefile +tkWindow.$(OBJEXT): configure Makefile + # Add the object extension to the implicit rules. By default .obj is not # automatically added. diff --git a/win/rules.vc b/win/rules.vc index f2f68c4..abb9980 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2007 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.15.2.2 2007/10/15 18:38:41 dgp Exp $ +# RCS: @(#) $Id: rules.vc,v 1.15.2.3 2007/11/01 16:37:25 dgp Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -106,19 +106,9 @@ OPTIMIZATIONS = $(OPTIMIZATIONS) -Oi OPTIMIZATIONS = $(OPTIMIZATIONS) -Op !endif -# Tk doesnt seem to be able to use -fp:strict. -!if "$(PROJECT)" != "tk" !if [nmakehlp -c -fp:strict] OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:strict !endif -!else -!if [nmakehlp -c -fp:precise] -OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:precise -!endif -!if [nmakehlp -c -fp:except] -OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:except -!endif -!endif !if [nmakehlp -c -Gs] OPTIMIZATIONS = $(OPTIMIZATIONS) -Gs diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index f2267fa..0e2311d 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinDefault.h,v 1.22 2007/05/04 21:29:22 patthoyts Exp $ + * RCS: @(#) $Id: tkWinDefault.h,v 1.22.2.1 2007/11/01 16:37:25 dgp Exp $ */ #ifndef _TKWINDEFAULT @@ -28,7 +28,6 @@ #define BLACK "Black" #define WHITE "White" -#define CTL_FONT "TkDefaultFont" /*"{MS Sans Serif} 8"*/ #define NORMAL_BG "SystemButtonFace" #define NORMAL_FG "SystemButtonText" #define ACTIVE_BG NORMAL_BG @@ -64,7 +63,7 @@ #define DEF_BUTTON_DISABLED_FG_MONO "" #define DEF_BUTTON_FG NORMAL_FG #define DEF_CHKRAD_FG TEXT_FG -#define DEF_BUTTON_FONT CTL_FONT +#define DEF_BUTTON_FONT "TkDefaultFont" #define DEF_BUTTON_HEIGHT "0" #define DEF_BUTTON_HIGHLIGHT_BG_COLOR DEF_BUTTON_BG_COLOR #define DEF_BUTTON_HIGHLIGHT_BG_MONO DEF_BUTTON_BG_MONO @@ -142,13 +141,13 @@ #define DEF_ENTRY_BG_COLOR "SystemWindow" #define DEF_ENTRY_BG_MONO WHITE -#define DEF_ENTRY_BORDER_WIDTH "2" +#define DEF_ENTRY_BORDER_WIDTH "1" #define DEF_ENTRY_CURSOR "xterm" #define DEF_ENTRY_DISABLED_BG_COLOR "SystemButtonFace" #define DEF_ENTRY_DISABLED_BG_MONO WHITE #define DEF_ENTRY_DISABLED_FG DISABLED #define DEF_ENTRY_EXPORT_SELECTION "1" -#define DEF_ENTRY_FONT CTL_FONT +#define DEF_ENTRY_FONT "TkTextFont" #define DEF_ENTRY_FG TEXT_FG #define DEF_ENTRY_HIGHLIGHT_BG NORMAL_BG #define DEF_ENTRY_HIGHLIGHT HIGHLIGHT @@ -206,7 +205,7 @@ #define DEF_LABELFRAME_CLASS "Labelframe" #define DEF_LABELFRAME_RELIEF "groove" #define DEF_LABELFRAME_FG NORMAL_FG -#define DEF_LABELFRAME_FONT CTL_FONT +#define DEF_LABELFRAME_FONT "TkDefaultFont" #define DEF_LABELFRAME_TEXT "" #define DEF_LABELFRAME_LABELANCHOR "nw" @@ -217,11 +216,11 @@ #define DEF_LISTBOX_ACTIVE_STYLE "underline" #define DEF_LISTBOX_BG_COLOR "SystemWindow" #define DEF_LISTBOX_BG_MONO WHITE -#define DEF_LISTBOX_BORDER_WIDTH "2" +#define DEF_LISTBOX_BORDER_WIDTH "1" #define DEF_LISTBOX_CURSOR "" #define DEF_LISTBOX_DISABLED_FG DISABLED #define DEF_LISTBOX_EXPORT_SELECTION "1" -#define DEF_LISTBOX_FONT CTL_FONT +#define DEF_LISTBOX_FONT "TkDefaultFont" #define DEF_LISTBOX_FG NORMAL_FG #define DEF_LISTBOX_HEIGHT "10" #define DEF_LISTBOX_HIGHLIGHT_BG NORMAL_BG @@ -285,7 +284,7 @@ #define DEF_MENU_CURSOR "arrow" #define DEF_MENU_DISABLED_FG_COLOR DISABLED #define DEF_MENU_DISABLED_FG_MONO "" -#define DEF_MENU_FONT "TkMenuFont" /* CTL_FONT */ +#define DEF_MENU_FONT "TkMenuFont" #define DEF_MENU_FG MENU_FG #define DEF_MENU_POST_COMMAND "" #define DEF_MENU_RELIEF "flat" @@ -309,12 +308,12 @@ #define DEF_MENUBUTTON_BG_COLOR NORMAL_BG #define DEF_MENUBUTTON_BG_MONO WHITE #define DEF_MENUBUTTON_BITMAP "" -#define DEF_MENUBUTTON_BORDER_WIDTH "2" +#define DEF_MENUBUTTON_BORDER_WIDTH "1" #define DEF_MENUBUTTON_CURSOR "" #define DEF_MENUBUTTON_DIRECTION "below" #define DEF_MENUBUTTON_DISABLED_FG_COLOR DISABLED #define DEF_MENUBUTTON_DISABLED_FG_MONO "" -#define DEF_MENUBUTTON_FONT CTL_FONT +#define DEF_MENUBUTTON_FONT "TkDefaultFont" #define DEF_MENUBUTTON_FG NORMAL_FG #define DEF_MENUBUTTON_HEIGHT "0" #define DEF_MENUBUTTON_HIGHLIGHT_BG_COLOR DEF_MENUBUTTON_BG_COLOR @@ -344,10 +343,10 @@ #define DEF_MESSAGE_ASPECT "150" #define DEF_MESSAGE_BG_COLOR NORMAL_BG #define DEF_MESSAGE_BG_MONO WHITE -#define DEF_MESSAGE_BORDER_WIDTH "2" +#define DEF_MESSAGE_BORDER_WIDTH "1" #define DEF_MESSAGE_CURSOR "" #define DEF_MESSAGE_FG NORMAL_FG -#define DEF_MESSAGE_FONT CTL_FONT +#define DEF_MESSAGE_FONT "TkDefaultFont" #define DEF_MESSAGE_HIGHLIGHT_BG NORMAL_BG #define DEF_MESSAGE_HIGHLIGHT HIGHLIGHT #define DEF_MESSAGE_HIGHLIGHT_WIDTH "0" @@ -366,18 +365,18 @@ #define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG #define DEF_PANEDWINDOW_BG_MONO WHITE -#define DEF_PANEDWINDOW_BORDERWIDTH "2" +#define DEF_PANEDWINDOW_BORDERWIDTH "1" #define DEF_PANEDWINDOW_CURSOR "" #define DEF_PANEDWINDOW_HANDLEPAD "8" #define DEF_PANEDWINDOW_HANDLESIZE "8" #define DEF_PANEDWINDOW_HEIGHT "" -#define DEF_PANEDWINDOW_OPAQUERESIZE "0" +#define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" -#define DEF_PANEDWINDOW_SASHPAD "2" -#define DEF_PANEDWINDOW_SASHRELIEF "raised" -#define DEF_PANEDWINDOW_SASHWIDTH "2" +#define DEF_PANEDWINDOW_SASHPAD "0" +#define DEF_PANEDWINDOW_SASHRELIEF "flat" +#define DEF_PANEDWINDOW_SASHWIDTH "3" #define DEF_PANEDWINDOW_SHOWHANDLE "0" #define DEF_PANEDWINDOW_WIDTH "" @@ -405,11 +404,11 @@ #define DEF_SCALE_BG_COLOR NORMAL_BG #define DEF_SCALE_BG_MONO WHITE #define DEF_SCALE_BIG_INCREMENT "0" -#define DEF_SCALE_BORDER_WIDTH "2" +#define DEF_SCALE_BORDER_WIDTH "1" #define DEF_SCALE_COMMAND "" #define DEF_SCALE_CURSOR "" #define DEF_SCALE_DIGITS "0" -#define DEF_SCALE_FONT CTL_FONT +#define DEF_SCALE_FONT "TkDefaultFont" #define DEF_SCALE_FG_COLOR NORMAL_FG #define DEF_SCALE_FG_MONO BLACK #define DEF_SCALE_FROM "0" @@ -470,11 +469,11 @@ #define DEF_TEXT_BG_COLOR "SystemWindow" #define DEF_TEXT_BG_MONO WHITE #define DEF_TEXT_BLOCK_CURSOR "0" -#define DEF_TEXT_BORDER_WIDTH "2" +#define DEF_TEXT_BORDER_WIDTH "1" #define DEF_TEXT_CURSOR "xterm" #define DEF_TEXT_FG TEXT_FG #define DEF_TEXT_EXPORT_SELECTION "1" -#define DEF_TEXT_FONT CTL_FONT +#define DEF_TEXT_FONT "TkFixedFont" #define DEF_TEXT_HEIGHT "24" #define DEF_TEXT_HIGHLIGHT_BG NORMAL_BG #define DEF_TEXT_HIGHLIGHT HIGHLIGHT @@ -515,7 +514,7 @@ * Defaults for canvas text: */ -#define DEF_CANVTEXT_FONT CTL_FONT +#define DEF_CANVTEXT_FONT "TkDefaultFont" /* * Defaults for toplevels (most of the defaults for frames also apply diff --git a/win/tkWinFont.c b/win/tkWinFont.c index bfdc111..5ccdc81 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinFont.c,v 1.32.2.2 2007/10/24 12:59:36 dgp Exp $ + * RCS: @(#) $Id: tkWinFont.c,v 1.32.2.3 2007/11/01 16:37:25 dgp Exp $ */ #include "tkWinInt.h" @@ -397,18 +397,19 @@ TkWinSetupSystemFonts(TkMainInfo *mainPtr) NONCLIENTMETRICS ncMetrics; ICONMETRICS iconMetrics; HFONT hFont; - + interp = (Tcl_Interp *) mainPtr->interp; tkwin = (Tk_Window) mainPtr->winPtr; - + /* force this for now */ - if (((TkWindow *) tkwin)->mainPtr == NULL) + if (((TkWindow *) tkwin)->mainPtr == NULL) { ((TkWindow *) tkwin)->mainPtr = mainPtr; - + } + ncMetrics.cbSize = sizeof(ncMetrics); SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncMetrics), &ncMetrics, 0); - + CreateNamedSystemLogFont(interp, tkwin, "TkDefaultFont", &ncMetrics.lfMessageFont); CreateNamedSystemLogFont(interp, tkwin, "TkHeadingFont", @@ -429,10 +430,10 @@ TkWinSetupSystemFonts(TkMainInfo *mainPtr) &iconMetrics, 0); CreateNamedSystemLogFont(interp, tkwin, "TkIconFont", &iconMetrics.lfFont); - + hFont = (HFONT)GetStockObject(ANSI_FIXED_FONT); CreateNamedSystemFont(interp, tkwin, "TkFixedFont", hFont); - + /* * Setup the remaining standard Tk font names as named fonts. */ |