bump product version to 7.6.3.2-android
[LibreOffice.git] / vcl / source / window / window3.cxx
blob5b8dd5cff4ecc2dacd595398bb206f508b419c7c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <vcl/window.hxx>
21 #include <window.h>
22 #include <vcl/cursor.hxx>
24 namespace vcl
26 Size Window::GetOptimalSize() const { return Size(); }
28 void Window::ImplAdjustNWFSizes()
30 for (Window* pWin = GetWindow(GetWindowType::FirstChild); pWin;
31 pWin = pWin->GetWindow(GetWindowType::Next))
32 pWin->ImplAdjustNWFSizes();
35 void WindowOutputDevice::ImplClearFontData(bool bNewFontLists)
37 OutputDevice::ImplClearFontData(bNewFontLists);
38 for (Window* pChild = mxOwnerWindow->mpWindowImpl->mpFirstChild; pChild;
39 pChild = pChild->mpWindowImpl->mpNext)
40 pChild->GetOutDev()->ImplClearFontData(bNewFontLists);
43 void WindowOutputDevice::ImplRefreshFontData(bool bNewFontLists)
45 OutputDevice::ImplRefreshFontData(bNewFontLists);
46 for (Window* pChild = mxOwnerWindow->mpWindowImpl->mpFirstChild; pChild;
47 pChild = pChild->mpWindowImpl->mpNext)
48 pChild->GetOutDev()->ImplRefreshFontData(bNewFontLists);
51 void WindowOutputDevice::ImplInitMapModeObjects()
53 OutputDevice::ImplInitMapModeObjects();
54 if (mxOwnerWindow->mpWindowImpl->mpCursor)
55 mxOwnerWindow->mpWindowImpl->mpCursor->ImplNew();
58 const Font& Window::GetFont() const { return GetOutDev()->GetFont(); }
59 void Window::SetFont(Font const& font) { return GetOutDev()->SetFont(font); }
61 float Window::approximate_char_width() const { return GetOutDev()->approximate_char_width(); }
63 const Wallpaper& Window::GetBackground() const { return GetOutDev()->GetBackground(); }
64 bool Window::IsBackground() const { return GetOutDev()->IsBackground(); }
65 tools::Long Window::GetTextHeight() const { return GetOutDev()->GetTextHeight(); }
66 tools::Long Window::GetTextWidth(const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen,
67 vcl::text::TextLayoutCache const* pCache,
68 SalLayoutGlyphs const* const pLayoutCache) const
70 return GetOutDev()->GetTextWidth(rStr, nIndex, nLen, pCache, pLayoutCache);
72 float Window::approximate_digit_width() const { return GetOutDev()->approximate_digit_width(); }
74 bool Window::IsNativeControlSupported(ControlType nType, ControlPart nPart) const
76 return GetOutDev()->IsNativeControlSupported(nType, nPart);
79 bool Window::GetNativeControlRegion(ControlType nType, ControlPart nPart,
80 const tools::Rectangle& rControlRegion, ControlState nState,
81 const ImplControlValue& aValue,
82 tools::Rectangle& rNativeBoundingRegion,
83 tools::Rectangle& rNativeContentRegion) const
85 return GetOutDev()->GetNativeControlRegion(nType, nPart, rControlRegion, nState, aValue,
86 rNativeBoundingRegion, rNativeContentRegion);
89 Size Window::GetOutputSizePixel() const { return GetOutDev()->GetOutputSizePixel(); }
91 tools::Rectangle Window::GetOutputRectPixel() const { return GetOutDev()->GetOutputRectPixel(); }
93 void Window::SetTextLineColor() { GetOutDev()->SetTextLineColor(); }
94 void Window::SetTextLineColor(const Color& rColor) { GetOutDev()->SetTextLineColor(rColor); }
95 void Window::SetOverlineColor() { GetOutDev()->SetOverlineColor(); }
96 void Window::SetOverlineColor(const Color& rColor) { GetOutDev()->SetOverlineColor(rColor); }
97 void Window::SetTextFillColor() { GetOutDev()->SetTextFillColor(); }
98 void Window::SetTextFillColor(const Color& rColor) { GetOutDev()->SetTextFillColor(rColor); }
99 const MapMode& Window::GetMapMode() const { return GetOutDev()->GetMapMode(); }
100 void Window::SetBackground() { GetOutDev()->SetBackground(); }
101 void Window::SetBackground(const Wallpaper& rBackground)
103 GetOutDev()->SetBackground(rBackground);
105 void Window::EnableMapMode(bool bEnable) { GetOutDev()->EnableMapMode(bEnable); }
106 bool Window::IsMapModeEnabled() const { return GetOutDev()->IsMapModeEnabled(); }
108 void Window::SetTextColor(const Color& rColor) { GetOutDev()->SetTextColor(rColor); }
109 const Color& Window::GetTextColor() const { return GetOutDev()->GetTextColor(); }
110 const Color& Window::GetTextLineColor() const { return GetOutDev()->GetTextLineColor(); }
112 bool Window::IsTextLineColor() const { return GetOutDev()->IsTextLineColor(); }
114 Color Window::GetTextFillColor() const { return GetOutDev()->GetTextFillColor(); }
116 bool Window::IsTextFillColor() const { return GetOutDev()->IsTextFillColor(); }
118 const Color& Window::GetOverlineColor() const { return GetOutDev()->GetOverlineColor(); }
119 bool Window::IsOverlineColor() const { return GetOutDev()->IsOverlineColor(); }
120 void Window::SetTextAlign(TextAlign eAlign) { GetOutDev()->SetTextAlign(eAlign); }
122 float Window::GetDPIScaleFactor() const { return GetOutDev()->GetDPIScaleFactor(); }
123 tools::Long Window::GetOutOffXPixel() const { return GetOutDev()->GetOutOffXPixel(); }
124 tools::Long Window::GetOutOffYPixel() const { return GetOutDev()->GetOutOffYPixel(); }
125 void Window::SetMapMode() { GetOutDev()->SetMapMode(); }
126 void Window::SetMapMode(const MapMode& rNewMapMode) { GetOutDev()->SetMapMode(rNewMapMode); }
127 bool Window::IsRTLEnabled() const { return GetOutDev()->IsRTLEnabled(); }
128 TextAlign Window::GetTextAlign() const { return GetOutDev()->GetTextAlign(); }
129 const AllSettings& Window::GetSettings() const { return GetOutDev()->GetSettings(); }
131 Point Window::LogicToPixel(const Point& rLogicPt) const
133 return GetOutDev()->LogicToPixel(rLogicPt);
135 Size Window::LogicToPixel(const Size& rLogicSize) const
137 return GetOutDev()->LogicToPixel(rLogicSize);
139 tools::Rectangle Window::LogicToPixel(const tools::Rectangle& rLogicRect) const
141 return GetOutDev()->LogicToPixel(rLogicRect);
143 vcl::Region Window::LogicToPixel(const vcl::Region& rLogicRegion) const
145 return GetOutDev()->LogicToPixel(rLogicRegion);
147 Point Window::LogicToPixel(const Point& rLogicPt, const MapMode& rMapMode) const
149 return GetOutDev()->LogicToPixel(rLogicPt, rMapMode);
151 Size Window::LogicToPixel(const Size& rLogicSize, const MapMode& rMapMode) const
153 return GetOutDev()->LogicToPixel(rLogicSize, rMapMode);
155 tools::Rectangle Window::LogicToPixel(const tools::Rectangle& rLogicRect,
156 const MapMode& rMapMode) const
158 return GetOutDev()->LogicToPixel(rLogicRect, rMapMode);
161 Point Window::PixelToLogic(const Point& rDevicePt) const
163 return GetOutDev()->PixelToLogic(rDevicePt);
165 Size Window::PixelToLogic(const Size& rDeviceSize) const
167 return GetOutDev()->PixelToLogic(rDeviceSize);
169 tools::Rectangle Window::PixelToLogic(const tools::Rectangle& rDeviceRect) const
171 return GetOutDev()->PixelToLogic(rDeviceRect);
173 tools::PolyPolygon Window::PixelToLogic(const tools::PolyPolygon& rDevicePolyPoly) const
175 return GetOutDev()->PixelToLogic(rDevicePolyPoly);
177 vcl::Region Window::PixelToLogic(const vcl::Region& rDeviceRegion) const
179 return GetOutDev()->PixelToLogic(rDeviceRegion);
181 Point Window::PixelToLogic(const Point& rDevicePt, const MapMode& rMapMode) const
183 return GetOutDev()->PixelToLogic(rDevicePt, rMapMode);
185 Size Window::PixelToLogic(const Size& rDeviceSize, const MapMode& rMapMode) const
187 return GetOutDev()->PixelToLogic(rDeviceSize, rMapMode);
189 tools::Rectangle Window::PixelToLogic(const tools::Rectangle& rDeviceRect,
190 const MapMode& rMapMode) const
192 return GetOutDev()->PixelToLogic(rDeviceRect, rMapMode);
195 Size Window::LogicToLogic(const Size& rSzSource, const MapMode* pMapModeSource,
196 const MapMode* pMapModeDest) const
198 return GetOutDev()->LogicToLogic(rSzSource, pMapModeSource, pMapModeDest);
201 tools::Rectangle Window::GetTextRect(const tools::Rectangle& rRect, const OUString& rStr,
202 DrawTextFlags nStyle, TextRectInfo* pInfo,
203 const vcl::ITextLayout* _pTextLayout) const
205 return GetOutDev()->GetTextRect(rRect, rStr, nStyle, pInfo, _pTextLayout);
208 void Window::SetSettings(const AllSettings& rSettings) { GetOutDev()->SetSettings(rSettings); }
209 void Window::SetSettings(const AllSettings& rSettings, bool bChild)
211 static_cast<vcl::WindowOutputDevice*>(GetOutDev())->SetSettings(rSettings, bChild);
214 Color Window::GetBackgroundColor() const { return GetOutDev()->GetBackgroundColor(); }
216 void Window::EnableRTL(bool bEnable) { GetOutDev()->EnableRTL(bEnable); }
218 } /* namespace vcl */
220 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */