LibreOffice Module vcl (master)  1
FileDefinitionWidgetDraw.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  */
10 
13 
14 #include <sal/config.h>
15 #include <svdata.hxx>
16 #include <rtl/bootstrap.hxx>
17 #include <config_folders.h>
18 #include <osl/file.hxx>
19 
24 
25 #include <tools/stream.hxx>
26 #include <vcl/bitmapex.hxx>
27 #include <vcl/BitmapTools.hxx>
28 #include <vcl/gradient.hxx>
29 
30 #include <comphelper/seqstream.hxx>
32 #include <comphelper/lok.hxx>
33 
34 #include <com/sun/star/graphic/SvgTools.hpp>
35 #include <basegfx/DrawCommands.hxx>
36 
37 using namespace css;
38 
39 namespace vcl
40 {
41 namespace
42 {
43 OUString lcl_getThemeDefinitionPath()
44 {
45  OUString sPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/theme_definitions/");
46  rtl::Bootstrap::expandMacros(sPath);
47  return sPath;
48 }
49 
50 bool lcl_directoryExists(OUString const& sDirectory)
51 {
52  osl::DirectoryItem aDirectoryItem;
53  osl::FileBase::RC eRes = osl::DirectoryItem::get(sDirectory, aDirectoryItem);
54  return eRes == osl::FileBase::E_None;
55 }
56 
57 bool lcl_fileExists(OUString const& sFilename)
58 {
59  osl::File aFile(sFilename);
60  osl::FileBase::RC eRC = aFile.open(osl_File_OpenFlag_Read);
61  return osl::FileBase::E_None == eRC;
62 }
63 
64 std::shared_ptr<WidgetDefinition> getWidgetDefinition(OUString const& rDefinitionFile,
65  OUString const& rDefinitionResourcesPath)
66 {
67  auto pWidgetDefinition = std::make_shared<WidgetDefinition>();
68  WidgetDefinitionReader aReader(rDefinitionFile, rDefinitionResourcesPath);
69  if (aReader.read(*pWidgetDefinition))
70  return pWidgetDefinition;
71  return std::shared_ptr<WidgetDefinition>();
72 }
73 
74 std::shared_ptr<WidgetDefinition> const& getWidgetDefinitionForTheme(OUString const& rThemenName)
75 {
76  static std::shared_ptr<WidgetDefinition> spDefinition;
77  if (!spDefinition)
78  {
79  OUString sSharedDefinitionBasePath = lcl_getThemeDefinitionPath();
80  OUString sThemeFolder = sSharedDefinitionBasePath + rThemenName + "/";
81  OUString sThemeDefinitionFile = sThemeFolder + "definition.xml";
82  if (lcl_directoryExists(sThemeFolder) && lcl_fileExists(sThemeDefinitionFile))
83  spDefinition = getWidgetDefinition(sThemeDefinitionFile, sThemeFolder);
84  }
85  return spDefinition;
86 }
87 
88 } // end anonymous namespace
89 
90 FileDefinitionWidgetDraw::FileDefinitionWidgetDraw(SalGraphics& rGraphics)
91  : m_rGraphics(rGraphics)
92  , m_bIsActive(false)
93 {
95  m_pWidgetDefinition = getWidgetDefinitionForTheme("online");
96 #ifdef IOS
98  m_pWidgetDefinition = getWidgetDefinitionForTheme("ios");
99 #endif
100 
102  {
103  ImplSVData* pSVData = ImplGetSVData();
104  pSVData->maNWFData.mbNoFocusRects = true;
105  pSVData->maNWFData.mbNoFocusRectsForFlatButtons = true;
106  pSVData->maNWFData.mbNoActiveTabTextRaise = true;
107  pSVData->maNWFData.mbCenteredTabs = true;
108  pSVData->maNWFData.mbProgressNeedsErase = true;
110  pSVData->maNWFData.mbCanDrawWidgetAnySize = true;
111  pSVData->maNWFData.mnListBoxEntryMargin = 20;
112 
113  m_bIsActive = true;
114  }
115 }
116 
118 {
119  switch (eType)
120  {
125  return true;
128  return false;
129  return true;
133  return true;
136  return false;
137  return true;
139  if (ePart == ControlPart::AllButtons)
140  return false;
141  return true;
143  return false;
148  return true;
152  return false;
153  return true;
154  case ControlType::Slider:
157  return true;
160  return true;
162  return true;
164  return false;
166  return true;
168  case ControlType::Frame:
172  return true;
173  }
174 
175  return false;
176 }
177 
179  ControlType /*eType*/, ControlPart /*ePart*/,
180  const tools::Rectangle& /*rBoundingControlRegion*/, const Point& /*aPos*/, bool& /*rIsInside*/)
181 {
182  return false;
183 }
184 
185 namespace
186 {
187 void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics, long nX, long nY,
188  long nWidth, long nHeight)
189 {
190  basegfx::B2DRectangle aSVGRect = rDrawRoot.maRectangle;
191 
192  basegfx::B2DRange aTargetSurface(nX, nY, nX + nWidth + 1, nY + nHeight + 1);
193 
194  for (std::shared_ptr<gfx::DrawBase> const& pDrawBase : rDrawRoot.maChildren)
195  {
196  switch (pDrawBase->getType())
197  {
199  {
200  auto const& rRectangle = static_cast<gfx::DrawRectangle const&>(*pDrawBase);
201 
202  basegfx::B2DRange aInputRectangle(rRectangle.maRectangle);
203 
204  double fDeltaX = aTargetSurface.getWidth() - aSVGRect.getWidth();
205  double fDeltaY = aTargetSurface.getHeight() - aSVGRect.getHeight();
206 
207  basegfx::B2DRange aFinalRectangle(
208  aInputRectangle.getMinX(), aInputRectangle.getMinY(),
209  aInputRectangle.getMaxX() + fDeltaX, aInputRectangle.getMaxY() + fDeltaY);
210 
212  aTargetSurface.getMinX() - 0.5, aTargetSurface.getMinY() - 0.5));
213 
215  aFinalRectangle, rRectangle.mnRx / aFinalRectangle.getWidth() * 2.0,
216  rRectangle.mnRy / aFinalRectangle.getHeight() * 2.0);
217 
218  if (rRectangle.mpFillColor)
219  {
220  rGraphics.SetLineColor();
221  rGraphics.SetFillColor(Color(*rRectangle.mpFillColor));
223  basegfx::B2DPolyPolygon(aB2DPolygon),
224  1.0 - rRectangle.mnOpacity, nullptr);
225  }
226  else if (rRectangle.mpFillGradient)
227  {
228  rGraphics.SetLineColor();
229  rGraphics.SetFillColor();
230  if (rRectangle.mpFillGradient->meType == gfx::GradientType::Linear)
231  {
232  auto* pLinearGradient = static_cast<gfx::LinearGradientInfo*>(
233  rRectangle.mpFillGradient.get());
234  SalGradient aGradient;
235  double x, y;
236 
237  x = pLinearGradient->x1;
238  y = pLinearGradient->y1;
239 
240  if (x > aSVGRect.getCenterX())
241  x = x + fDeltaX;
242  if (y > aSVGRect.getCenterY())
243  y = y + fDeltaY;
244 
245  aGradient.maPoint1 = basegfx::B2DPoint(x, y);
247  aTargetSurface.getMinX() - 0.5, aTargetSurface.getMinY() - 0.5);
248 
249  x = pLinearGradient->x2;
250  y = pLinearGradient->y2;
251 
252  if (x > aSVGRect.getCenterX())
253  x = x + fDeltaX;
254  if (y > aSVGRect.getCenterY())
255  y = y + fDeltaY;
256 
257  aGradient.maPoint2 = basegfx::B2DPoint(x, y);
259  aTargetSurface.getMinX() - 0.5, aTargetSurface.getMinY() - 0.5);
260 
261  for (gfx::GradientStop const& rStop : pLinearGradient->maGradientStops)
262  {
263  Color aColor(rStop.maColor);
264  aColor.SetTransparency(rStop.mfOpacity * (1.0f - rRectangle.mnOpacity));
265  aGradient.maStops.emplace_back(aColor, rStop.mfOffset);
266  }
267  rGraphics.DrawGradient(basegfx::B2DPolyPolygon(aB2DPolygon), aGradient);
268  }
269  }
270  if (rRectangle.mpStrokeColor)
271  {
272  rGraphics.SetLineColor(Color(*rRectangle.mpStrokeColor));
273  rGraphics.SetFillColor();
274  rGraphics.DrawPolyLine(
275  basegfx::B2DHomMatrix(), aB2DPolygon, 1.0 - rRectangle.mnOpacity,
276  basegfx::B2DVector(rRectangle.mnStrokeWidth, rRectangle.mnStrokeWidth),
277  basegfx::B2DLineJoin::Round, css::drawing::LineCap_ROUND, 0.0f, false,
278  nullptr);
279  }
280  }
281  break;
283  {
284  auto const& rPath = static_cast<gfx::DrawPath const&>(*pDrawBase);
285 
286  double fDeltaX = aTargetSurface.getWidth() - aSVGRect.getWidth();
287  double fDeltaY = aTargetSurface.getHeight() - aSVGRect.getHeight();
288 
289  basegfx::B2DPolyPolygon aPolyPolygon(rPath.maPolyPolygon);
290  for (auto& rPolygon : aPolyPolygon)
291  {
292  for (size_t i = 0; i < rPolygon.count(); ++i)
293  {
294  auto& rPoint = rPolygon.getB2DPoint(i);
295  double x = rPoint.getX();
296  double y = rPoint.getY();
297 
298  if (x > aSVGRect.getCenterX())
299  x = x + fDeltaX;
300  if (y > aSVGRect.getCenterY())
301  y = y + fDeltaY;
302  rPolygon.setB2DPoint(i, basegfx::B2DPoint(x, y));
303  }
304  }
305  aPolyPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix(
306  aTargetSurface.getMinX() - 0.5, aTargetSurface.getMinY() - 0.5));
307 
308  if (rPath.mpFillColor)
309  {
310  rGraphics.SetLineColor();
311  rGraphics.SetFillColor(Color(*rPath.mpFillColor));
312  rGraphics.DrawPolyPolygon(basegfx::B2DHomMatrix(), aPolyPolygon,
313  1.0 - rPath.mnOpacity, nullptr);
314  }
315  if (rPath.mpStrokeColor)
316  {
317  rGraphics.SetLineColor(Color(*rPath.mpStrokeColor));
318  rGraphics.SetFillColor();
319  for (auto const& rPolygon : aPolyPolygon)
320  {
321  rGraphics.DrawPolyLine(
322  basegfx::B2DHomMatrix(), rPolygon, 1.0 - rPath.mnOpacity,
323  basegfx::B2DVector(rPath.mnStrokeWidth, rPath.mnStrokeWidth),
324  basegfx::B2DLineJoin::Round, css::drawing::LineCap_ROUND, 0.0f, false,
325  nullptr);
326  }
327  }
328  }
329  break;
330 
331  default:
332  break;
333  }
334  }
335 }
336 
337 void munchDrawCommands(std::vector<std::shared_ptr<WidgetDrawAction>> const& rDrawActions,
338  SalGraphics& rGraphics, long nX, long nY, long nWidth, long nHeight)
339 {
340  for (std::shared_ptr<WidgetDrawAction> const& pDrawAction : rDrawActions)
341  {
342  switch (pDrawAction->maType)
343  {
345  {
346  auto const& rWidgetDraw
347  = static_cast<WidgetDrawActionRectangle const&>(*pDrawAction);
348 
349  basegfx::B2DRectangle rRect(
350  nX + (nWidth * rWidgetDraw.mfX1), nY + (nHeight * rWidgetDraw.mfY1),
351  nX + (nWidth * rWidgetDraw.mfX2), nY + (nHeight * rWidgetDraw.mfY2));
352 
354  rRect, rWidgetDraw.mnRx / rRect.getWidth() * 2.0,
355  rWidgetDraw.mnRy / rRect.getHeight() * 2.0);
356 
357  rGraphics.SetLineColor();
358  rGraphics.SetFillColor(rWidgetDraw.maFillColor);
360  basegfx::B2DPolyPolygon(aB2DPolygon), 0.0f, nullptr);
361  rGraphics.SetLineColor(rWidgetDraw.maStrokeColor);
362  rGraphics.SetFillColor();
363  rGraphics.DrawPolyLine(
364  basegfx::B2DHomMatrix(), aB2DPolygon, 0.0f,
365  basegfx::B2DVector(rWidgetDraw.mnStrokeWidth, rWidgetDraw.mnStrokeWidth),
366  basegfx::B2DLineJoin::Round, css::drawing::LineCap_ROUND, 0.0f, false, nullptr);
367  }
368  break;
370  {
371  auto const& rWidgetDraw = static_cast<WidgetDrawActionLine const&>(*pDrawAction);
372  Point aRectPoint(nX + 1, nY + 1);
373 
374  Size aRectSize(nWidth - 1, nHeight - 1);
375 
376  rGraphics.SetFillColor();
377  rGraphics.SetLineColor(rWidgetDraw.maStrokeColor);
378 
379  basegfx::B2DPolygon aB2DPolygon{
380  { aRectPoint.X() + (aRectSize.Width() * rWidgetDraw.mfX1),
381  aRectPoint.Y() + (aRectSize.Height() * rWidgetDraw.mfY1) },
382  { aRectPoint.X() + (aRectSize.Width() * rWidgetDraw.mfX2),
383  aRectPoint.Y() + (aRectSize.Height() * rWidgetDraw.mfY2) },
384  };
385 
386  rGraphics.DrawPolyLine(
387  basegfx::B2DHomMatrix(), aB2DPolygon, 0.0f,
388  basegfx::B2DVector(rWidgetDraw.mnStrokeWidth, rWidgetDraw.mnStrokeWidth),
389  basegfx::B2DLineJoin::Round, css::drawing::LineCap_ROUND, 0.0f, false, nullptr);
390  }
391  break;
393  {
394  double nScaleFactor = 1.0;
397 
398  auto const& rWidgetDraw = static_cast<WidgetDrawActionImage const&>(*pDrawAction);
399  auto& rCacheImages = ImplGetSVData()->maGDIData.maThemeImageCache;
400  OUString rCacheKey = rWidgetDraw.msSource + "@" + OUString::number(nScaleFactor);
401  auto aIterator = rCacheImages.find(rCacheKey);
402 
403  BitmapEx aBitmap;
404  if (aIterator == rCacheImages.end())
405  {
406  SvFileStream aFileStream(rWidgetDraw.msSource, StreamMode::READ);
407 
408  vcl::bitmap::loadFromSvg(aFileStream, "", aBitmap, nScaleFactor);
409  if (!!aBitmap)
410  {
411  rCacheImages.insert(std::make_pair(rCacheKey, aBitmap));
412  }
413  }
414  else
415  {
416  aBitmap = aIterator->second;
417  }
418 
419  long nImageWidth = aBitmap.GetSizePixel().Width();
420  long nImageHeight = aBitmap.GetSizePixel().Height();
421  SalTwoRect aTR(0, 0, nImageWidth, nImageHeight, nX, nY, nImageWidth / nScaleFactor,
422  nImageHeight / nScaleFactor);
423  if (!!aBitmap)
424  {
425  const std::shared_ptr<SalBitmap> pSalBitmap
426  = aBitmap.GetBitmap().ImplGetSalBitmap();
427  if (aBitmap.IsAlpha())
428  {
429  const std::shared_ptr<SalBitmap> pSalBitmapAlpha
430  = aBitmap.GetAlpha().ImplGetSalBitmap();
431  rGraphics.DrawBitmap(aTR, *pSalBitmap, *pSalBitmapAlpha, nullptr);
432  }
433  else
434  {
435  rGraphics.DrawBitmap(aTR, *pSalBitmap, nullptr);
436  }
437  }
438  }
439  break;
441  {
442  auto const& rWidgetDraw
443  = static_cast<WidgetDrawActionExternal const&>(*pDrawAction);
444 
445  auto& rCacheDrawCommands = ImplGetSVData()->maGDIData.maThemeDrawCommandsCache;
446 
447  auto aIterator = rCacheDrawCommands.find(rWidgetDraw.msSource);
448 
449  gfx::DrawRoot aDrawRoot;
450 
451  if (aIterator == rCacheDrawCommands.end())
452  {
453  SvFileStream aFileStream(rWidgetDraw.msSource, StreamMode::READ);
454 
455  uno::Reference<uno::XComponentContext> xContext(
457  const uno::Reference<graphic::XSvgParser> xSvgParser
458  = graphic::SvgTools::create(xContext);
459 
460  std::size_t nSize = aFileStream.remainingSize();
461  std::vector<sal_Int8> aBuffer(nSize + 1);
462  aFileStream.ReadBytes(aBuffer.data(), nSize);
463  aBuffer[nSize] = 0;
464 
465  uno::Sequence<sal_Int8> aData(aBuffer.data(), nSize + 1);
466  uno::Reference<io::XInputStream> aInputStream(
468 
469  uno::Any aAny = xSvgParser->getDrawCommands(aInputStream, "");
470  if (aAny.has<sal_uInt64>())
471  {
472  auto* pDrawRoot = reinterpret_cast<gfx::DrawRoot*>(aAny.get<sal_uInt64>());
473  if (pDrawRoot)
474  {
475  rCacheDrawCommands.insert(
476  std::make_pair(rWidgetDraw.msSource, *pDrawRoot));
477  drawFromDrawCommands(*pDrawRoot, rGraphics, nX, nY, nWidth, nHeight);
478  }
479  }
480  }
481  else
482  {
483  drawFromDrawCommands(aIterator->second, rGraphics, nX, nY, nWidth, nHeight);
484  }
485  }
486  break;
487  }
488  }
489 }
490 
491 } // end anonymous namespace
492 
494  ControlState eState,
495  const ImplControlValue& rValue, long nX, long nY,
496  long nWidth, long nHeight)
497 {
498  bool bOK = false;
499  auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ePart);
500  if (pPart)
501  {
502  auto const& aStates = pPart->getStates(eType, ePart, eState, rValue);
503  if (!aStates.empty())
504  {
505  // use last defined state
506  auto const& pState = aStates.back();
507  {
508  munchDrawCommands(pState->mpWidgetDrawActions, m_rGraphics, nX, nY, nWidth,
509  nHeight);
510  bOK = true;
511  }
512  }
513  }
514  return bOK;
515 }
516 
518  const tools::Rectangle& rControlRegion,
519  ControlState eState,
520  const ImplControlValue& rValue,
521  const OUString& /*aCaptions*/)
522 {
523  bool bOldAA = m_rGraphics.getAntiAliasB2DDraw();
525 
526  long nWidth = rControlRegion.GetWidth() - 1;
527  long nHeight = rControlRegion.GetHeight() - 1;
528  long nX = rControlRegion.Left();
529  long nY = rControlRegion.Top();
530 
531  bool bOK = false;
532 
533  switch (eType)
534  {
536  {
537  /*bool bIsAction = false;
538  const PushButtonValue* pPushButtonValue = static_cast<const PushButtonValue*>(&rValue);
539  if (pPushButtonValue)
540  bIsAction = pPushButtonValue->mbIsAction;*/
541 
542  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
543  }
544  break;
546  {
547  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
548  }
549  break;
551  {
552  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
553  }
554  break;
556  {
557  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
558  }
559  break;
563  {
564  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
565  }
566  break;
568  {
569  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
570  }
571  break;
573  {
574  if (rValue.getType() == ControlType::SpinButtons)
575  {
576  const SpinbuttonValue* pSpinVal = static_cast<const SpinbuttonValue*>(&rValue);
577 
578  {
579  ControlPart eUpButtonPart = pSpinVal->mnUpperPart;
580  ControlState eUpButtonState = pSpinVal->mnUpperState;
581 
582  long nUpperX = pSpinVal->maUpperRect.Left();
583  long nUpperY = pSpinVal->maUpperRect.Top();
584  long nUpperWidth = pSpinVal->maUpperRect.GetWidth() - 1;
585  long nUpperHeight = pSpinVal->maUpperRect.GetHeight() - 1;
586 
587  bOK = resolveDefinition(eType, eUpButtonPart, eUpButtonState,
588  ImplControlValue(), nUpperX, nUpperY, nUpperWidth,
589  nUpperHeight);
590  }
591 
592  if (bOK)
593  {
594  ControlPart eDownButtonPart = pSpinVal->mnLowerPart;
595  ControlState eDownButtonState = pSpinVal->mnLowerState;
596 
597  long nLowerX = pSpinVal->maLowerRect.Left();
598  long nLowerY = pSpinVal->maLowerRect.Top();
599  long nLowerWidth = pSpinVal->maLowerRect.GetWidth() - 1;
600  long nLowerHeight = pSpinVal->maLowerRect.GetHeight() - 1;
601 
602  bOK = resolveDefinition(eType, eDownButtonPart, eDownButtonState,
603  ImplControlValue(), nLowerX, nLowerY, nLowerWidth,
604  nLowerHeight);
605  }
606  }
607  else
608  {
609  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
610  }
611  }
612  break;
614  break;
619  {
620  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
621  }
622  break;
624  {
625  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
626  }
627  break;
628  case ControlType::Slider:
629  {
630  const SliderValue* pSliderValue = static_cast<const SliderValue*>(&rValue);
631  long nThumbX = pSliderValue->maThumbRect.Left();
632  long nThumbY = pSliderValue->maThumbRect.Top();
633  long nThumbWidth = pSliderValue->maThumbRect.GetWidth() - 1;
634  long nThumbHeight = pSliderValue->maThumbRect.GetHeight() - 1;
635 
636  if (ePart == ControlPart::TrackHorzArea)
637  {
638  long nCenterX = nThumbX + nThumbWidth / 2;
639 
640  bOK = resolveDefinition(eType, ControlPart::TrackHorzLeft, eState, rValue, nX, nY,
641  nCenterX - nX, nHeight);
642  if (bOK)
643  bOK = resolveDefinition(eType, ControlPart::TrackHorzRight, eState, rValue,
644  nCenterX, nY, nX + nWidth - nCenterX, nHeight);
645  }
646  else if (ePart == ControlPart::TrackVertArea)
647  {
648  long nCenterY = nThumbY + nThumbHeight / 2;
649 
650  bOK = resolveDefinition(eType, ControlPart::TrackVertUpper, eState, rValue, nX, nY,
651  nWidth, nCenterY - nY);
652  if (bOK)
653  bOK = resolveDefinition(eType, ControlPart::TrackVertLower, eState, rValue, nY,
654  nCenterY, nWidth, nY + nHeight - nCenterY);
655  }
656 
657  if (bOK)
658  {
660  eState | pSliderValue->mnThumbState, rValue, nThumbX,
661  nThumbY, nThumbWidth, nThumbHeight);
662  }
663  }
664  break;
666  {
667  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
668  }
669  break;
671  {
672  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
673  }
674  break;
677  {
678  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
679  }
680  break;
682  {
683  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
684  }
685  break;
687  break;
689  {
690  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
691  }
692  break;
694  case ControlType::Frame:
695  {
696  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
697  }
698  break;
702  {
703  bOK = resolveDefinition(eType, ePart, eState, rValue, nX, nY, nWidth, nHeight);
704  }
705  break;
706  default:
707  break;
708  }
709 
711 
712  return bOK;
713 }
714 
716  ControlType eType, ControlPart ePart, const tools::Rectangle& rBoundingControlRegion,
717  ControlState /*eState*/, const ImplControlValue& /*aValue*/, const OUString& /*aCaption*/,
718  tools::Rectangle& rNativeBoundingRegion, tools::Rectangle& rNativeContentRegion)
719 {
720  Point aLocation(rBoundingControlRegion.TopLeft());
721 
722  switch (eType)
723  {
725  {
726  auto const& pButtonUpPart
727  = m_pWidgetDefinition->getDefinition(eType, ControlPart::ButtonUp);
728  if (!pButtonUpPart)
729  return false;
730  Size aButtonSizeUp(pButtonUpPart->mnWidth, pButtonUpPart->mnHeight);
731 
732  auto const& pButtonDownPart
733  = m_pWidgetDefinition->getDefinition(eType, ControlPart::ButtonDown);
734  if (!pButtonDownPart)
735  return false;
736  Size aButtonSizeDown(pButtonDownPart->mnWidth, pButtonDownPart->mnHeight);
737 
738  auto const& pEntirePart
739  = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
740  OString sOrientation = pEntirePart->msOrientation;
741 
742  if (sOrientation.isEmpty() || sOrientation == "decrease-edit-increase")
743  {
744  if (ePart == ControlPart::ButtonUp)
745  {
746  Point aPoint(aLocation.X() + rBoundingControlRegion.GetWidth()
747  - aButtonSizeUp.Width(),
748  aLocation.Y());
749  rNativeContentRegion = tools::Rectangle(aPoint, aButtonSizeUp);
750  rNativeBoundingRegion = rNativeContentRegion;
751  return true;
752  }
753  else if (ePart == ControlPart::ButtonDown)
754  {
755  rNativeContentRegion = tools::Rectangle(aLocation, aButtonSizeDown);
756  rNativeBoundingRegion = rNativeContentRegion;
757  return true;
758  }
759  else if (ePart == ControlPart::SubEdit)
760  {
761  Point aPoint(aLocation.X() + aButtonSizeDown.Width(), aLocation.Y());
762  Size aSize(rBoundingControlRegion.GetWidth()
763  - (aButtonSizeDown.Width() + aButtonSizeUp.Width()),
764  std::max(aButtonSizeUp.Height(), aButtonSizeDown.Height()));
765  rNativeContentRegion = tools::Rectangle(aPoint, aSize);
766  rNativeBoundingRegion = rNativeContentRegion;
767  return true;
768  }
769  else if (ePart == ControlPart::Entire)
770  {
771  Size aSize(rBoundingControlRegion.GetWidth(),
772  std::max(aButtonSizeUp.Height(), aButtonSizeDown.Height()));
773  rNativeContentRegion = tools::Rectangle(aLocation, aSize);
774  rNativeBoundingRegion = rNativeContentRegion;
775  return true;
776  }
777  }
778  else if (sOrientation == "edit-decrease-increase")
779  {
780  if (ePart == ControlPart::ButtonUp)
781  {
782  Point aPoint(aLocation.X() + rBoundingControlRegion.GetWidth()
783  - aButtonSizeUp.Width(),
784  aLocation.Y());
785  rNativeContentRegion = tools::Rectangle(aPoint, aButtonSizeUp);
786  rNativeBoundingRegion = rNativeContentRegion;
787  return true;
788  }
789  else if (ePart == ControlPart::ButtonDown)
790  {
791  Point aPoint(aLocation.X() + rBoundingControlRegion.GetWidth()
792  - (aButtonSizeDown.Width() + aButtonSizeUp.Width()),
793  aLocation.Y());
794  rNativeContentRegion = tools::Rectangle(aPoint, aButtonSizeDown);
795  rNativeBoundingRegion = rNativeContentRegion;
796  return true;
797  }
798  else if (ePart == ControlPart::SubEdit)
799  {
800  Size aSize(rBoundingControlRegion.GetWidth()
801  - (aButtonSizeDown.Width() + aButtonSizeUp.Width()),
802  std::max(aButtonSizeUp.Height(), aButtonSizeDown.Height()));
803  rNativeContentRegion = tools::Rectangle(aLocation, aSize);
804  rNativeBoundingRegion = rNativeContentRegion;
805  return true;
806  }
807  else if (ePart == ControlPart::Entire)
808  {
809  Size aSize(rBoundingControlRegion.GetWidth(),
810  std::max(aButtonSizeUp.Height(), aButtonSizeDown.Height()));
811  rNativeContentRegion = tools::Rectangle(aLocation, aSize);
812  rNativeBoundingRegion = rNativeContentRegion;
813  return true;
814  }
815  }
816  }
817  break;
819  {
820  auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
821  if (!pPart)
822  return false;
823 
824  Size aSize(pPart->mnWidth, pPart->mnHeight);
825  rNativeContentRegion = tools::Rectangle(Point(), aSize);
826  return true;
827  }
829  {
830  auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
831  if (!pPart)
832  return false;
833 
834  Size aSize(pPart->mnWidth, pPart->mnHeight);
835  rNativeContentRegion = tools::Rectangle(Point(), aSize);
836  return true;
837  }
839  {
840  auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
841  if (!pPart)
842  return false;
843 
844  long nWidth = std::max(rBoundingControlRegion.GetWidth() + pPart->mnMarginWidth,
845  long(pPart->mnWidth));
846  long nHeight = std::max(rBoundingControlRegion.GetHeight() + pPart->mnMarginHeight,
847  long(pPart->mnHeight));
848 
849  rNativeBoundingRegion = tools::Rectangle(aLocation, Size(nWidth, nHeight));
850  rNativeContentRegion = rNativeBoundingRegion;
851  return true;
852  }
856  {
857  sal_Int32 nHeight = rBoundingControlRegion.GetHeight();
858 
859  auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::Entire);
860  if (pPart)
861  nHeight = std::max(nHeight, pPart->mnHeight);
862 
863  Size aSize(rBoundingControlRegion.GetWidth(), nHeight);
864  rNativeContentRegion = tools::Rectangle(aLocation, aSize);
865  rNativeBoundingRegion = rNativeContentRegion;
866  rNativeBoundingRegion.expand(2);
867  return true;
868  }
869  break;
871  {
872  if (ePart == ControlPart::ButtonUp || ePart == ControlPart::ButtonDown
873  || ePart == ControlPart::ButtonLeft || ePart == ControlPart::ButtonRight)
874  {
875  rNativeContentRegion = tools::Rectangle(aLocation, Size(0, 0));
876  rNativeBoundingRegion = rNativeContentRegion;
877  return true;
878  }
879  else
880  {
881  rNativeBoundingRegion = rBoundingControlRegion;
882  rNativeContentRegion = rNativeBoundingRegion;
883  return true;
884  }
885  }
886  break;
889  {
890  auto const& pPart = m_pWidgetDefinition->getDefinition(eType, ControlPart::ButtonDown);
891  Size aComboButtonSize(pPart->mnWidth, pPart->mnHeight);
892 
893  if (ePart == ControlPart::ButtonDown)
894  {
895  Point aPoint(aLocation.X() + rBoundingControlRegion.GetWidth()
896  - aComboButtonSize.Width(),
897  aLocation.Y() + 1);
898  rNativeContentRegion = tools::Rectangle(aPoint, aComboButtonSize);
899  rNativeBoundingRegion = rNativeContentRegion;
900  return true;
901  }
902  else if (ePart == ControlPart::SubEdit)
903  {
904  Size aSize(rBoundingControlRegion.GetWidth() - aComboButtonSize.Width(),
905  aComboButtonSize.Height());
906  rNativeContentRegion = tools::Rectangle(aLocation + Point(1, 1), aSize);
907  rNativeBoundingRegion = rNativeContentRegion;
908  return true;
909  }
910  else if (ePart == ControlPart::Entire)
911  {
912  Size aSize(rBoundingControlRegion.GetWidth(), aComboButtonSize.Height());
913  rNativeContentRegion = tools::Rectangle(aLocation, aSize);
914  rNativeBoundingRegion = rNativeContentRegion;
915  rNativeBoundingRegion.expand(1);
916  return true;
917  }
918  }
919  break;
920  case ControlType::Slider:
921  if (ePart == ControlPart::ThumbHorz || ePart == ControlPart::ThumbVert)
922  {
923  rNativeContentRegion = tools::Rectangle(aLocation, Size(28, 28));
924  rNativeBoundingRegion = rNativeContentRegion;
925  return true;
926  }
927  break;
928  default:
929  break;
930  }
931 
932  return false;
933 }
934 
936 {
937  StyleSettings aStyleSet = rSettings.GetStyleSettings();
938 
939  auto pDefinitionStyle = m_pWidgetDefinition->mpStyle;
940 
941  aStyleSet.SetFaceColor(pDefinitionStyle->maFaceColor);
942  aStyleSet.SetCheckedColor(pDefinitionStyle->maCheckedColor);
943  aStyleSet.SetLightColor(pDefinitionStyle->maLightColor);
944  aStyleSet.SetLightBorderColor(pDefinitionStyle->maLightBorderColor);
945  aStyleSet.SetShadowColor(pDefinitionStyle->maShadowColor);
946  aStyleSet.SetDarkShadowColor(pDefinitionStyle->maDarkShadowColor);
947  aStyleSet.SetButtonTextColor(pDefinitionStyle->maButtonTextColor);
948  aStyleSet.SetDefaultActionButtonTextColor(pDefinitionStyle->maDefaultActionButtonTextColor);
949  aStyleSet.SetActionButtonTextColor(pDefinitionStyle->maActionButtonTextColor);
950  aStyleSet.SetActionButtonRolloverTextColor(pDefinitionStyle->maActionButtonRolloverTextColor);
951  aStyleSet.SetButtonRolloverTextColor(pDefinitionStyle->maButtonRolloverTextColor);
952  aStyleSet.SetRadioCheckTextColor(pDefinitionStyle->maRadioCheckTextColor);
953  aStyleSet.SetGroupTextColor(pDefinitionStyle->maGroupTextColor);
954  aStyleSet.SetLabelTextColor(pDefinitionStyle->maLabelTextColor);
955  aStyleSet.SetWindowColor(pDefinitionStyle->maWindowColor);
956  aStyleSet.SetWindowTextColor(pDefinitionStyle->maWindowTextColor);
957  aStyleSet.SetDialogColor(pDefinitionStyle->maDialogColor);
958  aStyleSet.SetDialogTextColor(pDefinitionStyle->maDialogTextColor);
959  aStyleSet.SetWorkspaceColor(pDefinitionStyle->maWorkspaceColor);
960  aStyleSet.SetMonoColor(pDefinitionStyle->maMonoColor);
961  aStyleSet.SetFieldColor(pDefinitionStyle->maFieldColor);
962  aStyleSet.SetFieldTextColor(pDefinitionStyle->maFieldTextColor);
963  aStyleSet.SetFieldRolloverTextColor(pDefinitionStyle->maFieldRolloverTextColor);
964  aStyleSet.SetActiveColor(pDefinitionStyle->maActiveColor);
965  aStyleSet.SetActiveTextColor(pDefinitionStyle->maActiveTextColor);
966  aStyleSet.SetActiveBorderColor(pDefinitionStyle->maActiveBorderColor);
967  aStyleSet.SetDeactiveColor(pDefinitionStyle->maDeactiveColor);
968  aStyleSet.SetDeactiveTextColor(pDefinitionStyle->maDeactiveTextColor);
969  aStyleSet.SetDeactiveBorderColor(pDefinitionStyle->maDeactiveBorderColor);
970  aStyleSet.SetMenuColor(pDefinitionStyle->maMenuColor);
971  aStyleSet.SetMenuBarColor(pDefinitionStyle->maMenuBarColor);
972  aStyleSet.SetMenuBarRolloverColor(pDefinitionStyle->maMenuBarRolloverColor);
973  aStyleSet.SetMenuBorderColor(pDefinitionStyle->maMenuBorderColor);
974  aStyleSet.SetMenuTextColor(pDefinitionStyle->maMenuTextColor);
975  aStyleSet.SetMenuBarTextColor(pDefinitionStyle->maMenuBarTextColor);
976  aStyleSet.SetMenuBarRolloverTextColor(pDefinitionStyle->maMenuBarRolloverTextColor);
977  aStyleSet.SetMenuBarHighlightTextColor(pDefinitionStyle->maMenuBarHighlightTextColor);
978  aStyleSet.SetMenuHighlightColor(pDefinitionStyle->maMenuHighlightColor);
979  aStyleSet.SetMenuHighlightTextColor(pDefinitionStyle->maMenuHighlightTextColor);
980  aStyleSet.SetHighlightColor(pDefinitionStyle->maHighlightColor);
981  aStyleSet.SetHighlightTextColor(pDefinitionStyle->maHighlightTextColor);
982  aStyleSet.SetActiveTabColor(pDefinitionStyle->maActiveTabColor);
983  aStyleSet.SetInactiveTabColor(pDefinitionStyle->maInactiveTabColor);
984  aStyleSet.SetTabTextColor(pDefinitionStyle->maTabTextColor);
985  aStyleSet.SetTabRolloverTextColor(pDefinitionStyle->maTabRolloverTextColor);
986  aStyleSet.SetTabHighlightTextColor(pDefinitionStyle->maTabHighlightTextColor);
987  aStyleSet.SetDisableColor(pDefinitionStyle->maDisableColor);
988  aStyleSet.SetHelpColor(pDefinitionStyle->maHelpColor);
989  aStyleSet.SetHelpTextColor(pDefinitionStyle->maHelpTextColor);
990  aStyleSet.SetLinkColor(pDefinitionStyle->maLinkColor);
991  aStyleSet.SetVisitedLinkColor(pDefinitionStyle->maVisitedLinkColor);
992  aStyleSet.SetToolTextColor(pDefinitionStyle->maToolTextColor);
993  aStyleSet.SetFontColor(pDefinitionStyle->maFontColor);
994 
995  vcl::Font aFont(FAMILY_SWISS, Size(0, 10));
996  aFont.SetCharSet(osl_getThreadTextEncoding());
997  aFont.SetWeight(WEIGHT_NORMAL);
998  aFont.SetFamilyName("Liberation Sans");
999  aStyleSet.SetAppFont(aFont);
1000  aStyleSet.SetHelpFont(aFont);
1001  aStyleSet.SetMenuFont(aFont);
1002  aStyleSet.SetToolFont(aFont);
1003  aStyleSet.SetGroupFont(aFont);
1004  aStyleSet.SetLabelFont(aFont);
1005  aStyleSet.SetRadioCheckFont(aFont);
1006  aStyleSet.SetPushButtonFont(aFont);
1007  aStyleSet.SetFieldFont(aFont);
1008  aStyleSet.SetIconFont(aFont);
1009  aStyleSet.SetTabFont(aFont);
1010 
1011  aFont.SetWeight(WEIGHT_BOLD);
1012  aStyleSet.SetFloatTitleFont(aFont);
1013  aStyleSet.SetTitleFont(aFont);
1014 
1015  aStyleSet.SetTitleHeight(16);
1016  aStyleSet.SetFloatTitleHeight(12);
1017  aStyleSet.SetListBoxPreviewDefaultLogicSize(Size(16, 16));
1018 
1019  rSettings.SetStyleSettings(aStyleSet);
1020 
1021  return true;
1022 }
1023 
1024 } // end vcl namespace
1025 
1026 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetCheckedColor(const Color &rColor)
void SetMenuFont(const vcl::Font &rFont)
Point TopLeft() const
long Width() const
double getCenterY() const
void SetTabRolloverTextColor(const Color &rColor)
void loadFromSvg(SvStream &rStream, const OUString &sPath, BitmapEx &rBitmapEx, double fScalingFactor)
Definition: BitmapTools.cxx:61
void SetHighlightColor(const Color &rColor)
long GetWidth() const
void SetHelpFont(const vcl::Font &rFont)
basegfx::B2DRange maRectangle
bool mbCanDrawWidgetAnySize
Definition: svdata.hxx:284
long GetHeight() const
double getHeight() const
void SetFontColor(const Color &rColor)
const char aData[]
void SetFieldFont(const vcl::Font &rFont)
void SetMenuBorderColor(const Color &rColor)
ControlType getType() const
void SetMenuTextColor(const Color &rColor)
bool mbNoActiveTabTextRaise
Definition: svdata.hxx:279
void SetStyleSettings(const StyleSettings &rSet)
long Height() const
void SetMonoColor(const Color &rColor)
void SetLightColor(const Color &rColor)
void SetMenuBarRolloverTextColor(const Color &rColor)
void SetActionButtonTextColor(const Color &rColor)
int mnStatusBarLowerRightOffset
Definition: svdata.hxx:266
const std::shared_ptr< SalBitmap > & ImplGetSalBitmap() const
Definition: bitmap.hxx:518
void SetIconFont(const vcl::Font &rFont)
void SetRadioCheckFont(const vcl::Font &rFont)
void SetFieldRolloverTextColor(const Color &rColor)
const StyleSettings & GetStyleSettings() const
ImplSVNWFData maNWFData
Definition: svdata.hxx:352
void SetWindowColor(const Color &rColor)
void SetWeight(FontWeight)
Definition: font/font.cxx:215
bool mbNoFocusRectsForFlatButtons
Definition: svdata.hxx:277
ControlPart mnLowerPart
void SetCharSet(rtl_TextEncoding)
Definition: font/font.cxx:129
void SetMenuHighlightColor(const Color &rColor)
void SetDefaultActionButtonTextColor(const Color &rColor)
float x
void SetButtonTextColor(const Color &rColor)
tools::Rectangle maLowerRect
void SetDialogColor(const Color &rColor)
void SetActiveTabColor(const Color &rColor)
ImplSVGDIData maGDIData
Definition: svdata.hxx:348
int mnListBoxEntryMargin
Definition: svdata.hxx:295
void SetLinkColor(const Color &rColor)
void SetDeactiveBorderColor(const Color &rColor)
void SetDeactiveColor(const Color &rColor)
WEIGHT_BOLD
bool resolveDefinition(ControlType eType, ControlPart ePart, ControlState eState, const ImplControlValue &rValue, long nX, long nY, long nWidth, long nHeight)
tools::Rectangle maUpperRect
bool IsAlpha() const
Definition: bitmapex.cxx:226
double getWidth() const
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
void SetMenuBarRolloverColor(const Color &rColor)
void SetMenuHighlightTextColor(const Color &rColor)
void SetDialogTextColor(const Color &rColor)
void SetMenuColor(const Color &rColor)
void SetMenuBarTextColor(const Color &rColor)
bool updateSettings(AllSettings &rSettings) override
long Top() const
void SetTitleHeight(long nSize)
void DrawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const OutputDevice *pOutDev)
bool DrawGradient(const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient)
void DrawPolyLine(sal_uInt32 nPoints, SalPoint const *pPtAry, const OutputDevice *pOutDev)
void DrawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, PCONSTSALPOINT *pPtAry, const OutputDevice *pOutDev)
float y
std::vector< std::shared_ptr< DrawBase > > maChildren
o3tl::lru_map< OUString, BitmapEx > maThemeImageCache
Definition: svdata.hxx:191
Bitmap GetBitmap(const Color *pTransReplaceColor=nullptr) const
Definition: bitmapex.cxx:236
ControlPart mnUpperPart
std::vector< SalGradientStop > maStops
Definition: SalGradient.hxx:31
ControlState mnUpperState
virtual void SetFillColor()=0
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:67
void SetActionButtonRolloverTextColor(const Color &rColor)
void SetFamilyName(const OUString &rFamilyName)
Definition: font/font.cxx:107
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
Get the native control regions for the control part.
virtual void SetLineColor()=0
The edit field part of a control, e.g.
void SetMenuBarColor(const Color &rColor)
int i
void SetButtonRolloverTextColor(const Color &rColor)
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
ControlState mnLowerState
void SetGroupTextColor(const Color &rColor)
void SetMenuBarHighlightTextColor(const Color &rColor)
void SetDisableColor(const Color &rColor)
WEIGHT_NORMAL
void SetFieldColor(const Color &rColor)
void SetAppFont(const vcl::Font &rFont)
list_const_iterator_t find(const Key &key)
void SetRadioCheckTextColor(const Color &rColor)
o3tl::lru_map< OUString, gfx::DrawRoot > maThemeDrawCommandsCache
Definition: svdata.hxx:192
bool getAntiAliasB2DDraw() const
Definition: salgdi.hxx:85
void SetVisitedLinkColor(const Color &rColor)
bool hitTestNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, const Point &aPos, bool &rIsInside) override
Query if a position is inside the native widget part.
void SetLabelTextColor(const Color &rColor)
tools::Rectangle maThumbRect
void SetInactiveTabColor(const Color &rColor)
void SetToolFont(const vcl::Font &rFont)
void SetFloatTitleFont(const vcl::Font &rFont)
bool isNativeControlSupported(ControlType eType, ControlPart ePart) override
Query the platform layer for native control support.
double getCenterX() const
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
basegfx::B2DPoint maPoint2
Definition: SalGradient.hxx:30
void SetTabTextColor(const Color &rColor)
void SetToolTextColor(const Color &rColor)
void SetGroupFont(const vcl::Font &rFont)
void SetPushButtonFont(const vcl::Font &rFont)
void SetFaceColor(const Color &rColor)
void SetLightBorderColor(const Color &rColor)
AlphaMask GetAlpha() const
Definition: bitmapex.cxx:268
void SetTitleFont(const vcl::Font &rFont)
bool mbNoFocusRects
Definition: svdata.hxx:276
void SetLabelFont(const vcl::Font &rFont)
bool mbProgressNeedsErase
Definition: svdata.hxx:281
void SetWorkspaceColor(const Color &rColor)
ControlState mnThumbState
FAMILY_SWISS
basegfx::B2DPoint maPoint1
Definition: SalGradient.hxx:29
void setAntiAliasB2DDraw(bool bNew)
Definition: salgdi.hxx:84
Reference< XComponentContext > getProcessComponentContext()
void expand(long nExpandBy)
long Left() const
void SetHelpColor(const Color &rColor)
void SetActiveBorderColor(const Color &rColor)
basegfx::BColor maColor
void SetListBoxPreviewDefaultLogicSize(Size const &rSize)
void SetTabFont(const vcl::Font &rFont)
bool drawNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, ControlState eState, const ImplControlValue &aValue, const OUString &aCaptions) override
Draw the requested control.
void SetDeactiveTextColor(const Color &rColor)
void(* f)(TrueTypeTable *)
Definition: ttcr.cxx:466
void SetFieldTextColor(const Color &rColor)
void SetShadowColor(const Color &rColor)
void SetActiveTextColor(const Color &rColor)
void SetTabHighlightTextColor(const Color &rColor)
std::shared_ptr< WidgetDefinition > m_pWidgetDefinition
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
void SetHelpTextColor(const Color &rColor)
const Size & GetSizePixel() const
Definition: bitmapex.hxx:83
void SetWindowTextColor(const Color &rColor)
void SetHighlightTextColor(const Color &rColor)
void SetDarkShadowColor(const Color &rColor)
void SetFloatTitleHeight(long nSize)
void SetActiveColor(const Color &rColor)
bool mbCenteredTabs
Definition: svdata.hxx:278