86 static bool bInArrangeWindows =
false;
87 if (bInArrangeWindows)
89 bInArrangeWindows =
true;
93 if (nWidth && nHeight)
114 bInArrangeWindows =
false;
137 Window::DataChanged(rDCEvt);
138 if (!(rDCEvt.
GetType() == DataChangedEventType::SETTINGS && (rDCEvt.
GetFlags() & AllSettingsFlags::STYLE)))
141 bool bInvalidate =
false;
178 aSplitter.disposeAndClear();
179 for (
auto & item : vItems)
181 item.pSplit.disposeAndClear();
197 aItem.
nStartPos = vItems.empty() ? 0 : vItems.back().nEndPos + nSplitThickness;
204 InitSplitter(*aItem.
pSplit);
206 vItems.push_back(aItem);
208 rLayout.ArrangeWindows();
215 std::vector<Item>::size_type iWin;
216 for (iWin = 0; iWin != vItems.size(); ++iWin)
217 if (vItems[iWin].pWin == pWin)
219 if (iWin == vItems.size())
222 vItems[iWin].pSplit.disposeAndClear();
223 vItems[iWin].pWin.clear();
224 vItems.erase(vItems.begin() + iWin);
226 if (iWin == 0 && !vItems.empty())
227 vItems.front().pSplit.reset();
250 for (
auto const &
i: vItems)
251 if (IsDocking(*
i.pWin))
259 return IsEmpty() ? 0 : nSize;
270 tools::Long const nLength = bVertical ? aRect.GetSize().Height() : aRect.GetSize().Width();
271 tools::Long const nOtherSize = bVertical ? aRect.GetSize().Width() : aRect.GetSize().Height();
273 tools::Long const nPos1 = (bVertical ? aRect.Left() : aRect.Top()) +
274 (bLower ? 0 : nOtherSize - (nSize - nSplitThickness));
276 tools::Long const nPos2 = bVertical ? aRect.Top() : aRect.Left();
279 bool const bEmpty = IsEmpty();
285 aSplitter->SetSplitPosPixel((bLower ? nSize : nPos1) - nSplitThickness);
287 aSplitter->SetPosSizePixel(
288 MakePoint(nPos2, aSplitter->GetSplitPosPixel()),
289 MakeSize(
nLength, nSplitThickness)
292 aSplitter->SetDragRectPixel(aRect);
298 bool bPrevDocking =
false;
300 std::vector<Item>::size_type iLastWin = vItems.size();
302 for (std::vector<Item>::size_type
i = 0;
i != vItems.size(); ++
i)
306 bool const bDocking = IsDocking(rWin);
311 MakePoint(nPos2 + nStartPos, nPos1),
312 MakeSize(vItems[
i].nEndPos - nStartPos, nSize - nSplitThickness)
328 MakePoint(nPos2 + nStartPos - nSplitThickness, nPos1),
329 MakeSize(nSplitThickness, nSize - nSplitThickness)
333 MakePoint(nPos2, nPos1),
334 MakeSize(
nLength, nSize - nSplitThickness)
341 bPrevDocking = bDocking;
343 nStartPos = vItems[
i].nEndPos + nSplitThickness;
349 if (bEmpty || vItems[iLastWin].nEndPos ==
nLength)
352 Item& rItem = vItems[iLastWin];
353 Size aSize = rItem.
pWin->GetDockingSize();
358 rItem.
pWin->ResizeIfDocking(aSize);
360 if (iLastWin < vItems.size() - 1)
361 vItems[iLastWin + 1].pSplit->Hide();
367 CheckMarginsFor(pSplitter);
369 if (pSplitter == aSplitter.get())
373 nSize = pSplitter->GetSplitPosPixel();
375 nSize = (bVertical ? aRect.Right() : aRect.Bottom()) + 1 - pSplitter->GetSplitPosPixel();
380 for (
size_t i = 1;
i < vItems.size(); ++
i)
382 if (vItems[
i].pSplit.get() == pSplitter)
385 vItems[
i - 1].nEndPos = pSplitter->GetSplitPosPixel();
387 vItems[
i].nStartPos = pSplitter->GetSplitPosPixel() + nSplitThickness;
392 rLayout.ArrangeWindows();
401 aRect.GetWidth() : aRect.GetHeight();
422 Color aColor = rLayout.GetSettings().GetStyleSettings().GetShadowColor();
const StyleSettings & GetStyleSettings() const
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
const AllSettings * GetOldSettings() const
bool IsFloatingMode() const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
bool IsHorizontal() const
void SetSplitHdl(const Link< Splitter *, void > &rLink)
void SetSplitPosPixel(tools::Long nPos)
tools::Long GetSplitPosPixel() const
void SetDragRectPixel(const tools::Rectangle &rDragRect, vcl::Window *pRefWin=nullptr)
const Color & GetWindowColor() const
const Color & GetWindowTextColor() const
static VclPtr< reference_type > Create(Arg &&... arg)
void ResizeIfDocking(Point const &, Size const &)
void Add(DockingWindow *, Size const &)
Point MakePoint(tools::Long, tools::Long) const
tools::Long GetSize() const
VclPtr< Splitter > aSplitter
void Remove(DockingWindow *)
static bool IsDocking(DockingWindow const &)
void ArrangeIn(tools::Rectangle const &)
void InitSplitter(Splitter &)
SplittedSide(Layout *, Side)
Size MakeSize(tools::Long, tools::Long) const
void CheckMarginsFor(Splitter *)
virtual void DataChanged(DataChangedEvent const &rDCEvt) override
virtual void Resize() override
class basctl::Layout::SplittedSide aLeftSide
virtual ~Layout() override
void Remove(DockingWindow *)
class basctl::Layout::SplittedSide aBottomSide
virtual void dispose() override
Layout(vcl::Window *pParent)
virtual void OnFirstSize(tools::Long nWidth, tools::Long nHeight)=0
VclPtr< BaseWindow > pChild
virtual void Deactivating()
virtual void Activating(BaseWindow &)
void SetFontSize(const Size &)
void SetColor(const Color &)
void SetWeight(FontWeight)
const Size & GetFontSize() const
void SetFont(const vcl::Font &rNewFont)
const AllSettings & GetSettings() const
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
::OutputDevice const * GetOutDev() const
const vcl::Font & GetFont() const
Size GetOutputSizePixel() const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
#define LINK(Instance, Class, Member)
IMPL_LINK(AccessibleDialogWindow, WindowEventListener, VclWindowEvent &, rEvent, void)
VclPtr< DockingWindow > pWin
VclPtr< Splitter > pSplit
WinBits const WB_CLIPCHILDREN