39 #include <strings.hrc>
48 #include <com/sun/star/uno/Reference.h>
49 #include <com/sun/star/lang/XComponent.hpp>
50 #include <com/sun/star/accessibility/XAccessible.hpp>
52 #include <rtl/ustrbuf.hxx>
57 #include <string_view>
73 #define EXTRAITEMHEIGHT 4
74 #define SPACE_AROUND_TITLE 4
79 static int nAccelDisabled = -1;
81 if( nAccelDisabled == -1 )
85 getValue(
"Menu",
"SuppressAccelerators" );
86 nAccelDisabled = aStr.equalsIgnoreAsciiCase(
"true") ? 1 : 0;
88 return nAccelDisabled == 1;
96 else if ( pData->
aText.isEmpty() )
127 int linewidth = 1 * fScaleFactor;
128 int space = 4 * fScaleFactor;
134 if ( height % 2 == 0 )
148 if( height <= heightOrig / 2 + 1) x--;
152 rRenderContext.
Pop();
159 : mpFirstDel(nullptr),
161 pStartedFrom(nullptr),
198 css::uno::Reference< css::lang::XComponent> xComponent(
mxAccessible, css::uno::UNO_QUERY );
199 if ( xComponent.is() )
200 xComponent->dispose();
210 pDelData->
mpMenu =
nullptr;
211 pDelData = pDelData->
mpNext;
242 for ( n = 0; n <
pItemList->size(); n++ )
248 for ( n = 0; n <
pItemList->size(); n++ )
271 if ( pStartMenu && ( pStartMenu !=
this ) )
314 if ( pStartMenu && ( pStartMenu !=
this ) )
363 if (!pStartMenu || (pStartMenu ==
this))
371 void Menu::ImplSelectWithStart(
Menu* pSMenu )
377 if( pOldStartedFrom )
378 pOldStartedFrom->pStartedFrom = pOldStartedStarted;
399 for (
const auto& rLink : aCopy )
402 rLink.Call( aEvent );
418 const OUString& rStr,
Menu* pMenu,
419 size_t nPos,
const OString &rIdent)
423 nBits, rStr, pMenu, nPos, rIdent);
433 const OString &rIdent, sal_uInt16 nPos)
435 SAL_WARN_IF( !nItemId,
"vcl",
"Menu::InsertItem(): ItemId == 0" );
437 "Menu::InsertItem(): ItemId already exists" );
458 MenuItemBits nItemBits,
const OString &rIdent, sal_uInt16 nPos)
460 InsertItem(nItemId, OUString(), nItemBits, rIdent, nPos);
466 const OString &rIdent, sal_uInt16 nPos)
468 InsertItem(nItemId, rStr, nItemBits, rIdent, nPos);
483 pItemList->InsertSeparator(rIdent, nPos);
498 bool bRemove =
false;
537 "Menu::CopyItem(): ItemId already exists" );
545 pThis->
InsertItem( nId, pData->aText, pData->aImage, pData->nBits, pData->sIdent, nNewPos );
547 pThis->
InsertItem( nId, pData->aText, pData->nBits, pData->sIdent, nNewPos );
549 pThis->
InsertItem( nId, pData->aImage, pData->nBits, pData->sIdent, nNewPos );
579 return static_cast<sal_uInt16
>(
pItemList->size());
584 sal_uInt16 nItems = 0;
605 for (
size_t n = nPos;
n; )
638 if (pData && pData->
sIdent == rIdent)
650 return static_cast<sal_uInt16
>(nPos);
668 return pData ? pData->
sIdent : OString();
676 if (pData && (pData->
nBits != nBits))
678 pData->
nBits = nBits;
691 nBits = pData->
nBits;
723 if ( static_cast<PopupMenu*>(pData->
pSubMenu.
get()) == pMenu )
745 oldSubMenu.disposeAndClear();
794 sal_Int32
nPos = pData->
aText.indexOf(
'~' );
795 if( nPos != -1 && nPos < pData->aText.getLength()-1 )
797 sal_uInt16
nCode = 0;
799 if( cAccel >=
'a' && cAccel <=
'z' )
800 nCode =
KEY_A + (cAccel-
'a');
801 else if( cAccel >=
'A' && cAccel <=
'Z' )
802 nCode =
KEY_A + (cAccel-
'A');
803 else if( cAccel >=
'0' && cAccel <=
'9' )
804 nCode =
KEY_0 + (cAccel-
'0');
818 if ( !pData || pData->
bChecked == bCheck )
826 sal_uInt16 nGroupPos;
833 pGroupData =
pItemList->GetDataFromPos( nGroupPos-1 );
851 while ( nGroupPos < nItemCount )
853 pGroupData =
pItemList->GetDataFromPos( nGroupPos );
899 if ( !(pItemData && ( pItemData->
bEnabled != bEnable )) )
910 for (
size_t n = 0;
n < nCount;
n++ )
944 SAL_WARN_IF(
IsMenuBar() && !bVisible ,
"vcl",
"Menu::ShowItem - ignored for menu bar entries!");
951 SAL_WARN(
"vcl",
"Menu::ShowItem - ignored for visible popups!" );
969 if ( rStr == pData->
aText )
1090 pData->
aHelpText = pHelp->
GetHelpText( OStringToOUString( pData->
aHelpId, RTL_TEXTENCODING_UTF8 ), static_cast<weld::Widget*>(
nullptr) );
1136 if ( !pData->
aHelpId.isEmpty() )
1155 for ( sal_uInt16
i = 0;
i < nCount;
i++ )
1203 for( n = nPos + 1; n < nCount; n++ )
1205 pNextData =
pItemList->GetDataFromPos( n );
1206 if( pNextData && pNextData->
bVisible )
1220 for( n = nPos; n > 0; n-- )
1222 pNextData =
pItemList->GetDataFromPos( n-1 );
1223 if( pNextData && pNextData->
bVisible )
1246 pData->
sIdent ==
".uno:Cut" || pData->
sIdent ==
".uno:Copy" || pData->
sIdent ==
".uno:Paste" )
1269 bool bSelectable =
true;
1274 bSelectable =
false;
1294 css::uno::Reference<css::accessibility::XAccessibleContext> xParentContext( xParent->getAccessibleContext() );
1295 if (xParentContext.is())
1296 return xParentContext->getAccessibleChild(
i );
1319 rCheckHeight = rRadioHeight = 0;
1332 aNativeBounds, aNativeContent))
1334 rCheckHeight = aNativeBounds.
GetHeight() - 1;
1335 nCheckWidth = aNativeContent.
GetWidth() - 1;
1342 aNativeBounds, aNativeContent))
1344 rRadioHeight = aNativeBounds.
GetHeight() - 1;
1345 nRadioWidth = aNativeContent.
GetWidth() - 1;
1349 return Size(std::max(nCheckWidth, nRadioWidth), std::max(rCheckHeight, rRadioHeight));
1362 aVal, aNativeBounds, aNativeContent))
1375 SAL_WARN_IF( rDel.
mpMenu,
"vcl",
"Menu::ImplAddDel(): cannot add ImplMenuDelData twice !" );
1394 while ( pData && (pData->
mpNext != &rDel) )
1397 SAL_WARN_IF( !pData,
"vcl",
"Menu::ImplRemoveDel(): ImplMenuDelData not registered !" );
1414 if( aMarkSize.
Height() > nMinMenuItemHeight )
1415 nMinMenuItemHeight = aMarkSize.
Height();
1422 if ( 16 > nMinMenuItemHeight )
1423 nMinMenuItemHeight = 16;
1434 if ( aImgSz.
Width() > aMaxImgWidth )
1435 aMaxImgWidth = aImgSz.
Width();
1436 if ( aImgSz.
Height() > nMinMenuItemHeight )
1437 nMinMenuItemHeight = aImgSz.
Height();
1479 nWidth += aMarkSize.
Width() + nExtra * 2;
1494 if ( nTextHeight > pData->
aSz.
Height() )
1501 pData->
aSz.
setHeight( std::max( std::max( nTextHeight, pData->
aSz.
Height() ), nMinMenuItemHeight ) );
1503 nWidth += nTextWidth;
1511 nAccWidth += nExtra;
1512 nWidth += nAccWidth;
1518 if ( nFontHeight > nWidth )
1519 nWidth += nFontHeight;
1521 pData->
aSz.
setHeight( std::max( std::max( nFontHeight, pData->
aSz.
Height() ), nMinMenuItemHeight ) );
1527 if ( nWidth > nMaxWidth )
1552 if ( nWidth > nMaxWidth )
1565 if( nMaxWidth > nScreenWidth/2 )
1566 nMaxWidth = nScreenWidth/2;
1568 sal_uInt16 gfxExtra =
static_cast<sal_uInt16
>(std::max( nExtra,
tools::Long(7) ));
1571 if( aMarkSize.
Height() > 0 )
1572 nImgOrChkWidth = aMarkSize.
Height() + nExtra;
1574 nImgOrChkWidth = nFontHeight/2 + gfxExtra;
1575 nImgOrChkWidth = std::max( nImgOrChkWidth, aMaxImgWidth + gfxExtra );
1587 nTextPos =
static_cast<sal_uInt16
>(2*nExtra);
1607 int nNativeHeight = aNativeBounds.
GetHeight();
1608 if( nNativeHeight > aSz.
Height() )
1616 if (aSz.
Height() < nCloseButtonHeight)
1625 bool bNativeOk =
false;
1644 RenderTools::DrawSelectionBackground(rRenderContext, rWindow, i_rRect, 0, i_bHighlight,
true,
false,
nullptr, 2, &aColor);
1650 sal_Int32
nPos = -1;
1656 if (nPos < aNonMnem.getLength() && i_rLong[nPos+1] == aNonMnem[nPos])
1658 OUString aTmp = OUString::Concat(aNonMnem.subView(0, nPos)) +
"~" + aNonMnem.subView(nPos);
1668 rRenderContext.
Push(PushFlags::FONT | PushFlags::FILLCOLOR);
1676 rRenderContext.
SetFont(aFont);
1690 aTextTopLeft.AdjustX((aBgRect.
getWidth() - aTextBoundRect.GetSize().Width()) / 2 );
1691 aTextTopLeft.AdjustY((aBgRect.
GetHeight() - aTextBoundRect.GetSize().Height()) / 2
1692 - aTextBoundRect.Top() );
1696 rRenderContext.
Pop();
1702 bool bHighlighted,
bool bLayout,
bool bRollover)
const
1714 Point aTopLeft, aTmpPos;
1716 int nOuterSpaceX = 0;
1720 aTopLeft.AdjustX(nOuterSpaceX );
1721 aTopLeft.AdjustY(
ImplGetSVData()->maNWFData.mnMenuFormatBorderY );
1735 bool bHiddenItems =
false;
1737 for (
size_t n = 0;
n < nCount;
n++)
1740 if (
ImplIsVisible(
n) && (!pThisItemOnly || (pData == pThisItemOnly)))
1750 else if (bHighlighted)
1760 if (!bRollover && !bHighlighted)
1763 else if (bHighlighted)
1767 Point aPos(aTopLeft);
1768 aPos.AdjustY(nBorder );
1769 aPos.AdjustY(nStartY );
1794 bool bNativeOk =
false;
1807 aItemRect, nState, aVal, OUString());
1811 aTmpPos.setY( aPos.Y() + ((pData->
aSz.
Height() - 2) / 2) );
1812 aTmpPos.setX( aPos.X() + 2 + nOuterSpaceX );
1814 rRenderContext.
DrawLine(aTmpPos,
Point(aOutSz.
Width() - 3 - 2 * nOuterSpaceX, aTmpPos.Y()));
1815 aTmpPos.AdjustY( 1 );
1817 rRenderContext.
DrawLine(aTmpPos,
Point(aOutSz.
Width() - 3 - 2 * nOuterSpaceX, aTmpPos.Y()));
1842 ? ControlPart::MenuItemRadioMark
1857 aTmpPos.setX( aOuterCheckRect.
Left() + (aOuterCheckRect.
GetWidth() - nCtrlHeight) / 2 );
1858 aTmpPos.setY( aOuterCheckRect.
Top() + (aOuterCheckRect.
GetHeight() - nCtrlHeight) / 2 );
1866 nState, aVal, OUString());
1877 aSymbolSize =
Size(nFontHeight / 2, nFontHeight / 2);
1882 aSymbolSize =
Size((nFontHeight * 25) / 40, nFontHeight / 2);
1884 aTmpPos.setX( aOuterCheckRect.
Left() + (aOuterCheckRect.
GetWidth() - aSymbolSize.
Width()) / 2 );
1885 aTmpPos.setY( aOuterCheckRect.
Top() + (aOuterCheckRect.
GetHeight() - aSymbolSize.
Height()) / 2 );
1901 aTmpPos = aOuterCheckRect.
TopLeft();
1904 rRenderContext.
DrawImage(aTmpPos, aImage, nImageStyle);
1910 aTmpPos.setX( aPos.X() +
nTextPos );
1911 aTmpPos.setY( aPos.Y() );
1912 aTmpPos.AdjustY(nTextOffsetY );
1917 std::vector< tools::Rectangle >* pVector = bLayout ? &
mpLayoutData->m_aUnicodeBoundRects :
nullptr;
1918 OUString* pDisplayText = bLayout ? &
mpLayoutData->m_aDisplayText :
nullptr;
1929 bool bSetTmpBackground = !rRenderContext.
IsBackground()
1931 if (bSetTmpBackground)
1938 tools::Long nMaxItemTextWidth = aOutSz.
Width() - aTmpPos.X() - nExtra - nOuterSpaceX;
1942 nMaxItemTextWidth -= rRenderContext.
GetTextWidth(aAccText) + 3 * nExtra;
1946 nMaxItemTextWidth -= nFontHeight - nExtra;
1949 OUString aItemText(pData->
aText);
1954 if (nMaxItemTextWidth < rRenderContext.
GetTextWidth(aItemText))
1958 bHiddenItems =
true;
1968 if (aItemText != pData->
aText)
1972 rRenderContext.
DrawCtrlText(aTmpPos, aItemText, 0, aItemText.getLength(),
1973 nStyle, pVector, pDisplayText, pGlyphs);
1974 if (bSetTmpBackground)
1983 aTmpPos.AdjustX( -(4 * nExtra) );
1985 aTmpPos.AdjustX( -nOuterSpaceX );
1986 aTmpPos.setY( aPos.Y() );
1987 aTmpPos.AdjustY(nTextOffsetY );
1988 rRenderContext.
DrawCtrlText(aTmpPos, aAccText, 0, aAccText.getLength(), nTextStyle);
1994 bool bNativeOk =
false;
2003 aTmpSz =
Size(nFontHeight, nFontHeight);
2004 aSpacing = nOuterSpaceX;
2012 aTmpPos.setX( aOutSz.
Width() - aTmpSz.
Width() - aSpacing - nOuterSpaceX );
2013 aTmpPos.setY( aPos.Y() + ( pData->
aSz.
Height() - aTmpSz.
Height() ) / 2 );
2014 aTmpPos.AdjustY(nExtra / 2 );
2019 aItemRect, nState, aVal, OUString());
2023 aTmpPos.setX( aOutSz.
Width() - nFontHeight + nExtra - nOuterSpaceX );
2024 aTmpPos.setY( aPos.Y() );
2025 aTmpPos.AdjustY(nExtra/2 );
2026 aTmpPos.AdjustY((pData->
aSz.
Height() / 2) - (nFontHeight / 4) );
2030 Point aTmpPos2(aPos);
2031 aTmpPos2.setX( aOutSz.
Width() - nFontHeight - nFontHeight/4 );
2041 if (pThisItemOnly && bHighlighted)
2063 aTopLeft.AdjustX(pData->
aSz.
Width() );
2069 sal_Int32 nSize = nFontHeight;
2071 lclDrawMoreIndicator(rRenderContext, aRectangle);
2077 Menu* pStart =
this;
2127 Menu* pSelMenu =
nullptr;
2133 if( pData->
nId == nItemId )
2146 bool bRemove =
false;
2206 nullptr,
false,
true);
2261 std::map< sal_uInt16, tools::Rectangle >::const_iterator it =
mpLayoutData->m_aVisibleItemBoundRects.find( nPos );
2262 if( it !=
mpLayoutData->m_aVisibleItemBoundRects.end() )
2310 Menu* pMenu =
const_cast<Menu*
>(
this);
2360 : mbCloseBtnVisible(
false),
2361 mbFloatBtnVisible(
false),
2362 mbHideBtnVisible(
false),
2369 : mbCloseBtnVisible(
false),
2370 mbFloatBtnVisible(
false),
2371 mbHideBtnVisible(
false),
2444 if (!pMenuBarWindow)
2449 pMenu->pStartedFrom =
nullptr;
2451 pMenuBarWindow->
SetMenu(pMenu);
2468 if (pWindow && bDelete)
2475 pMenu->pWindow =
nullptr;
2476 if (pMenu->mpSalMenu) {
2477 pMenu->mpSalMenu->ShowMenuBar(
false);
2610 return pMenuWin ? pMenuWin->
AddMenuBarButton(i_rImage, i_rLink, i_rToolTip) : 0;
2653 return nMenubarHeight;
2750 ENSURE_OR_RETURN( pExecWindow,
"PopupMenu::Execute: need a non-NULL window!", 0 );
2765 return ImplExecute( pExecWindow, rRect, nPopupModeFlags,
nullptr,
false );
2796 bool bRealExecute =
false;
2800 xFocusId = Window::SaveFocus();
2801 bRealExecute =
true;
2845 if ( !nVisibleEntries )
2847 OUString aTmpEntryText(
VclResId(SV_RESID_STRING_NOSELECTIONPOSSIBLE));
2864 assert(xNotifierParent && xNotifierParent->
GetLOKNotifier() &&
"editview menu without LOKNotifier");
2904 nMaxHeight = std::min(nMaxHeight, std::max(nHeightAbove, nHeightBelow));
2910 "Available height misdetected as " << nMaxHeight
2911 <<
"px. Setting to 768px instead.");
2912 nMaxHeight = std::max(nMaxHeight,
tools::Long(768));
2916 sal_Int32 nLeft, nTop, nRight, nBottom;
2918 nMaxHeight -= nTop+nBottom;
2919 if ( aSz.
Height() > nMaxHeight )
2940 ImplClosePopupToolBox(pW);
2952 aPos = static_cast<MenuBarWindow *>(pSFrom->
pWindow.
get())->GetHighlightedItem();
2960 if ( bPreSelectFirst )
2963 for (
size_t n = 0;
n < nCount;
n++ )
2986 assert(xFocusId ==
nullptr &&
"Focus should already be restored by MenuFloatingWindow::End");
3000 ImplClosePopupToolBox(pW);
3013 sal_uInt16 nVisEntries = 0;
3018 for (
size_t n = nStartEntry;
n < nEntries;
n++ )
3024 if ( nHeight > nMaxHeight )
3039 sal_uInt16 nFound = 0;
3040 for (
size_t n = 0; ( nFound < nEntries ) && ( n < pItemList->
size() );
n++ )
3068 const_cast< Menu*
>( pMenu )->ImplAddDel( *
this );
3074 const_cast< Menu*
>(
mpMenu.
get() )->ImplRemoveDel( *
this );
#define LINK(Instance, Class, Member)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Size GetSizePixel() const
const Color & GetTextColor() const
const Color & GetShadowColor() const
bool IsInputEnabled() const
const Wallpaper & GetBackground() const
void StartPopupMode(const tools::Rectangle &rRect, FloatWinPopupFlags nFlags)
WinBits const WB_SYSTEMWINDOW
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...
const Color & GetMenuBarTextColor() const
void setWidth(tools::Long nWidth)
bool GetNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
Query the native control's actual drawing region (including adornment)
static Help * GetHelp()
Gets the application's help.
std::unique_ptr< sal_Int32[]> pData
bool IsBackground() const
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
constexpr sal_uInt16 KEY_A
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
constexpr sal_uInt16 KEY_0
VclPtr< PopupMenu > mpActivePopupMenu
const Color & GetFaceColor() const
static bool IsCycleKey(const vcl::KeyCode &rKeyCode)
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
virtual Size GetSizePixel() const
SAL_DLLPRIVATE WindowImpl * ImplGetWindowImpl() const
void SetWeight(FontWeight)
void SetLOKNotifier(const vcl::ILibreOfficeKitNotifier *pNotifier, bool bParent=false)
Interface to register for dialog / window tunneling.
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
Post a user event to the default window.
sal_uInt16 GetCode() const
static bool IsUnifiedDisplay()
Determines if the screens that make up a display are separate or form one large display area...
void setTristateVal(ButtonValue nTristate)
virtual OUString GetHelpText(const OUString &aHelpURL, const weld::Widget *pWidget)
tools::Rectangle GetDesktopRectPixel() const
OUString CreateMnemonic(const OUString &rKey)
virtual css::uno::Reference< css::awt::XPopupMenu > CreateMenuInterface(PopupMenu *pPopupMenu)=0
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
const Color & GetHighlightColor() const
const Color & GetMenuHighlightTextColor() const
constexpr tools::Long Width() const
WindowBorderStyle GetBorderStyle() const
VclPtr< vcl::Window > GetParentWithLOKNotifier()
Find the nearest parent with LOK Notifier; can be itself if this Window has LOK notifier set...
const vcl::Font & GetFont() const
OUString GetEllipsisString(const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
const Color & GetLightColor() const
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, o3tl::span< const sal_Int32 > pDXArray={}, const SalLayoutGlyphs *pGlyphs=nullptr) const
Return the exact bounding rectangle of rStr.
void SetBorderStyle(WindowBorderStyle nBorderStyle)
virtual void SetOutputSizePixel(const Size &rNewSize)
tools::Long GetCtrlTextWidth(const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
void SetAccessible(const css::uno::Reference< css::accessibility::XAccessible > &)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
const Color & GetMenuTextColor() const
static void ImplCallEventListeners(VclSimpleEvent &rEvent)
Send event to all VCL application event listeners.
void DrawRect(const tools::Rectangle &rRect)
const Color & GetMenuColor() const
OUString VclResId(TranslateId aId)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
Remove user event based on event ID.
ImplSVData * ImplGetSVData()
static tools::Rectangle GetScreenPosSizePixel(unsigned int nScreen)
Get a screen's rectangular area.
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
const Color & GetMenuBarColor() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
const Color & GetMenuBarHighlightTextColor() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const AllSettings & GetSettings() const
#define ENSURE_OR_RETURN(c, m, r)
void SetTextColor(const Color &rColor)
bool GetNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
Query the native control's actual drawing region (including adornment)
bool IsInModalMode() const
A window is in modal mode if one of its children or subchildren is a running modal window (a modal di...
SalFrameGeometry maGeometry
absolute, unmirrored values
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.
const AllSettings & GetSettings() const
static unsigned int GetScreenCount()
Get the number of screens available for the display.
static SAL_DLLPRIVATE unsigned int GetBestScreen(const tools::Rectangle &)
Get the "best" screen.
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
constexpr sal_uInt16 KEY_MOD2
void DrawCtrlText(const Point &rPos, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, DrawTextFlags nStyle=DrawTextFlags::Mnemonic, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr)
vcl::Window * GetParent() const
SystemWindow * GetFloatingWindow(const vcl::Window *pWin)
Point OutputToAbsoluteScreenPixel(const Point &rPos) const
float GetDPIScaleFactor() const
bool IsInPopupMode(const vcl::Window *pWin)
vcl::Window * GetWindow(GetWindowType nType) const
SAL_DLLPRIVATE void ImplEndPopupMode(FloatWinPopupEndFlags nFlags, const VclPtr< vcl::Window > &xFocusId)
virtual void KeyInput(const KeyEvent &rKEvt)
void GetBorder(sal_Int32 &rLeftBorder, sal_Int32 &rTopBorder, sal_Int32 &rRightBorder, sal_Int32 &rBottomBorder) const
A construction helper for a temporary VclPtr.
const vcl::KeyCode & GetKeyCode() const
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible(Menu *pMenu, bool bIsMenuBar)=0
DockingManager * ImplGetDockingManager()
bool GetUseImagesInMenus() const
#define SAL_WARN_IF(condition, area, stream)
constexpr tools::Long Height() const
void SetFont(const vcl::Font &rNewFont)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
::OutputDevice const * GetOutDev() const
tools::Long AdjustWidth(tools::Long n)
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
const vcl::Font & GetFont() const
bool GetSkipDisabledInMenus() const
tools::Long AdjustHeight(tools::Long n)
VclPtr< FloatingWindow > mpFirstFloat
virtual std::unique_ptr< SalMenu > CreateMenu(bool bMenuBar, Menu *pMenu)
Size GetOutputSizePixel() const
void setHeight(tools::Long nHeight)
WindowType GetType() const
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
reference_type * get() const
Get the body.
const vcl::ILibreOfficeKitNotifier * GetLOKNotifier() const
#define SAL_WARN(area, stream)
void DrawSymbol(const tools::Rectangle &rRect, SymbolType eType, const Color &rColor, DrawSymbolFlags nStyle=DrawSymbolFlags::NONE)
void SetFont(const vcl::Font &rNewFont)
Point OutputToScreenPixel(const Point &rPos) const
static UnoWrapperBase * GetUnoWrapper(bool bCreateIfNotExists=true)
Get the application's UNO wrapper object.
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
bool IsInPopupMenuExecute()
static SettingsConfigItem * get()
bool IsReallyVisible() const
const Color & GetMenuBarRolloverTextColor() const
static OUString GetNonMnemonicString(const OUString &rStr, sal_Int32 &rMnemonicPos)
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
void RegisterMnemonic(const OUString &rKey)
void EndPopupMode(FloatWinPopupEndFlags nFlags=FloatWinPopupEndFlags::NONE)
unsigned int nDisplayScreenNumber
ImplSVWinData * mpWinData
bool m_bDetectedRangeSegmentation false