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())); } }
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); }