Product Home Class IndexDownload

CK_BBoard

CK_Object
   |
   +----CK_Component
           |
           +----CK_Manager
                   |
                   +----CK_BBoard

This is a bulletin-board manager component. A bulletin board can have any number of children. It has a fixed size, which means that the width and height properties must be set. A bulletin board draws its children at each child's CP_RelativeX, CP_RelativeY coordinates relative to the upper left corner of the bulletin board. If a child component extends beyond the edges of the bulletin board, it will be clipped and only the non-clipped portion of the child will be visible. It is allowable for a bulletin board to have children located completely outside the boundaries of the bulletin board.

If children of a bulletin board overlap each other, the order of drawing each child can be controlled by setting each child's CP_ZOrder property. The bulletin board will draw child components with the lower Z-order first.

The background of a bulletin board can be filled with a solid color, or it can be a bitmap. It is possible to draw the bitmap tiled so as to fill then entire background. If both the CP_BgColor and CP_Bitmap properties are set, the background color will be ignored because the background bitmap was specified.

Properties

Examples of creating a bulletin board:

CK_Bitmap *texture;
RGBQUAD bg;

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

// Create a solid-black bulletin board.
CK_BBoard *bb1 = (CK_BBoard *) CreateComponent(CT_BBoard, 0,
    CP_BgColor, &bg,
    CP_Width, 640,
    CP_Height, 480,
    0);

// Create a bulletin board with a tiled bitmap as the background.
CK_BBoard *bb2 = (CK_BBoard *) CreateComponent(CT_BBoard, 0,
    CP_Bitmap, texture,
    CP_TiledBitmap, 1
    CP_Width, 640,
    CP_Height, 480,
    0);