Derived from: public BView
Declared in: <interface/Box.h>
A BBox draws a labeled border around other views. It serves only to label those views and organize them visually. It doesn't respond to messages.
The border is drawn around the edge of the view's frame rectangle. If the BBox has a label, the border at the top of box is broken where the label appears (and the border is inset from the top somewhat to make room for the label).
The current pen size of the view determines the width of the border, which by default is 1.0 coordinate unit. If you make the border thicker, it will be inset somewhat so that none of it is clipped by the BBox's frame rectangle. The label is drawn in the current font, which by default is the Erich bitmap font. Both the border and the label are drawn in the current high color; the default high color is black.
The views that the box encloses should be made children of the BBox object.
BBox(BRect frame, const char *name = NULL, ulong resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, ulong flags = B_WILL_DRAW)
Initializes the BBox by passing all arguments to the BView constructor, and sets the font for displaying the label to the 9.0-point Erich bitmap font. However, the new object doesn't have a label; call SetLabel() to assign it one.
See also: SetLabel()
virtual ~BBox(void)
Frees the label, if the BBox has one.
virtual void Draw(BRect updateRect)
Draws the box and its label. This function is called automatically in response to update messages.
See also: BView::Draw()
void SetLabel(const char *string) const char *Label(void) const
These functions set and return the label that's displayed along the top edge of the box. SetLabel() copies string and makes it the BBox's label, freeing the previous label, if any. If string is NULL, it removes the current label and frees it.
Label() returns a pointer to the BBox's current label, or NULL if it doesn't have one.
The Be Book, HTML Edition, for Developer Release 8 of the Be Operating System.
Copyright © 1996 Be, Inc. All rights reserved.
Be, the Be logo, BeBox, BeOS, BeWare, and GeekPort are trademarks of Be, Inc.
Last modified September 6, 1996.