#ifndef GROUP_H
#define GROUP_H
#include <View.h>
class Group : public BView {
public:
Group(BRect frame,
const char* name,
orientation direction = B_HORIZONTAL);
virtual ~Group();
virtual void AttachedToWindow();
virtual void FrameResized(float width, float height);
virtual void GetPreferredSize(float* width, float* height);
void SetSpacing(float insetFromBorder,
float childSpacing);
private:
void _LayoutControls(BRect frame) const;
BRect _MinFrame() const;
void _LayoutControl(BView* view,
BRect frame,
bool resizeWidth = false,
bool resizeHeight = false) const;
orientation fOrientation;
float fInset;
float fSpacing;
};
#endif