void Splitter::Clear() { while(GetFirstChild()) RemoveChild(GetFirstChild()); pos.Clear(); mins.Clear(); minpx.Clear(); } void Splitter::Reset() { Clear(); style = -1; width = 4; vert = false; }
void Splitter::Layout() { Size sz = GetSize(); int count = GetChildCount(); if(count == 0) return; if(mins.GetCount()<count) mins.SetCount(count,0); // Added if(minpx.GetCount()<count) minpx.SetCount(count,0); // Added count--; if(pos.GetCount() < count) { pos.SetCount(count, 0); for(int i = 0; i < count; i++)
void Splitter::Remove(Ctrl *ctrl) { int n=0; Ctrl *c=GetFirstChild(); while(c){ if(c==ctrl){ if(c->GetNext()) pos.Remove(n); else if(n>=1) pos.Remove(n-1); mins.Remove(n); minpx.Remove(n); RemoveChild(ctrl); break; } c=c->GetNext(); n++; } }
void Splitter::Clear() { while(GetFirstChild()) RemoveChild(GetFirstChild()); pos.Clear(); mins.Clear(); minpx.Clear(); } void Splitter::Reset() { Clear(); style = -1; width = 4; vert = false; }
void Splitter::Layout() { Size sz = GetSize(); int count = GetChildCount(); if(count == 0) return; if(mins.GetCount()<count) mins.SetCount(count,0); // Added if(minpx.GetCount()<count) minpx.SetCount(count,0); // Added count--; if(pos.GetCount() < count) { pos.SetCount(count, 0); for(int i = 0; i < count; i++)
void Splitter::Remove(Ctrl *ctrl) { int n=0; Ctrl *c=GetFirstChild(); while(c){ if(c==ctrl){ if(c->GetNext()) pos.Remove(n); else if(n>=1) pos.Remove(n-1); mins.Remove(n); minpx.Remove(n); RemoveChild(ctrl); break; } c=c->GetNext(); n++; } }