Version 3 of Tk glossary

Updated 2008-10-29 22:18:08 by lars_h

Purpose: To collect definitions of terms used in Tk documentation. (The documentation itself leaves many things undefined.)


scanning
To scroll the contents of a widget by clicking and dragging in the widget itself, as opposed to scrolling by using a scrollbar (a separate widget) or key bindings.

Using the middle mouse button to scroll the contents of a listbox, text widget, entry widget, or other scrollable widget. This feature appears to be unique to Tk -- no other major toolkit supports it.

window
Can refer to pretty much any part of the screen which is managed as a unit, and need in general not be something that the OS would recognise as a window. Scrollbars, buttons, canvases, etc. are all considered to be individual windows in Tk. Windows that are not a part of another window are called toplevels in Tk. Windows are organised in a hierarchy, where the "." character is used in the same way as "/" is used in the hierarchy of unix file names. Thus the root window is called "." (a period), the children of the root have names like ".content", and children of the children of the root names like ".content.upper". Windows will usually not be visible until they have been assigned a geometry manager, such as pack or grid.

X11 glossary

The following is the glossary from the X Protocol specification. While Tk isn't necessarily using X, a lot of the X terminology has made its way into Tk.

Access control list
X maintains a list of hosts from which client programs can be run. By default, only programs on the local host and hosts specified in an initial list read by the server can use the display. Clients on the local host can change this access control list. Some server implementations can also implement other authorization mechanisms in addition to or in place of this mechanism. The action of this mechanism can be conditional based on the authorization protocol name and data received by the server at connection setup.
Active grab
A grab is active when the pointer or keyboard is actually owned by the single grabbing client.
Ancestors
If W is an inferior of A, then A is an ancestor of W.
Atom
An atom is a unique ID corresponding to a string name. Atoms are used to identify properties, types, and selections.
Background
An InputOutput window can have a background, which is defined as a pixmap. When regions of the window have their contents lost or invalidated, the server will automatically tile those regions with the background.
Backing store
When a server maintains the contents of a window, the pixels saved off screen are known as a backing store.
Bit gravity
When a window is resized, the contents of the window are not necessarily discarded. It is possible to request that the server relocate the previous contents to some region of the window (though no guarantees are made). This attraction of window contents for some location of a window is known as bit gravity.
Bit plane
When a pixmap or window is thought of as a stack of bitmaps, each bitmap is called a bit plane or plane.
Bitmap
A bitmap is a pixmap of depth one.
Border
An InputOutput window can have a border of equal thickness on all four sides of the window. A pixmap defines the contents of the border, and the server automatically maintains the contents of the border. Exposure events are never generated for border regions.
Button grabbing
Buttons on the pointer may be passively grabbed by a client. When the button is pressed, the pointer is then actively grabbed by the client.
Byte order
For image (pixmap/bitmap) data, the server defifines the byte order, and clients with different native byte ordering must swap bytes as necessary. For all other parts of the protocol, the client defines the byte order, and the server swaps bytes as necessary.
Children
The children of a window are its first-level subwindows.
Client
An application program connects to the window system server by some interprocess communication path, such as a TCP connection or a shared memory buffer. This program is referred to as a client of the window system server. More precisely, the client is the communication path itself; a program with multiple paths open to the server is viewed as multiple clients by the protocol. Resource lifetimes are controlled by connection lifetimes, not by program lifetimes.
Clipping region
In a graphics context, a bitmap or list of rectangles can be specified to restrict output to a particular region of the window. The image defined by the bitmap or rectangles is called a clipping region.
Colormap
A colormap consists of a set of entries defining color values. The colormap associated with a window is used to display the contents of the window; each pixel value indexes the colormap to produce RGB values that drive the guns of a monitor. Depending on hardware limitations, one or more colormaps may be installed at one time, so that windows associated with those maps display with correct colors.
Connection
The interprocess communication path between the server and client program is known as a connection. A client program typically (but not necessarily) has one connection to the server over which requests and events are sent.
Containment
A window "contains" the pointer if the window is viewable and the hotspot of the cursor is within a visible region of the window or a visible region of one of its inferiors. The border of the window is included as part of the window for containment. The pointer is "in" a window if the window contains the pointer but no inferior contains the pointer.
Coordinate system
The coordinate system has the X axis horizontal and the Y axis vertical, with the origin [0,0] at the upper left. Coordinates are integral, in terms of pixels, and coincide with pixel centers. Each window and pixmap has its own coordinate system. For a window, the origin is inside the border at the inside upper left.
Cursor
A cursor is the visible shape of the pointer on a screen. It consists of a hot spot, a source bitmap, a shape bitmap, and a pair of colors. The cursor defifined for a window controls the visible appearance when the pointer is in that window.
Depth
The depth of a window or pixmap is the number of bits per pixel that it has. The depth of a graphics context is the depth of the drawables it can be used in conjunction with for graphics output.
Device
Keyboards, mice, tablets, track-balls, button boxes, and so on are all collectively known as input devices. The core protocol only deals with two devices, "the keyboard" and "the pointer."
DirectColor
DirectColor is a class of colormap in which a pixel value is decomposed into three separate subfields for indexing. The first subfield indexes an array to produce red intensity values. The second subfield indexes a second array to produce blue intensity values. The third subfield indexes a third array to produce green intensity values. The RGB values can be changed dynamically.
Display
A server, together with its screens and input devices, is called a display.
Drawable
Both windows and pixmaps can be used as sources and destinations in graphics operations. These windows and pixmaps are collectively known as drawables. However, an InputOnly window cannot be used as a source or destination in a graphics operation.

Category glossary