void BarCtrl::AddCtrl(Ctrl *ctrl, Size sz) { SizeCtrl& m = sizer.DoIndex(zii++); LogPos p = ctrl->GetPos(); if(p.x.IsEmpty()) { if(sz.cx == INT_MAX) ctrl->HSizePos(); else ctrl->HCenterPos(sz.cx ? sz.cx : MINSIZE); } if(p.y.IsEmpty()) { if(sz.cy == INT_MAX) ctrl->VSizePos(); else ctrl->VCenterPos(sz.cy ? sz.cy : MINSIZE); } LLOG("AddCtrl Ctrl::GetSize: " << ctrl->GetSize()); m.SetSize(sz); m.AddChild(ctrl); AddNC(m); LLOG("AddCtrl2 Ctrl::GetSize: " << ctrl->GetSize()); }
/** add and construct item using default constructor */ FORCEINLINE Titem& Add() { Titem& item = AddNC(); new(&item)Titem; return item; }
void BarCtrl::Separator() { AddNC(separator.At(sii++).Margin(lsepm, rsepm).SetStyle(*sepstyle).SetSize(ssize)); }