16#include <config_libcxx.h>
19#pragma clang diagnostic push
20#pragma clang diagnostic ignored "-Wunused-macros"
23#define _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION
25#pragma clang diagnostic pop
31#include <config_features.h>
32#include <com/sun/star/accessibility/AccessibleRole.hpp>
53#include <bitmaps.hlst>
57#include <boost/multi_array.hpp>
65 , m_bLayoutDirty(true)
75 return css::accessibility::AccessibleRole::PANEL;
90 Point aPos(rPos.X() + nLeft, rPos.Y() + nTop);
91 Size aSize(rSize.
Width() - nLeft - nRight, rSize.
Height() - nTop - nBottom);
107 Point aChildPos(rAllocPos);
108 Size aChildSize(rChildAlloc);
116 if (aChildPreferredSize.
Width() < rChildAlloc.
Width())
120 if (aChildPreferredSize.
Width() < rChildAlloc.
Width())
122 aChildPos.AdjustX(rChildAlloc.
Width() );
123 aChildPos.AdjustX( -(aChildSize.
Width()) );
126 if (aChildPreferredSize.
Width() < aChildSize.
Width())
128 aChildPos.AdjustX((rChildAlloc.
Width() - aChildSize.
Width()) / 2 );
137 if (aChildPreferredSize.
Height() < rChildAlloc.
Height())
141 if (aChildPreferredSize.
Height() < rChildAlloc.
Height())
143 aChildPos.AdjustY(rChildAlloc.
Height() );
144 aChildPos.AdjustY( -(aChildSize.
Height()) );
149 aChildPos.AdjustY((rChildAlloc.
Height() - aChildSize.
Height()) / 2 );
166 return Size(aSize.Width() + nLeft + nRight, aSize.Height() + nTop + nBottom);
178 Window::SetPosSizePixel(rAllocPos, rAllocation);
188 Point aAllocPos = rAllocPos;
194 Window::SetPosPixel(aAllocPos);
199 Size aAllocation = rAllocation;
205 Window::SetSizePixel(aAllocation);
216 Window::queue_resize(eReason);
228 pParent->Command(aCEvt);
234 Window::Command(rCEvt);
253 sal_uInt16 nVisibleChildren = 0;
258 if (!pChild->IsVisible())
264 nPrimaryDimension += pChild->get_padding() * 2;
275 sal_uInt16 nVisibleChildren = 0, nExpandChildren = 0;
278 if (!pChild->IsVisible())
286 if (!nVisibleChildren)
291 tools::Long nHomogeneousDimension = 0, nExtraSpace = 0;
294 nHomogeneousDimension = (nAllocPrimaryDimension -
295 (nVisibleChildren - 1) *
m_nSpacing) / nVisibleChildren;
297 else if (nExpandChildren)
308 if (!pChild->IsVisible())
312 aWindows[ePacking].push_back(pChild);
329 for (
auto const& window : aWindows[ePackType])
342 nPrimaryDimension += nPadding * 2;
344 nPrimaryDimension += nExtraSpace;
349 Point aChildPos(aPos);
350 Size aChildSize(aBoxSize);
387 if (rKey ==
"spacing")
389 else if (rKey ==
"homogeneous")
407 return css::accessibility::AccessibleRole::PANEL;
409 return css::accessibility::AccessibleRole::FILLER;
413#define DEFAULT_CHILD_MIN_WIDTH 85
414#define DEFAULT_CHILD_MIN_HEIGHT 27
420 if (nVisibleChildren)
424 nPrimaryDimension *= nVisibleChildren;
451 for (
auto const& nPrimaryChildDimension : rG)
453 if (nPrimaryChildDimension < nAvgDimension * 1.5)
455 nMaxDimensionNonOutlier = std::max(nPrimaryChildDimension,
456 nMaxDimensionNonOutlier);
459 return nMaxDimensionNonOutlier;
462static std::vector<tools::Long>
setButtonSizes(
const std::vector<tools::Long> &rG,
463 const std::vector<bool> &rNonHomogeneous,
466 std::vector<tools::Long> aVec;
469 std::vector<bool>::const_iterator aJ = rNonHomogeneous.begin();
470 auto nNonOutlierWidth = std::max(nMaxNonOutlier, nMinWidth);
471 for (
auto const& nPrimaryChildDimension : rG)
473 bool bNonHomogeneous = *aJ;
474 if (!bNonHomogeneous && nPrimaryChildDimension < nAvgDimension * 1.5)
476 aVec.push_back(nNonOutlierWidth);
480 aVec.push_back(std::max(nPrimaryChildDimension, nMinWidth));
501 std::vector<tools::Long> aMainGroupSizes;
502 std::vector<bool> aMainGroupNonHomogeneous;
503 std::vector<tools::Long> aSubGroupSizes;
504 std::vector<bool> aSubGroupNonHomogeneous;
508 if (!pChild->IsVisible())
511 if (bIgnoreSecondaryPacking || !pChild->get_secondary())
517 aMainGroupNonHomogeneous.push_back(pChild->get_non_homogeneous());
523 aSubGroupNonHomogeneous.push_back(pChild->get_non_homogeneous());
529 tools::Long nMaxMainDimension = aMainGroupSizes.empty() ? 0 :
530 *std::max_element(aMainGroupSizes.begin(), aMainGroupSizes.end());
531 nMaxMainDimension = std::max(nMaxMainDimension, nMinMainGroupPrimary);
532 tools::Long nMaxSubDimension = aSubGroupSizes.empty() ? 0 :
533 *std::max_element(aSubGroupSizes.begin(), aSubGroupSizes.end());
534 nMaxSubDimension = std::max(nMaxSubDimension, nMinSubGroupPrimary);
535 tools::Long nMaxDimension = std::max(nMaxMainDimension, nMaxSubDimension);
545 tools::Long nAccDimension = std::accumulate(aMainGroupSizes.begin(),
546 aMainGroupSizes.end(), 0);
547 nAccDimension = std::accumulate(aSubGroupSizes.begin(),
548 aSubGroupSizes.end(), nAccDimension);
550 size_t nTotalSize = aMainGroupSizes.size() + aSubGroupSizes.size();
552 tools::Long nAvgDimension = nTotalSize ? nAccDimension / nTotalSize : 0;
558 tools::Long nMaxNonOutlier = std::max(nMaxMainNonOutlier, nMaxSubNonOutlier);
561 aMainGroupNonHomogeneous,
562 nAvgDimension, nMaxNonOutlier, nMinMainGroupPrimary);
564 aSubGroupNonHomogeneous,
565 nAvgDimension, nMaxNonOutlier, nMinSubGroupPrimary);
590 if (nVisibleChildren)
594 nPrimaryDimension +
m_nSpacing * (nVisibleChildren-1));
611 if (rKey ==
"layout-style")
614 if (rValue ==
"spread")
616 else if (rValue ==
"edge")
618 else if (rValue ==
"start")
620 else if (rValue ==
"end")
622 else if (rValue ==
"center")
626 SAL_WARN(
"vcl.layout",
"unknown layout style " << rValue);
644 Point aMainGroupPos, aOtherGroupPos;
656 nAllocPrimaryDimension - nOtherPrimaryDimension);
664 tools::Long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
675 tools::Long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
680 SAL_WARN(
"vcl.layout",
"todo unimplemented layout style");
689 nAllocPrimaryDimension - nMainPrimaryDimension);
702 if (!pChild->IsVisible())
705 if (bIgnoreSecondaryPacking || !pChild->get_secondary())
707 tools::Long nMainGroupPrimaryDimension = *aPrimaryI++;
711 setPrimaryCoordinate(aMainGroupPos, nPrimaryCoordinate + nMainGroupPrimaryDimension + nSpacing);
715 tools::Long nSubGroupPrimaryDimension = *aSecondaryI++;
719 setPrimaryCoordinate(aOtherGroupPos, nPrimaryCoordinate + nSubGroupPrimaryDimension + nSpacing);
727 rJsonWriter.
put(
"type",
"buttonbox");
732 rJsonWriter.
put(
"layoutstyle",
"default");
736 rJsonWriter.
put(
"layoutstyle",
"spread");
740 rJsonWriter.
put(
"layoutstyle",
"edge");
744 rJsonWriter.
put(
"layoutstyle",
"center");
748 rJsonWriter.
put(
"layoutstyle",
"start");
752 rJsonWriter.
put(
"layoutstyle",
"end");
769 static const size_t N_TYPES = 6;
770 static const ButtonOrder aDiscardCancelSave[N_TYPES] =
780 static const ButtonOrder aSaveDiscardCancel[N_TYPES] =
790 const ButtonOrder* pOrder = &aDiscardCancelSave[0];
794 if (rEnv.equalsIgnoreAsciiCase(
"windows") ||
795 rEnv.equalsIgnoreAsciiCase(
"lxqt") ||
796 rEnv.startsWithIgnoreAsciiCase(
"plasma"))
798 pOrder = &aSaveDiscardCancel[0];
801 for (
size_t i = 0;
i < N_TYPES; ++
i, ++pOrder)
803 if (rType == pOrder->m_aType)
804 return pOrder->m_nPriority;
814 bool m_bVerticalContainer;
816 explicit sortButtons(
bool bVerticalContainer)
817 : m_bVerticalContainer(bVerticalContainer)
836 if (!m_bVerticalContainer)
859 std::vector<vcl::Window*> aChilds;
863 aChilds.push_back(pChild);
868 std::stable_sort(aChilds.begin(), aChilds.end(), sortButtons(rContainer.
get_orientation()));
877 sal_Int32 nSpanWidth;
878 sal_Int32 nSpanHeight;
897static void calcMaxs(
const array_type &A, std::vector<VclGrid::Value> &rWidths, std::vector<VclGrid::Value> &rHeights);
906 sal_Int32 nLeftAttach = std::max<sal_Int32>(pChild->get_grid_left_attach(), 0);
907 sal_Int32 nWidth = pChild->get_grid_width();
908 sal_Int32 nMaxXPos = nLeftAttach+nWidth-1;
910 sal_Int32 nTopAttach = std::max<sal_Int32>(pChild->get_grid_top_attach(), 0);
911 sal_Int32 nHeight = pChild->get_grid_height();
912 sal_Int32 nMaxYPos = nTopAttach+nHeight-1;
914 sal_Int32 nCurrentMaxXPos =
A.shape()[0]-1;
915 sal_Int32 nCurrentMaxYPos =
A.shape()[1]-1;
916 if (nMaxXPos > nCurrentMaxXPos || nMaxYPos > nCurrentMaxYPos)
918 nCurrentMaxXPos = std::max(nMaxXPos, nCurrentMaxXPos);
919 nCurrentMaxYPos = std::max(nMaxYPos, nCurrentMaxYPos);
920 A.resize(boost::extents[nCurrentMaxXPos+1][nCurrentMaxYPos+1]);
923 GridEntry &rEntry =
A[nLeftAttach][nTopAttach];
924 rEntry.pChild = pChild;
925 rEntry.nSpanWidth = nWidth;
926 rEntry.nSpanHeight = nHeight;
927 rEntry.x = nLeftAttach;
928 rEntry.y = nTopAttach;
930 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
932 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
934 GridEntry &rSpan =
A[nLeftAttach+nSpanX][nTopAttach+nSpanY];
935 rSpan.x = nLeftAttach;
936 rSpan.y = nTopAttach;
942 sal_Int32 nMaxX =
A.shape()[0];
943 sal_Int32 nMaxY =
A.shape()[1];
945 std::vector<bool> aNonEmptyCols(nMaxX);
946 std::vector<bool> aNonEmptyRows(nMaxY);
948 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
950 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
952 const GridEntry &rEntry =
A[
x][
y];
956 aNonEmptyCols[
x] =
true;
959 for (sal_Int32 nSpanX = 1; nSpanX < rEntry.nSpanWidth; ++nSpanX)
960 aNonEmptyCols[
x+nSpanX] =
true;
962 aNonEmptyRows[
y] =
true;
965 for (sal_Int32 nSpanY = 1; nSpanY < rEntry.nSpanHeight; ++nSpanY)
966 aNonEmptyRows[
y+nSpanY] =
true;
975 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
977 std::set<GridEntry*> candidates;
978 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
980 if (aNonEmptyCols[
x])
982 GridEntry &rSpan =
A[
x][
y];
985 if ((rSpan.x == -1) || (rSpan.y == -1))
991 GridEntry &rEntry =
A[rSpan.x][rSpan.y];
992 candidates.insert(&rEntry);
994 for (
auto const& candidate : candidates)
996 GridEntry *pEntry = candidate;
997 --pEntry->nSpanWidth;
1005 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1007 std::set<GridEntry*> candidates;
1008 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1010 if (aNonEmptyRows[
y])
1012 GridEntry &rSpan =
A[
x][
y];
1015 if ((rSpan.x == -1) || (rSpan.y == -1))
1021 GridEntry &rEntry =
A[rSpan.x][rSpan.y];
1022 candidates.insert(&rEntry);
1024 for (
auto const& candidate : candidates)
1026 GridEntry *pEntry = candidate;
1027 --pEntry->nSpanHeight;
1032 sal_Int32 nNonEmptyCols = std::count(aNonEmptyCols.begin(), aNonEmptyCols.end(),
true);
1033 sal_Int32 nNonEmptyRows = std::count(aNonEmptyRows.begin(), aNonEmptyRows.end(),
true);
1036 array_type B(boost::extents[nNonEmptyCols][nNonEmptyRows]);
1037 for (sal_Int32
x = 0, x2 = 0;
x < nMaxX; ++
x)
1039 if (!aNonEmptyCols[
x])
1041 for (sal_Int32
y = 0, y2 = 0;
y < nMaxY; ++
y)
1043 if (!aNonEmptyRows[
y])
1045 GridEntry &rEntry =
A[
x][
y];
1046 B[x2][y2++] = rEntry;
1056 sal_Int32 nMaxX =
A.shape()[0];
1057 sal_Int32 nMaxY =
A.shape()[1];
1059 return !nMaxX || !nMaxY;
1062static void calcMaxs(
const array_type &A, std::vector<VclGrid::Value> &rWidths, std::vector<VclGrid::Value> &rHeights)
1064 sal_Int32 nMaxX =
A.shape()[0];
1065 sal_Int32 nMaxY =
A.shape()[1];
1067 rWidths.resize(nMaxX);
1068 rHeights.resize(nMaxY);
1071 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1073 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1075 const GridEntry &rEntry =
A[
x][
y];
1080 sal_Int32 nWidth = rEntry.nSpanWidth;
1081 sal_Int32 nHeight = rEntry.nSpanHeight;
1083 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1086 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1089 if (nWidth == 1 || nHeight == 1)
1093 rWidths[
x].m_nValue = std::max(rWidths[
x].m_nValue, aChildSize.
Width());
1095 rHeights[
y].m_nValue = std::max(rHeights[
y].m_nValue, aChildSize.
Height());
1102 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1104 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1106 const GridEntry &rEntry =
A[
x][
y];
1111 sal_Int32 nWidth = rEntry.nSpanWidth;
1112 sal_Int32 nHeight = rEntry.nSpanHeight;
1114 if (nWidth == 1 && nHeight == 1)
1121 sal_Int32 nExistingWidth = 0;
1122 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1123 nExistingWidth += rWidths[
x+nSpanX].m_nValue;
1125 sal_Int32 nExtraWidth = aChildSize.
Width() - nExistingWidth;
1127 if (nExtraWidth > 0)
1129 bool bForceExpandAll =
false;
1130 sal_Int32 nExpandables = 0;
1131 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1132 if (rWidths[
x+nSpanX].m_bExpand)
1134 if (nExpandables == 0)
1136 nExpandables = nWidth;
1137 bForceExpandAll =
true;
1140 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1142 if (rWidths[
x+nSpanX].m_bExpand || bForceExpandAll)
1143 rWidths[
x+nSpanX].m_nValue += nExtraWidth/nExpandables;
1150 sal_Int32 nExistingHeight = 0;
1151 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1152 nExistingHeight += rHeights[
y+nSpanY].m_nValue;
1154 sal_Int32 nExtraHeight = aChildSize.
Height() - nExistingHeight;
1156 if (nExtraHeight > 0)
1158 bool bForceExpandAll =
false;
1159 sal_Int32 nExpandables = 0;
1160 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1161 if (rHeights[
y+nSpanY].m_bExpand)
1163 if (nExpandables == 0)
1165 nExpandables = nHeight;
1166 bForceExpandAll =
true;
1169 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1171 if (rHeights[
y+nSpanY].m_bExpand || bForceExpandAll)
1172 rHeights[
y+nSpanY].m_nValue += nExtraHeight/nExpandables;
1205 std::vector<Value> aWidths;
1206 std::vector<Value> aHeights;
1212 nTotalWidth = std::max_element(aWidths.begin(), aWidths.end(),
compareValues)->m_nValue;
1213 nTotalWidth *= aWidths.size();
1220 nTotalWidth += nColSpacing * (aWidths.size()-1);
1225 nTotalHeight = std::max_element(aHeights.begin(), aHeights.end(),
compareValues)->m_nValue;
1226 nTotalHeight *= aHeights.size();
1230 nTotalHeight = std::accumulate(aHeights.begin(), aHeights.end(),
Value(),
accumulateValues).m_nValue;
1233 nTotalHeight += nRowSpacing * (aHeights.size()-1);
1235 return Size(nTotalWidth, nTotalHeight);
1245 sal_Int32 nMaxX =
A.shape()[0];
1246 sal_Int32 nMaxY =
A.shape()[1];
1249 std::vector<Value> aWidths(nMaxX);
1250 std::vector<Value> aHeights(nMaxY);
1262 nAvailableWidth -= nColSpacing * (nMaxX - 1);
1265 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1266 aWidths[
x].m_nValue = nAvailableWidth/nMaxX;
1268 else if (rAllocation.
Width() != aRequisition.
Width())
1270 sal_Int32 nExpandables = 0;
1271 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1272 if (aWidths[
x].m_bExpand)
1274 tools::Long nExtraWidthForExpanders = nExpandables ? (rAllocation.
Width() - aRequisition.
Width()) / nExpandables : 0;
1277 if (!nExpandables && rAllocation.
Width() < aRequisition.
Width())
1284 if (aRequisition.
Width() <= rAllocation.
Width())
1291 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1292 aWidths[
x].m_nValue += nExtraWidth;
1295 if (nExtraWidthForExpanders)
1297 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1298 if (aWidths[
x].m_bExpand)
1299 aWidths[
x].m_nValue += nExtraWidthForExpanders;
1305 nAvailableHeight -= nRowSpacing * (nMaxY - 1);
1308 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1309 aHeights[
y].m_nValue = nAvailableHeight/nMaxY;
1311 else if (rAllocation.
Height() != aRequisition.
Height())
1313 sal_Int32 nExpandables = 0;
1314 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1315 if (aHeights[
y].m_bExpand)
1317 tools::Long nExtraHeightForExpanders = nExpandables ? (rAllocation.
Height() - aRequisition.
Height()) / nExpandables : 0;
1320 if (!nExpandables && rAllocation.
Height() < aRequisition.
Height())
1334 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1335 aHeights[
y].m_nValue += nExtraHeight;
1338 if (nExtraHeightForExpanders)
1340 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1341 if (aHeights[
y].m_bExpand)
1342 aHeights[
y].m_nValue += nExtraHeightForExpanders;
1346 Point aAllocPos(0, 0);
1347 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1349 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1351 GridEntry &rEntry =
A[
x][
y];
1355 Size aChildAlloc(0, 0);
1357 sal_Int32 nWidth = rEntry.nSpanWidth;
1358 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1362 sal_Int32 nHeight = rEntry.nSpanHeight;
1363 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1369 aAllocPos.AdjustY(aHeights[
y].m_nValue + nRowSpacing );
1371 aAllocPos.AdjustX(aWidths[
x].m_nValue + nColSpacing );
1372 aAllocPos.setY( 0 );
1379 rJsonWriter.
put(
"type",
"grid");
1384 return (!rValue.empty() && (rValue[0] ==
't' || rValue[0] ==
'T' || rValue[0] ==
'1'));
1389 if (rKey ==
"row-spacing")
1391 else if (rKey ==
"column-spacing")
1393 else if (rKey ==
"row-homogeneous")
1395 else if (rKey ==
"column-homogeneous")
1397 else if (rKey ==
"n-rows")
1406 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1413 return const_cast<vcl::Window*
>(
const_cast<const VclBin*
>(
this)->get_child());
1416Size VclBin::calculateRequisition()
const
1420 return getLayoutRequisition(*pChild);
1424void VclBin::setAllocation(
const Size &rAllocation)
1428 setLayoutAllocation(*pChild,
Point(0, 0), rAllocation);
1452 aRet = getLayoutRequisition(*pChild);
1456 Size aLabelSize = getLayoutRequisition(*pLabel);
1468 Size aAllocation(rAllocation);
1476 Size aLabelSize = getLayoutRequisition(*pLabel);
1479 setLayoutAllocation(*pLabel, aChildPos, aLabelSize);
1481 aChildPos.AdjustY(aLabelSize.
Height() );
1485 setLayoutAllocation(*pChild, aChildPos, aAllocation);
1491 designate_label(
nullptr);
1496 assert(!pWindow || pWindow->
GetParent() ==
this);
1508 assert(GetChildCount() <= 2);
1510 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1524 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1525 assert(GetChildCount() == 2 || pWindowImpl->
mbInDispose);
1557 return VclBin::getDefaultAccessibleName();
1562 VclBin::DumpAsPropertyTree(rJsonWriter);
1563 rJsonWriter.
put(
"type",
"frame");
1587 if (Window::IsEnabled())
1593 nState, aControlValue, OUString()))
1614 rRenderContext.
DrawImage(aOff, *pImg, nStyle);
1641 , m_bResizeTopLevel(false)
1681 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1697 WindowImpl* pWindowImpl = ImplGetWindowImpl();
1703 aRet = getLayoutRequisition(*pChild);
1709 Size aLabelSize = getLayoutRequisition(*pLabel);
1722 Size aAllocation(rAllocation);
1725 WindowImpl* pWindowImpl = ImplGetWindowImpl();
1733 Size aExpanderSize = aButtonSize;
1736 aLabelSize = getLayoutRequisition(*pLabel);
1748 Point aButtonPos(aChildPos.X(), aChildPos.Y() + nExtraExpanderHeight/2);
1755 aExpanderSize.
Width() - aButtonSize.
Width()) );
1758 Point aLabelPos(aChildPos.X() + aButtonSize.
Width(), aChildPos.Y() + nExtraLabelHeight/2);
1759 setLayoutAllocation(*pLabel, aLabelPos, aLabelSize);
1763 aChildPos.AdjustY(aExpanderSize.
Height() );
1768 aAllocation =
Size();
1769 setLayoutAllocation(*pChild, aChildPos, aAllocation);
1775 if (rKey ==
"expanded")
1777 else if (rKey ==
"resize-toplevel")
1780 return VclBin::set_property(rKey, rValue);
1786 VclBin::StateChanged(
nType );
1809 rJsonWriter.
put(
"type",
"expander");
1822 pChild->
Show(rBtn.IsChecked());
1824 Dialog* pResizeDialog = m_bResizeTopLevel ? GetParentDialog() :
nullptr;
1828 maExpandedHdl.Call(*
this);
1833 , m_bUserManagedScrolling(false)
1846 GetOutDev()->SetSettings(aAllSettings);
1881 assert(
dynamic_cast<VclViewport*
>(pChild) &&
"scrolledwindow child should be a Viewport");
1888 Point aWinPos(-m_pHScroll->GetThumbPos(), -m_pVScroll->GetThumbPos());
1894 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1895 assert(GetChildCount() == 4 || pWindowImpl->
mbInDispose);
1910 aRet = getLayoutRequisition(*pChild);
1913 aRet.
AdjustWidth(getLayoutRequisition(*m_pVScroll).Width() );
1916 aRet.
AdjustHeight(getLayoutRequisition(*m_pHScroll).Height() );
1950 aChildReq = getLayoutRequisition(*pChild);
1958 bShowVScroll = nAvailHeight < aChildReq.
Height();
1960 bShowVScroll = (GetStyle() &
WB_VSCROLL) != 0;
1963 nAvailWidth -= getLayoutRequisition(*m_pVScroll).Width();
1969 bShowHScroll = nAvailWidth < aChildReq.
Width();
1972 nAvailHeight -= getLayoutRequisition(*m_pHScroll).Height();
1975 bShowVScroll = nAvailHeight < aChildReq.
Height();
1978 bShowHScroll = (GetStyle() &
WB_HSCROLL) != 0;
1985 Size aInnerSize(rAllocation);
1990 auto nScrollBarWidth = getLayoutRequisition(*m_pVScroll).Width();
1991 auto nScrollBarHeight = getLayoutRequisition(*m_pHScroll).Height();
1999 setLayoutAllocation(*
m_pVScroll, aScrollPos, aScrollSize);
2009 setLayoutAllocation(*
m_pHScroll, aScrollPos, aScrollSize);
2026 assert(
dynamic_cast<VclViewport*
>(pChild) &&
"scrolledwindow child should be a Viewport");
2038 if (nOldBits != nNewBits && bRetryOnFailure)
2056 Size aRet(GetSizePixel());
2068 if (rKey ==
"shadow-type" || rKey ==
"name")
2070 if (rKey ==
"shadow-type")
2075 else if (rValue ==
"out")
2077 else if (rValue ==
"etched-in")
2079 else if (rValue ==
"etched-out")
2081 else if (rValue ==
"none")
2084 else if (rKey ==
"name")
2087 if (rValue ==
"monoborder")
2101 bool bRet = VclBin::set_property(rKey, rValue);
2119 bDone = HandleScrollCommand(rCEvt,
2126 return bDone || VclBin::EventNotify( rNEvt );
2131 VclBin::Paint(rRenderContext, rRect);
2148 Size aReq(getLayoutRequisition(*pChild));
2154 aKeepPos =
Point(0, 0);
2157 setLayoutAllocation(*pChild, aKeepPos, aReq);
2162 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
2176 Point aChildPos(0, 0);
2181 setLayoutAllocation(*pChild, aChildPos, rAllocation);
2194 Size aChildSize = getLayoutRequisition(*pChild);
2248 if (rKey ==
"ignore-hidden")
2250 else if (rKey ==
"mode")
2253 if (rValue ==
"none")
2255 else if (rValue ==
"horizontal")
2257 else if (rValue ==
"vertical")
2259 else if (rValue ==
"both")
2263 SAL_WARN(
"vcl.layout",
"unknown size group mode" << rValue);
2269 SAL_INFO(
"vcl.layout",
"unhandled property: " << rKey);
2275 setDeferredProperties();
2350 nDefaultResponse =
RET_OK;
2380 nDefaultResponse =
RET_NO;
2417 :
Dialog(pParent, nStyle)
2420 , m_pOwnedContentArea(nullptr)
2421 , m_pOwnedActionArea(nullptr)
2423 , m_pMessageBox(nullptr)
2425 , m_pPrimaryMessage(nullptr)
2426 , m_pSecondaryMessage(nullptr)
2436 , m_eButtonsType(eButtonsType)
2437 , m_eMessageType(eMessageType)
2439 , m_pMessageBox(nullptr)
2441 , m_pPrimaryMessage(nullptr)
2442 , m_pSecondaryMessage(nullptr)
2443 , m_sPrimaryString(
std::move(aMessage))
2490 if (pSecondaryMessage)
2492 assert(pPrimaryMessage);
2522 else if (rKey ==
"secondary-text")
2524 else if (rKey ==
"message-type")
2527 if (rValue ==
"info")
2529 else if (rValue ==
"warning")
2531 else if (rValue ==
"question")
2533 else if (rValue ==
"error")
2535 else if (rValue ==
"other")
2539 SAL_WARN(
"vcl.layout",
"unknown message type mode" << rValue);
2543 else if (rKey ==
"buttons")
2546 if (rValue ==
"none")
2548 else if (rValue ==
"ok")
2550 else if (rValue ==
"cancel")
2552 else if (rValue ==
"close")
2554 else if (rValue ==
"yes-no")
2556 else if (rValue ==
"ok-cancel")
2560 SAL_WARN(
"vcl.layout",
"unknown buttons type mode" << rValue);
2631 tools::Long nSize = pSplitter->GetSplitPosPixel();
2632 Size aSplitterSize(m_pSplitter->GetSizePixel());
2633 Size aAllocation(GetSizePixel());
2634 arrange(aAllocation, nSize, aAllocation.
Height() - nSize - aSplitterSize.
Height());
2640 Size aFirstChildSize(rAllocation.
Width(), nFirstHeight);
2641 Size aSecondChildSize(rAllocation.
Width(), nSecondHeight);
2654 else if (nElement == 1)
2656 Point aChildPos(0, 0);
2659 else if (nElement == 2)
2675 nPosition -= aSplitterSize.
Height() / 2;
2677 arrange(aAllocation, nPosition, aAllocation.
Height() - nPosition - aSplitterSize.
Height());
2689 bool bFirstCanResize =
true;
2690 bool bSecondCanResize =
true;
2700 if (bInitialAllocation)
2706 else if (nElement == 2)
2708 if (bInitialAllocation)
2716 tools::Long nHeightRequest = nFirstHeight + nSecondHeight;
2717 tools::Long nHeightDiff = nHeight - nHeightRequest;
2718 if (bFirstCanResize == bSecondCanResize)
2719 nFirstHeight += nHeightDiff/2;
2720 else if (bFirstCanResize)
2721 nFirstHeight += nHeightDiff;
2722 arrange(rAllocation, nFirstHeight, rAllocation.
Height() - nFirstHeight - aSplitterSize.
Height());
2750 tools::Long nSize = pSplitter->GetSplitPosPixel();
2751 Size aSplitterSize(m_pSplitter->GetSizePixel());
2752 Size aAllocation(GetSizePixel());
2753 arrange(aAllocation, nSize, aAllocation.
Width() - nSize - aSplitterSize.
Width());
2759 Size aFirstChildSize(nFirstWidth, rAllocation.
Height());
2760 Size aSecondChildSize(nSecondWidth, rAllocation.
Height());
2769 Point aSplitterPos(aFirstChildSize.
Width(), 0);
2773 else if (nElement == 1)
2775 Point aChildPos(0, 0);
2778 else if (nElement == 2)
2794 nPosition -= aSplitterSize.
Width() / 2;
2796 arrange(aAllocation, nPosition, aAllocation.
Width() - nPosition - aSplitterSize.
Width());
2808 bool bFirstCanResize =
true;
2809 bool bSecondCanResize =
true;
2819 if (bInitialAllocation)
2825 else if (nElement == 2)
2827 if (bInitialAllocation)
2835 tools::Long nWidthRequest = nFirstWidth + nSecondWidth;
2837 if (bFirstCanResize == bSecondCanResize)
2838 nFirstWidth += nWidthDiff/2;
2839 else if (bFirstCanResize)
2840 nFirstWidth += nWidthDiff;
2841 arrange(rAllocation, nFirstWidth, rAllocation.
Width() - nFirstWidth - aSplitterSize.
Width());
2872 aBounds.
Union(aChildBounds);
2912 bool bEnabled =
true;
2938 if (sHelpTip.isEmpty())
2942 aHelpArea.
SetTop(aPt.Y());
2967 OUString sSurroundingText;
2969 return sSurroundingText;
2976 OUString sSurroundingText;
3009 rJsonWriter.
put(
"type",
"drawingarea");
3014 Paint(*pDevice, aRect);
3020 OStringBuffer
aBuffer(
"data:image/png;base64,");
const StyleSettings & GetStyleSettings() const
void SetStyleSettings(const StyleSettings &rSet)
static OUString GetDisplayName()
Get the default name of the application for message dialogs and printing.
static const AllSettings & GetSettings()
Gets the application's settings.
static const OUString & GetDesktopEnvironment()
Get the desktop environment the process is currently running in.
void SetToggleHdl(const Link< CheckBox &, void > &rLink)
SAL_DLLPRIVATE const tools::Rectangle & GetStateRect() const
void Check(bool bCheck=true)
virtual void KeyInput(const KeyEvent &rKEvt) override
TriState GetState() const
SAL_DLLPRIVATE const tools::Rectangle & GetMouseRect() const
CommandEventId GetCommand() const
const CommandWheelData * GetWheelData() const
const Point & GetMousePosPixel() const
void * GetEventData() const
bool IsMouseEvent() const
virtual void SetText(const OUString &rStr) override
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
VclBox * get_content_area()
void set_content_area(VclBox *pBox)
virtual bool set_property(const OString &rKey, const OUString &rValue) override
int get_default_response() const
SAL_DLLPRIVATE void disposeOwnedButtons()
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
virtual void StateChanged(StateChangedType nStateChange) override
VclButtonBox * get_action_area()
void set_default_response(int nResponse)
void add_button(PushButton *pButton, int nResponse, bool bTransferOwnership)
void set_action_area(VclButtonBox *pBox)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
void SetImage(const Image &rImage)
static ErrCode Export(SvStream &rOStm, const Graphic &rGraphic, ConvertDataFormat nFormat)
HelpEventMode GetMode() const
const Point & GetMousePosPixel() const
static void ShowQuickHelp(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rHelpText, QuickHelpFlags nStyle=QuickHelpFlags::NONE)
Size GetSizePixel() const
const vcl::KeyCode & GetKeyCode() const
OUString m_sPrimaryString
VclPtr< VclButtonBox > m_pOwnedActionArea
VclButtonsType m_eButtonsType
OUString const & get_secondary_text() const
virtual ~MessageDialog() override
VclPtr< VclMultiLineEdit > m_pPrimaryMessage
OUString const & get_primary_text() const
void set_primary_text(const OUString &rPrimaryString)
VclPtr< VclVBox > m_pMessageBox
void create_message_area()
VclPtr< VclGrid > m_pGrid
virtual void StateChanged(StateChangedType nType) override
VclMessageType m_eMessageType
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
VclPtr< VclBox > m_pOwnedContentArea
VclPtr< FixedImage > m_pImage
static void SetMessagesWidths(vcl::Window const *pParent, VclMultiLineEdit *pPrimaryMessage, VclMultiLineEdit *pSecondaryMessage)
void create_owned_areas()
VclPtr< VclMultiLineEdit > m_pSecondaryMessage
void set_secondary_text(const OUString &rSecondaryString)
OUString m_sSecondaryString
virtual bool set_property(const OString &rKey, const OUString &rValue) override
MessageDialog(vcl::Window *pParent, WinBits nStyle)
const CommandEvent * GetCommandEvent() const
NotifyEventType GetType() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
void DrawImage(const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool DrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, const Color &rBackgroundColor=COL_AUTO)
Request rendering of a particular control and/or part.
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
void SetSplitHdl(const Link< Splitter *, void > &rLink)
void SetDragRectPixel(const tools::Rectangle &rDragRect, vcl::Window *pRefWin=nullptr)
const Color & GetShadowColor() const
const vcl::Font & GetLabelFont() const
void SetMonoColor(const Color &rColor)
virtual void SetText(const OUString &rStr) override
SAL_DLLPRIVATE void DoInitialLayout()
void setOptimalLayoutSize(bool bAllowWindowShrink)
bool m_bVerticalContainer
virtual void setAllocation(const Size &rAllocation) override
Size finalizeMaxes(const Size &rSize, sal_uInt16 nVisibleChildren) const
virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const =0
void set_homogeneous(bool bHomogeneous)
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
virtual bool set_property(const OString &rKey, const OUString &rValue) override
void accumulateMaxes(const Size &rChildSize, Size &rSize) const
virtual tools::Long getPrimaryDimension(const Size &rSize) const =0
virtual void setSecondaryDimension(Size &rSize, tools::Long) const =0
virtual tools::Long getSecondaryDimension(const Size &rSize) const =0
virtual void setPrimaryCoordinate(Point &rPos, tools::Long) const =0
virtual void setPrimaryDimension(Size &rSize, tools::Long) const =0
virtual tools::Long getPrimaryCoordinate(const Point &rPos) const =0
virtual Size calculateRequisition() const override
void set_spacing(int nSpacing)
bool get_orientation() const
virtual sal_uInt16 getDefaultAccessibleRole() const override
virtual Size GetOptimalSize() const override
static void setLayoutAllocation(vcl::Window &rWindow, const Point &rPos, const Size &rSize)
virtual void setAllocation(const Size &rAllocation)=0
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout) override
static Size getLayoutRequisition(const vcl::Window &rWindow)
virtual void SetSizePixel(const Size &rAllocation) override
virtual void Command(const CommandEvent &rCEvt) override
virtual sal_uInt16 getDefaultAccessibleRole() const override
static void setLayoutPosSize(vcl::Window &rWindow, const Point &rPos, const Size &rSize)
VclContainer(vcl::Window *pParent, WinBits nStyle=WB_HIDE|WB_CLIPCHILDREN)
virtual Size calculateRequisition() const =0
virtual void SetPosPixel(const Point &rAllocPos) override
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize) override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
rtl::Reference< TransferDataContainer > m_xTransferHelper
virtual bool DeleteSurroundingText(const Selection &rSelection) override
virtual void RequestHelp(const HelpEvent &rHelpEvent) override
Link< VclDrawingArea *, bool > m_aStartDragHdl
Link< const Selection &, bool > m_aDeleteSurroundingHdl
Link< OUString &, int > m_aGetSurroundingHdl
FactoryFunction m_pFactoryFunction
Link< tools::Rectangle &, OUString > m_aQueryTooltipHdl
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
virtual FactoryFunction GetUITestFactory() const override
virtual void StartDrag(sal_Int8 nAction, const Point &rPosPixel) override
virtual OUString GetSurroundingText() const override
virtual Selection GetSurroundingTextSelection() const override
virtual void Command(const CommandEvent &rCEvt) override
VclPtr< EventBoxHelper > m_aEventBoxHelper
virtual void dispose() override
virtual void setAllocation(const Size &rAllocation) override
virtual ~VclEventBox() override
virtual Size calculateRequisition() const override
virtual vcl::Window * get_child() override
virtual Size calculateRequisition() const override
OUString get_label() const
virtual void DumpAsPropertyTree(tools::JsonWriter &rJsonWriter) override
bool get_expanded() const
virtual void setAllocation(const Size &rAllocation) override
VclPtr< DisclosureButton > m_pDisclosureButton
virtual void dispose() override
vcl::Window * get_label_widget()
virtual void StateChanged(StateChangedType nType) override
virtual bool set_property(const OString &rKey, const OUString &rValue) override
void set_expanded(bool bExpanded)
virtual ~VclExpander() override
virtual vcl::Window * get_child() override
void set_label(const OUString &rLabel)
VclExpander(vcl::Window *pParent)
virtual FactoryFunction GetUITestFactory() const override
void designate_label(vcl::Window *pWindow)
virtual void setAllocation(const Size &rAllocation) override
void set_label(const OUString &rLabel)
VclPtr< vcl::Window > m_pLabel
vcl::Window * get_label_widget()
virtual vcl::Window * get_child() override
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
virtual OUString getDefaultAccessibleName() const override
virtual void dispose() override
OUString get_label() const
virtual ~VclFrame() override
virtual Size calculateRequisition() const override
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
int get_column_spacing() const
bool get_column_homogeneous() const
bool m_bColumnHomogeneous
bool get_row_homogeneous() const
Size calculateRequisitionForSpacings(sal_Int32 nRowSpacing, sal_Int32 nColSpacing) const
virtual void setAllocation(const Size &rAllocation) override
virtual Size calculateRequisition() const override
void set_row_spacing(int nSpacing)
void set_column_spacing(int nSpacing)
int get_row_spacing() const
virtual bool set_property(const OString &rKey, const OUString &rValue) override
void arrange(const Size &rAllocation, tools::Long nFirstHeight, tools::Long nSecondHeight)
virtual void set_position(tools::Long nPosition) override
VclHPaned(vcl::Window *pParent)
virtual void setAllocation(const Size &rAllocation) override
virtual Size calculateRequisition() const override
virtual ~VclHPaned() override
void EnableCursor(bool bEnable)
void SetMaxTextWidth(tools::Long nMaxWidth)
virtual void SetText(const OUString &rStr) override
VclPtr< Splitter > m_pSplitter
virtual void set_position(tools::Long nPosition)
tools::Long get_position() const
VclPaned(vcl::Window *pParent, bool bVertical)
virtual ~VclPaned() override
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
void set(reference_type *pBody)
reference_type * get() const
Get the body.
static VclPtr< reference_type > Create(Arg &&... arg)
A construction helper for VclPtr.
std::set< VclPtr< vcl::Window > > m_aWindows
void set_ignore_hidden(bool bIgnoreHidden)
void set_property(const OString &rKey, const OUString &rValue)
void set_mode(VclSizeGroupMode eMode)
void trigger_queue_resize()
virtual Size calculateRequisition() const override
virtual void set_position(tools::Long nPosition) override
VclVPaned(vcl::Window *pParent)
virtual void setAllocation(const Size &rAllocation) override
void arrange(const Size &rAllocation, tools::Long nFirstHeight, tools::Long nSecondHeight)
virtual ~VclVPaned() override
bool m_bInitialAllocation
virtual void setAllocation(const Size &rAllocation) override
VclPtr< vcl::Window > mpFirstChild
VclPtr< vcl::Window > mpLastChild
static void encode(OUStringBuffer &aStrBuffer, const css::uno::Sequence< sal_Int8 > &aPass)
void SetFontSize(const Size &)
void SetWeight(FontWeight)
const Size & GetFontSize() const
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
Point OutputToScreenPixel(const Point &rPos) const
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
void SetStyle(WinBits nStyle)
vcl::Window * GetParent() const
sal_Int32 get_padding() const
virtual Selection GetSurroundingTextSelection() const
void RemoveEventListener(const Link< VclWindowEvent &, void > &rEventListener)
const OUString & get_id() const
Get the ID of the window.
Size get_preferred_size() const
vcl::Window * GetWindow(GetWindowType nType) const
void set_border_width(sal_Int32 nBorderWidth)
void set_grid_left_attach(sal_Int32 nAttach)
void set_id(const OUString &rID)
Sets an ID.
VclPackType get_pack_type() const
sal_Int32 get_margin_end() const
void reorderWithinParent(sal_uInt16 nNewPosition)
void set_hexpand(bool bExpand)
virtual Point GetPosPixel() const
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
const AllSettings & GetSettings() const
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
virtual OUString GetSurroundingText() const
tools::Long CalcTitleWidth() const
SAL_DLLPRIVATE float approximate_char_width() const
sal_Int32 get_margin_top() const
bool get_secondary() const
virtual bool DeleteSurroundingText(const Selection &rSelection)
sal_Int32 get_margin_start() const
void AddEventListener(const Link< VclWindowEvent &, void > &rEventListener)
std::unique_ptr< WindowImpl > mpWindowImpl
void set_width_request(sal_Int32 nWidthRequest)
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
sal_Int32 get_border_width() const
virtual Size GetSizePixel() const
Size GetOutputSizePixel() const
Point GetPointerPosPixel()
virtual bool set_property(const OString &rKey, const OUString &rValue)
OUString GetAccessibleName() const
VclAlign get_halign() const
sal_Int32 get_margin_bottom() const
void SetPaintTransparent(bool bTransparent)
virtual void SetPosPixel(const Point &rNewPos)
void set_grid_top_attach(sal_Int32 nAttach)
void set_valign(VclAlign eAlign)
virtual void SetText(const OUString &rStr)
virtual OUString GetText() const
void SetType(WindowType nType)
Point ScreenToOutputPixel(const Point &rPos) const
const OUString & GetQuickHelpText() const
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
VclAlign get_valign() const
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
void EnableChildTransparentMode(bool bEnable=true)
@ TipStyleBalloon
force balloon-style in ShowPopover and ShowQuickHelp
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
constexpr sal_uInt16 KEY_ADD
constexpr sal_uInt16 KEY_SUBTRACT
static VclGrid::Value accumulateValues(const VclGrid::Value &i, const VclGrid::Value &j)
IMPL_LINK(VclFrame, WindowEventListener, VclWindowEvent &, rEvent, void)
bool toBool(std::u16string_view rValue)
boost::multi_array< GridEntry, 2 > array_type
bool isLayoutEnabled(const vcl::Window *pWindow)
vcl::Window * getNonLayoutParent(vcl::Window *pWindow)
Size getLegacyBestSizeForChildren(const vcl::Window &rWindow)
IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl, ScrollBar *, void)
static bool isNullGrid(const array_type &A)
void sort_native_button_order(const VclBox &rContainer)
bool isEnabledInLayout(const vcl::Window *pWindow)
bool isVisibleInLayout(const vcl::Window *pWindow)
static void calcMaxs(const array_type &A, std::vector< VclGrid::Value > &rWidths, std::vector< VclGrid::Value > &rHeights)
static array_type assembleGrid(const VclGrid &rGrid)
#define DEFAULT_CHILD_MIN_HEIGHT
static std::vector< tools::Long > setButtonSizes(const std::vector< tools::Long > &rG, const std::vector< bool > &rNonHomogeneous, tools::Long nAvgDimension, tools::Long nMaxNonOutlier, tools::Long nMinWidth)
static bool compareValues(const VclGrid::Value &i, const VclGrid::Value &j)
#define DEFAULT_CHILD_MIN_WIDTH
static tools::Long getMaxNonOutlier(const std::vector< tools::Long > &rG, tools::Long nAvgDimension)
static int getButtonPriority(std::u16string_view rType)
bool isContainerWindow(const vcl::Window &rWindow)
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
std::unique_ptr< sal_Int32[]> pData
void reorderWithinParent(vcl::Window &rWindow, sal_uInt16 nNewPosition)
enumrange< T >::Iterator begin(enumrange< T >)
OUString GetStandardQueryBoxText()
Image const & GetStandardInfoBoxImage()
Image const & GetStandardWarningBoxImage()
OUString GetStandardInfoBoxText()
Image const & GetStandardErrorBoxImage()
Image const & GetStandardQueryBoxImage()
OUString GetStandardWarningBoxText()
OUString GetStandardText(StandardButtonType eButton)
OUString GetStandardErrorBoxText()
std::unique_ptr< Image > mpDisclosurePlus
std::unique_ptr< Image > mpDisclosureMinus
ImplSVData * ImplGetSVData()
WinBits const WB_CLOSEABLE
WinBits const WB_MOVEABLE
WinBits const WB_NOTABSTOP
WinBits const WB_AUTOVSCROLL
WinBits const WB_AUTOHSCROLL
WinBits const WB_DEFBUTTON
WinBits const WB_CLIPCHILDREN
std::unique_ptr< char[]> aBuffer