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 bool bValidEntries =
false;
586 for (sal_uInt16
n = 0; !bValidEntries && (
n <
nCount);
n++)
591 if (bCheckPopups && pItem->
pSubMenu)
594 bValidEntries =
true;
597 return bValidEntries;
602 sal_uInt16 nItems = 0;
623 for (
size_t n =
nPos;
n; )
668 return static_cast<sal_uInt16
>(
nPos);
698 const bool bRoleBitsChanged = (
pData->nBits & nRoleMask) != (nBits & nRoleMask);
700 pData->nBits = nBits;
706 if (bRoleBitsChanged)
716 nBits =
pData->nBits;
725 if (
pData->aUserValueReleaseFunc)
726 pData->aUserValueReleaseFunc(
pData->nUserValue);
727 pData->aUserValueReleaseFunc = aFunc;
728 pData->nUserValue = nUserValue;
752 auto oldSubMenu =
pData->pSubMenu;
755 pData->pSubMenu = pMenu;
758 if (
pData->pSubMenu )
759 pData->pSubMenu->pStartedFrom =
nullptr;
770 oldSubMenu.disposeAndClear();
793 if (
pData->aAccelKey == rKeyCode )
796 pData->aAccelKey = rKeyCode;
808 return pData->aAccelKey;
819 sal_Int32
nPos =
pData->aText.indexOf(
'~' );
820 if(
nPos != -1 && nPos < pData->aText.getLength()-1 )
822 sal_uInt16 nCode = 0;
824 if( cAccel >=
'a' && cAccel <=
'z' )
825 nCode =
KEY_A + (cAccel-
'a');
826 else if( cAccel >=
'A' && cAccel <=
'Z' )
827 nCode =
KEY_A + (cAccel-
'A');
828 else if( cAccel >=
'0' && cAccel <=
'9' )
829 nCode =
KEY_0 + (cAccel-
'0');
851 sal_uInt16 nGroupPos;
858 pGroupData =
pItemList->GetDataFromPos( nGroupPos-1 );
876 while ( nGroupPos < nItemCount )
878 pGroupData =
pItemList->GetDataFromPos( nGroupPos );
894 pData->bChecked = bCheck;
916 return pData->bChecked;
924 if ( !(pItemData && ( pItemData->
bEnabled != bEnable )) )
943 nX +=
pData->aSz.Width();
961 return pData->bEnabled;
976 SAL_WARN(
"vcl",
"Menu::ShowItem - ignored for visible popups!" );
994 if ( rStr ==
pData->aText )
999 pData->aTextGlyphs.Invalidate();
1023 return pData->aText;
1036 pData->aImage = rImage;
1049 return pData->aImage;
1060 pData->aCommandStr = rCommand;
1068 return pData->aCommandStr;
1078 pData->aHelpCommandStr = rStr;
1086 return pData->aHelpCommandStr;
1096 pData->aHelpText = rStr;
1106 if (
pData->aHelpText.isEmpty() &&
1107 (( !
pData->aHelpId.isEmpty() ) || ( !
pData->aCommandStr.isEmpty() )))
1112 if (!
pData->aCommandStr.isEmpty())
1114 if (
pData->aHelpText.isEmpty() && !
pData->aHelpId.isEmpty())
1120 if (
pData->aHelpText.isEmpty())
1121 return pData->aAccessibleDescription;
1122 return pData->aHelpText;
1135 pData->aTipHelpText = rStr;
1143 return pData->aTipHelpText;
1153 pData->aHelpId = rHelpId;
1164 if ( !
pData->aHelpId.isEmpty() )
1165 aRet =
pData->aHelpId;
1167 aRet =
pData->aCommandStr;
1183 for ( sal_uInt16
i = 0;
i <
nCount;
i++ )
1234 if( pNextData && pNextData->
bVisible )
1250 pNextData =
pItemList->GetDataFromPos(
n-1 );
1251 if( pNextData && pNextData->
bVisible )
1273 if (
pData->aCommandStr ==
".uno:Cut" ||
pData->aCommandStr ==
".uno:Copy" ||
pData->aCommandStr ==
".uno:Paste" ||
1274 pData->sIdent ==
".uno:Cut" ||
pData->sIdent ==
".uno:Copy" ||
pData->sIdent ==
".uno:Paste" )
1297 bool bSelectable =
true;
1302 bSelectable =
false;
1322 css::uno::Reference<css::accessibility::XAccessibleContext> xParentContext( xParent->getAccessibleContext() );
1323 if (xParentContext.is())
1324 return xParentContext->getAccessibleChild(
i );
1347 rCheckHeight = rRadioHeight = 0;
1360 aNativeBounds, aNativeContent))
1362 rCheckHeight = aNativeBounds.
GetHeight() - 1;
1363 nCheckWidth = aNativeContent.
GetWidth() - 1;
1370 aNativeBounds, aNativeContent))
1372 rRadioHeight = aNativeBounds.
GetHeight() - 1;
1373 nRadioWidth = aNativeContent.
GetWidth() - 1;
1377 return Size(std::max(nCheckWidth, nRadioWidth), std::max(rCheckHeight, rRadioHeight));
1390 aVal, aNativeBounds, aNativeContent))
1403 SAL_WARN_IF( rDel.
mpMenu,
"vcl",
"Menu::ImplAddDel(): cannot add ImplMenuDelData twice !" );
1425 SAL_WARN_IF( !
pData,
"vcl",
"Menu::ImplRemoveDel(): ImplMenuDelData not registered !" );
1442 if( aMarkSize.
Height() > nMinMenuItemHeight )
1443 nMinMenuItemHeight = aMarkSize.
Height();
1450 if ( 16 > nMinMenuItemHeight )
1451 nMinMenuItemHeight = 16;
1461 Size aImgSz =
pData->aImage.GetSizePixel();
1462 if ( aImgSz.
Width() > aMaxImgWidth )
1463 aMaxImgWidth = aImgSz.
Width();
1464 if ( aImgSz.
Height() > nMinMenuItemHeight )
1465 nMinMenuItemHeight = aImgSz.
Height();
1478 pData->aSz.setHeight( 0 );
1479 pData->aSz.setWidth( 0 );
1488 pData->aSz.setHeight( 4 );
1497 if (aImgHeight >
pData->aSz.Height())
1498 pData->aSz.setHeight(aImgHeight);
1507 nWidth += aMarkSize.
Width() + nExtra * 2;
1522 if ( nTextHeight >
pData->aSz.Height() )
1523 pData->aSz.setHeight( nTextHeight );
1525 pData->aSz.setWidth( nTextWidth + 4*nExtra );
1529 pData->aSz.setHeight( std::max( std::max( nTextHeight,
pData->aSz.Height() ), nMinMenuItemHeight ) );
1531 nWidth += nTextWidth;
1539 nAccWidth += nExtra;
1540 nWidth += nAccWidth;
1546 if ( nFontHeight > nWidth )
1547 nWidth += nFontHeight;
1549 pData->aSz.setHeight( std::max( std::max( nFontHeight,
pData->aSz.Height() ), nMinMenuItemHeight ) );
1555 if ( nWidth > nMaxWidth )
1580 if ( nWidth > nMaxWidth )
1593 if( nMaxWidth > nScreenWidth/2 )
1594 nMaxWidth = nScreenWidth/2;
1596 sal_uInt16 gfxExtra =
static_cast<sal_uInt16
>(std::max( nExtra,
tools::Long(7) ));
1599 if( aMarkSize.
Height() > 0 )
1600 nImgOrChkWidth = aMarkSize.
Height() + nExtra;
1602 nImgOrChkWidth = nFontHeight/2 + gfxExtra;
1603 nImgOrChkWidth = std::max( nImgOrChkWidth, aMaxImgWidth + gfxExtra );
1615 nTextPos =
static_cast<sal_uInt16
>(2*nExtra);
1635 int nNativeHeight = aNativeBounds.
GetHeight();
1636 if( nNativeHeight > aSz.
Height() )
1644 if (aSz.
Height() < nCloseButtonHeight)
1653 bool bNativeOk =
false;
1672 RenderTools::DrawSelectionBackground(rRenderContext, rWindow, i_rRect, 0, i_bHighlight,
true,
false,
nullptr, 2, &aColor);
1678 sal_Int32
nPos = -1;
1684 if (
nPos < aNonMnem.getLength() && i_rLong[
nPos+1] == aNonMnem[
nPos])
1686 OUString aTmp = OUString::Concat(aNonMnem.subView(0,
nPos)) +
"~" + aNonMnem.subView(
nPos);
1696 rRenderContext.
Push(PushFlags::FONT | PushFlags::FILLCOLOR);
1704 rRenderContext.
SetFont(aFont);
1720 - aTextBoundRect.
Top() );
1724 rRenderContext.
Pop();
1730 bool bHighlighted,
bool bLayout,
bool bRollover)
const
1742 Point aTopLeft, aTmpPos;
1744 int nOuterSpaceX = 0;
1748 aTopLeft.
AdjustX(nOuterSpaceX );
1763 bool bHiddenItems =
false;
1778 else if (bHighlighted)
1788 if (!bRollover && !bHighlighted)
1791 else if (bHighlighted)
1795 Point aPos(aTopLeft);
1803 nTextOffsetY += (aOutSz.
Height()-
pData->aSz.Height()) / 2;
1822 bool bNativeOk =
false;
1835 aItemRect,
nState, aVal, OUString());
1839 aTmpPos.
setY( aPos.
Y() + ((
pData->aSz.Height() - 2) / 2) );
1840 aTmpPos.
setX( aPos.
X() + 2 + nOuterSpaceX );
1842 rRenderContext.
DrawLine(aTmpPos,
Point(aOutSz.
Width() - 3 - 2 * nOuterSpaceX, aTmpPos.
Y()));
1845 rRenderContext.
DrawLine(aTmpPos,
Point(aOutSz.
Width() - 3 - 2 * nOuterSpaceX, aTmpPos.
Y()));
1875 if (
pData->bChecked)
1885 aTmpPos.
setX( aOuterCheckRect.
Left() + (aOuterCheckRect.
GetWidth() - nCtrlHeight) / 2 );
1886 aTmpPos.
setY( aOuterCheckRect.
Top() + (aOuterCheckRect.
GetHeight() - nCtrlHeight) / 2 );
1894 nState, aVal, OUString());
1896 else if (
pData->bChecked)
1905 aSymbolSize =
Size(nFontHeight / 2, nFontHeight / 2);
1910 aSymbolSize =
Size((nFontHeight * 25) / 40, nFontHeight / 2);
1924 if (
pData->bChecked)
1929 aTmpPos = aOuterCheckRect.
TopLeft();
1932 rRenderContext.
DrawImage(aTmpPos, aImage, nImageStyle);
1939 aTmpPos.
setY( aPos.
Y() );
1940 aTmpPos.
AdjustY(nTextOffsetY );
1943 if (
pData->bIsTemporary)
1945 std::vector< tools::Rectangle >* pVector = bLayout ? &
mpLayoutData->m_aUnicodeBoundRects :
nullptr;
1946 OUString* pDisplayText = bLayout ? &
mpLayoutData->m_aDisplayText :
nullptr;
1957 bool bSetTmpBackground = !rRenderContext.
IsBackground()
1959 if (bSetTmpBackground)
1966 tools::Long nMaxItemTextWidth = aOutSz.
Width() - aTmpPos.
X() - nExtra - nOuterSpaceX;
1969 OUString aAccText =
pData->aAccelKey.GetName();
1970 nMaxItemTextWidth -= rRenderContext.
GetTextWidth(aAccText) + 3 * nExtra;
1974 nMaxItemTextWidth -= nFontHeight - nExtra;
1977 OUString aItemText(
pData->aText);
1978 pData->bHiddenOnGUI =
false;
1982 if (nMaxItemTextWidth < rRenderContext.
GetTextWidth(aItemText))
1985 pData->bHiddenOnGUI =
true;
1986 bHiddenItems =
true;
1992 pData->bHiddenOnGUI =
false;
1996 if (aItemText !=
pData->aText)
2000 rRenderContext.
DrawCtrlText(aTmpPos, aItemText, 0, aItemText.getLength(),
2001 nStyle, pVector, pDisplayText, pGlyphs);
2002 if (bSetTmpBackground)
2009 OUString aAccText =
pData->aAccelKey.GetName();
2011 aTmpPos.
AdjustX( -(4 * nExtra) );
2013 aTmpPos.
AdjustX( -nOuterSpaceX );
2014 aTmpPos.
setY( aPos.
Y() );
2015 aTmpPos.
AdjustY(nTextOffsetY );
2016 rRenderContext.
DrawCtrlText(aTmpPos, aAccText, 0, aAccText.getLength(), nTextStyle);
2022 bool bNativeOk =
false;
2031 aTmpSz =
Size(nFontHeight, nFontHeight);
2032 aSpacing = nOuterSpaceX;
2040 aTmpPos.
setX( aOutSz.
Width() - aTmpSz.
Width() - aSpacing - nOuterSpaceX );
2047 aItemRect,
nState, aVal, OUString());
2051 aTmpPos.
setX( aOutSz.
Width() - nFontHeight + nExtra - nOuterSpaceX );
2052 aTmpPos.
setY( aPos.
Y() );
2054 aTmpPos.
AdjustY((
pData->aSz.Height() / 2) - (nFontHeight / 4) );
2058 Point aTmpPos2(aPos);
2059 aTmpPos2.
setX( aOutSz.
Width() - nFontHeight - nFontHeight/4 );
2061 pData->aSz.Height())),
2069 if (pThisItemOnly && bHighlighted)
2097 sal_Int32 nSize = nFontHeight;
2099 lclDrawMoreIndicator(rRenderContext, aRectangle);
2105 Menu* pStart =
this;
2146 if (
pData->pSubMenu )
2147 pSelMenu =
pData->pSubMenu->ImplFindSelectMenu();
2155 Menu* pSelMenu =
nullptr;
2161 if(
pData->nId == nItemId )
2163 else if (
pData->pSubMenu )
2164 pSelMenu =
pData->pSubMenu->ImplFindMenu( nItemId );
2174 bool bRemove =
false;
2234 nullptr,
false,
true);
2289 std::map< sal_uInt16, tools::Rectangle >::const_iterator it =
mpLayoutData->m_aVisibleItemBoundRects.find(
nPos );
2290 if( it !=
mpLayoutData->m_aVisibleItemBoundRects.end() )
2301 if (
pData && !rStr.equals(
pData->aAccessibleName))
2303 pData->aAccessibleName = rStr;
2313 return pData->aAccessibleName;
2323 pData->aAccessibleDescription = rStr;
2330 if (
pData && !
pData->aAccessibleDescription.isEmpty())
2331 return pData->aAccessibleDescription;
2338 Menu* pMenu =
const_cast<Menu*
>(
this);
2388 : mbCloseBtnVisible(false),
2389 mbFloatBtnVisible(false),
2390 mbHideBtnVisible(false),
2397 : mbCloseBtnVisible(false),
2398 mbFloatBtnVisible(false),
2399 mbHideBtnVisible(false),
2472 if (!pMenuBarWindow)
2479 pMenuBarWindow->SetMenu(pMenu);
2489 pMenuBarWindow->SetHeight(nHeight);
2638 return pMenuWin ? pMenuWin->
AddMenuBarButton(i_rImage, i_rLink, i_rToolTip) : 0;
2681 return nMenubarHeight;
2711 p->KillActivePopup(pPopup);
2756 if(
pData->pSubMenu )
2791 return nPopupModeFlags;
2796 ENSURE_OR_RETURN( pExecWindow,
"PopupMenu::Execute: need a non-NULL window!", 0 );
2817 bRealExecute =
false;
2835 xFocusId = Window::SaveFocus();
2836 bRealExecute =
true;
2879 if ( !nVisibleEntries )
2881 OUString aTmpEntryText(
VclResId(SV_RESID_STRING_NOSELECTIONPOSSIBLE));
2889 pData->bIsTemporary =
true;
2898 assert(xNotifierParent && xNotifierParent->
GetLOKNotifier() &&
"editview menu without LOKNotifier");
2938 nMaxHeight = std::min(nMaxHeight, std::max(nHeightAbove, nHeightBelow));
2944 "Available height misdetected as " << nMaxHeight
2945 <<
"px. Setting to 768px instead.");
2946 nMaxHeight = std::max(nMaxHeight,
tools::Long(768));
2950 sal_Int32 nLeft, nTop, nRight, nBottom;
2952 nMaxHeight -= nTop+nBottom;
2953 if ( aSz.
Height() > nMaxHeight )
2955 pWin->EnableScrollMenu(
true );
2961 pWin->SetFocusId( xFocusId );
2962 pWin->SetOutputSizePixel( aSz );
2973 pWin->StartPopupMode(rRect, nPopupModeFlags);
2982 pWin->SetPosInParent(aPos);
2986 if ( bPreSelectFirst )
2991 if ( (
pData->bEnabled
2999 pWin->ChangeHighlightItem(
n,
false);
3013 if (!bRealExecute || pWin->isDisposed())
3019 assert(xFocusId ==
nullptr &&
"Focus should already be restored by MenuFloatingWindow::End");
3024 PopupMenu* pSub = pWin->GetActivePopup();
3033 pWin->StopExecute();
3037 ImplClosePopupToolBox(pParentWin);
3046 bool bRealExecute =
false;
3049 if (!
PrepareRun(pParentWin, aRect, nPopupModeFlags, pSFrom, bRealExecute, pWin))
3051 const bool bNative =
Run(pWin, bRealExecute, bPreSelectFirst, nPopupModeFlags, pSFrom, aRect);
3052 FinishRun(pWin, pParentWin, bRealExecute, bNative);
3062 sal_uInt16 nVisEntries = 0;
3067 for (
size_t n = nStartEntry;
n < nEntries;
n++ )
3072 nHeight +=
pData->aSz.Height();
3073 if ( nHeight > nMaxHeight )
3088 sal_uInt16 nFound = 0;
3089 for (
size_t n = 0; ( nFound < nEntries ) && ( n < pItemList->
size() );
n++ )
3094 nHeight +=
pData->aSz.Height();
3117 const_cast< Menu*
>( pMenu )->ImplAddDel( *
this );
3123 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 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.
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
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
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