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())
126 if (aChildPreferredSize.
Width() < aChildSize.
Width())
137 if (aChildPreferredSize.
Height() < rChildAlloc.
Height())
141 if (aChildPreferredSize.
Height() < rChildAlloc.
Height())
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")
409 return css::accessibility::AccessibleRole::PANEL;
412 css::accessibility::AccessibleRole::PANEL :
413 css::accessibility::AccessibleRole::FILLER;
418#define DEFAULT_CHILD_MIN_WIDTH 85
419#define DEFAULT_CHILD_MIN_HEIGHT 27
425 if (nVisibleChildren)
429 nPrimaryDimension *= nVisibleChildren;
456 for (
auto const& nPrimaryChildDimension : rG)
458 if (nPrimaryChildDimension < nAvgDimension * 1.5)
460 nMaxDimensionNonOutlier = std::max(nPrimaryChildDimension,
461 nMaxDimensionNonOutlier);
464 return nMaxDimensionNonOutlier;
467static std::vector<tools::Long>
setButtonSizes(
const std::vector<tools::Long> &rG,
468 const std::vector<bool> &rNonHomogeneous,
471 std::vector<tools::Long> aVec;
474 std::vector<bool>::const_iterator aJ = rNonHomogeneous.begin();
475 auto nNonOutlierWidth = std::max(nMaxNonOutlier, nMinWidth);
476 for (
auto const& nPrimaryChildDimension : rG)
478 bool bNonHomogeneous = *aJ;
479 if (!bNonHomogeneous && nPrimaryChildDimension < nAvgDimension * 1.5)
481 aVec.push_back(nNonOutlierWidth);
485 aVec.push_back(std::max(nPrimaryChildDimension, nMinWidth));
506 std::vector<tools::Long> aMainGroupSizes;
507 std::vector<bool> aMainGroupNonHomogeneous;
508 std::vector<tools::Long> aSubGroupSizes;
509 std::vector<bool> aSubGroupNonHomogeneous;
513 if (!pChild->IsVisible())
516 if (bIgnoreSecondaryPacking || !pChild->get_secondary())
522 aMainGroupNonHomogeneous.push_back(pChild->get_non_homogeneous());
528 aSubGroupNonHomogeneous.push_back(pChild->get_non_homogeneous());
534 tools::Long nMaxMainDimension = aMainGroupSizes.empty() ? 0 :
535 *std::max_element(aMainGroupSizes.begin(), aMainGroupSizes.end());
536 nMaxMainDimension = std::max(nMaxMainDimension, nMinMainGroupPrimary);
537 tools::Long nMaxSubDimension = aSubGroupSizes.empty() ? 0 :
538 *std::max_element(aSubGroupSizes.begin(), aSubGroupSizes.end());
539 nMaxSubDimension = std::max(nMaxSubDimension, nMinSubGroupPrimary);
540 tools::Long nMaxDimension = std::max(nMaxMainDimension, nMaxSubDimension);
550 tools::Long nAccDimension = std::accumulate(aMainGroupSizes.begin(),
551 aMainGroupSizes.end(), 0);
552 nAccDimension = std::accumulate(aSubGroupSizes.begin(),
553 aSubGroupSizes.end(), nAccDimension);
555 size_t nTotalSize = aMainGroupSizes.size() + aSubGroupSizes.size();
557 tools::Long nAvgDimension = nTotalSize ? nAccDimension / nTotalSize : 0;
563 tools::Long nMaxNonOutlier = std::max(nMaxMainNonOutlier, nMaxSubNonOutlier);
566 aMainGroupNonHomogeneous,
567 nAvgDimension, nMaxNonOutlier, nMinMainGroupPrimary);
569 aSubGroupNonHomogeneous,
570 nAvgDimension, nMaxNonOutlier, nMinSubGroupPrimary);
595 if (nVisibleChildren)
599 nPrimaryDimension +
m_nSpacing * (nVisibleChildren-1));
616 if (rKey ==
"layout-style")
619 if (rValue ==
"spread")
621 else if (rValue ==
"edge")
623 else if (rValue ==
"start")
625 else if (rValue ==
"end")
627 else if (rValue ==
"center")
631 SAL_WARN(
"vcl.layout",
"unknown layout style " << rValue);
649 Point aMainGroupPos, aOtherGroupPos;
661 nAllocPrimaryDimension - nOtherPrimaryDimension);
669 tools::Long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
680 tools::Long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
685 SAL_WARN(
"vcl.layout",
"todo unimplemented layout style");
694 nAllocPrimaryDimension - nMainPrimaryDimension);
707 if (!pChild->IsVisible())
710 if (bIgnoreSecondaryPacking || !pChild->get_secondary())
712 tools::Long nMainGroupPrimaryDimension = *aPrimaryI++;
716 setPrimaryCoordinate(aMainGroupPos, nPrimaryCoordinate + nMainGroupPrimaryDimension + nSpacing);
720 tools::Long nSubGroupPrimaryDimension = *aSecondaryI++;
724 setPrimaryCoordinate(aOtherGroupPos, nPrimaryCoordinate + nSubGroupPrimaryDimension + nSpacing);
732 rJsonWriter.
put(
"type",
"buttonbox");
737 rJsonWriter.
put(
"layoutstyle",
"default");
741 rJsonWriter.
put(
"layoutstyle",
"spread");
745 rJsonWriter.
put(
"layoutstyle",
"edge");
749 rJsonWriter.
put(
"layoutstyle",
"center");
753 rJsonWriter.
put(
"layoutstyle",
"start");
757 rJsonWriter.
put(
"layoutstyle",
"end");
774 static const size_t N_TYPES = 6;
775 static const ButtonOrder aDiscardCancelSave[N_TYPES] =
785 static const ButtonOrder aSaveDiscardCancel[N_TYPES] =
795 const ButtonOrder* pOrder = &aDiscardCancelSave[0];
799 if (rEnv.equalsIgnoreAsciiCase(
"windows") ||
800 rEnv.equalsIgnoreAsciiCase(
"lxqt") ||
801 rEnv.startsWithIgnoreAsciiCase(
"plasma"))
803 pOrder = &aSaveDiscardCancel[0];
806 for (
size_t i = 0;
i < N_TYPES; ++
i, ++pOrder)
808 if (rType == pOrder->m_aType)
809 return pOrder->m_nPriority;
819 bool m_bVerticalContainer;
821 explicit sortButtons(
bool bVerticalContainer)
822 : m_bVerticalContainer(bVerticalContainer)
841 if (!m_bVerticalContainer)
864 std::vector<vcl::Window*> aChilds;
868 aChilds.push_back(pChild);
873 std::stable_sort(aChilds.begin(), aChilds.end(), sortButtons(rContainer.
get_orientation()));
882 sal_Int32 nSpanWidth;
883 sal_Int32 nSpanHeight;
902static void calcMaxs(
const array_type &A, std::vector<VclGrid::Value> &rWidths, std::vector<VclGrid::Value> &rHeights);
911 sal_Int32 nLeftAttach = std::max<sal_Int32>(pChild->get_grid_left_attach(), 0);
912 sal_Int32 nWidth = pChild->get_grid_width();
913 sal_Int32 nMaxXPos = nLeftAttach+nWidth-1;
915 sal_Int32 nTopAttach = std::max<sal_Int32>(pChild->get_grid_top_attach(), 0);
916 sal_Int32 nHeight = pChild->get_grid_height();
917 sal_Int32 nMaxYPos = nTopAttach+nHeight-1;
919 sal_Int32 nCurrentMaxXPos =
A.shape()[0]-1;
920 sal_Int32 nCurrentMaxYPos =
A.shape()[1]-1;
921 if (nMaxXPos > nCurrentMaxXPos || nMaxYPos > nCurrentMaxYPos)
923 nCurrentMaxXPos = std::max(nMaxXPos, nCurrentMaxXPos);
924 nCurrentMaxYPos = std::max(nMaxYPos, nCurrentMaxYPos);
925 A.resize(boost::extents[nCurrentMaxXPos+1][nCurrentMaxYPos+1]);
928 GridEntry &rEntry =
A[nLeftAttach][nTopAttach];
929 rEntry.pChild = pChild;
930 rEntry.nSpanWidth = nWidth;
931 rEntry.nSpanHeight = nHeight;
932 rEntry.x = nLeftAttach;
933 rEntry.y = nTopAttach;
935 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
937 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
939 GridEntry &rSpan =
A[nLeftAttach+nSpanX][nTopAttach+nSpanY];
940 rSpan.x = nLeftAttach;
941 rSpan.y = nTopAttach;
947 sal_Int32 nMaxX =
A.shape()[0];
948 sal_Int32 nMaxY =
A.shape()[1];
950 std::vector<bool> aNonEmptyCols(nMaxX);
951 std::vector<bool> aNonEmptyRows(nMaxY);
953 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
955 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
957#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
958#pragma GCC diagnostic push
959#pragma GCC diagnostic ignored "-Wdangling-reference"
961 const GridEntry &rEntry =
A[
x][
y];
962#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
963#pragma GCC diagnostic pop
968 aNonEmptyCols[
x] =
true;
971 for (sal_Int32 nSpanX = 1; nSpanX < rEntry.nSpanWidth; ++nSpanX)
972 aNonEmptyCols[
x+nSpanX] =
true;
974 aNonEmptyRows[
y] =
true;
977 for (sal_Int32 nSpanY = 1; nSpanY < rEntry.nSpanHeight; ++nSpanY)
978 aNonEmptyRows[
y+nSpanY] =
true;
987 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
989 std::set<GridEntry*> candidates;
990 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
992 if (aNonEmptyCols[
x])
994 GridEntry &rSpan =
A[
x][
y];
997 if ((rSpan.x == -1) || (rSpan.y == -1))
1003 GridEntry &rEntry =
A[rSpan.x][rSpan.y];
1004 candidates.insert(&rEntry);
1006 for (
auto const& candidate : candidates)
1008 GridEntry *pEntry = candidate;
1009 --pEntry->nSpanWidth;
1017 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1019 std::set<GridEntry*> candidates;
1020 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1022 if (aNonEmptyRows[
y])
1024 GridEntry &rSpan =
A[
x][
y];
1027 if ((rSpan.x == -1) || (rSpan.y == -1))
1033 GridEntry &rEntry =
A[rSpan.x][rSpan.y];
1034 candidates.insert(&rEntry);
1036 for (
auto const& candidate : candidates)
1038 GridEntry *pEntry = candidate;
1039 --pEntry->nSpanHeight;
1044 sal_Int32 nNonEmptyCols = std::count(aNonEmptyCols.begin(), aNonEmptyCols.end(),
true);
1045 sal_Int32 nNonEmptyRows = std::count(aNonEmptyRows.begin(), aNonEmptyRows.end(),
true);
1048 array_type B(boost::extents[nNonEmptyCols][nNonEmptyRows]);
1049 for (sal_Int32
x = 0, x2 = 0;
x < nMaxX; ++
x)
1051 if (!aNonEmptyCols[
x])
1053 for (sal_Int32
y = 0, y2 = 0;
y < nMaxY; ++
y)
1055 if (!aNonEmptyRows[
y])
1057 GridEntry &rEntry =
A[
x][
y];
1058 B[x2][y2++] = rEntry;
1068 sal_Int32 nMaxX =
A.shape()[0];
1069 sal_Int32 nMaxY =
A.shape()[1];
1071 return !nMaxX || !nMaxY;
1074static void calcMaxs(
const array_type &A, std::vector<VclGrid::Value> &rWidths, std::vector<VclGrid::Value> &rHeights)
1076 sal_Int32 nMaxX =
A.shape()[0];
1077 sal_Int32 nMaxY =
A.shape()[1];
1079 rWidths.resize(nMaxX);
1080 rHeights.resize(nMaxY);
1083 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1085 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1087#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
1088#pragma GCC diagnostic push
1089#pragma GCC diagnostic ignored "-Wdangling-reference"
1091 const GridEntry &rEntry =
A[
x][
y];
1092#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
1093#pragma GCC diagnostic pop
1099 sal_Int32 nWidth = rEntry.nSpanWidth;
1100 sal_Int32 nHeight = rEntry.nSpanHeight;
1102 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1105 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1108 if (nWidth == 1 || nHeight == 1)
1112 rWidths[
x].m_nValue = std::max(rWidths[
x].m_nValue, aChildSize.
Width());
1114 rHeights[
y].m_nValue = std::max(rHeights[
y].m_nValue, aChildSize.
Height());
1121 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1123 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1125#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
1126#pragma GCC diagnostic push
1127#pragma GCC diagnostic ignored "-Wdangling-reference"
1129 const GridEntry &rEntry =
A[
x][
y];
1130#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
1131#pragma GCC diagnostic pop
1137 sal_Int32 nWidth = rEntry.nSpanWidth;
1138 sal_Int32 nHeight = rEntry.nSpanHeight;
1140 if (nWidth == 1 && nHeight == 1)
1147 sal_Int32 nExistingWidth = 0;
1148 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1149 nExistingWidth += rWidths[
x+nSpanX].m_nValue;
1151 sal_Int32 nExtraWidth = aChildSize.
Width() - nExistingWidth;
1153 if (nExtraWidth > 0)
1155 bool bForceExpandAll =
false;
1156 sal_Int32 nExpandables = 0;
1157 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1158 if (rWidths[
x+nSpanX].m_bExpand)
1160 if (nExpandables == 0)
1162 nExpandables = nWidth;
1163 bForceExpandAll =
true;
1166 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1168 if (rWidths[
x+nSpanX].m_bExpand || bForceExpandAll)
1169 rWidths[
x+nSpanX].m_nValue += nExtraWidth/nExpandables;
1176 sal_Int32 nExistingHeight = 0;
1177 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1178 nExistingHeight += rHeights[
y+nSpanY].m_nValue;
1180 sal_Int32 nExtraHeight = aChildSize.
Height() - nExistingHeight;
1182 if (nExtraHeight > 0)
1184 bool bForceExpandAll =
false;
1185 sal_Int32 nExpandables = 0;
1186 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1187 if (rHeights[
y+nSpanY].m_bExpand)
1189 if (nExpandables == 0)
1191 nExpandables = nHeight;
1192 bForceExpandAll =
true;
1195 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1197 if (rHeights[
y+nSpanY].m_bExpand || bForceExpandAll)
1198 rHeights[
y+nSpanY].m_nValue += nExtraHeight/nExpandables;
1231 std::vector<Value> aWidths;
1232 std::vector<Value> aHeights;
1238 nTotalWidth = std::max_element(aWidths.begin(), aWidths.end(),
compareValues)->m_nValue;
1239 nTotalWidth *= aWidths.size();
1246 nTotalWidth += nColSpacing * (aWidths.size()-1);
1251 nTotalHeight = std::max_element(aHeights.begin(), aHeights.end(),
compareValues)->m_nValue;
1252 nTotalHeight *= aHeights.size();
1256 nTotalHeight = std::accumulate(aHeights.begin(), aHeights.end(),
Value(),
accumulateValues).m_nValue;
1259 nTotalHeight += nRowSpacing * (aHeights.size()-1);
1261 return Size(nTotalWidth, nTotalHeight);
1271 sal_Int32 nMaxX =
A.shape()[0];
1272 sal_Int32 nMaxY =
A.shape()[1];
1275 std::vector<Value> aWidths(nMaxX);
1276 std::vector<Value> aHeights(nMaxY);
1288 nAvailableWidth -= nColSpacing * (nMaxX - 1);
1291 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1292 aWidths[
x].m_nValue = nAvailableWidth/nMaxX;
1294 else if (rAllocation.
Width() != aRequisition.
Width())
1296 sal_Int32 nExpandables = 0;
1297 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1298 if (aWidths[
x].m_bExpand)
1300 tools::Long nExtraWidthForExpanders = nExpandables ? (rAllocation.
Width() - aRequisition.
Width()) / nExpandables : 0;
1303 if (!nExpandables && rAllocation.
Width() < aRequisition.
Width())
1310 if (aRequisition.
Width() <= rAllocation.
Width())
1317 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1318 aWidths[
x].m_nValue += nExtraWidth;
1321 if (nExtraWidthForExpanders)
1323 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1324 if (aWidths[
x].m_bExpand)
1325 aWidths[
x].m_nValue += nExtraWidthForExpanders;
1331 nAvailableHeight -= nRowSpacing * (nMaxY - 1);
1334 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1335 aHeights[
y].m_nValue = nAvailableHeight/nMaxY;
1337 else if (rAllocation.
Height() != aRequisition.
Height())
1339 sal_Int32 nExpandables = 0;
1340 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1341 if (aHeights[
y].m_bExpand)
1343 tools::Long nExtraHeightForExpanders = nExpandables ? (rAllocation.
Height() - aRequisition.
Height()) / nExpandables : 0;
1346 if (!nExpandables && rAllocation.
Height() < aRequisition.
Height())
1360 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1361 aHeights[
y].m_nValue += nExtraHeight;
1364 if (nExtraHeightForExpanders)
1366 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1367 if (aHeights[
y].m_bExpand)
1368 aHeights[
y].m_nValue += nExtraHeightForExpanders;
1372 Point aAllocPos(0, 0);
1373 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1375 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1377#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
1378#pragma GCC diagnostic push
1379#pragma GCC diagnostic ignored "-Wdangling-reference"
1381 GridEntry &rEntry =
A[
x][
y];
1382#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
1383#pragma GCC diagnostic pop
1388 Size aChildAlloc(0, 0);
1390 sal_Int32 nWidth = rEntry.nSpanWidth;
1391 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1395 sal_Int32 nHeight = rEntry.nSpanHeight;
1396 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1402 aAllocPos.
AdjustY(aHeights[
y].m_nValue + nRowSpacing );
1404 aAllocPos.
AdjustX(aWidths[
x].m_nValue + nColSpacing );
1405 aAllocPos.
setY( 0 );
1412 rJsonWriter.
put(
"type",
"grid");
1417 return (!rValue.empty() && (rValue[0] ==
't' || rValue[0] ==
'T' || rValue[0] ==
'1'));
1422 if (rKey ==
"row-spacing")
1424 else if (rKey ==
"column-spacing")
1426 else if (rKey ==
"row-homogeneous")
1428 else if (rKey ==
"column-homogeneous")
1430 else if (rKey ==
"n-rows")
1439 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1446 return const_cast<vcl::Window*
>(
const_cast<const VclBin*
>(
this)->get_child());
1449Size VclBin::calculateRequisition()
const
1453 return getLayoutRequisition(*pChild);
1457void VclBin::setAllocation(
const Size &rAllocation)
1461 setLayoutAllocation(*pChild,
Point(0, 0), rAllocation);
1485 aRet = getLayoutRequisition(*pChild);
1489 Size aLabelSize = getLayoutRequisition(*pLabel);
1501 Size aAllocation(rAllocation);
1509 Size aLabelSize = getLayoutRequisition(*pLabel);
1512 setLayoutAllocation(*pLabel, aChildPos, aLabelSize);
1518 setLayoutAllocation(*pChild, aChildPos, aAllocation);
1524 designate_label(
nullptr);
1529 assert(!pWindow || pWindow->
GetParent() ==
this);
1541 assert(GetChildCount() <= 2);
1543 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1557 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1558 assert(GetChildCount() == 2 || pWindowImpl->
mbInDispose);
1590 return VclBin::getDefaultAccessibleName();
1595 VclBin::DumpAsPropertyTree(rJsonWriter);
1596 rJsonWriter.
put(
"type",
"frame");
1620 if (Window::IsEnabled())
1626 nState, aControlValue, OUString()))
1647 rRenderContext.
DrawImage(aOff, *pImg, nStyle);
1674 , m_bResizeTopLevel(false)
1714 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1730 WindowImpl* pWindowImpl = ImplGetWindowImpl();
1736 aRet = getLayoutRequisition(*pChild);
1742 Size aLabelSize = getLayoutRequisition(*pLabel);
1755 Size aAllocation(rAllocation);
1758 WindowImpl* pWindowImpl = ImplGetWindowImpl();
1766 Size aExpanderSize = aButtonSize;
1769 aLabelSize = getLayoutRequisition(*pLabel);
1781 Point aButtonPos(aChildPos.
X(), aChildPos.
Y() + nExtraExpanderHeight/2);
1788 aExpanderSize.
Width() - aButtonSize.
Width()) );
1791 Point aLabelPos(aChildPos.
X() + aButtonSize.
Width(), aChildPos.
Y() + nExtraLabelHeight/2);
1792 setLayoutAllocation(*pLabel, aLabelPos, aLabelSize);
1801 aAllocation =
Size();
1802 setLayoutAllocation(*pChild, aChildPos, aAllocation);
1808 if (rKey ==
"expanded")
1810 else if (rKey ==
"resize-toplevel")
1813 return VclBin::set_property(rKey, rValue);
1819 VclBin::StateChanged(
nType );
1842 rJsonWriter.
put(
"type",
"expander");
1855 pChild->
Show(rBtn.IsChecked());
1857 Dialog* pResizeDialog = m_bResizeTopLevel ? GetParentDialog() :
nullptr;
1861 maExpandedHdl.Call(*
this);
1866 , m_bUserManagedScrolling(false)
1879 GetOutDev()->SetSettings(aAllSettings);
1914 assert(
dynamic_cast<VclViewport*
>(pChild) &&
"scrolledwindow child should be a Viewport");
1921 Point aWinPos(-m_pHScroll->GetThumbPos(), -m_pVScroll->GetThumbPos());
1927 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1928 assert(GetChildCount() == 4 || pWindowImpl->
mbInDispose);
1943 aRet = getLayoutRequisition(*pChild);
1946 aRet.
AdjustWidth(getLayoutRequisition(*m_pVScroll).Width() );
1949 aRet.
AdjustHeight(getLayoutRequisition(*m_pHScroll).Height() );
1983 aChildReq = getLayoutRequisition(*pChild);
1991 bShowVScroll = nAvailHeight < aChildReq.
Height();
1993 bShowVScroll = (GetStyle() &
WB_VSCROLL) != 0;
1996 nAvailWidth -= getLayoutRequisition(*m_pVScroll).Width();
2002 bShowHScroll = nAvailWidth < aChildReq.
Width();
2005 nAvailHeight -= getLayoutRequisition(*m_pHScroll).Height();
2008 bShowVScroll = nAvailHeight < aChildReq.
Height();
2011 bShowHScroll = (GetStyle() &
WB_HSCROLL) != 0;
2018 Size aInnerSize(rAllocation);
2023 auto nScrollBarWidth = getLayoutRequisition(*m_pVScroll).Width();
2024 auto nScrollBarHeight = getLayoutRequisition(*m_pHScroll).Height();
2032 setLayoutAllocation(*
m_pVScroll, aScrollPos, aScrollSize);
2042 setLayoutAllocation(*
m_pHScroll, aScrollPos, aScrollSize);
2059 assert(
dynamic_cast<VclViewport*
>(pChild) &&
"scrolledwindow child should be a Viewport");
2071 if (nOldBits != nNewBits && bRetryOnFailure)
2089 Size aRet(GetSizePixel());
2101 if (rKey ==
"shadow-type" || rKey ==
"name")
2103 if (rKey ==
"shadow-type")
2108 else if (rValue ==
"out")
2110 else if (rValue ==
"etched-in")
2112 else if (rValue ==
"etched-out")
2114 else if (rValue ==
"none")
2117 else if (rKey ==
"name")
2120 if (rValue ==
"monoborder")
2134 bool bRet = VclBin::set_property(rKey, rValue);
2152 bDone = HandleScrollCommand(rCEvt,
2159 return bDone || VclBin::EventNotify( rNEvt );
2164 VclBin::Paint(rRenderContext, rRect);
2189 VclBin::DumpAsPropertyTree(rJsonWriter);
2194 auto aVertical = rJsonWriter.
startNode(
"vertical");
2197 lcl_dumpScrollbar(rJsonWriter, rScrollBar);
2199 WinBits nWinBits = GetStyle();
2201 rJsonWriter.
put(
"policy",
"always");
2203 rJsonWriter.
put(
"policy",
"auto");
2205 rJsonWriter.
put(
"policy",
"never");
2209 auto aHorizontal = rJsonWriter.
startNode(
"horizontal");
2212 lcl_dumpScrollbar(rJsonWriter, rScrollBar);
2214 WinBits nWinBits = GetStyle();
2216 rJsonWriter.
put(
"policy",
"always");
2218 rJsonWriter.
put(
"policy",
"auto");
2220 rJsonWriter.
put(
"policy",
"never");
2230 Size aReq(getLayoutRequisition(*pChild));
2236 aKeepPos =
Point(0, 0);
2239 setLayoutAllocation(*pChild, aKeepPos, aReq);
2244 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
2258 Point aChildPos(0, 0);
2263 setLayoutAllocation(*pChild, aChildPos, rAllocation);
2276 Size aChildSize = getLayoutRequisition(*pChild);
2330 if (rKey ==
"ignore-hidden")
2332 else if (rKey ==
"mode")
2335 if (rValue ==
"none")
2337 else if (rValue ==
"horizontal")
2339 else if (rValue ==
"vertical")
2341 else if (rValue ==
"both")
2345 SAL_WARN(
"vcl.layout",
"unknown size group mode" << rValue);
2351 SAL_INFO(
"vcl.layout",
"unhandled property: " << rKey);
2357 setDeferredProperties();
2432 nDefaultResponse =
RET_OK;
2462 nDefaultResponse =
RET_NO;
2499 :
Dialog(pParent, nStyle)
2502 , m_pOwnedContentArea(nullptr)
2503 , m_pOwnedActionArea(nullptr)
2505 , m_pMessageBox(nullptr)
2507 , m_pPrimaryMessage(nullptr)
2508 , m_pSecondaryMessage(nullptr)
2518 , m_eButtonsType(eButtonsType)
2519 , m_eMessageType(eMessageType)
2521 , m_pMessageBox(nullptr)
2523 , m_pPrimaryMessage(nullptr)
2524 , m_pSecondaryMessage(nullptr)
2525 , m_sPrimaryString(
std::move(aMessage))
2572 if (pSecondaryMessage)
2574 assert(pPrimaryMessage);
2604 else if (rKey ==
"secondary-text")
2606 else if (rKey ==
"message-type")
2609 if (rValue ==
"info")
2611 else if (rValue ==
"warning")
2613 else if (rValue ==
"question")
2615 else if (rValue ==
"error")
2617 else if (rValue ==
"other")
2621 SAL_WARN(
"vcl.layout",
"unknown message type mode" << rValue);
2625 else if (rKey ==
"buttons")
2628 if (rValue ==
"none")
2630 else if (rValue ==
"ok")
2632 else if (rValue ==
"cancel")
2634 else if (rValue ==
"close")
2636 else if (rValue ==
"yes-no")
2638 else if (rValue ==
"ok-cancel")
2642 SAL_WARN(
"vcl.layout",
"unknown buttons type mode" << rValue);
2713 tools::Long nSize = pSplitter->GetSplitPosPixel();
2714 Size aSplitterSize(m_pSplitter->GetSizePixel());
2715 Size aAllocation(GetSizePixel());
2716 arrange(aAllocation, nSize, aAllocation.
Height() - nSize - aSplitterSize.
Height());
2722 Size aFirstChildSize(rAllocation.
Width(), nFirstHeight);
2723 Size aSecondChildSize(rAllocation.
Width(), nSecondHeight);
2736 else if (nElement == 1)
2738 Point aChildPos(0, 0);
2741 else if (nElement == 2)
2757 nPosition -= aSplitterSize.
Height() / 2;
2759 arrange(aAllocation, nPosition, aAllocation.
Height() - nPosition - aSplitterSize.
Height());
2771 bool bFirstCanResize =
true;
2772 bool bSecondCanResize =
true;
2782 if (bInitialAllocation)
2788 else if (nElement == 2)
2790 if (bInitialAllocation)
2798 tools::Long nHeightRequest = nFirstHeight + nSecondHeight;
2799 tools::Long nHeightDiff = nHeight - nHeightRequest;
2800 if (bFirstCanResize == bSecondCanResize)
2801 nFirstHeight += nHeightDiff/2;
2802 else if (bFirstCanResize)
2803 nFirstHeight += nHeightDiff;
2804 arrange(rAllocation, nFirstHeight, rAllocation.
Height() - nFirstHeight - aSplitterSize.
Height());
2832 tools::Long nSize = pSplitter->GetSplitPosPixel();
2833 Size aSplitterSize(m_pSplitter->GetSizePixel());
2834 Size aAllocation(GetSizePixel());
2835 arrange(aAllocation, nSize, aAllocation.
Width() - nSize - aSplitterSize.
Width());
2841 Size aFirstChildSize(nFirstWidth, rAllocation.
Height());
2842 Size aSecondChildSize(nSecondWidth, rAllocation.
Height());
2851 Point aSplitterPos(aFirstChildSize.
Width(), 0);
2855 else if (nElement == 1)
2857 Point aChildPos(0, 0);
2860 else if (nElement == 2)
2876 nPosition -= aSplitterSize.
Width() / 2;
2878 arrange(aAllocation, nPosition, aAllocation.
Width() - nPosition - aSplitterSize.
Width());
2890 bool bFirstCanResize =
true;
2891 bool bSecondCanResize =
true;
2901 if (bInitialAllocation)
2907 else if (nElement == 2)
2909 if (bInitialAllocation)
2917 tools::Long nWidthRequest = nFirstWidth + nSecondWidth;
2919 if (bFirstCanResize == bSecondCanResize)
2920 nFirstWidth += nWidthDiff/2;
2921 else if (bFirstCanResize)
2922 nFirstWidth += nWidthDiff;
2923 arrange(rAllocation, nFirstWidth, rAllocation.
Width() - nFirstWidth - aSplitterSize.
Width());
2954 aBounds.
Union(aChildBounds);
2994 bool bEnabled =
true;
3020 if (sHelpTip.isEmpty())
3049 OUString sSurroundingText;
3051 return sSurroundingText;
3058 OUString sSurroundingText;
3091 rJsonWriter.
put(
"type",
"drawingarea");
3097 pDevice->SetOutputSize(aRenderSize);
3103 Paint(*pDevice, aRect);
3105 BitmapEx aImage = pDevice->GetBitmapEx(
Point(0,0), aRenderSize);
3106 aImage.
Scale(aOutputSize);
3112 OStringBuffer
aBuffer(
"data:image/png;base64,");
const StyleSettings & GetStyleSettings() const
void SetStyleSettings(const StyleSettings &rSet)
static OUString GetToolkitName()
Get the toolkit's name.
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.
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
Scale the bitmap.
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)
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 bool set_property(const OUString &rKey, const OUString &rValue) override
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 OUString &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...
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
const Wallpaper & GetBackground() const
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 Y() const
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
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.
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 bool set_property(const OUString &rKey, const OUString &rValue) override
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
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
virtual bool set_property(const OUString &rKey, const OUString &rValue) 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
virtual bool set_property(const OUString &rKey, const OUString &rValue) override
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
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 OUString &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
::OutputDevice const * GetOutDev() 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()
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)
virtual bool set_property(const OUString &rKey, const OUString &rValue)
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::optional< Image > moDisclosureMinus
std::optional< Image > moDisclosurePlus
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