Derived from: public BBox, public FSView
Declared in: FSBox.h
Library: none
BBox-derived class which provides font-sensitivity for the label text, if it has a textual label or a FSView subclass inserted as a BView label, and with any other kind of BView inserted as a label, still provides convenience for finding the usable interior BRect and interoperability with other FSViews in using FSView::Align().
FSBox(const char *name = NULL, uint32 resize_flags = B_FOLLOW_LEFT|B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW|B_FRAME_EVENTS|B_NAVIGABLE_JUMP, border_style border = B_FANCY_BORDER)
Creates a FSBox at the minimum size necessary to accommodate the label. It should subsequently be resized to a size sufficient that the BRect returned by InteriorRect() is large enough to accommodate the view(s) which will be placed inside.
float BorderTop()
BorderTop() returns the y-coordinate of the top edge of the line border (not the label) in the parent view's coordinate space.
BRect InteriorRect() void SetInteriorRectSize(float width, float height)
InteriorRect() returns the size of the interior rectangle, beginning one pixel below the bottom of the label, and on the other sides, extending to one pixel inside of the inside edge of the border. SetInteriorRectSize() sets the size of the interior rectangle.
float LabelVisualBottom()
LabelVisualBottom() returns the y-coordinate of the bottom edge of the label in the FSBox's coordinate space.
float MinimumWidth()
MinimumWidth() returns the minimum width required for the FSBox to accommodate the label. Note that this is slightly wider than the actual label width.
float TopMargin() inline float LeftMargin() inline float RightMargin() inline float BottomMargin() float LeftRightBottomMargin()
These functions return the widths of the various margins. They represent the width from the outermost pixel of the FSBox's frame rectangle to the outermost pixel of the interior rectangle (as returned by InteriorRect()) on the corresponding side.
By Brian Tietz
Copyright 2000
Bug reports (including documentation errors) and feature requests can be sent to briant@timelinevista.com.