Product Home Class IndexDownload

Component Types

This page gives a summary description of each type of component available in the library. Applications create displayable interface components by calling the CreateComponent global function.

CT_AdjustmentLayer
CT_BBoard
CT_ClipWindow
CT_Frame
CT_Label
CT_LineEdit
CT_RowColumn
CT_ScaledLabel
CT_ScrollHandle
CT_Viewport

CK_Label objects are probably the most commonly used interface component. They can be used to display non-editable text or bitmaps. They can also be programmed to behave as buttons by reacting to button up/down events. See CK_Label.

Properties

A bulletin board is very often the top-level component of a screen. It is a manager component that can have any number of children. Each child component is drawn at the child's CP_RelativeX and CP_RelativeY coordinates relative to the top-left corner of the bulletin board. The bulletin board can have an optional bitmap that can serve as a background. The bitmap can be tiled. See CK_BBoard.

Properties

A row-column component can layout it's children in a horizontal or vertical row. The size of the row-column is determined by the size of the children, the spacing between the children, and possibly a border surrounding the children. When the children are of different sizes, the row-column can align the children in different ways, such as top-aligned or centered. An optional bitmap can be specified to be drawn as a background. See CK_RowColumn.

Properties

A frame is a manager component that can have one and only one child. It can also have a border, and optionally a bitmap or solid-color background. The width and height of the frame is determined by the sizeo f the child and the border size. See CK_Frame.

Properties

A clip window is like a frame, except that the width and height are not determined by the child component. Like a frame, the clip window can only have one child, but the width and height of the clip window must be explicitly set. The clip-window is useful for providing a windowed view of a component that may be very large, such as a large row-column. The child component is drawn at the child's CP_RelativeX, CP_RelativeY property values, relative to the top-left corner of the clip-window. This behavior makes it possible to implement a scroll window by updating the child's relative X,Y properties in reaction to mouse movement in a CT_ScrollHandle component. See CK_ClipWindow.

Properties

A line-edit component is the same as a CT_Label, with the added ability to edit the text. When the left mouse button is clicked on the line-edit, the caret begins blinking and the line-edit will have keyboard focus. A right button click on the component will cause the keyboard focus to be lost, and the caret will stop blinking. The properties of the line-edit are the same as that for labels, with two additional properties: CP_BlinkDelay and CP_Caret. See CK_LineEdit.

Properties

The viewport component provides a rectangular area in which the application can provide the rendering. The CK_Viewport class will call the application's CK_Render callback object to do the rendering whenever the component is drawn. The proper way to update the contents of the viewport would be to mark the component as dirty using the CK_Component::setDirty() method, and then let the Chilkat engine redraw the viewport component.

A viewport component might be used to contain a tiled map. See CK_Viewport.

Properties

A scroll handle component is actually both the scroll handle, and the channel. The channel can be vertical or horizontal. The CP_Bitmap property sets the bitmap for the handle. When the left mouse button is clicked on the handle and dragged, the handle will move. When the mouse button is released, the focus is lost and the handle will stop moving.

If a background bitmap for the channel is desired, the scroll handle can be placed in a frame (CK_Frame) that contains the background bitmap. See CK_ScrollHandle.

Properties

An adjustment layer component provides a number of pixel-modifying overlay effects. This component can have only one child. The child component is drawn first before the effect is applied. Currently there are two simple effects, lightening and darkening. The adjustment layer will automatically take the same width and height as it's child.

It should be noted that the pixel-modifying effect must read the pixel values from the render surface, and then write the modified pixel. Performance will vary depending on where the render surface is located. If the surface scenario is to render directly to the primary surface's back buffer in video memory, then performance will be slower because reading from video memory is slow. Ideally, the surface scenario should place the render surface in system memory when this component is used.

The library performs the pixel adjustments in optimized assembly code. See CK_AdjustmentLayer.

Properties

The scaled label component can display a stretched or shrunken bitmap. The width and height of this component is explicitly set, and the bitmap will be stretched to this size.

In the Beta release of the library, the bitmap must be 16 bits per pixel or greater. See CK_ScaledLabel.

Properties