44 bIgnoreFirstMove(true),
80 for(i = 0; i < nCount; i++)
95 SetAccessible( css::uno::Reference< css::accessibility::XAccessible >() );
149 aStyle.SetMenuHighlightTextColor(aHighlightTextColor);
221 if ( ( nMouseY >= nY ) && ( nMouseY < aOutSz.
Height() ) )
223 bool bHighlighted =
false;
225 for (
size_t n = 0; !bHighlighted && (
n < nCount );
n++ )
234 bool bPopupArea =
true;
240 bPopupArea = ( rMEvt.
GetPosPixel().X() >= ( aSz.
Width() - nFontHeight - nFontHeight/4 ) );
250 bool bAllowNewPopup =
true;
255 if ( bAllowNewPopup )
259 if ( bPopupArea && bAllowNewPopup )
261 HighlightChanged(
nullptr );
273 HighlightChanged(
nullptr );
302 pMenu->bInCallback =
true;
304 pMenu->bInCallback =
false;
308 if (pMenu && pMenu->pStartedFrom)
309 pMenu->pStartedFrom->ClosePopup(pMenu);
318 ImplScroll( GetPointerPosPixel() );
326 MenuItemData* pItemData = pMenu->pItemList->GetDataFromPos( nHighlightedItem );
330 if ( pActivePopup && ( pActivePopup != pItemData->
pSubMenu ) )
335 SetPopupModeFlags( nOldFlags );
345 pData = pMenu->pItemList->GetDataFromPos(
n );
348 pData = pMenu->pItemList->GetDataFromPos( nHighlightedItem );
349 Size MySize = GetOutputSizePixel();
350 Point aItemTopLeft( 0, nY );
351 Point aItemBottomRight( aItemTopLeft );
352 aItemBottomRight.AdjustX(MySize.
Width() );
353 aItemBottomRight.AdjustY(pData->
aSz.
Height() );
356 aItemTopLeft.AdjustX(2 );
357 aItemBottomRight.AdjustX( -2 );
358 if ( nHighlightedItem )
359 aItemTopLeft.AdjustY( -2 );
362 sal_Int32 nL, nT, nR, nB;
363 GetBorder( nL, nT, nR, nB );
364 aItemTopLeft.AdjustY( -nT );
371 Menu* pTest = pActivePopup;
375 SetPopupModeFlags( nOldFlags );
378 if ( !nRet && ( pActivePopup == pTest ) && pActivePopup->ImplGetWindow() )
379 pActivePopup->ImplGetFloatingWindow()->AddPopupModeWindow(
this );
384 if( pMenu && pMenu->pStartedFrom )
444 Window::EndSaveFocus(xFocusId);
495 pPopup->bInCallback =
true;
497 pPopup->bInCallback =
false;
502 pPopup->pWindow->SetParentToDefaultWindow();
503 pPopup->pWindow.disposeAndClear();
591 if ( rMEvt.
GetPosPixel().X() < ( aSz.
Width() - nFontHeight - nFontHeight/4 ) )
682 sal_uInt16 nLastVisible;
708 nDelta = nY - nMouseY;
713 nDelta = nMouseY - ( aOutSz.
Height() - nY );
723 else if ( nDelta < 5 )
725 else if ( nDelta < 8 )
727 else if ( nDelta < 12 )
761 for(i = 0; i < nCount; i++)
786 if ( bStartPopupTimer )
792 if (
GetSettings().GetMouseSettings().GetMenuDelay() )
818 for (
size_t n = 0;
n < nCount;
n++)
846 for (
size_t n = 0;
n < nCount;
n++)
854 bool bRestoreLineColor =
false;
856 bool bDrawItemRect =
true;
862 aItemRect.
AdjustRight( -(nFontHeight + nFontHeight / 4) );
876 bDrawItemRect =
false;
883 bDrawItemRect =
true;
887 bDrawItemRect =
true;
888 rRenderContext.
Pop();
899 bRestoreLineColor =
true;
905 if (bRestoreLineColor)
926 for (
size_t n = 0;
n < nCount;
n++ )
938 aRect.
AdjustRight( -(nFontHeight + nFontHeight/4) );
964 sal_uInt16 nLoop = n;
1018 sal_uInt16 nLastVisible;
1020 while ( n > nLastVisible )
1029 }
while ( n != nLoop );
1112 HighlightChanged(
nullptr );
1136 HighlightChanged(
nullptr );
1162 size_t nDuplicates = 0;
1167 if ( pData->
pSubMenu || nDuplicates > 1 )
1170 HighlightChanged(
nullptr );
1186 const bool bShowAccels = nCode !=
KEY_ESCAPE;
1239 rRenderContext.
Pop();
1283 Window::RequestHelp( rHEvt );
1326 css::uno::Reference<css::accessibility::XAccessible> xAcc;
#define LINK(Instance, Class, Member)
Point GetPointerPosPixel()
void SetPopupModeEndHdl(const Link< FloatingWindow *, void > &rLink)
const vcl::Font & GetMenuFont() const
std::unique_ptr< ContentProperties > pData
virtual void StateChanged(StateChangedType nType) override
void SetStyleSettings(const StyleSettings &rSet)
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
const StyleSettings & GetStyleSettings() const
VclPtr< PopupMenu > mpActivePopupMenu
virtual Size GetSizePixel() const
sal_uInt16 GetCode() const
DataChangedEventType GetType() const
void IntersectClipRegion(const tools::Rectangle &rRect)
The invalidated area is updated immediately.
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
void SetDebugName(const char *pDebugName)
constexpr sal_uInt16 KEY_DOWN
ImplSVData * ImplGetSVData()
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...
CommandEventId GetCommand() const
const Color & GetLineColor() const
sal_uInt16 GetModifier() const
void SetTextColor(const Color &rColor)
std::unique_ptr< WindowImpl > mpWindowImpl
virtual void Start() override
Activates the timer task.
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
Size GetOutputSizePixel() const
tools::Long GetScrollBarSize() 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
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
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
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
void Push(PushFlags nFlags=PushFlags::ALL)
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?