Beispiel #1
0
HeaderCtrl& HeaderCtrl::Invisible(bool inv)
{
	invisible = inv;
	if(InFrame() && GetParent())
		RefreshParentLayout();
	return *this;
}
Beispiel #2
0
void AutoHideBar::AddCtrl(DockCont& c, const String& group)
{ 
	TabBar::Add(RawToValue<DockCont *>(&c), Null, group); 
	if (GetCount() == autohide+1)
		RefreshParentLayout();
	else
		Refresh();
}
Beispiel #3
0
void RightTabs::Repos()
{
	int y = 0;
	for(int i = 0; i < tab.GetCount(); i++) {
		tab[i].y = y;
		y += tab[i].GetHeight();
	}
	RefreshParentLayout();
}
Beispiel #4
0
void AutoHideBar::TabClose(Value v)
{
	DockCont &dc = *(ValueTo<DockCont *>(v));
	RemoveCtrl(dc, -1);
	dc.StateNotDocked();
	dc.SignalStateChange();
	if (GetCount() == autohide)
		RefreshParentLayout();	
}
Beispiel #5
0
void SplitterFrame::MouseMove(Point p, dword keyflags)
{
	if(!HasCapture())
		return;
	p = GetMousePos();
	switch(type) {
	case LEFT: size = size0 + p.x - ref.x; break;
	case RIGHT: size = size0 + ref.x - p.x; break;
	case TOP: size = size0 + p.y - ref.y; break;
	case BOTTOM: size = size0 + ref.y - p.y; break;
	}
	RefreshParentLayout();
}
Beispiel #6
0
void SplitterFrame::Serialize(Stream& s)
{
	int version = 1;
	s / version;
	s % size;
	bool visible = IsShown();
	if(version >= 1)
		s % visible;
	if(s.IsLoading()) {
		Show(visible);
		RefreshParentLayout();
	}
}
Beispiel #7
0
SplitterFrame& SplitterFrame::Set(Ctrl& c, int _size, int _type)
{
	while(GetFirstChild())
		GetFirstChild()->Remove();
	type = _type;
	size = _size;
	Add(c.SizePos());
	switch(type) {
	case LEFT: c.HSizePos(0, 4); break;
	case RIGHT: c.HSizePos(4, 0); break;
	case TOP: c.VSizePos(0, 4); break;
	case BOTTOM: c.VSizePos(4, 0); break;
	}
	RefreshParentLayout();
	return *this;
}
Beispiel #8
0
void AutoHideBar::RemoveCtrl(DockCont& c, int ix)
{
	if (c.IsOpen()) c.Close();

	if (ctrl == &c) {
		if (popup.IsOpen())
			popup.Close();
		ctrl->Remove();
		//KillTimeCallback(TIMEID_ANIMATE);
		KillTimeCallback(TIMEID_HIDE_TIMEOUT);			
		ctrl = NULL;				
	}
	if (ix >= 0) DockTabBar::Close(ix);
	if (GetCount() == autohide)
		RefreshParentLayout();	
}
Beispiel #9
0
void HeaderCtrl::SetHeight(int cy)
{
	height = cy;
	RefreshParentLayout();
}