diff options
Diffstat (limited to 'vcl/source/window/menu.cxx')
-rw-r--r-- | vcl/source/window/menu.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index f40a5b4e90df..2a69969621d5 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1366,9 +1366,9 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo Rectangle aNativeContent; Rectangle aCtrlRegion(Rectangle(Point(), Size(100, 15))); - if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, PART_MENU_ITEM_CHECK_MARK)) + if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemCheckMark)) { - if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart(PART_MENU_ITEM_CHECK_MARK), + if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemCheckMark, aCtrlRegion, ControlState::ENABLED, aVal, OUString(), aNativeBounds, aNativeContent)) { @@ -1376,9 +1376,9 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo nCheckWidth = aNativeContent.GetWidth(); } } - if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, PART_MENU_ITEM_RADIO_MARK)) + if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemRadioMark)) { - if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart(PART_MENU_ITEM_RADIO_MARK), + if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemRadioMark, aCtrlRegion, ControlState::ENABLED, aVal, OUString(), aNativeBounds, aNativeContent)) { @@ -1396,9 +1396,9 @@ bool Menu::ImplGetNativeSubmenuArrowSize(vcl::RenderContext& rRenderContext, Siz Rectangle aNativeBounds; Rectangle aNativeContent; Rectangle aCtrlRegion(Rectangle(Point(), Size(100, 15))); - if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, PART_MENU_SUBMENU_ARROW)) + if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::SubmenuArrow)) { - if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart(PART_MENU_SUBMENU_ARROW), + if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::SubmenuArrow, aCtrlRegion, ControlState::ENABLED, aVal, OUString(), aNativeBounds, aNativeContent)) { @@ -1638,7 +1638,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin ) aSz.Height() = nFontHeight+6; // get menubar height from native methods if supported - if( pWindow->IsNativeControlSupported( ControlType::Menubar, PART_ENTIRE_CONTROL ) ) + if( pWindow->IsNativeControlSupported( ControlType::Menubar, ControlPart::Entire ) ) { ImplControlValue aVal; Rectangle aNativeBounds; @@ -1646,7 +1646,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin ) Point tmp( 0, 0 ); Rectangle aCtrlRegion( tmp, Size( 100, 15 ) ); if( pWindow->GetNativeControlRegion( ControlType::Menubar, - ControlPart(PART_ENTIRE_CONTROL), + ControlPart::Entire, aCtrlRegion, ControlState::ENABLED, aVal, @@ -1677,7 +1677,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin ) static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow, const Rectangle& i_rRect, bool i_bHighlight) { bool bNativeOk = false; - if (rRenderContext.IsNativeControlSupported(ControlType::Toolbar, PART_BUTTON)) + if (rRenderContext.IsNativeControlSupported(ControlType::Toolbar, ControlPart::Button)) { ImplControlValue aControlValue; Rectangle aCtrlRegion( i_rRect ); @@ -1685,7 +1685,7 @@ static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Wi aControlValue.setTristateVal(ButtonValue::On); - bNativeOk = rRenderContext.DrawNativeControl(ControlType::Toolbar, PART_BUTTON, + bNativeOk = rRenderContext.DrawNativeControl(ControlType::Toolbar, ControlPart::Button, aCtrlRegion, nState, aControlValue, OUString()); } @@ -1840,7 +1840,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, if (!bLayout && !IsMenuBar() && (pData->eType == MenuItemType::SEPARATOR)) { bool bNativeOk = false; - if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, PART_MENU_SEPARATOR)) + if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::Separator)) { ControlState nState = ControlState::NONE; if (pData->bEnabled && pWindow->IsEnabled()) @@ -1854,7 +1854,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, aSz.Width() = aOutSz.Width() - 2*nOuterSpaceX - 2 * nSepPad; Rectangle aItemRect(aMpos, aSz); MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect); - bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, PART_MENU_SEPARATOR, + bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Separator, aItemRect, nState, aVal, OUString()); } if (!bNativeOk) @@ -1890,12 +1890,12 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, { if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, (pData->nBits & MenuItemBits::RADIOCHECK) - ? PART_MENU_ITEM_CHECK_MARK - : PART_MENU_ITEM_RADIO_MARK)) + ? ControlPart::MenuItemCheckMark + : ControlPart::MenuItemRadioMark)) { ControlPart nPart = ((pData->nBits & MenuItemBits::RADIOCHECK) - ? PART_MENU_ITEM_RADIO_MARK - : PART_MENU_ITEM_CHECK_MARK); + ? ControlPart::MenuItemRadioMark + : ControlPart::MenuItemCheckMark); ControlState nState = ControlState::NONE; @@ -1996,7 +1996,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, // hopefully matches the NWF background since it is read // from the system style settings bool bSetTmpBackground = !rRenderContext.IsBackground() - && rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, PART_ENTIRE_CONTROL); + && rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::Entire); if (bSetTmpBackground) { Color aBg = IsMenuBar() ? rRenderContext.GetSettings().GetStyleSettings().GetMenuBarColor() @@ -2037,7 +2037,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, if (!bLayout && !IsMenuBar() && pData->pSubMenu) { bool bNativeOk = false; - if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, PART_MENU_SUBMENU_ARROW)) + if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::SubmenuArrow)) { ControlState nState = ControlState::NONE; Size aTmpSz(0, 0); @@ -2060,7 +2060,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, Rectangle aItemRect(aTmpPos, aTmpSz); MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect); - bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, PART_MENU_SUBMENU_ARROW, + bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::SubmenuArrow, aItemRect, nState, aVal, OUString()); } if (!bNativeOk) |