示例#1
0
void Pane::OnMove(const Area& rc) {
	if(_settings) {
		_settings->SetValue(L"x", Stringify(rc.GetLeft()));
		_settings->SetValue(L"y", Stringify(rc.GetTop()));
		_settings->SetValue(L"w", Stringify(rc.GetWidth()));
		_settings->SetValue(L"h", Stringify(rc.GetHeight()));
	}
}
示例#2
0
				virtual void Layout() {
					Area rc = GetClientArea();
					strong<Theme> theme = ThemeManager::GetTheme();
					rc.MultiplyCeil(theme->GetDPIScaleFactor(), theme->GetDPIScaleFactor());

					int w = rc.GetWidth()/3;
					SetWindowPos(_x, 0L, 0, 0, w, rc.GetHeight(), SWP_NOZORDER);
					SetWindowPos(_y, 0L, w-1, 0, w, rc.GetHeight(), SWP_NOZORDER);
					SetWindowPos(_z, 0L, 2*w-2, 0, w+2, rc.GetHeight(), SWP_NOZORDER);
				}
示例#3
0
FloatingPane::FloatingPane(RootWnd* rw, ref<Pane> p): Wnd(null, false) {
	assert(p);
	_pane = p;
	_root = rw;
	
	#ifdef TJ_OS_WIN
		SetStyle(WS_OVERLAPPEDWINDOW|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU|WS_CAPTION);
	#endif

	// adapt the window to this pane
	ref<Wnd> paneWnd = _pane->GetWindow();
	if(paneWnd) {
		Add(paneWnd);
		Area childArea = paneWnd->GetWindowArea();
		Move(childArea.GetLeft()+TabWnd::TearOffLimit, childArea.GetTop()+TabWnd::TearOffLimit, childArea.GetWidth(), childArea.GetHeight());
		paneWnd->Show(true);
	}
	
	// set window title
	SetText(p->GetTitle());

	Layout();
	Show(true);
}