summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-01 21:50:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-01 21:50:55 (GMT)
commit1ebb0c9d23b20f48bb8d5cc30f30532c99823731 (patch)
tree639f805d8747720a68d33f6fb1db835bfaf70bee /doc
parent0bffbe8dfe9cd138fc970a3b8d026558f2f57847 (diff)
downloadtk-1ebb0c9d23b20f48bb8d5cc30f30532c99823731.zip
tk-1ebb0c9d23b20f48bb8d5cc30f30532c99823731.tar.gz
tk-1ebb0c9d23b20f48bb8d5cc30f30532c99823731.tar.bz2
Fix Tk_Get3BorderColors() signature. Add documentation, created by René Zaumseil
Diffstat (limited to 'doc')
-rw-r--r--doc/3DBorder.336
-rw-r--r--doc/AddOption.311
-rw-r--r--doc/MainWin.321
-rw-r--r--doc/WinUtil.364
4 files changed, 130 insertions, 2 deletions
diff --git a/doc/3DBorder.3 b/doc/3DBorder.3
index f589e66..c9fa657 100644
--- a/doc/3DBorder.3
+++ b/doc/3DBorder.3
@@ -9,7 +9,7 @@
.so man.macros
.BS
.SH NAME
-Tk_Alloc3DBorderFromObj, Tk_Get3DBorder, Tk_Get3DBorderFromObj, Tk_Draw3DRectangle, Tk_Fill3DRectangle, Tk_Draw3DPolygon, Tk_Fill3DPolygon, Tk_3DVerticalBevel, Tk_3DHorizontalBevel, Tk_SetBackgroundFromBorder, Tk_NameOf3DBorder, Tk_3DBorderColor, Tk_3DBorderGC, Tk_Free3DBorderFromObj, Tk_Free3DBorder \- draw borders with three-dimensional appearance
+Tk_Alloc3DBorderFromObj, Tk_ClipDrawableToRect, Tk_DrawHighlightBorder, Tk_Get3DBorder, fBTk_Get3DBorderColors, Tk_Get3DBorderFromObj, Tk_Draw3DRectangle, Tk_Fill3DRectangle, Tk_Draw3DPolygon, Tk_Fill3DPolygon, Tk_3DVerticalBevel, Tk_3DHorizontalBevel, Tk_SetBackgroundFromBorder, Tk_NameOf3DBorder, Tk_3DBorderColor, Tk_3DBorderGC, Tk_Free3DBorderFromObj, Tk_Free3DBorder \- draw borders with three-dimensional appearance
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
@@ -17,9 +17,18 @@ Tk_Alloc3DBorderFromObj, Tk_Get3DBorder, Tk_Get3DBorderFromObj, Tk_Draw3DRectang
Tk_3DBorder
\fBTk_Alloc3DBorderFromObj(\fIinterp, tkwin, objPtr\fB)\fR
.sp
+void
+\fBTk_ClipDrawableToRect(\fIdisplay, drawable, x, y, width, height\fB)\fR
+.sp
+void
+\fBTk_DrawHighlightBorder(\fItkwin, fgGC, bgGC, highlightWidth, drawable\fB)\fR
+.sp
Tk_3DBorder
\fBTk_Get3DBorder(\fIinterp, tkwin, colorName\fB)\fR
.sp
+void
+\fBTk_Get3DBorderColors(\fIborder, bgColorPtr, darkColorPtr, lightColorPtr\fB)\fR
+.sp
Tk_3DBorder
\fBTk_Get3DBorderFromObj(\fItkwin, objPtr\fB)\fR
.sp
@@ -90,6 +99,8 @@ Height of rectangle describing border or bevel, in pixels.
Width of border in pixels. Positive means border is inside rectangle
given by \fIx\fR, \fIy\fR, \fIwidth\fR, \fIheight\fR, negative means
border is outside rectangle.
+.AP int highlightWidth in
+Width of ring around the outside of the widget if the widget has received the input focus.
.AP int relief in
Indicates 3-D position of interior of value relative to exterior;
should be \fBTK_RELIEF_RAISED\fR, \fBTK_RELIEF_SUNKEN\fR, \fBTK_RELIEF_GROOVE\fR,
@@ -133,6 +144,16 @@ it forms the bottom side.
.AP int which in
Specifies which of the border's graphics contexts is desired.
Must be \fBTK_3D_FLAT_GC\fR, \fBTK_3D_LIGHT_GC\fR, or \fBTK_3D_DARK_GC\fR.
+.AP XColor *bgColorPtr out
+Pointer to location in which to store the background color of the given border.
+.AP XColor *darkColorPtr out
+Pointer to location in which to store the color for darker areas of the given border.
+.AP XColor *lightColorPtr out
+Pointer to location in which to store the color for lighter areas of the given border.
+.AP GC fgGC in
+Foreground X graphics context.
+.AP GC fgGC in
+Background X graphics context.
.BE
.SH DESCRIPTION
.PP
@@ -159,11 +180,24 @@ information about the return value in \fIobjPtr\fR, which speeds up
future calls to \fBTk_Alloc3DBorderFromObj\fR with the same \fIobjPtr\fR
and \fItkwin\fR.
.PP
+\fBTk_ClipDrawableToRect\fR will clip all drawing into the drawable d to the given rectangle. If width or height are negative, reset to no clipping.
+Subsequent drawing into d is offset and clipped as specified.
+The function is only used when \fBTK_NO_DOUBLE_BUFFERING\fR is specified at compile time.
+.PP
+\fBTk_DrawHighlightBorder\fR draws a rectangular ring around the outside of a widget
+to indicate that it has received the input focus.
+On the Macintosh, this puts a 1 pixel border in the bgGC color between
+the widget and the focus ring, except in the case where highlightWidth
+is 1, in which case the border is left out.
+For proper Mac L&F, use highlightWidth of 3.
+.PP
\fBTk_Get3DBorder\fR is identical to \fBTk_Alloc3DBorderFromObj\fR except
that the color is specified with a string instead of a value. This
prevents \fBTk_Get3DBorder\fR from caching the return value, so
\fBTk_Get3DBorder\fR is less efficient than \fBTk_Alloc3DBorderFromObj\fR.
.PP
+\fBTk_Get3DBorderColors\fR returns the used colors of the given border.
+.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 does not actually create the border; it must
diff --git a/doc/AddOption.3 b/doc/AddOption.3
index c1c116a..a331455 100644
--- a/doc/AddOption.3
+++ b/doc/AddOption.3
@@ -13,6 +13,9 @@ Tk_AddOption \- Add an option to the option database
.sp
void
\fBTk_AddOption\fR(\fItkwin, name, value, priority\fR)
+.sp
+void
+\fBTk_GetSystemDefault\fR(\fItkwin, dbName, className\fR)
.SH ARGUMENTS
.AP Tk_Window tkwin in
Token for window.
@@ -20,12 +23,16 @@ Token for window.
Multi-element name of option.
.AP "const char" *value in
Value of option.
+.AP "const char" *dbName in
+The option database name.
+.AP "const char" *className in
+The name of the option class.
.AP int priority in
Overall priority level to use for option.
.BE
.SH DESCRIPTION
.PP
-This procedure is invoked to add an option to the database
+\fBTk_AddOption\fR is invoked to add an option to the database
associated with \fItkwin\fR's main window. \fIName\fR
contains the option being specified and consists of names and/or
classes separated by asterisks or dots, in the usual X format.
@@ -46,5 +53,7 @@ user-specific startup files.
.IP 80
Used for options specified interactively after the application starts
running.
+\fBTk_GetSystemDefault\fR return a Tk_Uid string representation of the given \fIdbname\fR and \fIclassName\fR of a configuration option.
+Returns NULL if there are no system defaults that match this pair.
.SH KEYWORDS
class, name, option, add
diff --git a/doc/MainWin.3 b/doc/MainWin.3
index 94bd7e2..b11b6cd 100644
--- a/doc/MainWin.3
+++ b/doc/MainWin.3
@@ -17,12 +17,26 @@ Tk_MainWindow, Tk_GetNumMainWindows \- functions for querying main window inform
Tk_Window
\fBTk_MainWindow\fR(\fIinterp\fR)
.sp
+void
+\fBTk_SetMainMenubar\fR(\fIinterp, tkwin, menuName\fR)
+.sp
+void
+\fBTk_SetWindowMenubar\fR(\fIinterp, tkwin, oldMenuName, menuName\fR)
+.sp
int
\fBTk_GetNumMainWindows\fR()
.SH ARGUMENTS
.AS Tcl_Interp *pathName
.AP Tcl_Interp *interp in/out
Interpreter associated with the application.
+.AP Tk_Window tkwin in
+Token for main window.
+.AP const char *menuName in
+The name of the new menubar that the toplevel needs to be set to.
+NULL means that their is no menu now.
+.AP const char *oldMenuName in
+The name of the menubar previously set in this toplevel.
+NULL means no menu was set previously.
.BE
.SH DESCRIPTION
.PP
@@ -36,5 +50,12 @@ leaves an error message in interpreter \fIinterp\fR's result.
.PP
\fBTk_GetNumMainWindows\fR returns a count of the number of main
windows currently open in the current thread.
+\fBTk_SetMainMenubar\fR
+Called when a toplevel widget is brought to front. On the Macintosh,
+sets up the menubar that goes accross the top of the main monitor. On
+other platforms, nothing is necessary.
+\fBTk_SetWindowMenubar\fR associates a menu with a window.
+The old menu clones for the menubar are thrown away, and a handler is
+set up to allocate the new ones.
.SH KEYWORDS
application, main window
diff --git a/doc/WinUtil.3 b/doc/WinUtil.3
new file mode 100644
index 0000000..253ed19
--- /dev/null
+++ b/doc/WinUtil.3
@@ -0,0 +1,64 @@
+'\"
+'\" Copyright (c) 1990-1993 The Regents of the University of California.
+'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+.TH Tk_ConfigureWindow 3 4.0 Tk "Tk Library Procedures"
+.so man.macros
+.BS
+.SH NAME
+Tk_GetOtherWindow, Tk_MakeContainer, Tk_MakeWindow, Tk_UseWindow \- window utility functions
+.SH SYNOPSIS
+.nf
+\fB#include <tk.h>\fR
+.sp
+Tk_Window
+\fBTk_GetOtherWindow(\fItkwin\fB)\fR
+.sp
+\fBTk_MakeContainer(\fItkwin\fB)\fR
+.sp
+\fBTk_MakeWindow(\fItkwin, parent\fB)\fR
+.sp
+int
+\fBTk_UseWindow(\fIinterp, tkwin, string\fB)\fR
+.SH ARGUMENTS
+.AS XSetWindowAttributes borderWidth
+.AP Tcl_Interp * interp in
+Interpreter associated with the application.
+.AP Tk_Window tkwin in
+Token for window.
+.AP Window parent in
+Parent window.
+.AP "const char" *string in
+String identifying an X window to use for \fItkwin\fR; must be an integer value.
+.BE
+.SH DESCRIPTION
+.PP
+If both the container and embedded window are in the same process,
+\fBTk_GetOtherWindow\fR will return either one, given the other.
+If winPtr is a container, the return value is the token for the
+embedded window, and vice versa. If the "other" window isn't in this
+process, NULL is returned.
+.PP
+\fBTk_MakeContainer\fR is called to indicate that a particular window will be a
+container for an embedded application. This changes certain aspects of
+the window's behavior, such as whether it will receive events anymore.
+.PP
+\fBTk_MakeWindow\fR creates an actual window system window object based on the
+current attributes of the specified TkWindow. It returns the handle to the new
+window, or None on failure.
+.PP
+\fBTk_UseWindow\fR causes a Tk window to use a given X window as its
+parent window, rather than the root window for the screen. It is
+invoked by an embedded application to specify the window in which it
+is embedded.
+.PP
+The return value is normally TCL_OK. If an error occurs (such as
+string not being a valid window spec), then the return value is
+TCL_ERROR and an error message is left in the interp's result if
+interp is non-NULL.
+.PP
+.SH KEYWORDS
+parent, window