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.
- widget
- [add information here]
- binding
- [add definition here]
megawidget: [add definition here]]
X11 glossary edit
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. Some of the following describe low-level details which are not visible at the script level, whereas other parts are very noticable.
- 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.
- Event
- Clients are informed of information asynchronously by means of events. These events can be generated either asynchronously from devices or as side effects of client requests. Events are grouped into types. The server never sends events to a client unless the client has specificially asked to be informed of that type of event. However, other clients can force events to be sent to other clients. Events are typically reported relative to a window.
- Event mask
- Events are requested relative to a window. The set of event types that a client requests relative to a window is described by using an event mask.
- Event synchronization
- There are certain race conditions possible when demultiplexing device events to clients (in particular deciding where pointer and keyboard events should be sent when in the middle of window management operations). The event synchronization mechanism allows synchronous processing of device events.
- Event propagation
- Device-related events propagate from the source window to ancestor windows until some client has expressed interest in handling that type of event or until the event is discarded explicitly.
- Event source
- The window the pointer is in is the source of a device-related event.
- Exposure event
- Servers do not guarantee to preserve the contents of windows when windows are obscured or reconfigured. Exposure events are sent to clients to inform them when contents of regions of windows have been lost.
- Extension
- Named extensions to the core protocol can be defined to extend the system. Extension to output requests, resources, and event types are all possible and are expected.
- Focus window
- The focus window is another term for the input focus.
- Font
- A font is a matrix of glyphs (typically characters). The protocol does no translation or interpretation of character sets. The client simply indicates values used to index the glyph array. A font contains additional metric information to determine interglyph and interline spacing.
- GC, GContext
- GC and gcontext are abbreviations for graphics context.
- Glyph
- A glyph is an image, typically of a character, in a font.
- Grab
- Keyboard keys, the keyboard, pointer buttons, the pointer, and the server can be grabbed for exclusive use by a client. In general, these facilities are not intended to be used by normal applications but are intended for various input and window managers to implement various styles of user interfaces.
- Graphics context
- Various information for graphics output is stored in a graphics context such as foreground pixel, background pixel, line width, clipping region, and so on. A graphics context can only be used with drawables that have the same root and the same depth as the graphics context.
- Gravity
- See bit gravity and window gravity.
- GrayScale
- GrayScale can be viewed as a degenerate case of PseudoColor, in which the red, green, and blue values in any given colormap entry are equal, thus producing shades of gray. The gray values can be changed dynamically.
- Hotspot
- A cursor has an associated hotspot that defines the point in the cursor corresponding to the coordinates reported for the pointer.
- Identifier
- An identifier is a unique value associated with a resource that clients use to name that resource. The identifier can be used over any connection.
- Inferiors
- The inferiors of a window are all of the subwindows nested below it: the children, the children's children, and so on.
- Input focus
- The input focus is normally a window defining the scope for processing of keyboard input. If a generated keyboard event would normally be reported to this window or one of its inferiors, the event is reported normally. Otherwise, the event is reported with respect to the focus window. The input focus also can be set such that all keyboard events are discarded and such that the focus window is dynamically taken to be the root window of whatever screen the pointer is on at each keyboard event.
- Input manager
- Control over keyboard input is typically provided by an input manager client.
- InputOnly window
- An InputOnly window is a window that cannot be used for graphics requests. InputOnly windows are invisible and can be used to control such things as cursors, input event generation, and grabbing. InputOnly windows cannot have InputOutput windows as inferiors.
- InputOutput window
- An InputOutput window is the normal kind of opaque window, used for both input and output. InputOutput windows can have both InputOutput and InputOnly windows as inferiors.
- Key grabbing
- Keys on the keyboard can be passively grabbed by a client. When the key is pressed, the keyboard is then actively grabbed by the client.
- Keyboard grabbing
- A client can actively grab control of the keyboard, and key events will be sent to that client rather than the client the events would normally have been sent to.
- Keysym
- An encoding of a symbol on a keycap on a keyboard.
- Mapped
- A window is said to be mapped if a map call has been performed on it. Unmapped windows and their inferiors are never viewable or visible.
- Modifier keys
- Shift, Control, Meta, Super, Hyper, Alt, Compose, Apple, CapsLock, ShiftLock, and similar keys are called modifier keys.
- Monochrome
- Monochrome is a special case of StaticGray in which there are only two colormap entries.
- Obscure
- A window is obscured if some other window obscures it. Window A obscures window B if both are viewable InputOutput windows, A is higher in the global stacking order, and the rectangle defined by the outside edges of A intersects the rectangle defined by the outside edges of B. Note the distinction between obscure and occludes. Also note that window borders are included in the calculation and that a window can be obscured and yet still have visible regions.
- Occlude
- A window is occluded if some other window occludes it. Window A occludes window B if both are mapped, A is higher in the global stacking order, and the rectangle defined by the outside edges of A intersects the rectangle defined by the outside edges of B. Note the distinction between occludes and obscures. Also note that window borders are included in the calculation.
- Padding
- Some padding bytes are inserted in the data stream to maintain alignment of the protocol requests on natural boundaries. This increases ease of portability to some machine architectures.
- Parent window
- If C is a child of P, then P is the parent of C.
- Passive grab
- Grabbing a key or button is a passive grab. The grab activates when the key or button is actually pressed.
- Pixel value
- A pixel is an N-bit value, where N is the number of bit planes used in a particular window or pixmap (that is, N is the depth of the window or pixmap). For a window, a pixel value indexes a colormap to derive an actual color to be displayed.
- Pixmap
- A pixmap is a three-dimensional array of bits. A pixmap is normally thought of as a twodimensional array of pixels, where each pixel can be a value from 0 to (2^N)-1 and where N is the depth (z axis) of the pixmap. A pixmap can also be thought of as a stack of N bitmaps.
- Plane
- When a pixmap or window is thought of as a stack of bitmaps, each bitmap is called a plane or bit plane.
- Plane mask
- Graphics operations can be restricted to only affect a subset of bit planes of a destination. A plane mask is a bit mask describing which planes are to be modified. The plane mask is stored in a graphics context.
- Pointer
- The pointer is the pointing device attached to the cursor and tracked on the screens.
- Pointer grabbing
- A client can actively grab control of the pointer. Then button and motion events will be sent to that client rather than the client the events would normally have been sent to.
- Pointing device
- A pointing device is typically a mouse, tablet, or some other device with effective dimensional motion. There is only one visible cursor defined by the core protocol, and it tracks whatever pointing device is attached as the pointer.
- Property
- Windows may have associated properties, which consist of a name, a type, a data format, and some data. The protocol places no interpretation on properties. They are intended as a general-purpose naming mechanism for clients. For example, clients might use properties to share information such as resize hints, program names, and icon formats with a window manager.
- Property list
- The property list of a window is the list of properties that have been defined for the window.
- PseudoColor
- PseudoColor is a class of colormap in which a pixel value indexes the colormap to produce independent red, green, and blue values; that is, the colormap is viewed as an array of triples (RGB values). The RGB values can be changed dynamically.
- Redirecting control
- Window managers (or client programs) may want to enforce window layout policy in various ways. When a client attempts to change the size or position of a window, the operation may be redirected to a specified client rather than the operation actually being performed.
- Reply
- Information requested by a client program is sent back to the client with a reply. Both events and replies are multiplexed on the same connection. Most requests do not generate replies, although some requests generate multiple replies.
- Request
- A command to the server is called a request. It is a single block of data sent over a connection.
- Resource
- Windows, pixmaps, cursors, fonts, graphics contexts, and colormaps are known as resources. They all have unique identifiers associated with them for naming purposes. The lifetime of a resource usually is bounded by the lifetime of the connection over which the resource was created.
- RGB values
- Red, green, and blue (RGB) intensity values are used to define color. These values are always represented as 16-bit unsigned numbers, with 0 being the minimum intensity and 65535 being the maximum intensity. The server scales the values to match the display hardware.
- Root
- The root of a pixmap, colormap, or graphics context is the same as the root of whatever drawable was used when the pixmap, colormap, or graphics context was created. The root of a window is the root window under which the window was created.
- Root window
- Each screen has a root window covering it. It cannot be reconfigured or unmapped, but it otherwise acts as a full-edged window. A root window has no parent.
- Save set
- The save set of a client is a list of other clients' windows that, if they are inferiors of one of the client's windows at connection close, should not be destroyed and that should be remapped if currently unmapped. Save sets are typically used by window managers to avoid lost windows if the manager terminates abnormally.
- Scanline
- A scanline is a list of pixel or bit values viewed as a horizontal row (all values having the same y coordinate) of an image, with the values ordered by increasing x coordinate.
- Scanline order
- An image represented in scanline order contains scanlines ordered by increasing y coordinate.
- Screen
- A server can provide several independent screens, which typically have physically independent monitors. This would be the expected configuration when there is only a single keyboard and pointer shared among the screens.
- Selection
- A selection can be thought of as an indirect property with dynamic type; that is, rather than having the property stored in the server, it is maintained by some client (the "owner"). A selection is global in nature and is thought of as belonging to the user (although maintained by clients), rather than as being private to a particular window subhierarchy or a particular set of clients. When a client asks for the contents of a selection, it specifies a selection "target type". This target type can be used to control the transmitted representation of the contents. For example, if the selection is "the last thing the user clicked on" and that is currently an image, then the target type might specify whether the contents of the image should be sent in XY format or Z format. The target type can also be used to control the class of contents transmitted; for example, asking for the "looks" (fonts, line spacing, indentation, and so on) of a paragraph selection rather than the text of the paragraph. The target type can also be used for other purposes. The protocol does not constrain the semantics.
- Server
- The server provides the basic windowing mechanism. It handles connections from clients, multiplexes graphics requests onto the screens, and demultiplexes input back to the appropriate clients.
- Server grabbing
- The server can be grabbed by a single client for exclusive use. This prevents processing of any requests from other client connections until the grab is completed. This is typically only a transient state for such things as rubber-banding, pop-up menus, or to execute requests indivisibly.
- Sibling
- Children of the same parent window are known as sibling windows.
- Stacking order
- Sibling windows may stack on top of each other. Windows above other windows both obscure and occlude those lower windows. This is similar to paper on a desk. The relationship between sibling windows is known as the stacking order.
- StaticColor
- StaticColor can be viewed as a degenerate case of PseudoColor in which the RGB values are predefined and read-only.
- StaticGray
- StaticGray can be viewed as a degenerate case of GrayScale in which the gray values are predefined and read-only. The values are typically linear or near-linear increasing ramps.
- Stipple
- A stipple pattern is a bitmap that is used to tile a region that will serve as an additional clip mask for a fill operation with the foreground color.
- String Equivalence
- Two ISO Latin-1 STRING8 values are considered equal if they are the same length and if corresponding bytes are either equal or are equivalent as follows: decimal values 65 to 90 inclusive (characters "A" to "Z") are pairwise equivalent to decimal values 97 to 122 inclusive (characters "a" to "z"), decimal values 192 to 214 inclusive (characters "A grave" to "O diaeresis") are pairwise equivalent to decimal values 224 to 246 inclusive (characters "a grave" to "o diaeresis"), and decimal values 216 to 222 inclusive (characters "O oblique" to "THORN") are pairwise equivalent to decimal values 246 to 254 inclusive (characters "o oblique" to "thorn").
- Tile
- A pixmap can be replicated in two dimensions to tile a region. The pixmap itself is also known as a tile.
- Timestamp
- A timestamp is a time value, expressed in milliseconds. It typically is the time since the last server reset. Timestamp values wrap around (after about 49.7 days). The server, given its current time is represented by timestamp T, always interprets timestamps from clients by treating half of the timestamp space as being earlier in time than T and half of the timestamp space as being later in time than T. One timestamp value (named CurrentTime) is never generated by the server. This value is reserved for use in requests to represent the current server time.
- TrueColor
- TrueColor can be viewed as a degenerate case of DirectColor in which the subfields in the pixel value directly encode the corresponding RGB values; that is, the colormap has predefined read-only RGB values. The values are typically linear or near-linear increasing ramps.
- Type
- A type is an arbitrary atom used to identify the interpretation of property data. Types are completely uninterpreted by the server and are solely for the benefit of clients.
- Viewable
- A window is viewable if it and all of its ancestors are mapped. This does not imply that any portion of the window is actually visible. Graphics requests can be performed on a window when it is not viewable, but output will not be retained unless the server is maintaining backing store.
- Visible
- A region of a window is visible if someone looking at the screen can actually see it; that is, the window is viewable and the region is not occluded by any other window.
- Window gravity
- When windows are resized, subwindows may be repositioned automatically relative to some position in the window. This attraction of a subwindow to some part of its parent is known as window gravity.
- Windowmanager
- Manipulation of windows on the screen and much of the user interface (policy) is typically provided by a window manager client.
- XYFormat
- The data for a pixmap is said to be in XY format if it is organized as a set of bitmaps representing individual bit planes, with the planes appearing from most-significant to least-significant in bit order.
- ZFormat
- The data for a pixmap is said to be in Z format if it is organized as a set of pixel values in scanline order.