12 #include <string_view>
14 #include <config_features.h>
15 #include <com/sun/star/accessibility/AccessibleRole.hpp>
34 #include <bitmaps.hlst>
38 #include <boost/multi_array.hpp>
46 , m_bLayoutDirty(true)
56 return css::accessibility::AccessibleRole::PANEL;
71 Point aPos(rPos.X() + nLeft, rPos.Y() + nTop);
72 Size aSize(rSize.
Width() - nLeft - nRight, rSize.
Height() - nTop - nBottom);
88 Point aChildPos(rAllocPos);
89 Size aChildSize(rChildAlloc);
97 if (aChildPreferredSize.
Width() < rChildAlloc.
Width())
101 if (aChildPreferredSize.
Width() < rChildAlloc.
Width())
103 aChildPos.AdjustX(rChildAlloc.
Width() );
104 aChildPos.AdjustX( -(aChildSize.
Width()) );
107 if (aChildPreferredSize.
Width() < aChildSize.
Width())
109 aChildPos.AdjustX((rChildAlloc.
Width() - aChildSize.
Width()) / 2 );
118 if (aChildPreferredSize.
Height() < rChildAlloc.
Height())
122 if (aChildPreferredSize.
Height() < rChildAlloc.
Height())
124 aChildPos.AdjustY(rChildAlloc.
Height() );
125 aChildPos.AdjustY( -(aChildSize.
Height()) );
130 aChildPos.AdjustY((rChildAlloc.
Height() - aChildSize.
Height()) / 2 );
147 return Size(aSize.Width() + nLeft + nRight, aSize.Height() + nTop + nBottom);
159 Window::SetPosSizePixel(rAllocPos, rAllocation);
169 Point aAllocPos = rAllocPos;
175 Window::SetPosPixel(aAllocPos);
180 Size aAllocation = rAllocation;
186 Window::SetSizePixel(aAllocation);
197 Window::queue_resize(eReason);
209 pParent->Command(aCEvt);
215 Window::Command(rCEvt);
234 sal_uInt16 nVisibleChildren = 0;
239 if (!pChild->IsVisible())
245 nPrimaryDimension += pChild->get_padding() * 2;
256 sal_uInt16 nVisibleChildren = 0, nExpandChildren = 0;
259 if (!pChild->IsVisible())
267 if (!nVisibleChildren)
272 tools::Long nHomogeneousDimension = 0, nExtraSpace = 0;
275 nHomogeneousDimension = (nAllocPrimaryDimension -
276 (nVisibleChildren - 1) *
m_nSpacing) / nVisibleChildren;
278 else if (nExpandChildren)
288 SAL_WARN(
"vcl.layout",
"nExtraSpace went negative, setting to zero for VclBox: " <<
GetHelpId());
297 if (!pChild->IsVisible())
301 aWindows[ePacking].push_back(pChild);
318 for (
auto const& window : aWindows[ePackType])
331 nPrimaryDimension += nPadding * 2;
333 nPrimaryDimension += nExtraSpace;
338 Point aChildPos(aPos);
339 Size aChildSize(aBoxSize);
376 if (rKey ==
"spacing")
378 else if (rKey ==
"homogeneous")
396 return css::accessibility::AccessibleRole::PANEL;
398 return css::accessibility::AccessibleRole::FILLER;
402 #define DEFAULT_CHILD_MIN_WIDTH 85
403 #define DEFAULT_CHILD_MIN_HEIGHT 27
409 if (nVisibleChildren)
413 nPrimaryDimension *= nVisibleChildren;
440 for (
auto const& nPrimaryChildDimension : rG)
442 if (nPrimaryChildDimension < nAvgDimension * 1.5)
444 nMaxDimensionNonOutlier = std::max(nPrimaryChildDimension,
445 nMaxDimensionNonOutlier);
448 return nMaxDimensionNonOutlier;
451 static std::vector<tools::Long>
setButtonSizes(
const std::vector<tools::Long> &rG,
452 const std::vector<bool> &rNonHomogeneous,
455 std::vector<tools::Long> aVec;
458 std::vector<bool>::const_iterator aJ = rNonHomogeneous.begin();
459 auto nNonOutlierWidth = std::max(nMaxNonOutlier, nMinWidth);
460 for (
auto const& nPrimaryChildDimension : rG)
462 bool bNonHomogeneous = *aJ;
463 if (!bNonHomogeneous && nPrimaryChildDimension < nAvgDimension * 1.5)
465 aVec.push_back(nNonOutlierWidth);
469 aVec.push_back(std::max(nPrimaryChildDimension, nMinWidth));
490 std::vector<tools::Long> aMainGroupSizes;
491 std::vector<bool> aMainGroupNonHomogeneous;
492 std::vector<tools::Long> aSubGroupSizes;
493 std::vector<bool> aSubGroupNonHomogeneous;
497 if (!pChild->IsVisible())
500 if (bIgnoreSecondaryPacking || !pChild->get_secondary())
506 aMainGroupNonHomogeneous.push_back(pChild->get_non_homogeneous());
512 aSubGroupNonHomogeneous.push_back(pChild->get_non_homogeneous());
518 tools::Long nMaxMainDimension = aMainGroupSizes.empty() ? 0 :
519 *std::max_element(aMainGroupSizes.begin(), aMainGroupSizes.end());
520 nMaxMainDimension = std::max(nMaxMainDimension, nMinMainGroupPrimary);
521 tools::Long nMaxSubDimension = aSubGroupSizes.empty() ? 0 :
522 *std::max_element(aSubGroupSizes.begin(), aSubGroupSizes.end());
523 nMaxSubDimension = std::max(nMaxSubDimension, nMinSubGroupPrimary);
524 tools::Long nMaxDimension = std::max(nMaxMainDimension, nMaxSubDimension);
534 tools::Long nAccDimension = std::accumulate(aMainGroupSizes.begin(),
535 aMainGroupSizes.end(), 0);
536 nAccDimension = std::accumulate(aSubGroupSizes.begin(),
537 aSubGroupSizes.end(), nAccDimension);
539 size_t nTotalSize = aMainGroupSizes.size() + aSubGroupSizes.size();
541 tools::Long nAvgDimension = nTotalSize ? nAccDimension / nTotalSize : 0;
547 tools::Long nMaxNonOutlier = std::max(nMaxMainNonOutlier, nMaxSubNonOutlier);
550 aMainGroupNonHomogeneous,
551 nAvgDimension, nMaxNonOutlier, nMinMainGroupPrimary);
553 aSubGroupNonHomogeneous,
554 nAvgDimension, nMaxNonOutlier, nMinSubGroupPrimary);
579 if (nVisibleChildren)
583 nPrimaryDimension +
m_nSpacing * (nVisibleChildren-1));
600 if (rKey ==
"layout-style")
603 if (rValue ==
"spread")
605 else if (rValue ==
"edge")
607 else if (rValue ==
"start")
609 else if (rValue ==
"end")
611 else if (rValue ==
"center")
615 SAL_WARN(
"vcl.layout",
"unknown layout style " << rValue);
633 Point aMainGroupPos, aOtherGroupPos;
645 nAllocPrimaryDimension - nOtherPrimaryDimension);
653 tools::Long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
664 tools::Long nExtraSpace = nAllocPrimaryDimension - nMainPrimaryDimension;
669 SAL_WARN(
"vcl.layout",
"todo unimplemented layout style");
678 nAllocPrimaryDimension - nMainPrimaryDimension);
691 if (!pChild->IsVisible())
694 if (bIgnoreSecondaryPacking || !pChild->get_secondary())
696 tools::Long nMainGroupPrimaryDimension = *aPrimaryI++;
700 setPrimaryCoordinate(aMainGroupPos, nPrimaryCoordinate + nMainGroupPrimaryDimension + nSpacing);
704 tools::Long nSubGroupPrimaryDimension = *aSecondaryI++;
708 setPrimaryCoordinate(aOtherGroupPos, nPrimaryCoordinate + nSubGroupPrimaryDimension + nSpacing);
716 rJsonWriter.
put(
"type",
"buttonbox");
721 rJsonWriter.
put(
"layoutstyle",
"default");
725 rJsonWriter.
put(
"layoutstyle",
"spread");
729 rJsonWriter.
put(
"layoutstyle",
"edge");
733 rJsonWriter.
put(
"layoutstyle",
"center");
737 rJsonWriter.
put(
"layoutstyle",
"start");
741 rJsonWriter.
put(
"layoutstyle",
"end");
758 static const size_t N_TYPES = 6;
759 static const ButtonOrder aDiscardCancelSave[N_TYPES] =
769 static const ButtonOrder aSaveDiscardCancel[N_TYPES] =
779 const ButtonOrder* pOrder = &aDiscardCancelSave[0];
783 if (rEnv.equalsIgnoreAsciiCase(
"windows") ||
784 rEnv.equalsIgnoreAsciiCase(
"lxqt") ||
785 rEnv.startsWithIgnoreAsciiCase(
"plasma"))
787 pOrder = &aSaveDiscardCancel[0];
790 for (
size_t i = 0;
i < N_TYPES; ++
i, ++pOrder)
792 if (rType == pOrder->m_aType)
793 return pOrder->m_nPriority;
803 bool m_bVerticalContainer;
805 explicit sortButtons(
bool bVerticalContainer)
806 : m_bVerticalContainer(bVerticalContainer)
825 if (!m_bVerticalContainer)
848 std::vector<vcl::Window*> aChilds;
852 aChilds.push_back(pChild);
857 std::stable_sort(aChilds.begin(), aChilds.end(), sortButtons(rContainer.
get_orientation()));
866 sal_Int32 nSpanWidth;
867 sal_Int32 nSpanHeight;
886 static void calcMaxs(
const array_type &A, std::vector<VclGrid::Value> &rWidths, std::vector<VclGrid::Value> &rHeights);
895 sal_Int32 nLeftAttach = std::max<sal_Int32>(pChild->get_grid_left_attach(), 0);
896 sal_Int32 nWidth = pChild->get_grid_width();
897 sal_Int32 nMaxXPos = nLeftAttach+nWidth-1;
899 sal_Int32 nTopAttach = std::max<sal_Int32>(pChild->get_grid_top_attach(), 0);
900 sal_Int32 nHeight = pChild->get_grid_height();
901 sal_Int32 nMaxYPos = nTopAttach+nHeight-1;
903 sal_Int32 nCurrentMaxXPos = A.shape()[0]-1;
904 sal_Int32 nCurrentMaxYPos = A.shape()[1]-1;
905 if (nMaxXPos > nCurrentMaxXPos || nMaxYPos > nCurrentMaxYPos)
907 nCurrentMaxXPos = std::max(nMaxXPos, nCurrentMaxXPos);
908 nCurrentMaxYPos = std::max(nMaxYPos, nCurrentMaxYPos);
909 A.resize(boost::extents[nCurrentMaxXPos+1][nCurrentMaxYPos+1]);
912 GridEntry &rEntry = A[nLeftAttach][nTopAttach];
913 rEntry.pChild = pChild;
914 rEntry.nSpanWidth = nWidth;
915 rEntry.nSpanHeight = nHeight;
916 rEntry.x = nLeftAttach;
917 rEntry.y = nTopAttach;
919 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
921 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
923 GridEntry &rSpan = A[nLeftAttach+nSpanX][nTopAttach+nSpanY];
924 rSpan.x = nLeftAttach;
925 rSpan.y = nTopAttach;
931 sal_Int32 nMaxX = A.shape()[0];
932 sal_Int32 nMaxY = A.shape()[1];
934 std::vector<bool> aNonEmptyCols(nMaxX);
935 std::vector<bool> aNonEmptyRows(nMaxY);
937 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
939 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
941 const GridEntry &rEntry = A[
x][
y];
945 aNonEmptyCols[
x] =
true;
948 for (sal_Int32 nSpanX = 1; nSpanX < rEntry.nSpanWidth; ++nSpanX)
949 aNonEmptyCols[
x+nSpanX] =
true;
951 aNonEmptyRows[
y] =
true;
954 for (sal_Int32 nSpanY = 1; nSpanY < rEntry.nSpanHeight; ++nSpanY)
955 aNonEmptyRows[
y+nSpanY] =
true;
964 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
966 std::set<GridEntry*> candidates;
967 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
969 if (aNonEmptyCols[
x])
971 GridEntry &rSpan = A[x][
y];
974 if ((rSpan.x == -1) || (rSpan.y == -1))
980 GridEntry &rEntry = A[rSpan.x][rSpan.y];
981 candidates.insert(&rEntry);
983 for (
auto const& candidate : candidates)
985 GridEntry *pEntry = candidate;
986 --pEntry->nSpanWidth;
994 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
996 std::set<GridEntry*> candidates;
997 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
999 if (aNonEmptyRows[
y])
1001 GridEntry &rSpan = A[
x][y];
1004 if ((rSpan.x == -1) || (rSpan.y == -1))
1010 GridEntry &rEntry = A[rSpan.x][rSpan.y];
1011 candidates.insert(&rEntry);
1013 for (
auto const& candidate : candidates)
1015 GridEntry *pEntry = candidate;
1016 --pEntry->nSpanHeight;
1021 sal_Int32 nNonEmptyCols = std::count(aNonEmptyCols.begin(), aNonEmptyCols.end(),
true);
1022 sal_Int32 nNonEmptyRows = std::count(aNonEmptyRows.begin(), aNonEmptyRows.end(),
true);
1025 array_type
B(boost::extents[nNonEmptyCols][nNonEmptyRows]);
1026 for (sal_Int32
x = 0, x2 = 0;
x < nMaxX; ++
x)
1028 if (!aNonEmptyCols[
x])
1030 for (sal_Int32
y = 0, y2 = 0;
y < nMaxY; ++
y)
1032 if (!aNonEmptyRows[
y])
1034 GridEntry &rEntry = A[x][y];
1035 B[x2][y2++] = rEntry;
1045 sal_Int32 nMaxX = A.shape()[0];
1046 sal_Int32 nMaxY = A.shape()[1];
1048 return !nMaxX || !nMaxY;
1051 static void calcMaxs(
const array_type &A, std::vector<VclGrid::Value> &rWidths, std::vector<VclGrid::Value> &rHeights)
1053 sal_Int32 nMaxX = A.shape()[0];
1054 sal_Int32 nMaxY = A.shape()[1];
1056 rWidths.resize(nMaxX);
1057 rHeights.resize(nMaxY);
1060 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1062 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1064 const GridEntry &rEntry = A[
x][
y];
1069 sal_Int32 nWidth = rEntry.nSpanWidth;
1070 sal_Int32 nHeight = rEntry.nSpanHeight;
1072 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1075 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1078 if (nWidth == 1 || nHeight == 1)
1082 rWidths[
x].m_nValue = std::max(rWidths[
x].m_nValue, aChildSize.
Width());
1084 rHeights[
y].m_nValue = std::max(rHeights[
y].m_nValue, aChildSize.
Height());
1091 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1093 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1095 const GridEntry &rEntry = A[
x][
y];
1100 sal_Int32 nWidth = rEntry.nSpanWidth;
1101 sal_Int32 nHeight = rEntry.nSpanHeight;
1103 if (nWidth == 1 && nHeight == 1)
1110 sal_Int32 nExistingWidth = 0;
1111 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1112 nExistingWidth += rWidths[
x+nSpanX].m_nValue;
1114 sal_Int32 nExtraWidth = aChildSize.
Width() - nExistingWidth;
1116 if (nExtraWidth > 0)
1118 bool bForceExpandAll =
false;
1119 sal_Int32 nExpandables = 0;
1120 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1121 if (rWidths[
x+nSpanX].m_bExpand)
1123 if (nExpandables == 0)
1125 nExpandables = nWidth;
1126 bForceExpandAll =
true;
1129 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1131 if (rWidths[
x+nSpanX].m_bExpand || bForceExpandAll)
1132 rWidths[
x+nSpanX].m_nValue += nExtraWidth/nExpandables;
1139 sal_Int32 nExistingHeight = 0;
1140 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1141 nExistingHeight += rHeights[
y+nSpanY].m_nValue;
1143 sal_Int32 nExtraHeight = aChildSize.
Height() - nExistingHeight;
1145 if (nExtraHeight > 0)
1147 bool bForceExpandAll =
false;
1148 sal_Int32 nExpandables = 0;
1149 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1150 if (rHeights[
y+nSpanY].m_bExpand)
1152 if (nExpandables == 0)
1154 nExpandables = nHeight;
1155 bForceExpandAll =
true;
1158 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1160 if (rHeights[
y+nSpanY].m_bExpand || bForceExpandAll)
1161 rHeights[
y+nSpanY].m_nValue += nExtraHeight/nExpandables;
1194 std::vector<Value> aWidths;
1195 std::vector<Value> aHeights;
1201 nTotalWidth = std::max_element(aWidths.begin(), aWidths.end(),
compareValues)->m_nValue;
1202 nTotalWidth *= aWidths.size();
1209 nTotalWidth += nColSpacing * (aWidths.size()-1);
1214 nTotalHeight = std::max_element(aHeights.begin(), aHeights.end(),
compareValues)->m_nValue;
1215 nTotalHeight *= aHeights.size();
1219 nTotalHeight = std::accumulate(aHeights.begin(), aHeights.end(),
Value(),
accumulateValues).m_nValue;
1222 nTotalHeight += nRowSpacing * (aHeights.size()-1);
1224 return Size(nTotalWidth, nTotalHeight);
1234 sal_Int32 nMaxX = A.shape()[0];
1235 sal_Int32 nMaxY = A.shape()[1];
1238 std::vector<Value> aWidths(nMaxX);
1239 std::vector<Value> aHeights(nMaxY);
1251 nAvailableWidth -= nColSpacing * (nMaxX - 1);
1254 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1255 aWidths[
x].m_nValue = nAvailableWidth/nMaxX;
1257 else if (rAllocation.
Width() != aRequisition.
Width())
1259 sal_Int32 nExpandables = 0;
1260 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1261 if (aWidths[
x].m_bExpand)
1263 tools::Long nExtraWidthForExpanders = nExpandables ? (rAllocation.
Width() - aRequisition.
Width()) / nExpandables : 0;
1266 if (!nExpandables && rAllocation.
Width() < aRequisition.
Width())
1273 if (aRequisition.
Width() <= rAllocation.
Width())
1280 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1281 aWidths[
x].m_nValue += nExtraWidth;
1284 if (nExtraWidthForExpanders)
1286 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1287 if (aWidths[
x].m_bExpand)
1288 aWidths[
x].m_nValue += nExtraWidthForExpanders;
1294 nAvailableHeight -= nRowSpacing * (nMaxY - 1);
1297 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1298 aHeights[
y].m_nValue = nAvailableHeight/nMaxY;
1300 else if (rAllocation.
Height() != aRequisition.
Height())
1302 sal_Int32 nExpandables = 0;
1303 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1304 if (aHeights[
y].m_bExpand)
1306 tools::Long nExtraHeightForExpanders = nExpandables ? (rAllocation.
Height() - aRequisition.
Height()) / nExpandables : 0;
1309 if (!nExpandables && rAllocation.
Height() < aRequisition.
Height())
1323 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1324 aHeights[
y].m_nValue += nExtraHeight;
1327 if (nExtraHeightForExpanders)
1329 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1330 if (aHeights[
y].m_bExpand)
1331 aHeights[
y].m_nValue += nExtraHeightForExpanders;
1335 Point aAllocPos(0, 0);
1336 for (sal_Int32
x = 0;
x < nMaxX; ++
x)
1338 for (sal_Int32
y = 0;
y < nMaxY; ++
y)
1340 GridEntry &rEntry = A[
x][
y];
1344 Size aChildAlloc(0, 0);
1346 sal_Int32 nWidth = rEntry.nSpanWidth;
1347 for (sal_Int32 nSpanX = 0; nSpanX < nWidth; ++nSpanX)
1351 sal_Int32 nHeight = rEntry.nSpanHeight;
1352 for (sal_Int32 nSpanY = 0; nSpanY < nHeight; ++nSpanY)
1358 aAllocPos.AdjustY(aHeights[
y].m_nValue + nRowSpacing );
1360 aAllocPos.AdjustX(aWidths[
x].m_nValue + nColSpacing );
1361 aAllocPos.setY( 0 );
1368 rJsonWriter.
put(
"type",
"grid");
1373 return (!rValue.empty() && (rValue[0] ==
't' || rValue[0] ==
'T' || rValue[0] ==
'1'));
1378 if (rKey ==
"row-spacing")
1380 else if (rKey ==
"column-spacing")
1382 else if (rKey ==
"row-homogeneous")
1384 else if (rKey ==
"column-homogeneous")
1386 else if (rKey ==
"n-rows")
1395 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1402 return const_cast<vcl::Window*
>(
const_cast<const VclBin*
>(
this)->get_child());
1405 Size VclBin::calculateRequisition()
const
1409 return getLayoutRequisition(*pChild);
1413 void VclBin::setAllocation(
const Size &rAllocation)
1417 setLayoutAllocation(*pChild,
Point(0, 0), rAllocation);
1441 aRet = getLayoutRequisition(*pChild);
1445 Size aLabelSize = getLayoutRequisition(*pLabel);
1457 Size aAllocation(rAllocation);
1465 Size aLabelSize = getLayoutRequisition(*pLabel);
1468 setLayoutAllocation(*pLabel, aChildPos, aLabelSize);
1470 aChildPos.AdjustY(aLabelSize.
Height() );
1474 setLayoutAllocation(*pChild, aChildPos, aAllocation);
1480 designate_label(
nullptr);
1485 assert(!pWindow || pWindow->
GetParent() ==
this);
1497 assert(GetChildCount() == 2);
1499 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1513 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1514 assert(GetChildCount() == 2 || pWindowImpl->
mbInDispose);
1546 return VclBin::getDefaultAccessibleName();
1551 VclBin::DumpAsPropertyTree(rJsonWriter);
1552 rJsonWriter.
put(
"type",
"frame");
1576 if (Window::IsEnabled())
1582 nState, aControlValue, OUString()))
1600 Point aOff((aSize.Width() - aImgSize.Width()) / 2,
1601 (aSize.Height() - aImgSize.Height()) / 2);
1603 rRenderContext.
DrawImage(aOff, *pImg, nStyle);
1630 , m_bResizeTopLevel(
false)
1670 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1686 WindowImpl* pWindowImpl = ImplGetWindowImpl();
1692 aRet = getLayoutRequisition(*pChild);
1698 Size aLabelSize = getLayoutRequisition(*pLabel);
1711 Size aAllocation(rAllocation);
1714 WindowImpl* pWindowImpl = ImplGetWindowImpl();
1722 Size aExpanderSize = aButtonSize;
1725 aLabelSize = getLayoutRequisition(*pLabel);
1737 Point aButtonPos(aChildPos.X(), aChildPos.Y() + nExtraExpanderHeight/2);
1744 aExpanderSize.
Width() - aButtonSize.
Width()) );
1747 Point aLabelPos(aChildPos.X() + aButtonSize.
Width(), aChildPos.Y() + nExtraLabelHeight/2);
1748 setLayoutAllocation(*pLabel, aLabelPos, aLabelSize);
1752 aChildPos.AdjustY(aExpanderSize.
Height() );
1757 aAllocation =
Size();
1758 setLayoutAllocation(*pChild, aChildPos, aAllocation);
1764 if (rKey ==
"expanded")
1766 else if (rKey ==
"resize-toplevel")
1769 return VclBin::set_property(rKey, rValue);
1775 VclBin::StateChanged( nType );
1798 rJsonWriter.
put(
"type",
"expander");
1811 pChild->
Show(rBtn.IsChecked());
1813 Dialog* pResizeDialog = m_bResizeTopLevel ? GetParentDialog() :
nullptr;
1817 maExpandedHdl.Call(*
this);
1822 , m_bUserManagedScrolling(
false)
1829 SetType(WindowType::SCROLLWINDOW);
1835 GetOutDev()->SetSettings(aAllSettings);
1849 DecorationView aDecoView(const_cast<OutputDevice*>(GetOutDev()));
1852 const auto nBorderWidth = (aRect.
GetWidth() - aContentRect.
GetWidth()) / 2;
1853 return std::max<int>(nBorderWidth, 1);
1870 assert(dynamic_cast<VclViewport*>(pChild) &&
"scrolledwindow child should be a Viewport");
1877 Point aWinPos(-m_pHScroll->GetThumbPos(), -m_pVScroll->GetThumbPos());
1883 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
1884 assert(GetChildCount() == 4 || pWindowImpl->
mbInDispose);
1899 aRet = getLayoutRequisition(*pChild);
1902 aRet.
AdjustWidth(getLayoutRequisition(*m_pVScroll).Width() );
1905 aRet.
AdjustHeight(getLayoutRequisition(*m_pHScroll).Height() );
1939 aChildReq = getLayoutRequisition(*pChild);
1947 bShowVScroll = nAvailHeight < aChildReq.
Height();
1949 bShowVScroll = (GetStyle() &
WB_VSCROLL) != 0;
1952 nAvailWidth -= getLayoutRequisition(*m_pVScroll).Width();
1958 bShowHScroll = nAvailWidth < aChildReq.
Width();
1961 nAvailHeight -= getLayoutRequisition(*m_pHScroll).Height();
1964 bShowVScroll = nAvailHeight < aChildReq.
Height();
1967 bShowHScroll = (GetStyle() &
WB_HSCROLL) != 0;
1974 Size aInnerSize(rAllocation);
1979 auto nScrollBarWidth = getLayoutRequisition(*m_pVScroll).Width();
1980 auto nScrollBarHeight = getLayoutRequisition(*m_pHScroll).Height();
1988 setLayoutAllocation(*
m_pVScroll, aScrollPos, aScrollSize);
1998 setLayoutAllocation(*
m_pHScroll, aScrollPos, aScrollSize);
2015 assert(dynamic_cast<VclViewport*>(pChild) &&
"scrolledwindow child should be a Viewport");
2027 if (nOldBits != nNewBits && bRetryOnFailure)
2045 Size aRet(GetSizePixel());
2057 if (rKey ==
"shadow-type" || rKey ==
"name")
2059 if (rKey ==
"shadow-type")
2064 else if (rValue ==
"out")
2066 else if (rValue ==
"etched-in")
2068 else if (rValue ==
"etched-out")
2070 else if (rValue ==
"none")
2073 else if (rKey ==
"name")
2076 if (rValue ==
"monoborder")
2090 bool bRet = VclBin::set_property(rKey, rValue);
2108 bDone = HandleScrollCommand(rCEvt,
2115 return bDone || VclBin::EventNotify( rNEvt );
2120 VclBin::Paint(rRenderContext, rRect);
2126 const auto nBorderWidth = (aRect.
GetWidth() - aContentRect.
GetWidth()) / 2;
2137 Size aReq(getLayoutRequisition(*pChild));
2143 aKeepPos =
Point(0, 0);
2146 setLayoutAllocation(*pChild, aKeepPos, aReq);
2151 const WindowImpl* pWindowImpl = ImplGetWindowImpl();
2165 Point aChildPos(0, 0);
2170 setLayoutAllocation(*pChild, aChildPos, rAllocation);
2183 Size aChildSize = getLayoutRequisition(*pChild);
2237 if (rKey ==
"ignore-hidden")
2239 else if (rKey ==
"mode")
2242 if (rValue ==
"none")
2244 else if (rValue ==
"horizontal")
2246 else if (rValue ==
"vertical")
2248 else if (rValue ==
"both")
2252 SAL_WARN(
"vcl.layout",
"unknown size group mode" << rValue);
2258 SAL_INFO(
"vcl.layout",
"unhandled property: " << rKey);
2339 nDefaultResponse =
RET_OK;
2369 nDefaultResponse =
RET_NO;
2406 :
Dialog(pParent, nStyle)
2409 , m_pOwnedContentArea(nullptr)
2410 , m_pOwnedActionArea(nullptr)
2412 , m_pMessageBox(nullptr)
2414 , m_pPrimaryMessage(nullptr)
2415 , m_pSecondaryMessage(nullptr)
2421 const OUString &rMessage,
2425 , m_eButtonsType(eButtonsType)
2426 , m_eMessageType(eMessageType)
2428 , m_pMessageBox(nullptr)
2430 , m_pPrimaryMessage(nullptr)
2431 , m_pSecondaryMessage(nullptr)
2432 , m_sPrimaryString(rMessage)
2479 if (pSecondaryMessage)
2481 assert(pPrimaryMessage);
2511 else if (rKey ==
"secondary-text")
2513 else if (rKey ==
"message-type")
2516 if (rValue ==
"info")
2518 else if (rValue ==
"warning")
2520 else if (rValue ==
"question")
2522 else if (rValue ==
"error")
2524 else if (rValue ==
"other")
2528 SAL_WARN(
"vcl.layout",
"unknown message type mode" << rValue);
2532 else if (rKey ==
"buttons")
2535 if (rValue ==
"none")
2537 else if (rValue ==
"ok")
2539 else if (rValue ==
"cancel")
2541 else if (rValue ==
"close")
2543 else if (rValue ==
"yes-no")
2545 else if (rValue ==
"ok-cancel")
2549 SAL_WARN(
"vcl.layout",
"unknown buttons type mode" << rValue);
2620 tools::Long nSize = pSplitter->GetSplitPosPixel();
2621 Size aSplitterSize(m_pSplitter->GetSizePixel());
2622 Size aAllocation(GetSizePixel());
2623 arrange(aAllocation, nSize, aAllocation.Height() - nSize - aSplitterSize.Height());
2629 Size aFirstChildSize(rAllocation.
Width(), nFirstHeight);
2630 Size aSecondChildSize(rAllocation.
Width(), nSecondHeight);
2639 Point aSplitterPos(0, aFirstChildSize.Height());
2641 m_nPosition = aSplitterPos.Y() + aSplitterSize.Height() / 2;
2643 else if (nElement == 1)
2645 Point aChildPos(0, 0);
2648 else if (nElement == 2)
2650 Point aChildPos(0, aFirstChildSize.Height() + aSplitterSize.Height());
2664 nPosition -= aSplitterSize.
Height() / 2;
2666 arrange(aAllocation, nPosition, aAllocation.
Height() - nPosition - aSplitterSize.Height());
2678 bool bFirstCanResize =
true;
2679 bool bSecondCanResize =
true;
2689 if (bInitialAllocation)
2695 else if (nElement == 2)
2697 if (bInitialAllocation)
2705 tools::Long nHeightRequest = nFirstHeight + nSecondHeight;
2706 tools::Long nHeightDiff = nHeight - nHeightRequest;
2707 if (bFirstCanResize == bSecondCanResize)
2708 nFirstHeight += nHeightDiff/2;
2709 else if (bFirstCanResize)
2710 nFirstHeight += nHeightDiff;
2711 arrange(rAllocation, nFirstHeight, rAllocation.
Height() - nFirstHeight - aSplitterSize.Height());
2739 tools::Long nSize = pSplitter->GetSplitPosPixel();
2740 Size aSplitterSize(m_pSplitter->GetSizePixel());
2741 Size aAllocation(GetSizePixel());
2742 arrange(aAllocation, nSize, aAllocation.Width() - nSize - aSplitterSize.Width());
2748 Size aFirstChildSize(nFirstWidth, rAllocation.
Height());
2749 Size aSecondChildSize(nSecondWidth, rAllocation.
Height());
2758 Point aSplitterPos(aFirstChildSize.Width(), 0);
2760 m_nPosition = aSplitterPos.X() + aSplitterSize.Width() / 2;
2762 else if (nElement == 1)
2764 Point aChildPos(0, 0);
2767 else if (nElement == 2)
2769 Point aChildPos(aFirstChildSize.Width() + aSplitterSize.Width(), 0);
2783 nPosition -= aSplitterSize.
Width() / 2;
2785 arrange(aAllocation, nPosition, aAllocation.
Width() - nPosition - aSplitterSize.Width());
2797 bool bFirstCanResize =
true;
2798 bool bSecondCanResize =
true;
2808 if (bInitialAllocation)
2814 else if (nElement == 2)
2816 if (bInitialAllocation)
2824 tools::Long nWidthRequest = nFirstWidth + nSecondWidth;
2826 if (bFirstCanResize == bSecondCanResize)
2827 nFirstWidth += nWidthDiff/2;
2828 else if (bFirstCanResize)
2829 nFirstWidth += nWidthDiff;
2830 arrange(rAllocation, nFirstWidth, rAllocation.
Width() - nFirstWidth - aSplitterSize.Width());
2861 aBounds.
Union(aChildBounds);
2869 aRet.AdjustWidth(aTopLeft.X()*2 );
2870 aRet.AdjustHeight(aTopLeft.Y()*2 );
2901 bool bEnabled =
true;
2927 if (sHelpTip.isEmpty())
2930 aHelpArea.SetLeft(aPt.X());
2931 aHelpArea.SetTop(aPt.Y());
2933 aHelpArea.SetRight(aPt.X());
2934 aHelpArea.SetBottom(aPt.Y());
2956 OUString sSurroundingText;
2958 return sSurroundingText;
2965 OUString sSurroundingText;
2998 rJsonWriter.
put(
"type",
"drawingarea");
3003 Paint(*pDevice, aRect);
3008 css::uno::Sequence<sal_Int8>
aSeq( static_cast<sal_Int8 const *>(aOStm.
GetData()), aOStm.
Tell());
3009 OUStringBuffer
aBuffer(
"data:image/png;base64,");
3011 rJsonWriter.
put(
"image", aBuffer.makeStringAndClear());
virtual void set_position(tools::Long nPosition)
virtual Point GetPosPixel() const
static OUString GetDisplayName()
Get the default name of the application for message dialogs and printing.
virtual void SetText(const OUString &rStr)
#define LINK(Instance, Class, Member)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
virtual Selection GetSurroundingTextSelection() const override
Size GetSizePixel() const
const Color & GetShadowColor() const
virtual sal_uInt16 getDefaultAccessibleRole() const override
Image const & GetStandardInfoBoxImage()
virtual ~VclExpander() override
virtual bool set_property(const OString &rKey, const OUString &rValue) override
bool m_bColumnHomogeneous
virtual void setAllocation(const Size &rAllocation)=0
int get_column_spacing() const
void SetDragRectPixel(const tools::Rectangle &rDragRect, vcl::Window *pRefWin=nullptr)
Point GetPointerPosPixel()
virtual bool set_property(const OString &rKey, const OUString &rValue) override
sal_Int32 get_padding() const
void setDeferredProperties()
static VclGrid::Value accumulateValues(const VclGrid::Value &i, const VclGrid::Value &j)
virtual void SetPosPixel(const Point &rAllocPos) override
static void setLayoutAllocation(vcl::Window &rWindow, const Point &rPos, const Size &rSize)
Image const & GetStandardWarningBoxImage()
virtual void RequestHelp(const HelpEvent &rHelpEvent) override
void sort_native_button_order(const VclBox &rContainer)
void SetFontSize(const Size &)
void arrange(const Size &rAllocation, tools::Long nFirstHeight, tools::Long nSecondHeight)
bool isVisibleInLayout(const vcl::Window *pWindow)
virtual void setSecondaryDimension(Size &rSize, tools::Long) const =0
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...
void set_border_width(sal_Int32 nBorderWidth)
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 OString &rKey, const OUString &rValue) override
OUString const & get_secondary_text() const
static void SetMessagesWidths(vcl::Window const *pParent, VclMultiLineEdit *pPrimaryMessage, VclMultiLineEdit *pSecondaryMessage)
sal_Int32 get_margin_bottom() const
void setWidth(tools::Long nWidth)
void designate_label(vcl::Window *pWindow)
static array_type assembleGrid(const VclGrid &rGrid)
VclBox * get_content_area()
void create_message_area()
virtual Size GetOptimalSize() const override
virtual void setAllocation(const Size &rAllocation) override
const CommandEvent * GetCommandEvent() const
VclPtr< vcl::Window > m_pLabel
void set_grid_left_attach(sal_Int32 nAttach)
OUString GetStandardText(StandardButtonType eButton)
void SetStyleSettings(const StyleSettings &rSet)
SAL_DLLPRIVATE float approximate_char_width() const
void SetMonoColor(const Color &rColor)
bool m_bVerticalContainer
std::unique_ptr< sal_Int32[]> pData
virtual ~VclPaned() override
OUString GetStandardErrorBoxText()
VclPtr< DisclosureButton > m_pDisclosureButton
virtual void StateChanged(StateChangedType nType) override
static Size getLayoutRequisition(const vcl::Window &rWindow)
OUString const & get_primary_text() const
VclPtr< VclMultiLineEdit > m_pSecondaryMessage
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
SAL_DLLPRIVATE void disposeOwnedButtons()
VclPtr< VclVBox > m_pMessageBox
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
SAL_DLLPRIVATE const tools::Rectangle & GetStateRect() const
const OUString & GetQuickHelpText() const
VclButtonsType m_eButtonsType
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
virtual Size GetSizePixel() const
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
void EnableCursor(bool bEnable)
void SetWeight(FontWeight)
WinBits const WB_AUTOVSCROLL
void set_row_spacing(int nSpacing)
virtual Size calculateRequisition() const override
tools::Long CalcTitleWidth() const
sal_uInt16 GetCode() const
VclPtr< VclBox > m_pOwnedContentArea
void set_spacing(int nSpacing)
virtual vcl::Window * get_child() override
const CommandWheelData * GetWheelData() const
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
void SetType(WindowType nType)
constexpr sal_uInt16 KEY_ADD
virtual void setAllocation(const Size &rAllocation) override
HelpEventMode GetMode() const
VclContainer(vcl::Window *pParent, WinBits nStyle=WB_HIDE|WB_CLIPCHILDREN)
virtual tools::Long getSecondaryDimension(const Size &rSize) const =0
static const OUString & GetDesktopEnvironment()
Get the desktop environment the process is currently running in.
void create_owned_areas()
virtual bool getPrimaryDimensionChildExpand(const vcl::Window &rWindow) const =0
sal_Int32 get_margin_start() const
virtual void set_position(tools::Long nPosition) override
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)
OUString GetStandardQueryBoxText()
constexpr tools::Long Width() const
virtual void KeyInput(const KeyEvent &rKEvt) override
rtl::Reference< TransferDataContainer > m_xTransferHelper
OUString GetAccessibleName() const
virtual void dispose() override
Link< OUString &, int > m_aGetSurroundingHdl
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
std::set< VclPtr< vcl::Window > > m_aWindows
const OUString & get_id() const
Get the ID of the window.
virtual void dispose() override
void set_ignore_hidden(bool bIgnoreHidden)
const vcl::Font & GetLabelFont() const
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
virtual Size calculateRequisition() const =0
WinBits const WB_DEFBUTTON
OUString get_label() const
enumrange< T >::Iterator begin(enumrange< T >)
VclMessageType m_eMessageType
bool IsMouseEvent() const
boost::multi_array< GridEntry, 2 > array_type
virtual OUString GetSurroundingText() const override
void reorderWithinParent(vcl::Window &rWindow, sal_uInt16 nNewPosition)
virtual FactoryFunction GetUITestFactory() const override
VclPtr< vcl::Window > mpLastChild
void set_default_response(int nResponse)
virtual ~VclHPaned() override
static bool compareValues(const VclGrid::Value &i, const VclGrid::Value &j)
void set_width_request(sal_Int32 nWidthRequest)
sal_uInt16 GetModifier() const
virtual OUString GetText() const
void set_mode(VclSizeGroupMode eMode)
virtual void Command(const CommandEvent &rCEvt) override
force balloon-style in ShowPopover and ShowQuickHelp
static tools::Long getMaxNonOutlier(const std::vector< tools::Long > &rG, tools::Long nAvgDimension)
static void encode(OUStringBuffer &aStrBuffer, const css::uno::Sequence< sal_Int8 > &aPass)
void * GetEventData() const
virtual void setPrimaryDimension(Size &rSize, tools::Long) const =0
bool get_secondary() const
TriState GetState() const
virtual Selection GetSurroundingTextSelection() const
Link< VclDrawingArea *, bool > m_aStartDragHdl
bool isContainerWindow(const vcl::Window &rWindow)
const Point & GetMousePosPixel() const
ImplSVData * ImplGetSVData()
Size getLegacyBestSizeForChildren(const vcl::Window &rWindow)
const OString & GetHelpId() const
Size finalizeMaxes(const Size &rSize, sal_uInt16 nVisibleChildren) const
virtual Size calculateRequisition() const override
virtual bool DeleteSurroundingText(const Selection &rSelection)
virtual bool DeleteSurroundingText(const Selection &rSelection) override
bool isEnabledInLayout(const vcl::Window *pWindow)
virtual bool set_property(const OString &rKey, const OUString &rValue) override
virtual ~VclFrame() override
virtual void setAllocation(const Size &rAllocation) override
void set_property(const OString &rKey, const OUString &rValue)
virtual OUString GetSurroundingText() const
VclPtr< VclButtonBox > m_pOwnedActionArea
bool get_expanded() const
void setOptimalLayoutSize(bool bAllowWindowShrink)
virtual void DumpAsPropertyTree(tools::JsonWriter &rJsonWriter) override
int get_default_response() const
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
std::unique_ptr< Image > mpDisclosureMinus
virtual void SetText(const OUString &rStr) override
virtual void setAllocation(const Size &rAllocation) override
void SetSplitHdl(const Link< Splitter *, void > &rLink)
OUString get_label() const
CommandWheelMode GetMode() const
virtual void SetSizePixel(const Size &rAllocation) override
static int getButtonPriority(std::u16string_view rType)
sal_Int32 get_margin_top() const
#define DEFAULT_CHILD_MIN_WIDTH
virtual sal_uInt16 getDefaultAccessibleRole() const override
void arrange(const Size &rAllocation, tools::Long nFirstHeight, tools::Long nSecondHeight)
Size calculateRequisitionForSpacings(sal_Int32 nRowSpacing, sal_Int32 nColSpacing) const
Image const & GetStandardErrorBoxImage()
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const AllSettings & GetSettings() const
CommandEventId GetCommand() const
virtual void setAllocation(const Size &rAllocation) override
sal_uInt16 GetModifier() const
virtual void Command(const CommandEvent &rCEvt) override
void add_button(PushButton *pButton, int nResponse, bool bTransferOwnership)
std::unique_ptr< WindowImpl > mpWindowImpl
const Size & GetFontSize() const
Size get_preferred_size() const
bool isLayoutEnabled(const vcl::Window *pWindow)
MouseNotifyEvent GetType() const
VclPtr< FixedImage > m_pImage
virtual void setPrimaryCoordinate(Point &rPos, tools::Long) const =0
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.
void SetToggleHdl(const Link< CheckBox &, void > &rLink)
void set_homogeneous(bool bHomogeneous)
virtual void dispose() override
void SetPaintTransparent(bool bTransparent)
void SetImage(const Image &rImage)
VclPtr< Splitter > m_pSplitter
bool get_row_homogeneous() const
virtual bool set_property(const OString &rKey, const OUString &rValue)
static void setLayoutPosSize(vcl::Window &rWindow, const Point &rPos, const Size &rSize)
void reorderWithinParent(sal_uInt16 nNewPosition)
FactoryFunction m_pFactoryFunction
void Check(bool bCheck=true)
VclPackType get_pack_type() const
bool get_orientation() const
Point ScreenToOutputPixel(const Point &rPos) const
static void ShowQuickHelp(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rHelpText, QuickHelpFlags nStyle=QuickHelpFlags::NONE)
vcl::Window * GetParent() const
sal_Int32 get_margin_end() const
void SetStyle(WinBits nStyle)
enumrange< T >::Iterator end(enumrange< T >)
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual tools::Long getPrimaryCoordinate(const Point &rPos) const =0
vcl::Window * GetWindow(GetWindowType nType) const
const Point & GetMousePosPixel() const
virtual Size calculateRequisition() const override
void set_grid_top_attach(sal_Int32 nAttach)
bool m_bInitialAllocation
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
#define DEFAULT_CHILD_MIN_HEIGHT
virtual void setAllocation(const Size &rAllocation) override
VclButtonBox * get_action_area()
void set_id(const OUString &rID)
Sets an ID.
static ErrCode Export(SvStream &rOStm, const Graphic &rGraphic, ConvertDataFormat nFormat)
VclPtr< VclGrid > m_pGrid
void AddEventListener(const Link< VclWindowEvent &, void > &rEventListener)
void set_valign(VclAlign eAlign)
const vcl::KeyCode & GetKeyCode() const
virtual FactoryFunction GetUITestFactory() const override
virtual void StateChanged(StateChangedType nStateChange) override
virtual ~VclVPaned() override
std::unique_ptr< char[]> aBuffer
OUString GetStandardInfoBoxText()
void SetMaxTextWidth(tools::Long nMaxWidth)
virtual ~MessageDialog() override
virtual vcl::Window * get_child() override
constexpr sal_uInt16 KEY_SUBTRACT
VclVPaned(vcl::Window *pParent)
void set_hexpand(bool bExpand)
bool get_column_homogeneous() const
#define SAL_WARN_IF(condition, area, stream)
constexpr tools::Long Height() const
void set_expanded(bool bExpanded)
void set_label(const OUString &rLabel)
virtual tools::Long getPrimaryDimension(const Size &rSize) const =0
VclExpander(vcl::Window *pParent)
virtual void setAllocation(const Size &rAllocation) override
bool toBool(std::u16string_view rValue)
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
vcl::Window * get_label_widget()
virtual vcl::Window * get_child() override
#define SAL_INFO(area, stream)
virtual void StartDrag(sal_Int8 nAction, const Point &rPosPixel) override
VclPtr< EventBoxHelper > m_aEventBoxHelper
void set_column_spacing(int nSpacing)
virtual Size calculateRequisition() const override
void EnableChildTransparentMode(bool bEnable=true)
virtual OUString getDefaultAccessibleName() const override
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
VclPtr< VclMultiLineEdit > m_pPrimaryMessage
virtual void SetText(const OUString &rStr) override
tools::Long AdjustWidth(tools::Long n)
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
virtual Size calculateRequisition() const override
void set_content_area(VclBox *pBox)
void set_action_area(VclButtonBox *pBox)
Sequence< sal_Int8 > aSeq
virtual Size calculateRequisition() const override
VclAlign get_valign() const
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
MessageDialog(vcl::Window *pParent, WinBits nStyle)
Link< tools::Rectangle &, OUString > m_aQueryTooltipHdl
WinBits const WB_AUTOHSCROLL
void set(reference_type *pBody)
VclPtr< vcl::Window > mpFirstChild
tools::Long AdjustHeight(tools::Long n)
virtual ~VclEventBox() override
SAL_DLLPRIVATE const tools::Rectangle & GetMouseRect() const
Link< const Selection &, bool > m_aDeleteSurroundingHdl
Size GetOutputSizePixel() const
IMPL_LINK(VclFrame, WindowEventListener, VclWindowEvent &, rEvent, void)
std::unique_ptr< Image > mpDisclosurePlus
vcl::Window * getNonLayoutParent(vcl::Window *pWindow)
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize) override
void setHeight(tools::Long nHeight)
virtual void set_position(tools::Long nPosition) override
OUString GetStandardWarningBoxText()
void set_secondary_text(const OUString &rSecondaryString)
reference_type * get() const
Get the body.
#define SAL_WARN(area, stream)
void RemoveEventListener(const Link< VclWindowEvent &, void > &rEventListener)
virtual Size calculateRequisition() const override
virtual void setAllocation(const Size &rAllocation) override
OUString m_sPrimaryString
void set_primary_text(const OUString &rPrimaryString)
Point OutputToScreenPixel(const Point &rPos) const
WinBits const WB_CLOSEABLE
WinBits const WB_MOVEABLE
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout) override
Image const & GetStandardQueryBoxImage()
void accumulateMaxes(const Size &rChildSize, Size &rSize) const
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
virtual void StateChanged(StateChangedType nType) override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
int get_row_spacing() const
void set_label(const OUString &rLabel)
WinBits const WB_CLIPCHILDREN
WinBits const WB_NOTABSTOP
virtual void SetPosPixel(const Point &rNewPos)
IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl, ScrollBar *, void)
virtual void SetText(const OUString &rStr) override
sal_Int32 get_border_width() const
VclPaned(vcl::Window *pParent, bool bVertical)
SAL_DLLPRIVATE void DoInitialLayout()
void trigger_queue_resize()
VclHPaned(vcl::Window *pParent)
tools::Long get_position() const
static bool isNullGrid(const array_type &A)
bool m_bDetectedRangeSegmentation false
VclAlign get_halign() const
static void calcMaxs(const array_type &A, std::vector< VclGrid::Value > &rWidths, std::vector< VclGrid::Value > &rHeights)
OUString m_sSecondaryString
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
virtual bool set_property(const OString &rKey, const OUString &rValue) override
vcl::Window * get_label_widget()