[Libreoffice-commits] core.git: vcl/headless vcl/inc vcl/Library_vcl.mk
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 8 08:05:44 UTC 2021
vcl/Library_vcl.mk | 1
vcl/headless/CustomWidgetDraw.cxx | 434 ----------------------------------
vcl/headless/svpgdi.cxx | 7
vcl/inc/WidgetThemeLibrary.hxx | 180 --------------
vcl/inc/headless/CustomWidgetDraw.hxx | 56 ----
5 files changed, 1 insertion(+), 677 deletions(-)
New commits:
commit d2440c757daa7e16e3dec607497cb7175687799d
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue Sep 7 10:04:28 2021 +0900
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Sep 8 10:05:10 2021 +0200
vcl: remove CustomWidgetDraw as it is not needed anymore
CustomWidgetDraw was the first implemetation for custom drawing
of widgets, which was now replaced by FileDefinitionsWidgetDraw
so CustomWidgetDraw is not needed anymore.
Change-Id: I1c7a9fcf720bbfd91d9c44ad4b15a7281a0d0e14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121740
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 41d3ee3e7fc9..45f3b543a443 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -528,7 +528,6 @@ vcl_headless_code= \
vcl/headless/svpbmp \
vcl/headless/svpgdi \
$(if $(ENABLE_HEADLESS),vcl/headless/svpdata) \
- vcl/headless/CustomWidgetDraw \
) \
vcl/headless/svpdummies \
vcl/headless/svpinst \
diff --git a/vcl/headless/CustomWidgetDraw.cxx b/vcl/headless/CustomWidgetDraw.cxx
deleted file mode 100644
index 24a6218a7e9d..000000000000
--- a/vcl/headless/CustomWidgetDraw.cxx
+++ /dev/null
@@ -1,434 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include <cairo.h>
-#include <headless/CustomWidgetDraw.hxx>
-#include <sal/config.h>
-#include <rtl/bootstrap.hxx>
-#include <tools/svlibrary.h>
-#include <osl/module.hxx>
-#include <svdata.hxx>
-
-namespace vcl
-{
-WidgetThemeLibrary* CustomWidgetDraw::s_pWidgetImplementation = nullptr;
-
-CustomWidgetDraw::CustomWidgetDraw(SvpSalGraphics& rGraphics)
- : m_rGraphics(rGraphics)
-{
-#ifndef DISABLE_DYNLOADING
- static bool s_bMissingLibrary = false;
- if (s_pWidgetImplementation || s_bMissingLibrary)
- return;
-
- OUString aUrl("${LO_LIB_DIR}/" SVLIBRARY("vcl_widget_theme"));
- rtl::Bootstrap::expandMacros(aUrl);
- osl::Module aLibrary;
- aLibrary.load(aUrl, SAL_LOADMODULE_GLOBAL);
- auto fCreateWidgetThemeLibraryFunction
- = reinterpret_cast<vcl::WidgetThemeLibrary*(SAL_CALL*)()>(
- aLibrary.getFunctionSymbol("CreateWidgetThemeLibrary"));
- aLibrary.release();
-
- if (fCreateWidgetThemeLibraryFunction)
- s_pWidgetImplementation = (*fCreateWidgetThemeLibraryFunction)();
-
- // Init
- if (s_pWidgetImplementation)
- {
- ImplSVData* pSVData = ImplGetSVData();
- pSVData->maNWFData.mbNoFocusRects = true;
- pSVData->maNWFData.mbNoFocusRectsForFlatButtons = true;
- }
- else
- s_bMissingLibrary = true;
-#endif
-}
-
-CustomWidgetDraw::~CustomWidgetDraw() {}
-
-bool CustomWidgetDraw::isNativeControlSupported(ControlType eType, ControlPart ePart)
-{
- return s_pWidgetImplementation
- && s_pWidgetImplementation->isNativeControlSupported(eType, ePart);
-}
-
-bool CustomWidgetDraw::hitTestNativeControl(ControlType /*eType*/, ControlPart /*ePart*/,
- const tools::Rectangle& /*rBoundingControlRegion*/,
- const Point& /*aPos*/, bool& /*rIsInside*/)
-{
- return false;
-}
-
-bool CustomWidgetDraw::drawNativeControl(ControlType eType, ControlPart ePart,
- const tools::Rectangle& rControlRegion,
- ControlState eState, const ImplControlValue& rValue,
- const OUString& /*aCaptions*/,
- const Color& /*rBackgroundColor*/)
-{
- if (!s_pWidgetImplementation)
- return false;
-
- bool bOldAA = m_rGraphics.getAntiAlias();
- m_rGraphics.setAntiAlias(true);
-
- cairo_t* pCairoContext = m_rGraphics.getCairoContext(false);
- m_rGraphics.clipRegion(pCairoContext);
-
- cairo_translate(pCairoContext, rControlRegion.Left(), rControlRegion.Top());
-
- tools::Long nWidth = rControlRegion.GetWidth();
- tools::Long nHeight = rControlRegion.GetHeight();
-
- bool bOK = false;
-
- ControlDrawParameters aParameters{ pCairoContext, ePart, eState };
-
- switch (eType)
- {
- case ControlType::Generic:
- {
- }
- break;
- case ControlType::Pushbutton:
- {
- const PushButtonValue* pPushButtonValue = static_cast<const PushButtonValue*>(&rValue);
- if (pPushButtonValue)
- aParameters.bIsAction = pPushButtonValue->mbIsAction;
- bOK = s_pWidgetImplementation->drawPushButton(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Radiobutton:
- {
- aParameters.eButtonValue = rValue.getTristateVal();
- bOK = s_pWidgetImplementation->drawRadiobutton(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Checkbox:
- {
- aParameters.eButtonValue = rValue.getTristateVal();
- bOK = s_pWidgetImplementation->drawCheckbox(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Combobox:
- {
- bOK = s_pWidgetImplementation->drawCombobox(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Editbox:
- {
- bOK = s_pWidgetImplementation->drawEditbox(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::EditboxNoBorder:
- {
- bOK = s_pWidgetImplementation->drawEditbox(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::MultilineEditbox:
- {
- bOK = s_pWidgetImplementation->drawEditbox(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Listbox:
- {
- bOK = s_pWidgetImplementation->drawListbox(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Spinbox:
- {
- if (rValue.getType() == ControlType::SpinButtons)
- {
- const SpinbuttonValue* pSpinVal = static_cast<const SpinbuttonValue*>(&rValue);
-
- ControlPart upBtnPart = pSpinVal->mnUpperPart;
- ControlState upBtnState = pSpinVal->mnUpperState;
-
- ControlPart downBtnPart = pSpinVal->mnLowerPart;
- ControlState downBtnState = pSpinVal->mnLowerState;
- {
- ControlDrawParameters aParametersUp{ pCairoContext, upBtnPart, upBtnState };
- cairo_save(pCairoContext);
- cairo_translate(pCairoContext,
- pSpinVal->maUpperRect.Left() - rControlRegion.Left(),
- pSpinVal->maUpperRect.Top() - rControlRegion.Top());
- bOK = s_pWidgetImplementation->drawSpinbox(aParametersUp,
- pSpinVal->maUpperRect.GetWidth(),
- pSpinVal->maUpperRect.GetHeight());
- cairo_restore(pCairoContext);
- }
-
- if (bOK)
- {
- ControlDrawParameters aParametersDown{ pCairoContext, downBtnPart,
- downBtnState };
- cairo_save(pCairoContext);
- cairo_translate(pCairoContext,
- pSpinVal->maLowerRect.Left() - rControlRegion.Left(),
- pSpinVal->maLowerRect.Top() - rControlRegion.Top());
- bOK = s_pWidgetImplementation->drawSpinbox(aParametersDown,
- pSpinVal->maLowerRect.GetWidth(),
- pSpinVal->maLowerRect.GetHeight());
- cairo_restore(pCairoContext);
- }
- }
- else
- {
- bOK = s_pWidgetImplementation->drawSpinbox(aParameters, nWidth, nHeight);
- }
- }
- break;
- case ControlType::SpinButtons:
- {
- bOK = s_pWidgetImplementation->drawSpinButtons(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::TabItem:
- {
- bOK = s_pWidgetImplementation->drawTabItem(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::TabPane:
- {
- bOK = s_pWidgetImplementation->drawTabPane(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::TabHeader:
- {
- bOK = s_pWidgetImplementation->drawTabHeader(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::TabBody:
- {
- bOK = s_pWidgetImplementation->drawTabBody(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Scrollbar:
- {
- bOK = s_pWidgetImplementation->drawScrollbar(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Slider:
- {
- cairo_save(pCairoContext);
- bOK = s_pWidgetImplementation->drawSlider(aParameters, nWidth, nHeight);
- cairo_restore(pCairoContext);
-
- if (bOK)
- {
- const SliderValue* pSliderValue = static_cast<const SliderValue*>(&rValue);
-
- ControlDrawParameters aParametersButton{ pCairoContext, ControlPart::Button,
- eState | pSliderValue->mnThumbState };
- cairo_save(pCairoContext);
- cairo_translate(pCairoContext,
- pSliderValue->maThumbRect.Left() - rControlRegion.Left(),
- pSliderValue->maThumbRect.Top() - rControlRegion.Top());
- bOK = s_pWidgetImplementation->drawSlider(aParametersButton,
- pSliderValue->maThumbRect.GetWidth(),
- pSliderValue->maThumbRect.GetHeight());
- cairo_restore(pCairoContext);
- }
- }
- break;
- case ControlType::Fixedline:
- {
- bOK = s_pWidgetImplementation->drawFixedline(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Toolbar:
- {
- bOK = s_pWidgetImplementation->drawToolbar(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Menubar:
- break;
- case ControlType::MenuPopup:
- break;
- case ControlType::Progress:
- {
- aParameters.nValue = rValue.getNumericVal();
- bOK = s_pWidgetImplementation->drawProgress(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::IntroProgress:
- break;
- case ControlType::Tooltip:
- break;
- case ControlType::WindowBackground:
- {
- bOK = s_pWidgetImplementation->drawWindowsBackground(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::Frame:
- {
- bOK = s_pWidgetImplementation->drawFrame(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::ListNode:
- {
- aParameters.eButtonValue = rValue.getTristateVal();
- bOK = s_pWidgetImplementation->drawListNode(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::ListNet:
- {
- bOK = s_pWidgetImplementation->drawListNet(aParameters, nWidth, nHeight);
- }
- break;
- case ControlType::ListHeader:
- {
- bOK = s_pWidgetImplementation->drawListHeader(aParameters, nWidth, nHeight);
- }
- break;
- }
-
- basegfx::B2DRange aExtents(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.Right(),
- rControlRegion.Bottom());
-
- m_rGraphics.releaseCairoContext(pCairoContext, true, aExtents);
-
- m_rGraphics.setAntiAlias(bOldAA);
-
- return bOK;
-}
-
-bool CustomWidgetDraw::getNativeControlRegion(
- ControlType eType, ControlPart ePart, const tools::Rectangle& rBoundingControlRegion,
- ControlState eState, const ImplControlValue& /*aValue*/, const OUString& /*aCaption*/,
- tools::Rectangle& rNativeBoundingRegion, tools::Rectangle& rNativeContentRegion)
-{
- // Translate to POD rectangle and back.
- const rectangle_t aRegion
- = { rBoundingControlRegion.Left(), rBoundingControlRegion.Top(),
- rBoundingControlRegion.GetWidth(), rBoundingControlRegion.GetHeight() };
- if (s_pWidgetImplementation)
- {
- rectangle_t aNativeBoundingRegion;
- rectangle_t aNativeContentRegion;
- s_pWidgetImplementation->getRegion(eType, ePart, eState, aRegion, aNativeBoundingRegion,
- aNativeContentRegion);
-
- rNativeBoundingRegion
- = tools::Rectangle(aNativeBoundingRegion.x, aNativeBoundingRegion.y,
- aNativeBoundingRegion.width, aNativeBoundingRegion.height);
- rNativeContentRegion
- = tools::Rectangle(aNativeBoundingRegion.x, aNativeBoundingRegion.y,
- aNativeBoundingRegion.width, aNativeBoundingRegion.height);
- }
-
- return false;
-}
-
-bool CustomWidgetDraw::updateSettings(AllSettings& rSettings)
-{
- if (!s_pWidgetImplementation)
- return false;
-
- WidgetDrawStyle aStyle;
- aStyle.nSize = sizeof(WidgetDrawStyle);
-
- if (s_pWidgetImplementation->updateSettings(aStyle))
- {
- StyleSettings aStyleSet = rSettings.GetStyleSettings();
-
- aStyleSet.SetFaceColor(Color(ColorTransparency, aStyle.maFaceColor));
- aStyleSet.SetCheckedColor(Color(ColorTransparency, aStyle.maCheckedColor));
- aStyleSet.SetLightColor(Color(ColorTransparency, aStyle.maLightColor));
- aStyleSet.SetLightBorderColor(Color(ColorTransparency, aStyle.maLightBorderColor));
- aStyleSet.SetShadowColor(Color(ColorTransparency, aStyle.maShadowColor));
- aStyleSet.SetDarkShadowColor(Color(ColorTransparency, aStyle.maDarkShadowColor));
- aStyleSet.SetDefaultButtonTextColor(
- Color(ColorTransparency, aStyle.maDefaultButtonTextColor));
- aStyleSet.SetButtonTextColor(Color(ColorTransparency, aStyle.maButtonTextColor));
- aStyleSet.SetDefaultActionButtonTextColor(
- Color(ColorTransparency, aStyle.maDefaultActionButtonTextColor));
- aStyleSet.SetActionButtonTextColor(
- Color(ColorTransparency, aStyle.maActionButtonTextColor));
- aStyleSet.SetFlatButtonTextColor(Color(ColorTransparency, aStyle.maFlatButtonTextColor));
- aStyleSet.SetDefaultButtonRolloverTextColor(
- Color(ColorTransparency, aStyle.maDefaultButtonRolloverTextColor));
- aStyleSet.SetButtonRolloverTextColor(
- Color(ColorTransparency, aStyle.maButtonRolloverTextColor));
- aStyleSet.SetDefaultActionButtonRolloverTextColor(
- Color(ColorTransparency, aStyle.maDefaultActionButtonRolloverTextColor));
- aStyleSet.SetActionButtonRolloverTextColor(
- Color(ColorTransparency, aStyle.maActionButtonRolloverTextColor));
- aStyleSet.SetFlatButtonRolloverTextColor(
- Color(ColorTransparency, aStyle.maFlatButtonRolloverTextColor));
- aStyleSet.SetDefaultButtonPressedRolloverTextColor(
- Color(ColorTransparency, aStyle.maDefaultButtonPressedRolloverTextColor));
- aStyleSet.SetButtonPressedRolloverTextColor(
- Color(ColorTransparency, aStyle.maButtonPressedRolloverTextColor));
- aStyleSet.SetDefaultActionButtonPressedRolloverTextColor(
- Color(ColorTransparency, aStyle.maDefaultActionButtonPressedRolloverTextColor));
- aStyleSet.SetActionButtonPressedRolloverTextColor(
- Color(ColorTransparency, aStyle.maActionButtonPressedRolloverTextColor));
- aStyleSet.SetFlatButtonPressedRolloverTextColor(
- Color(ColorTransparency, aStyle.maFlatButtonPressedRolloverTextColor));
- aStyleSet.SetRadioCheckTextColor(Color(ColorTransparency, aStyle.maRadioCheckTextColor));
- aStyleSet.SetGroupTextColor(Color(ColorTransparency, aStyle.maGroupTextColor));
- aStyleSet.SetLabelTextColor(Color(ColorTransparency, aStyle.maLabelTextColor));
- aStyleSet.SetWindowColor(Color(ColorTransparency, aStyle.maWindowColor));
- aStyleSet.SetWindowTextColor(Color(ColorTransparency, aStyle.maWindowTextColor));
- aStyleSet.SetDialogColor(Color(ColorTransparency, aStyle.maDialogColor));
- aStyleSet.SetDialogTextColor(Color(ColorTransparency, aStyle.maDialogTextColor));
- aStyleSet.SetWorkspaceColor(Color(ColorTransparency, aStyle.maWorkspaceColor));
- aStyleSet.SetMonoColor(Color(ColorTransparency, aStyle.maMonoColor));
- aStyleSet.SetFieldColor(Color(ColorTransparency, aStyle.maFieldColor));
- aStyleSet.SetFieldTextColor(Color(ColorTransparency, aStyle.maFieldTextColor));
- aStyleSet.SetFieldRolloverTextColor(
- Color(ColorTransparency, aStyle.maFieldRolloverTextColor));
- aStyleSet.SetActiveColor(Color(ColorTransparency, aStyle.maActiveColor));
- aStyleSet.SetActiveTextColor(Color(ColorTransparency, aStyle.maActiveTextColor));
- aStyleSet.SetActiveBorderColor(Color(ColorTransparency, aStyle.maActiveBorderColor));
- aStyleSet.SetDeactiveColor(Color(ColorTransparency, aStyle.maDeactiveColor));
- aStyleSet.SetDeactiveTextColor(Color(ColorTransparency, aStyle.maDeactiveTextColor));
- aStyleSet.SetDeactiveBorderColor(Color(ColorTransparency, aStyle.maDeactiveBorderColor));
- aStyleSet.SetMenuColor(Color(ColorTransparency, aStyle.maMenuColor));
- aStyleSet.SetMenuBarColor(Color(ColorTransparency, aStyle.maMenuBarColor));
- aStyleSet.SetMenuBarRolloverColor(Color(ColorTransparency, aStyle.maMenuBarRolloverColor));
- aStyleSet.SetMenuBorderColor(Color(ColorTransparency, aStyle.maMenuBorderColor));
- aStyleSet.SetMenuTextColor(Color(ColorTransparency, aStyle.maMenuTextColor));
- aStyleSet.SetMenuBarTextColor(Color(ColorTransparency, aStyle.maMenuBarTextColor));
- aStyleSet.SetMenuBarRolloverTextColor(
- Color(ColorTransparency, aStyle.maMenuBarRolloverTextColor));
- aStyleSet.SetMenuBarHighlightTextColor(
- Color(ColorTransparency, aStyle.maMenuBarHighlightTextColor));
- aStyleSet.SetMenuHighlightColor(Color(ColorTransparency, aStyle.maMenuHighlightColor));
- aStyleSet.SetMenuHighlightTextColor(
- Color(ColorTransparency, aStyle.maMenuHighlightTextColor));
- aStyleSet.SetHighlightColor(Color(ColorTransparency, aStyle.maHighlightColor));
- aStyleSet.SetHighlightTextColor(Color(ColorTransparency, aStyle.maHighlightTextColor));
- aStyleSet.SetActiveTabColor(Color(ColorTransparency, aStyle.maActiveTabColor));
- aStyleSet.SetInactiveTabColor(Color(ColorTransparency, aStyle.maInactiveTabColor));
- aStyleSet.SetTabTextColor(Color(ColorTransparency, aStyle.maTabTextColor));
- aStyleSet.SetTabRolloverTextColor(Color(ColorTransparency, aStyle.maTabRolloverTextColor));
- aStyleSet.SetTabHighlightTextColor(
- Color(ColorTransparency, aStyle.maTabHighlightTextColor));
- aStyleSet.SetDisableColor(Color(ColorTransparency, aStyle.maDisableColor));
- aStyleSet.SetHelpColor(Color(ColorTransparency, aStyle.maHelpColor));
- aStyleSet.SetHelpTextColor(Color(ColorTransparency, aStyle.maHelpTextColor));
- aStyleSet.SetLinkColor(Color(ColorTransparency, aStyle.maLinkColor));
- aStyleSet.SetVisitedLinkColor(Color(ColorTransparency, aStyle.maVisitedLinkColor));
- aStyleSet.SetToolTextColor(Color(ColorTransparency, aStyle.maToolTextColor));
- aStyleSet.SetFontColor(Color(ColorTransparency, aStyle.maFontColor));
-
- rSettings.SetStyleSettings(aStyleSet);
-
- return true;
- }
-
- return false;
-}
-
-} // end vcl namespace
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 53d0de812475..c87a90e3fbf9 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -26,7 +26,6 @@
#include <headless/svpbmp.hxx>
#include <headless/svpframe.hxx>
#include <headless/svpcairotextrender.hxx>
-#include <headless/CustomWidgetDraw.hxx>
#include <saldatabasic.hxx>
#include <sal/log.hxx>
@@ -919,11 +918,7 @@ SvpSalGraphics::SvpSalGraphics()
, m_aTextRenderImpl(*this)
{
bool bLOKActive = comphelper::LibreOfficeKit::isActive();
- if (!initWidgetDrawBackends(bLOKActive))
- {
- if (bLOKActive)
- m_pWidgetDraw.reset(new vcl::CustomWidgetDraw(*this));
- }
+ initWidgetDrawBackends(bLOKActive);
}
SvpSalGraphics::~SvpSalGraphics()
diff --git a/vcl/inc/WidgetThemeLibrary.hxx b/vcl/inc/WidgetThemeLibrary.hxx
deleted file mode 100644
index 9a593e6dc6a2..000000000000
--- a/vcl/inc/WidgetThemeLibrary.hxx
+++ /dev/null
@@ -1,180 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef INCLUDED_VCL_INC_WIDGETTHEME_HXX
-#define INCLUDED_VCL_INC_WIDGETTHEME_HXX
-
-#include <cstdint>
-
-namespace vcl
-{
-struct WidgetDrawStyle
-{
- uint32_t nSize;
- uint32_t maFaceColor;
- uint32_t maCheckedColor;
- uint32_t maLightColor;
- uint32_t maLightBorderColor;
- uint32_t maShadowColor;
- uint32_t maDarkShadowColor;
- uint32_t maDefaultButtonTextColor;
- uint32_t maButtonTextColor;
- uint32_t maDefaultActionButtonTextColor;
- uint32_t maActionButtonTextColor;
- uint32_t maFlatButtonTextColor;
- uint32_t maDefaultButtonRolloverTextColor;
- uint32_t maButtonRolloverTextColor;
- uint32_t maDefaultActionButtonRolloverTextColor;
- uint32_t maActionButtonRolloverTextColor;
- uint32_t maFlatButtonRolloverTextColor;
- uint32_t maDefaultButtonPressedRolloverTextColor;
- uint32_t maButtonPressedRolloverTextColor;
- uint32_t maDefaultActionButtonPressedRolloverTextColor;
- uint32_t maActionButtonPressedRolloverTextColor;
- uint32_t maFlatButtonPressedRolloverTextColor;
- uint32_t maRadioCheckTextColor;
- uint32_t maGroupTextColor;
- uint32_t maLabelTextColor;
- uint32_t maWindowColor;
- uint32_t maWindowTextColor;
- uint32_t maDialogColor;
- uint32_t maDialogTextColor;
- uint32_t maWorkspaceColor;
- uint32_t maMonoColor;
- uint32_t maFieldColor;
- uint32_t maFieldTextColor;
- uint32_t maFieldRolloverTextColor;
- uint32_t maActiveColor;
- uint32_t maActiveTextColor;
- uint32_t maActiveBorderColor;
- uint32_t maDeactiveColor;
- uint32_t maDeactiveTextColor;
- uint32_t maDeactiveBorderColor;
- uint32_t maMenuColor;
- uint32_t maMenuBarColor;
- uint32_t maMenuBarRolloverColor;
- uint32_t maMenuBorderColor;
- uint32_t maMenuTextColor;
- uint32_t maMenuBarTextColor;
- uint32_t maMenuBarRolloverTextColor;
- uint32_t maMenuBarHighlightTextColor;
- uint32_t maMenuHighlightColor;
- uint32_t maMenuHighlightTextColor;
- uint32_t maHighlightColor;
- uint32_t maHighlightTextColor;
- uint32_t maActiveTabColor;
- uint32_t maInactiveTabColor;
- uint32_t maTabTextColor;
- uint32_t maTabRolloverTextColor;
- uint32_t maTabHighlightTextColor;
- uint32_t maDisableColor;
- uint32_t maHelpColor;
- uint32_t maHelpTextColor;
- uint32_t maLinkColor;
- uint32_t maVisitedLinkColor;
- uint32_t maToolTextColor;
- uint32_t maFontColor;
-};
-
-struct ControlDrawParameters
-{
- typedef struct _cairo cairo_t;
- ControlDrawParameters(cairo_t* i_pCairo, ControlPart i_ePart, ControlState i_eState)
- : nSize(sizeof(ControlDrawParameters))
- , pCairo(i_pCairo)
- , ePart(i_ePart)
- , eState(i_eState)
- , eButtonValue(ButtonValue::DontKnow)
- , bIsAction(false)
- , nValue(0)
- {
- }
-
- uint32_t nSize;
- cairo_t* pCairo;
- ControlPart ePart;
- ControlState eState;
- ButtonValue eButtonValue;
- bool bIsAction;
- int64_t nValue;
-};
-
-typedef struct WidgetThemeLibrary_t WidgetThemeLibrary;
-
-typedef struct _rectangle
-{
- tools::Long x, y;
- tools::Long width, height;
-} rectangle_t;
-
-struct WidgetThemeLibrary_t
-{
- uint32_t nSize;
-
- bool (*isNativeControlSupported)(ControlType eType, ControlPart ePart);
- bool (*getRegion)(ControlType eType, ControlPart ePart, ControlState eState,
- const rectangle_t& rBoundingControlRegion, rectangle_t& rNativeBoundingRegion,
- rectangle_t& rNativeContentRegion);
-
- bool (*drawPushButton)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawRadiobutton)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawCheckbox)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawCombobox)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawEditbox)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawScrollbar)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawSpinButtons)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawSpinbox)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawTabItem)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawTabPane)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawTabHeader)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawTabBody)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawSlider)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawFixedline)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawToolbar)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawProgress)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawWindowsBackground)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawListbox)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawFrame)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawListNode)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawListNet)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
- bool (*drawListHeader)(ControlDrawParameters const& rParameters, tools::Long nWidth,
- tools::Long nHeight);
-
- bool (*updateSettings)(WidgetDrawStyle& rStyle);
-};
-
-extern "C" vcl::WidgetThemeLibrary* CreateWidgetThemeLibrary();
-
-} // end vcl namespace
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/headless/CustomWidgetDraw.hxx b/vcl/inc/headless/CustomWidgetDraw.hxx
deleted file mode 100644
index f30488ca8e17..000000000000
--- a/vcl/inc/headless/CustomWidgetDraw.hxx
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#ifndef INCLUDED_VCL_INC_CUSTOMWIDGETDRAW_HXX
-#define INCLUDED_VCL_INC_CUSTOMWIDGETDRAW_HXX
-
-#include <vcl/dllapi.h>
-#include <WidgetDrawInterface.hxx>
-#include <WidgetThemeLibrary.hxx>
-#include <headless/svpgdi.hxx>
-#include <vcl/settings.hxx>
-
-namespace vcl
-{
-class CustomWidgetDraw final : public vcl::WidgetDrawInterface
-{
-private:
- static WidgetThemeLibrary* s_pWidgetImplementation;
- SvpSalGraphics& m_rGraphics;
-
-public:
- CustomWidgetDraw(SvpSalGraphics& rGraphics);
- ~CustomWidgetDraw() override;
-
- bool isNativeControlSupported(ControlType eType, ControlPart ePart) override;
-
- bool hitTestNativeControl(ControlType eType, ControlPart ePart,
- const tools::Rectangle& rBoundingControlRegion, const Point& aPos,
- bool& rIsInside) override;
-
- bool drawNativeControl(ControlType eType, ControlPart ePart,
- const tools::Rectangle& rBoundingControlRegion, ControlState eState,
- const ImplControlValue& aValue, const OUString& aCaptions,
- const Color& rBackgroundColor) override;
-
- bool getNativeControlRegion(ControlType eType, ControlPart ePart,
- const tools::Rectangle& rBoundingControlRegion, ControlState eState,
- const ImplControlValue& aValue, const OUString& aCaption,
- tools::Rectangle& rNativeBoundingRegion,
- tools::Rectangle& rNativeContentRegion) override;
-
- bool updateSettings(AllSettings& rSettings) override;
-};
-
-} // end vcl namespace
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list