URLInputGroup::URLInputGroup(BMessage* goMessage) : BGroupView(B_HORIZONTAL, 0.0), fWindowActive(false) { GroupLayout()->SetInsets(2, 2, 2, 2); fIconView = new PageIconView(); GroupLayout()->AddView(fIconView, 0.0f); fTextView = new URLTextView(this); AddChild(fTextView); AddChild(new BSeparatorView(B_VERTICAL, B_PLAIN_BORDER)); // TODO: Fix in Haiku, no in-built support for archived BBitmaps from // resources? // fGoButton = new BitmapButton("kActionGo", NULL); fGoButton = new BitmapButton(kGoBitmapBits, kGoBitmapWidth, kGoBitmapHeight, kGoBitmapFormat, goMessage); GroupLayout()->AddView(fGoButton, 0.0f); SetFlags(Flags() | B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE); SetLowColor(ViewColor()); SetViewColor(B_TRANSPARENT_COLOR); SetExplicitAlignment(BAlignment(B_ALIGN_USE_FULL_WIDTH, B_ALIGN_VERTICAL_CENTER)); }
PreviewView::PreviewView() : BView("Rect View", B_WILL_DRAW), fBitmapView(NULL), fTop(NULL), fLeft(NULL), fRight(NULL), fBottom(NULL) { fCoordRect = BRect(10, 10, 20, 20); fChanged = true; SetLayout(new BGroupLayout(B_HORIZONTAL)); SetExplicitAlignment(BAlignment(B_ALIGN_HORIZONTAL_CENTER, B_ALIGN_VERTICAL_CENTER)); AddChild(BGroupLayoutBuilder(B_VERTICAL) .AddGroup(B_HORIZONTAL) .Add(new BStringView("spacer", "")) .Add(fTop = new BStringView("top", "top")) .Add(new BStringView("spacer", "")) .End() .AddGroup(B_HORIZONTAL) .Add(fLeft = new BStringView("left", "left")) .Add(fBitmapView = new BitmapView()) .Add(fRight = new BStringView("right", "right")) .End() .AddGroup(B_HORIZONTAL) .Add(new BStringView("spacer", "")) .Add(fBottom = new BStringView("bottom", "bottom")) .Add(new BStringView("spacer", "")) .End() ); }