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>
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() )
118 rRenderContext.
Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
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;
271 if ( pStartMenu && ( pStartMenu !=
this ) )
292 if (
pData->bIsTemporary )
314 if ( pStartMenu && ( pStartMenu !=
this ) )
363 if (!pStartMenu || (pStartMenu ==
this))
371void Menu::ImplSelectWithStart(
Menu* pSMenu )
377 if( pOldStartedFrom )
378 pOldStartedFrom->pStartedFrom = pOldStartedStarted;
399 for (
const auto& rLink : aCopy )
418 const OUString& rStr,
Menu* pMenu,
419 size_t nPos,
const OUString &rIdent)
423 nBits, rStr, pMenu,
nPos, rIdent);
433 const OUString &rIdent, sal_uInt16 nPos)
435 SAL_WARN_IF( !nItemId,
"vcl",
"Menu::InsertItem(): ItemId == 0" );
437 "Menu::InsertItem(): ItemId already exists" );
458 MenuItemBits nItemBits,
const OUString &rIdent, sal_uInt16 nPos)
466 const OUString &rIdent, sal_uInt16 nPos)
498 bool bRemove =
false;
537 "Menu::CopyItem(): ItemId already exists" );
579 return static_cast<sal_uInt16
>(
pItemList->size());
584 sal_uInt16 nItems = 0;
605 for (
size_t n =
nPos;
n; )
650 return static_cast<sal_uInt16
>(
nPos);
678 pData->nBits = nBits;
691 nBits =
pData->nBits;
700 if (
pData->aUserValueReleaseFunc)
701 pData->aUserValueReleaseFunc(
pData->nUserValue);
702 pData->aUserValueReleaseFunc = aFunc;
703 pData->nUserValue = nUserValue;
727 auto oldSubMenu =
pData->pSubMenu;
730 pData->pSubMenu = pMenu;
733 if (
pData->pSubMenu )
734 pData->pSubMenu->pStartedFrom =
nullptr;
745 oldSubMenu.disposeAndClear();
768 if (
pData->aAccelKey == rKeyCode )
771 pData->aAccelKey = rKeyCode;
783 return pData->aAccelKey;
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' )
801 else if( cAccel >=
'A' && cAccel <=
'Z' )
803 else if( cAccel >=
'0' && cAccel <=
'9' )
826 sal_uInt16 nGroupPos;
833 pGroupData =
pItemList->GetDataFromPos( nGroupPos-1 );
851 while ( nGroupPos < nItemCount )
853 pGroupData =
pItemList->GetDataFromPos( nGroupPos );
869 pData->bChecked = bCheck;
891 return pData->bChecked;
899 if ( !(pItemData && ( pItemData->
bEnabled != bEnable )) )
918 nX +=
pData->aSz.Width();
936 return pData->bEnabled;
951 SAL_WARN(
"vcl",
"Menu::ShowItem - ignored for visible popups!" );
969 if ( rStr ==
pData->aText )
974 pData->aTextGlyphs.Invalidate();
1011 pData->aImage = rImage;
1024 return pData->aImage;
1035 pData->aCommandStr = rCommand;
1043 return pData->aCommandStr;
1053 pData->aHelpCommandStr = rStr;
1061 return pData->aHelpCommandStr;
1071 pData->aHelpText = rStr;
1081 if (
pData->aHelpText.isEmpty() &&
1082 (( !
pData->aHelpId.isEmpty() ) || ( !
pData->aCommandStr.isEmpty() )))
1087 if (!
pData->aCommandStr.isEmpty())
1089 if (
pData->aHelpText.isEmpty() && !
pData->aHelpId.isEmpty())
1095 if (
pData->aHelpText.isEmpty())
1096 return pData->aAccessibleDescription;
1097 return pData->aHelpText;
1110 pData->aTipHelpText = rStr;
1118 return pData->aTipHelpText;
1128 pData->aHelpId = rHelpId;
1139 if ( !
pData->aHelpId.isEmpty() )
1140 aRet =
pData->aHelpId;
1142 aRet =
pData->aCommandStr;
1158 for ( sal_uInt16
i = 0;
i <
nCount;
i++ )
1209 if( pNextData && pNextData->
bVisible )
1225 pNextData =
pItemList->GetDataFromPos(
n-1 );
1226 if( pNextData && pNextData->
bVisible )
1248 if (
pData->aCommandStr ==
".uno:Cut" ||
pData->aCommandStr ==
".uno:Copy" ||
pData->aCommandStr ==
".uno:Paste" ||
1249 pData->sIdent ==
".uno:Cut" ||
pData->sIdent ==
".uno:Copy" ||
pData->sIdent ==
".uno:Paste" )
1272 bool bSelectable =
true;
1277 bSelectable =
false;
1297 css::uno::Reference<css::accessibility::XAccessibleContext> xParentContext( xParent->getAccessibleContext() );
1298 if (xParentContext.is())
1299 return xParentContext->getAccessibleChild(
i );
1322 rCheckHeight = rRadioHeight = 0;
1335 aNativeBounds, aNativeContent))
1337 rCheckHeight = aNativeBounds.
GetHeight() - 1;
1338 nCheckWidth = aNativeContent.
GetWidth() - 1;
1345 aNativeBounds, aNativeContent))
1347 rRadioHeight = aNativeBounds.
GetHeight() - 1;
1348 nRadioWidth = aNativeContent.
GetWidth() - 1;
1352 return Size(std::max(nCheckWidth, nRadioWidth), std::max(rCheckHeight, rRadioHeight));
1365 aVal, aNativeBounds, aNativeContent))
1378 SAL_WARN_IF( rDel.
mpMenu,
"vcl",
"Menu::ImplAddDel(): cannot add ImplMenuDelData twice !" );
1400 SAL_WARN_IF( !
pData,
"vcl",
"Menu::ImplRemoveDel(): ImplMenuDelData not registered !" );
1417 if( aMarkSize.
Height() > nMinMenuItemHeight )
1418 nMinMenuItemHeight = aMarkSize.
Height();
1425 if ( 16 > nMinMenuItemHeight )
1426 nMinMenuItemHeight = 16;
1436 Size aImgSz =
pData->aImage.GetSizePixel();
1437 if ( aImgSz.
Width() > aMaxImgWidth )
1438 aMaxImgWidth = aImgSz.
Width();
1439 if ( aImgSz.
Height() > nMinMenuItemHeight )
1440 nMinMenuItemHeight = aImgSz.
Height();
1453 pData->aSz.setHeight( 0 );
1454 pData->aSz.setWidth( 0 );
1463 pData->aSz.setHeight( 4 );
1472 if (aImgHeight >
pData->aSz.Height())
1473 pData->aSz.setHeight(aImgHeight);
1482 nWidth += aMarkSize.
Width() + nExtra * 2;
1497 if ( nTextHeight >
pData->aSz.Height() )
1498 pData->aSz.setHeight( nTextHeight );
1500 pData->aSz.setWidth( nTextWidth + 4*nExtra );
1504 pData->aSz.setHeight( std::max( std::max( nTextHeight,
pData->aSz.Height() ), nMinMenuItemHeight ) );
1506 nWidth += nTextWidth;
1514 nAccWidth += nExtra;
1515 nWidth += nAccWidth;
1521 if ( nFontHeight > nWidth )
1522 nWidth += nFontHeight;
1524 pData->aSz.setHeight( std::max( std::max( nFontHeight,
pData->aSz.Height() ), nMinMenuItemHeight ) );
1530 if ( nWidth > nMaxWidth )
1555 if ( nWidth > nMaxWidth )
1568 if( nMaxWidth > nScreenWidth/2 )
1569 nMaxWidth = nScreenWidth/2;
1571 sal_uInt16 gfxExtra =
static_cast<sal_uInt16
>(std::max( nExtra,
tools::Long(7) ));
1574 if( aMarkSize.
Height() > 0 )
1575 nImgOrChkWidth = aMarkSize.
Height() + nExtra;
1577 nImgOrChkWidth = nFontHeight/2 + gfxExtra;
1578 nImgOrChkWidth = std::max( nImgOrChkWidth, aMaxImgWidth + gfxExtra );
1590 nTextPos =
static_cast<sal_uInt16
>(2*nExtra);
1610 int nNativeHeight = aNativeBounds.
GetHeight();
1611 if( nNativeHeight > aSz.
Height() )
1619 if (aSz.
Height() < nCloseButtonHeight)
1628 bool bNativeOk =
false;
1647 RenderTools::DrawSelectionBackground(rRenderContext, rWindow, i_rRect, 0, i_bHighlight,
true,
false,
nullptr, 2, &aColor);
1653 sal_Int32
nPos = -1;
1659 if (
nPos < aNonMnem.getLength() && i_rLong[
nPos+1] == aNonMnem[
nPos])
1661 OUString aTmp = OUString::Concat(aNonMnem.subView(0,
nPos)) +
"~" + aNonMnem.subView(
nPos);
1671 rRenderContext.
Push(PushFlags::FONT | PushFlags::FILLCOLOR);
1679 rRenderContext.
SetFont(aFont);
1695 - aTextBoundRect.
Top() );
1699 rRenderContext.
Pop();
1705 bool bHighlighted,
bool bLayout,
bool bRollover)
const
1717 Point aTopLeft, aTmpPos;
1719 int nOuterSpaceX = 0;
1723 aTopLeft.AdjustX(nOuterSpaceX );
1724 aTopLeft.AdjustY(
ImplGetSVData()->maNWFData.mnMenuFormatBorderY );
1738 bool bHiddenItems =
false;
1753 else if (bHighlighted)
1763 if (!bRollover && !bHighlighted)
1766 else if (bHighlighted)
1770 Point aPos(aTopLeft);
1772 aPos.AdjustY(nStartY );
1778 nTextOffsetY += (aOutSz.
Height()-
pData->aSz.Height()) / 2;
1797 bool bNativeOk =
false;
1810 aItemRect,
nState, aVal, OUString());
1814 aTmpPos.setY( aPos.Y() + ((
pData->aSz.Height() - 2) / 2) );
1815 aTmpPos.setX( aPos.X() + 2 + nOuterSpaceX );
1817 rRenderContext.
DrawLine(aTmpPos,
Point(aOutSz.
Width() - 3 - 2 * nOuterSpaceX, aTmpPos.Y()));
1818 aTmpPos.AdjustY( 1 );
1820 rRenderContext.
DrawLine(aTmpPos,
Point(aOutSz.
Width() - 3 - 2 * nOuterSpaceX, aTmpPos.Y()));
1850 if (
pData->bChecked)
1860 aTmpPos.setX( aOuterCheckRect.
Left() + (aOuterCheckRect.
GetWidth() - nCtrlHeight) / 2 );
1861 aTmpPos.setY( aOuterCheckRect.
Top() + (aOuterCheckRect.
GetHeight() - nCtrlHeight) / 2 );
1869 nState, aVal, OUString());
1871 else if (
pData->bChecked)
1880 aSymbolSize =
Size(nFontHeight / 2, nFontHeight / 2);
1885 aSymbolSize =
Size((nFontHeight * 25) / 40, nFontHeight / 2);
1887 aTmpPos.setX( aOuterCheckRect.
Left() + (aOuterCheckRect.
GetWidth() - aSymbolSize.
Width()) / 2 );
1888 aTmpPos.setY( aOuterCheckRect.
Top() + (aOuterCheckRect.
GetHeight() - aSymbolSize.
Height()) / 2 );
1899 if (
pData->bChecked)
1904 aTmpPos = aOuterCheckRect.
TopLeft();
1907 rRenderContext.
DrawImage(aTmpPos, aImage, nImageStyle);
1913 aTmpPos.setX( aPos.X() +
nTextPos );
1914 aTmpPos.setY( aPos.Y() );
1915 aTmpPos.AdjustY(nTextOffsetY );
1918 if (
pData->bIsTemporary)
1920 std::vector< tools::Rectangle >* pVector = bLayout ? &
mpLayoutData->m_aUnicodeBoundRects :
nullptr;
1921 OUString* pDisplayText = bLayout ? &
mpLayoutData->m_aDisplayText :
nullptr;
1932 bool bSetTmpBackground = !rRenderContext.
IsBackground()
1934 if (bSetTmpBackground)
1941 tools::Long nMaxItemTextWidth = aOutSz.
Width() - aTmpPos.X() - nExtra - nOuterSpaceX;
1944 OUString aAccText =
pData->aAccelKey.GetName();
1945 nMaxItemTextWidth -= rRenderContext.
GetTextWidth(aAccText) + 3 * nExtra;
1949 nMaxItemTextWidth -= nFontHeight - nExtra;
1952 OUString aItemText(
pData->aText);
1953 pData->bHiddenOnGUI =
false;
1957 if (nMaxItemTextWidth < rRenderContext.
GetTextWidth(aItemText))
1960 pData->bHiddenOnGUI =
true;
1961 bHiddenItems =
true;
1967 pData->bHiddenOnGUI =
false;
1971 if (aItemText !=
pData->aText)
1975 rRenderContext.
DrawCtrlText(aTmpPos, aItemText, 0, aItemText.getLength(),
1976 nStyle, pVector, pDisplayText, pGlyphs);
1977 if (bSetTmpBackground)
1984 OUString aAccText =
pData->aAccelKey.GetName();
1986 aTmpPos.AdjustX( -(4 * nExtra) );
1988 aTmpPos.AdjustX( -nOuterSpaceX );
1989 aTmpPos.setY( aPos.Y() );
1990 aTmpPos.AdjustY(nTextOffsetY );
1991 rRenderContext.
DrawCtrlText(aTmpPos, aAccText, 0, aAccText.getLength(), nTextStyle);
1997 bool bNativeOk =
false;
2006 aTmpSz =
Size(nFontHeight, nFontHeight);
2007 aSpacing = nOuterSpaceX;
2015 aTmpPos.setX( aOutSz.
Width() - aTmpSz.
Width() - aSpacing - nOuterSpaceX );
2016 aTmpPos.setY( aPos.Y() + (
pData->aSz.Height() - aTmpSz.
Height() ) / 2 );
2017 aTmpPos.AdjustY(nExtra / 2 );
2022 aItemRect,
nState, aVal, OUString());
2026 aTmpPos.setX( aOutSz.
Width() - nFontHeight + nExtra - nOuterSpaceX );
2027 aTmpPos.setY( aPos.Y() );
2028 aTmpPos.AdjustY(nExtra/2 );
2029 aTmpPos.AdjustY((
pData->aSz.Height() / 2) - (nFontHeight / 4) );
2033 Point aTmpPos2(aPos);
2034 aTmpPos2.setX( aOutSz.
Width() - nFontHeight - nFontHeight/4 );
2036 pData->aSz.Height())),
2044 if (pThisItemOnly && bHighlighted)
2064 aTopLeft.AdjustY(
pData->aSz.Height() );
2066 aTopLeft.AdjustX(
pData->aSz.Width() );
2072 sal_Int32 nSize = nFontHeight;
2074 lclDrawMoreIndicator(rRenderContext, aRectangle);
2080 Menu* pStart =
this;
2121 if (
pData->pSubMenu )
2122 pSelMenu =
pData->pSubMenu->ImplFindSelectMenu();
2130 Menu* pSelMenu =
nullptr;
2136 if(
pData->nId == nItemId )
2138 else if (
pData->pSubMenu )
2139 pSelMenu =
pData->pSubMenu->ImplFindMenu( nItemId );
2149 bool bRemove =
false;
2209 nullptr,
false,
true);
2264 std::map< sal_uInt16, tools::Rectangle >::const_iterator it =
mpLayoutData->m_aVisibleItemBoundRects.find(
nPos );
2265 if( it !=
mpLayoutData->m_aVisibleItemBoundRects.end() )
2276 if (
pData && !rStr.equals(
pData->aAccessibleName))
2278 pData->aAccessibleName = rStr;
2288 return pData->aAccessibleName;
2298 pData->aAccessibleDescription = rStr;
2305 if (
pData && !
pData->aAccessibleDescription.isEmpty())
2306 return pData->aAccessibleDescription;
2313 Menu* pMenu =
const_cast<Menu*
>(
this);
2363 : mbCloseBtnVisible(false),
2364 mbFloatBtnVisible(false),
2365 mbHideBtnVisible(false),
2372 : mbCloseBtnVisible(false),
2373 mbFloatBtnVisible(false),
2374 mbHideBtnVisible(false),
2447 if (!pMenuBarWindow)
2454 pMenuBarWindow->SetMenu(pMenu);
2464 pMenuBarWindow->SetHeight(nHeight);
2613 return pMenuWin ? pMenuWin->
AddMenuBarButton(i_rImage, i_rLink, i_rToolTip) : 0;
2656 return nMenubarHeight;
2686 p->KillActivePopup(pPopup);
2731 if(
pData->pSubMenu )
2766 return nPopupModeFlags;
2771 ENSURE_OR_RETURN( pExecWindow,
"PopupMenu::Execute: need a non-NULL window!", 0 );
2792 bRealExecute =
false;
2810 xFocusId = Window::SaveFocus();
2811 bRealExecute =
true;
2854 if ( !nVisibleEntries )
2856 OUString aTmpEntryText(
VclResId(SV_RESID_STRING_NOSELECTIONPOSSIBLE));
2864 pData->bIsTemporary =
true;
2873 assert(xNotifierParent && xNotifierParent->
GetLOKNotifier() &&
"editview menu without LOKNotifier");
2913 nMaxHeight = std::min(nMaxHeight, std::max(nHeightAbove, nHeightBelow));
2919 "Available height misdetected as " << nMaxHeight
2920 <<
"px. Setting to 768px instead.");
2921 nMaxHeight = std::max(nMaxHeight,
tools::Long(768));
2925 sal_Int32 nLeft, nTop, nRight, nBottom;
2927 nMaxHeight -= nTop+nBottom;
2928 if ( aSz.
Height() > nMaxHeight )
2930 pWin->EnableScrollMenu(
true );
2936 pWin->SetFocusId( xFocusId );
2937 pWin->SetOutputSizePixel( aSz );
2948 pWin->StartPopupMode(rRect, nPopupModeFlags);
2957 pWin->SetPosInParent(aPos);
2961 if ( bPreSelectFirst )
2966 if ( (
pData->bEnabled
2974 pWin->ChangeHighlightItem(
n,
false);
2988 if (!bRealExecute || pWin->isDisposed())
2994 assert(xFocusId ==
nullptr &&
"Focus should already be restored by MenuFloatingWindow::End");
2999 PopupMenu* pSub = pWin->GetActivePopup();
3008 pWin->StopExecute();
3012 ImplClosePopupToolBox(pParentWin);
3021 bool bRealExecute =
false;
3024 if (!
PrepareRun(pParentWin, aRect, nPopupModeFlags, pSFrom, bRealExecute, pWin))
3026 const bool bNative =
Run(pWin, bRealExecute, bPreSelectFirst, nPopupModeFlags, pSFrom, aRect);
3027 FinishRun(pWin, pParentWin, bRealExecute, bNative);
3037 sal_uInt16 nVisEntries = 0;
3042 for (
size_t n = nStartEntry;
n < nEntries;
n++ )
3047 nHeight +=
pData->aSz.Height();
3048 if ( nHeight > nMaxHeight )
3063 sal_uInt16 nFound = 0;
3064 for (
size_t n = 0; ( nFound < nEntries ) && ( n < pItemList->
size() );
n++ )
3069 nHeight +=
pData->aSz.Height();
3092 const_cast< Menu*
>( pMenu )->ImplAddDel( *
this );
3098 const_cast< Menu*
>(
mpMenu.
get() )->ImplRemoveDel( *
this );
const StyleSettings & GetStyleSettings() const
static void ImplCallEventListeners(VclSimpleEvent &rEvent)
Send event to all VCL application event listeners.
static SAL_DLLPRIVATE unsigned int GetBestScreen(const tools::Rectangle &)
Get the "best" screen.
static unsigned int GetScreenCount()
Get the number of screens available for the display.
static const AllSettings & GetSettings()
Gets the application's settings.
static bool IsUnifiedDisplay()
Determines if the screens that make up a display are separate or form one large display area.
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
Post a user event to the default window.
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
Remove user event based on event ID.
static Help * GetHelp()
Gets the application's help.
static tools::Rectangle GetScreenPosSizePixel(unsigned int nScreen)
Get a screen's rectangular area.
void DrawSymbol(const tools::Rectangle &rRect, SymbolType eType, const Color &rColor, DrawSymbolFlags nStyle=DrawSymbolFlags::NONE)
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
SystemWindow * GetFloatingWindow(const vcl::Window *pWin)
void EndPopupMode(FloatWinPopupEndFlags nFlags=FloatWinPopupEndFlags::NONE)
virtual OUString GetHelpText(const OUString &aHelpURL, const weld::Widget *pWidget)
Size GetSizePixel() const
void setTristateVal(ButtonValue nTristate)
const vcl::KeyCode & GetKeyCode() const
void RegisterMnemonic(const OUString &rKey)
OUString CreateMnemonic(const OUString &rKey)
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
tools::Long GetCtrlTextWidth(const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
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)
const vcl::Font & GetFont() const
float GetDPIScaleFactor() const
void SetFont(const vcl::Font &rNewFont)
void DrawRect(const tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
const Wallpaper & GetBackground() 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, KernArraySpan aDXArray=KernArraySpan(), o3tl::span< const sal_Bool > pKashidaArray={}, const SalLayoutGlyphs *pGlyphs=nullptr) const
Return the exact bounding rectangle of rStr.
OUString GetEllipsisString(const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) 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.
void SetTextColor(const Color &rColor)
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 & GetTextColor() const
bool IsBackground() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
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 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 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)
const AllSettings & GetSettings() const
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
unsigned int screen() const
SalFrameGeometry maGeometry
absolute, unmirrored values
virtual std::unique_ptr< SalMenu > CreateMenu(bool bMenuBar, Menu *pMenu)
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
const Color & GetMenuHighlightTextColor() const
const Color & GetShadowColor() const
const Color & GetMenuColor() const
const Color & GetMenuBarTextColor() const
const Color & GetMenuBarRolloverTextColor() const
const Color & GetLightColor() const
bool GetSkipDisabledInMenus() const
const Color & GetMenuBarColor() const
bool GetUseImagesInMenus() const
const Color & GetHighlightColor() const
const Color & GetFaceColor() const
const Color & GetMenuBarHighlightTextColor() const
const Color & GetMenuTextColor() const
static bool IsCycleKey(const vcl::KeyCode &rKeyCode)
virtual css::uno::Reference< css::awt::XPopupMenu > CreateMenuInterface(PopupMenu *pPopupMenu)=0
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible(Menu *pMenu, bool bIsMenuBar)=0
static UnoWrapperBase * GetUnoWrapper(bool bCreateIfNotExists=true)
Get the application's UNO wrapper object.
A construction helper for a temporary VclPtr.
reference_type * get() const
Get the body.
static VclPtr< reference_type > Create(Arg &&... arg)
A construction helper for VclPtr.
void SetWeight(FontWeight)
static SettingsConfigItem * get()
Point OutputToScreenPixel(const Point &rPos) 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.
void SetFont(const vcl::Font &rNewFont)
bool IsReallyVisible() const
vcl::Window * GetParent() const
bool IsInputEnabled() const
WindowType GetType() const
void GetBorder(sal_Int32 &rLeftBorder, sal_Int32 &rTopBorder, sal_Int32 &rRightBorder, sal_Int32 &rBottomBorder) const
vcl::Window * GetWindow(GetWindowType nType) const
void SetAccessible(const css::uno::Reference< css::accessibility::XAccessible > &)
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)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
const AllSettings & GetSettings() const
virtual void KeyInput(const KeyEvent &rKEvt)
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
VclPtr< vcl::Window > GetParentWithLOKNotifier()
Find the nearest parent with LOK Notifier; can be itself if this Window has LOK notifier set.
::OutputDevice const * GetOutDev() const
const vcl::Font & GetFont() const
const vcl::ILibreOfficeKitNotifier * GetLOKNotifier() const
bool IsInModalMode() const
A window is in modal mode if one of its children or subchildren is a running modal window (a modal di...
SAL_DLLPRIVATE WindowImpl * ImplGetWindowImpl() const
virtual Size GetSizePixel() const
Size GetOutputSizePixel() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Point OutputToAbsoluteScreenPixel(const Point &rPos) const
#define ENSURE_OR_RETURN(c, m, r)
constexpr sal_uInt16 KEY_0
constexpr sal_uInt16 KEY_MOD2
constexpr sal_uInt16 KEY_A
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
std::unique_ptr< sal_Int32[]> pData
tools::Long const nBorder
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
bool IsInPopupMenuExecute()
VclPtr< PopupMenu > mpActivePopupMenu
ImplSVWinData * mpWinData
VclPtr< FloatingWindow > mpFirstFloat
ImplSVData * ImplGetSVData()
DockingManager * ImplGetDockingManager()
OUString VclResId(TranslateId aId)
OUString removeMnemonicFromString(OUString const &rStr)
@ MenuAccessibleNameChanged
WinBits const WB_SYSTEMWINDOW