Product Home Class IndexDownload

CK_ClipWindow

CK_Object
   |
   +----CK_Component
           |
           +----CK_Manager
                   |
                   +----CK_ClipWindow

The CK_ClipWindow is like a CK_BBoard, except that it can only have one child. The clip window's width and height should be explicitly set by the application. The intended use of the clip window is to provide a clipping window for a component that might be very large, such as a large CK_RowColumn. When used in conjunction with CK_ScrollHandle components, a scroll window can be achieved. One of the example programs provided with the Chilkat SDK demonstrates this.

The clip window can have a transparent background, a solid-color background, or a bitmap background. A bitmap background can be drawn tiled, to cover the entire clip window. It is possible to set horizontal and vertical borders using the CP_BorderX and CP_BorderY properties. As an example, if a clip window was created with CP_Width = 100, CP_Height = 100, CP_BorderX = 10, and CP_BorderY = 10, then the child would be clipped to a 90x90 pixel window.

Properties

Examples of creating a clip window:

CK_Bitmap *texture;
RGBQUAD bg;

bg.rgbRed = bg.rgbBlue = bg.rgbGreen = 0

// Create a clip window with a black background
CK_ClipWindow *c1 = (CK_ClipWindow *) CreateComponent(CT_ClipWindow, 0,
    CP_BgColor, &bg,
    CP_BorderX, 10,
    CP_BorderY, 10,
    0);

// Create a clip window with a tiled bitmap as the background.
CK_ClipWindow *c2 = (CK_ClipWindow *) CreateComponent(CT_ClipWindow, 0,
    CP_Bitmap, texture,
    CP_TiledBitmap, 1
    0);