34 aHighlightChangedTimer(
"vcl::MenuFloatingWindow aHighlightChangedTimer"),
35 aSubmenuCloseTimer(
"vcl::MenuFloatingWindow aSubmenuCloseTimer" ),
36 aScrollTimer(
"vcl::MenuFloatingWindow aScrollTimer" ),
46 bIgnoreFirstMove(true),
79 for(i = 0; i < nCount; i++)
94 SetAccessible( css::uno::Reference< css::accessibility::XAccessible >() );
148 aStyle.SetMenuHighlightTextColor(aHighlightTextColor);
220 if ( ( nMouseY >= nY ) && ( nMouseY < aOutSz.
Height() ) )
222 bool bHighlighted =
false;
224 for (
size_t n = 0; !bHighlighted && (
n < nCount );
n++ )
233 bool bPopupArea =
true;
239 bPopupArea = ( rMEvt.
GetPosPixel().X() >= ( aSz.
Width() - nFontHeight - nFontHeight/4 ) );
249 bool bAllowNewPopup =
true;
254 if ( bAllowNewPopup )
258 if ( bPopupArea && bAllowNewPopup )
260 HighlightChanged(
nullptr );
272 HighlightChanged(
nullptr );
301 pMenu->bInCallback =
true;
303 pMenu->bInCallback =
false;
307 if (pMenu && pMenu->pStartedFrom)
308 pMenu->pStartedFrom->ClosePopup(pMenu);
317 ImplScroll( GetPointerPosPixel() );
325 MenuItemData* pItemData = pMenu->pItemList->GetDataFromPos( nHighlightedItem );
329 if ( pActivePopup && ( pActivePopup != pItemData->
pSubMenu ) )
334 SetPopupModeFlags( nOldFlags );
344 pData = pMenu->pItemList->GetDataFromPos(
n );
347 pData = pMenu->pItemList->GetDataFromPos( nHighlightedItem );
348 Size MySize = GetOutputSizePixel();
349 Point aItemTopLeft( 0, nY );
350 Point aItemBottomRight( aItemTopLeft );
351 aItemBottomRight.AdjustX(MySize.
Width() );
352 aItemBottomRight.AdjustY(pData->
aSz.
Height() );
355 aItemTopLeft.AdjustX(2 );
356 aItemBottomRight.AdjustX( -2 );
357 if ( nHighlightedItem )
358 aItemTopLeft.AdjustY( -2 );
361 sal_Int32 nL, nT, nR, nB;
362 GetBorder( nL, nT, nR, nB );
363 aItemTopLeft.AdjustY( -nT );
370 Menu* pTest = pActivePopup;
374 SetPopupModeFlags( nOldFlags );
377 if ( !nRet && ( pActivePopup == pTest ) && pActivePopup->ImplGetWindow() )
378 pActivePopup->ImplGetFloatingWindow()->AddPopupModeWindow(
this );
383 if( pMenu && pMenu->pStartedFrom )
443 Window::EndSaveFocus(xFocusId);
494 pPopup->bInCallback =
true;
496 pPopup->bInCallback =
false;
501 pPopup->pWindow.disposeAndClear();
589 if ( rMEvt.
GetPosPixel().X() < ( aSz.
Width() - nFontHeight - nFontHeight/4 ) )
680 sal_uInt16 nLastVisible;
706 nDelta = nY - nMouseY;
711 nDelta = nMouseY - ( aOutSz.
Height() - nY );
721 else if ( nDelta < 5 )
723 else if ( nDelta < 8 )
725 else if ( nDelta < 12 )
759 for(i = 0; i < nCount; i++)
784 if ( bStartPopupTimer )
790 if (
GetSettings().GetMouseSettings().GetMenuDelay() )
816 for (
size_t n = 0;
n < nCount;
n++)
844 for (
size_t n = 0;
n < nCount;
n++)
852 bool bRestoreLineColor =
false;
854 bool bDrawItemRect =
true;
860 aItemRect.
AdjustRight( -(nFontHeight + nFontHeight / 4) );
874 bDrawItemRect =
false;
881 bDrawItemRect =
true;
885 bDrawItemRect =
true;
886 rRenderContext.
Pop();
897 bRestoreLineColor =
true;
903 if (bRestoreLineColor)
924 for (
size_t n = 0;
n < nCount;
n++ )
936 aRect.
AdjustRight( -(nFontHeight + nFontHeight/4) );
962 sal_uInt16 nLoop = n;
1016 sal_uInt16 nLastVisible;
1018 while ( n > nLastVisible )
1027 }
while ( n != nLoop );
1109 HighlightChanged(
nullptr );
1133 HighlightChanged(
nullptr );
1159 size_t nDuplicates = 0;
1164 if ( pData->
pSubMenu || nDuplicates > 1 )
1167 HighlightChanged(
nullptr );
1223 rRenderContext.
Pop();
1267 Window::RequestHelp( rHEvt );
1310 css::uno::Reference<css::accessibility::XAccessible> xAcc;
#define LINK(Instance, Class, Member)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Point GetPointerPosPixel()
void SetPopupModeEndHdl(const Link< FloatingWindow *, void > &rLink)
const vcl::Font & GetMenuFont() const
virtual void StateChanged(StateChangedType nType) override
void SetStyleSettings(const StyleSettings &rSet)
std::unique_ptr< sal_Int32[]> pData
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
const StyleSettings & GetStyleSettings() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
VclPtr< PopupMenu > mpActivePopupMenu
virtual Size GetSizePixel() const
sal_uInt16 GetCode() const
DataChangedEventType GetType() const
void IntersectClipRegion(const tools::Rectangle &rRect)
virtual void SetSettings(const AllSettings &rSettings)
constexpr sal_uInt16 KEY_F6
const CommandWheelData * GetWheelData() const
constexpr sal_uInt16 KEY_MENU
const Color & GetMenuHighlightColor() const
bool HasChildPathFocus(bool bSystemWindow=false) const
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
HelpEventMode GetMode() const
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_END
constexpr tools::Long Width() const
sal_uInt16 GetClicks() const
Buffers drawing on a vcl::RenderContext using a VirtualDevice.
static void Yield()
Process the next event.
bool IsEnterWindow() const
AllSettingsFlags GetFlags() const
void SetAccessible(const css::uno::Reference< css::accessibility::XAccessible > &)
tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
const Color & GetMenuTextColor() const
void DrawRect(const tools::Rectangle &rRect)
const Color & GetMenuColor() const
constexpr sal_uInt16 KEY_DOWN
ImplSVData * ImplGetSVData()
sal_Int32 GetScrollBarSize() const
bool IsLeaveWindow() const
constexpr sal_uInt16 KEY_HOME
CommandWheelMode GetMode() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const AllSettings & GetSettings() const
CommandEventId GetCommand() const
const Color & GetLineColor() const
virtual void Start(bool bStartTimer=true) override
Schedules the task for execution.
sal_uInt16 GetModifier() const
void SetTextColor(const Color &rColor)
std::unique_ptr< WindowImpl > mpWindowImpl
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.
virtual void UpdateSettings(AllSettings &rSettings)=0
const AllSettings & GetSettings() const
void SetTimeout(sal_uInt64 nTimeoutMs)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
vcl::Window * GetParent() const
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_RIGHT
void SetPointFont(vcl::RenderContext &rRenderContext, const vcl::Font &rFont)
SAL_DLLPRIVATE void ImplEndPopupMode(FloatWinPopupEndFlags nFlags, const VclPtr< vcl::Window > &xFocusId)
virtual void KeyInput(const KeyEvent &rKEvt)
void AddEventListener(const Link< VclWindowEvent &, void > &rEventListener)
SalFrame * ImplGetFrame() const
const vcl::KeyCode & GetKeyCode() const
virtual void Scroll(tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags=ScrollFlags::NONE)
const Color & GetButtonTextColor() const
#define SAL_WARN_IF(condition, area, stream)
constexpr tools::Long Height() const
constexpr sal_uInt16 KEY_ESCAPE
::OutputDevice const * GetOutDev() const
sal_Unicode GetCharCode() const
tools::Long AdjustWidth(tools::Long n)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
bool GetSkipDisabledInMenus() const
const Point & GetPosPixel() const
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
Size GetOutputSizePixel() const
tools::Long GetDelta() const
reference_type * get() const
Get the body.
void RemoveEventListener(const Link< VclWindowEvent &, void > &rEventListener)
void DrawSymbol(const tools::Rectangle &rRect, SymbolType eType, const Color &rColor, DrawSymbolFlags nStyle=DrawSymbolFlags::NONE)
constexpr sal_uInt16 KEY_LEFT
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
::Color maMenuBarHighlightTextColor
ImplSVWinData * mpWinData
static bool IsQuit()
Has Quit() been called?
bool m_bDetectedRangeSegmentation false