LibreOffice Module vcl (master)  1
decoview.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  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #include <vcl/settings.hxx>
21 #include <vcl/outdev.hxx>
22 #include <vcl/decoview.hxx>
23 #include <vcl/window.hxx>
24 #include <vcl/ctrl.hxx>
25 
30 
31 namespace {
32 
33 tools::Long AdjustRectToSquare( tools::Rectangle &rRect )
34 {
35  const tools::Long nWidth = rRect.GetWidth();
36  const tools::Long nHeight = rRect.GetHeight();
37  tools::Long nSide = std::min( nWidth, nHeight );
38 
39  if ( nSide && !(nSide & 1) )
40  {
41  // we prefer an odd size
42  --nSide;
43  }
44 
45  // Make the rectangle a square
46  rRect.SetSize( Size( nSide, nSide ) );
47 
48  // and place it at the center of the original rectangle
49  rRect.Move( (nWidth-nSide)/2, (nHeight-nSide)/2 );
50 
51  return nSide;
52 }
53 
54 void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolType eType )
55 {
56  const tools::Long nSide = AdjustRectToSquare( nRect );
57 
58  if ( !nSide ) return;
59  if ( nSide==1 )
60  {
61  pDev->DrawPixel( Point( nRect.Left(), nRect.Top() ) );
62  return;
63  }
64 
65  // Precalculate some values
66  const tools::Long n2 = nSide/2;
67  const tools::Long n4 = (n2+1)/2;
68  const tools::Long n8 = (n4+1)/2;
69  const tools::Long n16 = (n8+1)/2;
70  const Point aCenter = nRect.Center();
71 
72  switch ( eType )
73  {
75  {
76  tools::Polygon arrow(7);
77  arrow.SetPoint( Point( aCenter.X(), nRect.Top()), 0 );
78  arrow.SetPoint( Point( aCenter.X() - n2, nRect.Top() + n2 ), 1 );
79  arrow.SetPoint( Point( aCenter.X() - n8, nRect.Top() + n2 ), 2 );
80  arrow.SetPoint( Point( aCenter.X() - n8, nRect.Bottom()), 3 );
81  arrow.SetPoint( Point( aCenter.X() + n8, nRect.Bottom()), 4 );
82  arrow.SetPoint( Point( aCenter.X() + n8, nRect.Top() + n2 ), 5 );
83  arrow.SetPoint( Point( aCenter.X() + n2, nRect.Top() + n2 ), 6 );
85  pDev->SetLineColor();
86  pDev->DrawPolygon( arrow );
87  pDev->Pop();
88  break;
89  }
90 
92  {
93  tools::Polygon arrow(7);
94  arrow.SetPoint( Point( aCenter.X(), nRect.Bottom()), 0 );
95  arrow.SetPoint( Point( aCenter.X() - n2, nRect.Bottom() - n2 ), 1 );
96  arrow.SetPoint( Point( aCenter.X() - n8, nRect.Bottom() - n2 ), 2 );
97  arrow.SetPoint( Point( aCenter.X() - n8, nRect.Top()), 3 );
98  arrow.SetPoint( Point( aCenter.X() + n8, nRect.Top()), 4 );
99  arrow.SetPoint( Point( aCenter.X() + n8, nRect.Bottom() - n2 ), 5 );
100  arrow.SetPoint( Point( aCenter.X() + n2, nRect.Bottom() - n2 ), 6 );
102  pDev->SetLineColor();
103  pDev->DrawPolygon( arrow );
104  pDev->Pop();
105  break;
106  }
107 
109  {
110  tools::Polygon arrow(7);
111  arrow.SetPoint( Point( nRect.Left(), aCenter.Y()), 0 );
112  arrow.SetPoint( Point( nRect.Left() + n2, aCenter.Y() - n2 ), 1 );
113  arrow.SetPoint( Point( nRect.Left() + n2, aCenter.Y() - n8 ), 2 );
114  arrow.SetPoint( Point( nRect.Right(), aCenter.Y() - n8 ), 3 );
115  arrow.SetPoint( Point( nRect.Right(), aCenter.Y() + n8 ), 4 );
116  arrow.SetPoint( Point( nRect.Left() + n2, aCenter.Y() + n8 ), 5 );
117  arrow.SetPoint( Point( nRect.Left() + n2, aCenter.Y() + n2 ), 6 );
119  pDev->SetLineColor();
120  pDev->DrawPolygon( arrow );
121  pDev->Pop();
122  break;
123  }
124 
126  {
127  tools::Polygon arrow(7);
128  arrow.SetPoint( Point( nRect.Right(), aCenter.Y()), 0 );
129  arrow.SetPoint( Point( nRect.Right() - n2, aCenter.Y() - n2 ), 1 );
130  arrow.SetPoint( Point( nRect.Right() - n2, aCenter.Y() - n8 ), 2 );
131  arrow.SetPoint( Point( nRect.Left(), aCenter.Y() - n8 ), 3 );
132  arrow.SetPoint( Point( nRect.Left(), aCenter.Y() + n8 ), 4 );
133  arrow.SetPoint( Point( nRect.Right() - n2, aCenter.Y() + n8 ), 5 );
134  arrow.SetPoint( Point( nRect.Right() - n2, aCenter.Y() + n2 ), 6 );
136  pDev->SetLineColor();
137  pDev->DrawPolygon( arrow );
138  pDev->Pop();
139  break;
140  }
141 
142  case SymbolType::SPIN_UP:
143  {
144  tools::Polygon triangle( 3 );
145  triangle.SetPoint( Point( aCenter.X(), nRect.Top() + n4 ), 0 );
146  triangle.SetPoint( Point( aCenter.X() - n2, nRect.Top() + n4 + n2 ), 1 );
147  triangle.SetPoint( Point( aCenter.X() + n2, nRect.Top() + n4 + n2 ), 2 );
149  pDev->SetLineColor();
150  pDev->DrawPolygon( triangle );
151  pDev->Pop();
152  break;
153  }
154 
156  {
157  tools::Polygon triangle( 3 );
158  triangle.SetPoint( Point( aCenter.X(), nRect.Bottom() - n4 ), 0 );
159  triangle.SetPoint( Point( aCenter.X() - n2, nRect.Bottom() - n4 - n2 ), 1 );
160  triangle.SetPoint( Point( aCenter.X() + n2, nRect.Bottom() - n4 - n2 ), 2 );
162  pDev->SetLineColor();
163  pDev->DrawPolygon( triangle );
164  pDev->Pop();
165  break;
166  }
167 
169  case SymbolType::FIRST:
170  case SymbolType::PREV:
171  {
172  nRect.AdjustLeft(n4 );
173  if ( eType==SymbolType::FIRST )
174  {
175  pDev->DrawLine( Point( nRect.Left(), nRect.Top() ),
176  Point( nRect.Left(), nRect.Bottom() ) );
177  nRect.AdjustLeft( 1 );
178  }
179 
180  tools::Polygon aTriangle(3);
181  aTriangle.SetPoint(Point(nRect.Left() + n2, aCenter.Y() - n2), 0);
182  aTriangle.SetPoint(Point(nRect.Left(), aCenter.Y()), 1);
183  aTriangle.SetPoint(Point(nRect.Left() + n2, aCenter.Y() + n2), 2);
184 
186  pDev->SetLineColor();
187  pDev->DrawPolygon(aTriangle);
188  pDev->Pop();
189 
190  break;
191  }
192 
194  case SymbolType::LAST:
195  case SymbolType::NEXT:
196  case SymbolType::PLAY:
197  {
198  nRect.AdjustRight( -n4 );
199  if ( eType==SymbolType::LAST )
200  {
201  pDev->DrawLine( Point( nRect.Right(), nRect.Top() ),
202  Point( nRect.Right(), nRect.Bottom() ) );
203  nRect.AdjustRight( -1 );
204  }
205 
206  tools::Polygon aTriangle(3);
207  aTriangle.SetPoint(Point(nRect.Right() - n2, aCenter.Y() - n2), 0);
208  aTriangle.SetPoint(Point(nRect.Right(), aCenter.Y()), 1);
209  aTriangle.SetPoint(Point(nRect.Right() - n2, aCenter.Y() + n2), 2);
210 
212  pDev->SetLineColor();
213  pDev->DrawPolygon(aTriangle);
214  pDev->Pop();
215  break;
216  }
217 
218  case SymbolType::PAGEUP:
219  {
220  tools::Polygon triangle( 3 );
221  triangle.SetPoint( Point( aCenter.X(), nRect.Top()), 0 );
222  triangle.SetPoint( Point( aCenter.X() - n2, nRect.Top() + n2 ), 1 );
223  triangle.SetPoint( Point( aCenter.X() + n2, nRect.Top() + n2 ), 2 );
225  pDev->SetLineColor();
226  pDev->DrawPolygon( triangle );
227  triangle.Move( 0, n2 );
228  pDev->DrawPolygon( triangle );
229  pDev->Pop();
230  break;
231  }
232 
234  {
235  tools::Polygon triangle( 3 );
236  triangle.SetPoint( Point( aCenter.X(), nRect.Bottom()), 0 );
237  triangle.SetPoint( Point( aCenter.X() - n2, nRect.Bottom() - n2 ), 1 );
238  triangle.SetPoint( Point( aCenter.X() + n2, nRect.Bottom() - n2 ), 2 );
240  pDev->SetLineColor();
241  pDev->DrawPolygon( triangle );
242  triangle.Move( 0, -n2 );
243  pDev->DrawPolygon( triangle );
244  pDev->Pop();
245  break;
246  }
247 
249  {
250  pDev->DrawEllipse(nRect);
251  break;
252  }
253 
254  case SymbolType::STOP:
255  pDev->DrawRect( nRect );
256  break;
257 
258  case SymbolType::CLOSE:
259  {
260  const tools::Long diff = std::max<tools::Long>( 0, n8 - 1 );
261  tools::Polygon cross( 16 );
262  cross.SetPoint( Point( nRect.Left(), nRect.Top()), 0 );
263  cross.SetPoint( Point( nRect.Left(), nRect.Top() + diff ), 1 );
264  cross.SetPoint( Point( aCenter.X() - diff, aCenter.Y()), 2 );
265  cross.SetPoint( Point( nRect.Left(), nRect.Bottom() - diff ), 3 );
266  cross.SetPoint( Point( nRect.Left(), nRect.Bottom()), 4 );
267  cross.SetPoint( Point( nRect.Left() + diff, nRect.Bottom()), 5 );
268  cross.SetPoint( Point( aCenter.X(), aCenter.Y() + diff ), 6 );
269  cross.SetPoint( Point( nRect.Right() - diff, nRect.Bottom()), 7 );
270  cross.SetPoint( Point( nRect.Right(), nRect.Bottom()), 8 );
271  cross.SetPoint( Point( nRect.Right(), nRect.Bottom() - diff ), 9 );
272  cross.SetPoint( Point( aCenter.X() + diff, aCenter.Y()), 10 );
273  cross.SetPoint( Point( nRect.Right(), nRect.Top() + diff ), 11 );
274  cross.SetPoint( Point( nRect.Right(), nRect.Top()), 12 );
275  cross.SetPoint( Point( nRect.Right() - diff, nRect.Top()), 13 );
276  cross.SetPoint( Point( aCenter.X(), aCenter.Y() - diff ), 14 );
277  cross.SetPoint( Point( nRect.Left() + diff, nRect.Top()), 15 );
278  pDev->DrawPolygon( cross );
279  break;
280  }
281 
283  {
284  tools::Long n3 = nSide/3;
285  nRect.AdjustTop( -(n3/2) );
286  nRect.AdjustBottom( -(n3/2) );
287  tools::Polygon checkmark(6);
288  // #106953# never mirror checkmarks
289  if ( pDev->HasMirroredGraphics() && pDev->IsRTLEnabled() )
290  {
291  // Draw a mirrored checkmark so that it looks "normal" in a
292  // mirrored graphics device (double mirroring!)
293  checkmark.SetPoint( Point( nRect.Right(), nRect.Bottom()-n3 ), 0 );
294  checkmark.SetPoint( Point( nRect.Right()-n3, nRect.Bottom()), 1 );
295  checkmark.SetPoint( Point( nRect.Left(), nRect.Top()+n3 ), 2 );
296  checkmark.SetPoint( Point( nRect.Left(), nRect.Top()+n3 + 1 ), 3 );
297  checkmark.SetPoint( Point( nRect.Right()-n3, nRect.Bottom() + 1 ), 4 );
298  checkmark.SetPoint( Point( nRect.Right(), nRect.Bottom()-n3 + 1 ), 5 );
299  }
300  else
301  {
302  checkmark.SetPoint( Point( nRect.Left(), nRect.Bottom()-n3 ), 0 );
303  checkmark.SetPoint( Point( nRect.Left()+n3, nRect.Bottom()), 1 );
304  checkmark.SetPoint( Point( nRect.Right(), nRect.Top()+n3 ), 2 );
305  checkmark.SetPoint( Point( nRect.Right(), nRect.Top()+n3 + 1 ), 3 );
306  checkmark.SetPoint( Point( nRect.Left()+n3, nRect.Bottom() + 1 ), 4 );
307  checkmark.SetPoint( Point( nRect.Left(), nRect.Bottom()-n3 + 1 ), 5 );
308  }
309  pDev->DrawPolygon( checkmark );
310  }
311  break;
312 
313  case SymbolType::FLOAT:
314  nRect.AdjustRight( -n4 );
315  nRect.AdjustTop(n4+1 );
316  pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(),
317  nRect.Right(), nRect.Top()+n8 ) );
318  pDev->DrawLine( Point( nRect.Left(), nRect.Top()+n8 ),
319  Point( nRect.Left(), nRect.Bottom() ) );
320  pDev->DrawLine( Point( nRect.Left(), nRect.Bottom() ),
321  Point( nRect.Right(), nRect.Bottom() ) );
322  pDev->DrawLine( Point( nRect.Right(), nRect.Top()+n8 ),
323  Point( nRect.Right(), nRect.Bottom() ) );
324  nRect.AdjustRight(n4 );
325  nRect.AdjustTop( -(n4+1) );
326  nRect.AdjustLeft(n4 );
327  nRect.AdjustBottom( -(n4+1) );
328  pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(),
329  nRect.Right(), nRect.Top()+n8 ) );
330  pDev->DrawLine( Point( nRect.Left(), nRect.Top()+n8 ),
331  Point( nRect.Left(), nRect.Bottom() ) );
332  pDev->DrawLine( Point( nRect.Left(), nRect.Bottom() ),
333  Point( nRect.Right(), nRect.Bottom() ) );
334  pDev->DrawLine( Point( nRect.Right(), nRect.Top()+n8 ),
335  Point( nRect.Right(), nRect.Bottom() ) );
336  break;
337 
338  case SymbolType::DOCK:
339  pDev->DrawLine( Point( nRect.Left(), nRect.Top() ),
340  Point( nRect.Right(), nRect.Top() ) );
341  pDev->DrawLine( Point( nRect.Left(), nRect.Top() ),
342  Point( nRect.Left(), nRect.Bottom() ) );
343  pDev->DrawLine( Point( nRect.Left(), nRect.Bottom() ),
344  Point( nRect.Right(), nRect.Bottom() ) );
345  pDev->DrawLine( Point( nRect.Right(), nRect.Top() ),
346  Point( nRect.Right(), nRect.Bottom() ) );
347  break;
348 
349  case SymbolType::HIDE:
350  pDev->DrawRect( tools::Rectangle( nRect.Left()+n8, nRect.Bottom()-n8,
351  nRect.Right()-n8, nRect.Bottom() ) );
352  break;
353 
354  case SymbolType::PLUS:
355  pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n16,
356  nRect.Right(), aCenter.Y()+n16 ) );
357  pDev->DrawRect( tools::Rectangle( aCenter.X()-n16, nRect.Top(),
358  aCenter.X()+n16, nRect.Bottom() ) );
359  break;
361  case SymbolType::IMAGE:
362  case SymbolType::HELP: break;
363  }
364 }
365 
366 void ImplDrawDPILineRect( OutputDevice *const pDev, tools::Rectangle& rRect,
367  const Color *const pColor, const bool bRound = false )
368 {
369  tools::Long nLineWidth = pDev->GetDPIX()/300;
370  tools::Long nLineHeight = pDev->GetDPIY()/300;
371  if ( !nLineWidth )
372  nLineWidth = 1;
373  if ( !nLineHeight )
374  nLineHeight = 1;
375 
376  if ( pColor )
377  {
378  if ( (nLineWidth == 1) && (nLineHeight == 1) )
379  {
380  pDev->SetLineColor( *pColor );
381  if( bRound )
382  {
383  pDev->DrawLine( Point( rRect.Left()+1, rRect.Top()), Point( rRect.Right()-1, rRect.Top()) );
384  pDev->DrawLine( Point( rRect.Left()+1, rRect.Bottom()), Point( rRect.Right()-1, rRect.Bottom()) );
385  pDev->DrawLine( Point( rRect.Left(), rRect.Top()+1), Point( rRect.Left(), rRect.Bottom()-1) );
386  pDev->DrawLine( Point( rRect.Right(), rRect.Top()+1), Point( rRect.Right(), rRect.Bottom()-1) );
387  }
388  else
389  {
390  pDev->SetFillColor();
391  pDev->DrawRect( rRect );
392  }
393  }
394  else
395  {
396  const tools::Long nWidth = rRect.GetWidth();
397  const tools::Long nHeight = rRect.GetHeight();
398  pDev->SetLineColor();
399  pDev->SetFillColor( *pColor );
400  pDev->DrawRect( tools::Rectangle( rRect.TopLeft(), Size( nWidth, nLineHeight ) ) );
401  pDev->DrawRect( tools::Rectangle( rRect.TopLeft(), Size( nLineWidth, nHeight ) ) );
402  pDev->DrawRect( tools::Rectangle( Point( rRect.Left(), rRect.Bottom()-nLineHeight ),
403  Size( nWidth, nLineHeight ) ) );
404  pDev->DrawRect( tools::Rectangle( Point( rRect.Right()-nLineWidth, rRect.Top() ),
405  Size( nLineWidth, nHeight ) ) );
406  }
407  }
408 
409  rRect.AdjustLeft(nLineWidth );
410  rRect.AdjustTop(nLineHeight );
411  rRect.AdjustRight( -nLineWidth );
412  rRect.AdjustBottom( -nLineHeight );
413 }
414 
415 void ImplDraw2ColorFrame( OutputDevice *const pDev, tools::Rectangle& rRect,
416  const Color& rLeftTopColor, const Color& rRightBottomColor )
417 {
418  pDev->SetLineColor( rLeftTopColor );
419  pDev->DrawLine( rRect.TopLeft(), rRect.BottomLeft() );
420  pDev->DrawLine( rRect.TopLeft(), rRect.TopRight() );
421  pDev->SetLineColor( rRightBottomColor );
422  pDev->DrawLine( rRect.BottomLeft(), rRect.BottomRight() );
423  pDev->DrawLine( rRect.TopRight(), rRect.BottomRight() );
424 
425  // reduce drawing area
426  rRect.AdjustLeft( 1 );
427  rRect.AdjustTop( 1 );
428  rRect.AdjustRight( -1 );
429  rRect.AdjustBottom( -1 );
430 }
431 
432 void ImplDrawButton( OutputDevice *const pDev, tools::Rectangle aFillRect,
433  const DrawButtonFlags nStyle )
434 {
435  const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
436 
437  if ( (nStyle & DrawButtonFlags::Mono) ||
438  (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) )
439  {
440  const Color aBlackColor(COL_BLACK);
441 
442  if ( nStyle & DrawButtonFlags::Default )
443  {
444  // default selection shows a wider border
445  ImplDrawDPILineRect( pDev, aFillRect, &aBlackColor );
446  }
447 
448  ImplDrawDPILineRect( pDev, aFillRect, &aBlackColor );
449 
450  Size aBrdSize(pDev->GetButtonBorderSize());
451 
452  pDev->SetLineColor();
453  pDev->SetFillColor( aBlackColor );
454  const tools::Rectangle aOrigFillRect(aFillRect);
456  {
457  // shrink fill rect
458  aFillRect.AdjustLeft(aBrdSize.Width() );
459  aFillRect.AdjustTop(aBrdSize.Height() );
460  // draw top and left borders (aOrigFillRect-aFillRect)
461  pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(),
462  aOrigFillRect.Right(), aFillRect.Top()-1 ) );
463  pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(),
464  aFillRect.Left()-1, aOrigFillRect.Bottom() ) );
465  }
466  else
467  {
468  // shrink fill rect
469  aFillRect.AdjustRight( -(aBrdSize.Width()) );
470  aFillRect.AdjustBottom( -(aBrdSize.Height()) );
471  // draw bottom and right borders (aOrigFillRect-aFillRect)
472  pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aFillRect.Bottom()+1,
473  aOrigFillRect.Right(), aOrigFillRect.Bottom() ) );
474  pDev->DrawRect( tools::Rectangle( aFillRect.Right()+1, aOrigFillRect.Top(),
475  aOrigFillRect.Right(), aOrigFillRect.Bottom() ) );
476  }
477 
478  // Hack: in monochrome mode on printers we like to have grey buttons
479  pDev->SetFillColor(pDev->GetMonochromeButtonColor());
480  pDev->DrawRect( aFillRect );
481  }
482  else
483  {
484  if ( nStyle & DrawButtonFlags::Default )
485  {
486  const Color aDefBtnColor = rStyleSettings.GetDarkShadowColor();
487  ImplDrawDPILineRect( pDev, aFillRect, &aDefBtnColor );
488  }
489 
490  if ( nStyle & DrawButtonFlags::NoLeftLightBorder )
491  {
492  pDev->SetLineColor( rStyleSettings.GetLightBorderColor() );
493  pDev->DrawLine( Point( aFillRect.Left(), aFillRect.Top() ),
494  Point( aFillRect.Left(), aFillRect.Bottom() ) );
495  aFillRect.AdjustLeft( 1 );
496  }
497 
498  Color aColor1;
499  Color aColor2;
501  {
502  aColor1 = rStyleSettings.GetDarkShadowColor();
503  aColor2 = rStyleSettings.GetLightColor();
504  }
505  else
506  {
507  if ( nStyle & DrawButtonFlags::NoLightBorder )
508  aColor1 = rStyleSettings.GetLightBorderColor();
509  else
510  aColor1 = rStyleSettings.GetLightColor();
511  if ( (nStyle & BUTTON_DRAW_FLATTEST) == DrawButtonFlags::Flat )
512  aColor2 = rStyleSettings.GetShadowColor();
513  else
514  aColor2 = rStyleSettings.GetDarkShadowColor();
515  }
516 
517  ImplDraw2ColorFrame( pDev, aFillRect, aColor1, aColor2 );
518 
519  if ( (nStyle & BUTTON_DRAW_FLATTEST) != DrawButtonFlags::Flat )
520  {
522  {
523  aColor1 = rStyleSettings.GetShadowColor();
524  aColor2 = rStyleSettings.GetLightBorderColor();
525  }
526  else
527  {
528  if ( nStyle & DrawButtonFlags::NoLightBorder )
529  aColor1 = rStyleSettings.GetLightColor();
530  else
531  aColor1 = rStyleSettings.GetLightBorderColor();
532  aColor2 = rStyleSettings.GetShadowColor();
533  }
534  ImplDraw2ColorFrame( pDev, aFillRect, aColor1, aColor2 );
535  }
536 
537  pDev->SetLineColor();
539  pDev->SetFillColor( rStyleSettings.GetCheckedColor() );
540  else
541  pDev->SetFillColor( rStyleSettings.GetFaceColor() );
542  pDev->DrawRect( aFillRect );
543  }
544 }
545 
546 void ImplDrawFrame( OutputDevice *const pDev, tools::Rectangle& rRect,
547  const StyleSettings& rStyleSettings, DrawFrameStyle nStyle, DrawFrameFlags nFlags )
548 {
549  vcl::Window * pWin = pDev->GetOwnerWindow();
550 
551  const bool bMenuStyle(nFlags & DrawFrameFlags::Menu);
552 
553  // UseFlatBorders disables 3D style for all frames except menus
554  // menus may use different border colors (eg on XP)
555  // normal frames will be drawn using the shadow color
556  // whereas window frame borders will use black
557  bool bFlatBorders = !bMenuStyle && rStyleSettings.GetUseFlatBorders();
558 
559  // no flat borders for standard VCL controls (ie formcontrols that keep their classic look)
560  // will not affect frame windows (like dropdowns)
561  if( bFlatBorders && pWin && pWin->GetType() == WindowType::BORDERWINDOW && (pWin != pWin->ImplGetFrameWindow()) )
562  {
563  // check for formcontrol, i.e., a control without NWF enabled
564  Control *const pControl = dynamic_cast< Control* >( pWin->GetWindow( GetWindowType::Client ) );
565  if( !pControl || !pControl->IsNativeWidgetEnabled() )
566  bFlatBorders = false;
567  }
568 
569  const bool bNoDraw(nFlags & DrawFrameFlags::NoDraw);
570 
571  if ( (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ||
572  (pDev->GetOutDevType() == OUTDEV_PRINTER) ||
573  bFlatBorders )
574  nFlags |= DrawFrameFlags::Mono;
575 
576  if( nStyle != DrawFrameStyle::NWF &&
578  {
579  tools::Long nControlFlags = static_cast<tools::Long>(nStyle);
580  nControlFlags |= static_cast<tools::Long>(nFlags);
581  nControlFlags |= static_cast<tools::Long>(pWin->GetType() == WindowType::BORDERWINDOW ?
583  ImplControlValue aControlValue( nControlFlags );
584 
585  tools::Rectangle aBound, aContent;
586  tools::Rectangle aNatRgn( rRect );
588  aNatRgn, ControlState::NONE, aControlValue, aBound, aContent) )
589  {
590  // if bNoDraw is true then don't call the drawing routine
591  // but just update the target rectangle
592  if( bNoDraw ||
594  aControlValue, OUString()) )
595  {
596  rRect = aContent;
597  return;
598  }
599  }
600  }
601 
602  if ( nFlags & DrawFrameFlags::Mono )
603  {
604  // no round corners for window frame borders
605  const bool bRound = bFlatBorders && !(nFlags & DrawFrameFlags::WindowBorder);
606 
607  if ( bNoDraw )
608  {
609  ImplDrawDPILineRect( pDev, rRect, nullptr, bRound );
610  }
611  else
612  {
613  Color aColor = bRound ? rStyleSettings.GetShadowColor()
615  // when the MonoColor wasn't set, check face color
616  if (
617  (bRound && aColor.IsDark()) ||
618  (
619  (aColor == COL_BLACK) &&
621  )
622  )
623  {
624  aColor = COL_WHITE;
625  }
626  ImplDrawDPILineRect( pDev, rRect, &aColor, bRound );
627  }
628  }
629  else
630  {
631  if ( bNoDraw )
632  {
633  switch ( nStyle )
634  {
635  case DrawFrameStyle::In:
636  case DrawFrameStyle::Out:
637  rRect.AdjustLeft( 1 );
638  rRect.AdjustTop( 1 );
639  rRect.AdjustRight( -1 );
640  rRect.AdjustBottom( -1 );
641  break;
642 
646  rRect.AdjustLeft(2 );
647  rRect.AdjustTop(2 );
648  rRect.AdjustRight( -2 );
649  rRect.AdjustBottom( -2 );
650  break;
651 
652  case DrawFrameStyle::NWF:
653  // enough space for the native rendering
654  rRect.AdjustLeft(4 );
655  rRect.AdjustTop(4 );
656  rRect.AdjustRight( -4 );
657  rRect.AdjustBottom( -4 );
658  break;
659  default: break;
660  }
661  }
662  else
663  {
664  switch ( nStyle )
665  {
667  pDev->SetFillColor();
668  pDev->SetLineColor( rStyleSettings.GetLightColor() );
669  pDev->DrawRect( tools::Rectangle( rRect.Left()+1, rRect.Top()+1,
670  rRect.Right(), rRect.Bottom() ) );
671  pDev->SetLineColor( rStyleSettings.GetShadowColor() );
672  pDev->DrawRect( tools::Rectangle( rRect.Left(), rRect.Top(),
673  rRect.Right()-1, rRect.Bottom()-1 ) );
674 
675  // adjust target rectangle
676  rRect.AdjustLeft(2 );
677  rRect.AdjustTop(2 );
678  rRect.AdjustRight( -2 );
679  rRect.AdjustBottom( -2 );
680  break;
681 
682  case DrawFrameStyle::In:
683  ImplDraw2ColorFrame( pDev, rRect,
684  rStyleSettings.GetShadowColor(),
685  rStyleSettings.GetLightColor() );
686  break;
687 
688  case DrawFrameStyle::Out:
689  ImplDraw2ColorFrame( pDev, rRect,
690  rStyleSettings.GetLightColor(),
691  rStyleSettings.GetShadowColor() );
692  break;
693 
695  if( bFlatBorders )
696  {
697  // no 3d effect
698  ImplDraw2ColorFrame( pDev, rRect,
699  rStyleSettings.GetShadowColor(),
700  rStyleSettings.GetShadowColor() );
701  ImplDraw2ColorFrame( pDev, rRect,
702  rStyleSettings.GetFaceColor(),
703  rStyleSettings.GetFaceColor() );
704  }
705  else
706  {
707  ImplDraw2ColorFrame( pDev, rRect,
708  rStyleSettings.GetShadowColor(),
709  rStyleSettings.GetLightColor() );
710  ImplDraw2ColorFrame( pDev, rRect,
711  rStyleSettings.GetDarkShadowColor(),
712  rStyleSettings.GetLightBorderColor() );
713  }
714  break;
715 
717  if( bMenuStyle )
718  {
719  ImplDraw2ColorFrame( pDev, rRect,
720  rStyleSettings.GetMenuBorderColor(),
721  rStyleSettings.GetDarkShadowColor() );
722  if ( !rStyleSettings.GetUseFlatMenus() )
723  {
724  ImplDraw2ColorFrame( pDev, rRect,
725  rStyleSettings.GetLightColor(),
726  rStyleSettings.GetShadowColor() );
727  }
728  }
729  else
730  {
731  ImplDraw2ColorFrame( pDev, rRect,
732  bFlatBorders ? // no 3d effect
733  rStyleSettings.GetDarkShadowColor() :
734  rStyleSettings.GetLightBorderColor(),
735  rStyleSettings.GetDarkShadowColor() );
736  ImplDraw2ColorFrame( pDev, rRect,
737  rStyleSettings.GetLightColor(),
738  rStyleSettings.GetShadowColor() );
739  }
740  break;
741 
742  case DrawFrameStyle::NWF:
743  // no rendering, just enough space for the native rendering
744  rRect.AdjustLeft(4 );
745  rRect.AdjustTop(4 );
746  rRect.AdjustRight( -4 );
747  rRect.AdjustBottom( -4 );
748  break;
749  default: break;
750  }
751  }
752  }
753 }
754 
755 } // end anonymous namespace
756 
758  mpOutDev(pOutDev)
759 {}
760 
762  const Color& rColor, DrawSymbolFlags nStyle )
763 {
764  const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
765  const tools::Rectangle aRect = mpOutDev->LogicToPixel( rRect );
766  const Color aOldLineColor = mpOutDev->GetLineColor();
767  const Color aOldFillColor = mpOutDev->GetFillColor();
768  const bool bOldMapMode = mpOutDev->IsMapModeEnabled();
769  Color nColor(rColor);
770  mpOutDev->EnableMapMode( false );
771 
772  if ( (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ||
774  nStyle |= DrawSymbolFlags::Mono;
775 
776  if ( nStyle & DrawSymbolFlags::Mono )
777  {
778  // Monochrome: set color to black if enabled, to gray if disabled
779  nColor = ( nStyle & DrawSymbolFlags::Disable ) ? COL_GRAY : COL_BLACK;
780  }
781  else
782  {
783  if ( nStyle & DrawSymbolFlags::Disable )
784  {
785  // Draw shifted and brighter symbol for embossed look
786  mpOutDev->SetLineColor( rStyleSettings.GetLightColor() );
787  mpOutDev->SetFillColor( rStyleSettings.GetLightColor() );
788  ImplDrawSymbol( mpOutDev, aRect + Point(1, 1) , eType );
789  nColor = rStyleSettings.GetShadowColor();
790  }
791  }
792 
793  // Set selected color and draw the symbol
794  mpOutDev->SetLineColor( nColor );
795  mpOutDev->SetFillColor( nColor );
796  ImplDrawSymbol( mpOutDev, aRect, eType );
797 
798  // Restore previous settings
799  mpOutDev->SetLineColor( aOldLineColor );
800  mpOutDev->SetFillColor( aOldFillColor );
801  mpOutDev->EnableMapMode( bOldMapMode );
802 }
803 
805  const Color& rLeftTopColor,
806  const Color& rRightBottomColor )
807 {
808  tools::Rectangle aRect = mpOutDev->LogicToPixel( rRect );
809  const Color aOldLineColor = mpOutDev->GetLineColor();
810  const bool bOldMapMode = mpOutDev->IsMapModeEnabled();
811  mpOutDev->EnableMapMode( false );
812  ImplDraw2ColorFrame( mpOutDev, aRect, rLeftTopColor, rRightBottomColor );
813  mpOutDev->SetLineColor( aOldLineColor );
814  mpOutDev->EnableMapMode( bOldMapMode );
815 }
816 
818  DrawHighlightFrameStyle nStyle )
819 {
820  const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
821  Color aLightColor = rStyleSettings.GetLightColor();
822  Color aShadowColor = rStyleSettings.GetShadowColor();
823 
824  if ( (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ||
826  {
827  aLightColor = COL_BLACK;
828  aShadowColor = COL_BLACK;
829  }
830  else
831  {
832  Wallpaper aBackground = mpOutDev->GetBackground();
833  if ( aBackground.IsBitmap() || aBackground.IsGradient() )
834  {
835  aLightColor = rStyleSettings.GetFaceColor();
836  aShadowColor = COL_BLACK;
837  }
838  else
839  {
840  Color aBackColor = aBackground.GetColor();
841  if ( (aLightColor.GetColorError( aBackColor ) < 96) ||
842  (aShadowColor.GetColorError( aBackColor ) < 96) )
843  {
844  aLightColor = COL_WHITE;
845  aShadowColor = COL_BLACK;
846 
847  if ( aLightColor.GetColorError( aBackColor ) < 96 )
848  aLightColor.DecreaseLuminance( 64 );
849  if ( aShadowColor.GetColorError( aBackColor ) < 96 )
850  aShadowColor.IncreaseLuminance( 64 );
851  }
852  }
853  }
854 
855  if ( nStyle == DrawHighlightFrameStyle::In )
856  {
857  Color aTempColor = aLightColor;
858  aLightColor = aShadowColor;
859  aShadowColor = aTempColor;
860  }
861 
862  DrawFrame( rRect, aLightColor, aShadowColor );
863 }
864 
866 {
867  tools::Rectangle aRect = rRect;
868  bool bOldMap = mpOutDev->IsMapModeEnabled();
869  if ( bOldMap )
870  {
871  aRect = mpOutDev->LogicToPixel( aRect );
872  mpOutDev->EnableMapMode( false );
873  }
874 
875  if ( !rRect.IsEmpty() )
876  {
877  if ( nFlags & DrawFrameFlags::NoDraw )
878  ImplDrawFrame( mpOutDev, aRect, mpOutDev->GetSettings().GetStyleSettings(), nStyle, nFlags );
879  else
880  {
881  Color aOldLineColor = mpOutDev->GetLineColor();
882  Color aOldFillColor = mpOutDev->GetFillColor();
883  ImplDrawFrame( mpOutDev, aRect, mpOutDev->GetSettings().GetStyleSettings(), nStyle, nFlags );
884  mpOutDev->SetLineColor( aOldLineColor );
885  mpOutDev->SetFillColor( aOldFillColor );
886  }
887  }
888 
889  if ( bOldMap )
890  {
891  mpOutDev->EnableMapMode( bOldMap );
892  aRect = mpOutDev->PixelToLogic( aRect );
893  }
894 
895  return aRect;
896 }
897 
899 {
900  if ( rRect.IsEmpty() )
901  {
902  return rRect;
903  }
904 
905  tools::Rectangle aRect = rRect;
906  const bool bOldMap = mpOutDev->IsMapModeEnabled();
907 
908  if ( bOldMap )
909  {
910  aRect = mpOutDev->LogicToPixel( aRect );
911  mpOutDev->EnableMapMode( false );
912  }
913 
914  const Color aOldLineColor = mpOutDev->GetLineColor();
915  const Color aOldFillColor = mpOutDev->GetFillColor();
916  ImplDrawButton( mpOutDev, aRect, nStyle );
917  mpOutDev->SetLineColor( aOldLineColor );
918  mpOutDev->SetFillColor( aOldFillColor );
919 
920  // keep border free, although it is used at default representation
921  aRect.AdjustLeft( 1 );
922  aRect.AdjustTop( 1 );
923  aRect.AdjustRight( -1 );
924  aRect.AdjustBottom( -1 );
925 
926  if ( nStyle & DrawButtonFlags::NoLightBorder )
927  {
928  aRect.AdjustLeft( 1 );
929  aRect.AdjustTop( 1 );
930  }
931  else if ( nStyle & DrawButtonFlags::NoLeftLightBorder )
932  {
933  aRect.AdjustLeft( 1 );
934  }
935 
936  if ( nStyle & DrawButtonFlags::Pressed )
937  {
938  if ( (aRect.GetHeight() > 10) && (aRect.GetWidth() > 10) )
939  {
940  aRect.AdjustLeft(4 );
941  aRect.AdjustTop(4 );
942  aRect.AdjustRight( -1 );
943  aRect.AdjustBottom( -1 );
944  }
945  else
946  {
947  aRect.AdjustLeft(3 );
948  aRect.AdjustTop(3 );
949  aRect.AdjustRight( -2 );
950  aRect.AdjustBottom( -2 );
951  }
952  }
953  else if ( nStyle & DrawButtonFlags::Checked )
954  {
955  aRect.AdjustLeft(3 );
956  aRect.AdjustTop(3 );
957  aRect.AdjustRight( -2 );
958  aRect.AdjustBottom( -2 );
959  }
960  else
961  {
962  aRect.AdjustLeft(2 );
963  aRect.AdjustTop(2 );
964  aRect.AdjustRight( -3 );
965  aRect.AdjustBottom( -3 );
966  }
967 
968  if ( bOldMap )
969  {
970  mpOutDev->EnableMapMode( bOldMap );
971  aRect = mpOutDev->PixelToLogic( aRect );
972  }
973 
974  return aRect;
975 }
976 
977 void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical )
978 {
979  Point aStart( rStart ), aStop( rStop );
980  const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
981  vcl::Window *const pWin = mpOutDev->GetOwnerWindow();
982  if(pWin)
983  {
985  bool nativeSupported = pWin->IsNativeControlSupported( ControlType::Fixedline, nPart );
986  ImplControlValue aValue;
987  tools::Rectangle aRect(rStart,rStop);
988  if(nativeSupported && pWin->GetOutDev()->DrawNativeControl(ControlType::Fixedline,nPart,aRect,ControlState::NONE,aValue,OUString()))
989  return;
990  }
991 
993  if ( rStyleSettings.GetOptions() & StyleSettingsOptions::Mono )
995  else
996  mpOutDev->SetLineColor( rStyleSettings.GetShadowColor() );
997 
998  mpOutDev->DrawLine( aStart, aStop );
999  if ( !(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) )
1000  {
1001  mpOutDev->SetLineColor( rStyleSettings.GetLightColor() );
1002  if( bVertical )
1003  {
1004  aStart.AdjustX( 1 );
1005  aStop.AdjustX( 1 );
1006  }
1007  else
1008  {
1009  aStart.AdjustY( 1 );
1010  aStop.AdjustY( 1 );
1011  }
1012  mpOutDev->DrawLine( aStart, aStop );
1013  }
1014  mpOutDev->Pop();
1015 }
1016 
1018 {
1019  const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
1020 
1021  Size aOutputSize = rRect.GetSize();
1022 
1023  mpOutDev->SetLineColor(rStyleSettings.GetDarkShadowColor());
1024  mpOutDev->SetFillColor(rStyleSettings.GetDarkShadowColor());
1025 
1026  const sal_Int32 nNumberOfPoints = 3;
1027 
1028  tools::Long nHalfWidth = aOutputSize.Width() / 2.0f;
1029 
1030  float fDistance = aOutputSize.Height();
1031  fDistance /= (nNumberOfPoints + 1);
1032 
1033  tools::Long nRadius = aOutputSize.Width();
1034  nRadius /= (nNumberOfPoints + 2);
1035 
1036  for (tools::Long i = 1; i <= nNumberOfPoints; i++)
1037  {
1038  tools::Rectangle aLocation(nHalfWidth - nRadius,
1039  round(fDistance * i) - nRadius,
1040  nHalfWidth + nRadius,
1041  round(fDistance * i) + nRadius);
1042  mpOutDev->DrawEllipse(aLocation);
1043  }
1044 }
1045 
1046 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const Color & GetShadowColor() const
OutDevType GetOutDevType() const
Definition: outdev.hxx:413
virtual Color GetMonochromeButtonColor()
Definition: outdev.hxx:429
const Wallpaper & GetBackground() const
Definition: outdev.hxx:534
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
constexpr tools::Long Left() const
long Long
const StyleSettings & GetStyleSettings() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
Definition: stack.cxx:33
const Color & GetFaceColor() const
bool IsMapModeEnabled() const
Definition: outdev.hxx:1566
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
Definition: decoview.cxx:804
void DrawPolygon(const tools::Polygon &rPoly)
Render the given polygon.
Definition: polygon.cxx:156
SAL_DLLPRIVATE vcl::Window * ImplGetFrameWindow() const
Definition: window2.cxx:924
void Move(tools::Long nHorzMove, tools::Long nVertMove)
DrawButtonFlags
Definition: decoview.hxx:53
void EnableMapMode(bool bEnable=true)
Definition: map.cxx:641
tools::Rectangle DrawButton(const tools::Rectangle &rRect, DrawButtonFlags nStyle)
Definition: decoview.cxx:898
void SetPoint(const Point &rPt, sal_uInt16 nPos)
const Color & GetLightBorderColor() const
constexpr tools::Long Width() const
int n2
SymbolType
Definition: vclenum.hxx:73
bool GetUseFlatMenus() const
constexpr Point BottomLeft() const
const Color & GetLightColor() const
constexpr tools::Long GetWidth() const
void Pop()
Definition: stack.cxx:92
void IncreaseLuminance(sal_uInt8 cLumInc)
sal_uInt16 GetColorError(const Color &rCompareColor) const
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
Definition: line.cxx:160
void DrawHighlightFrame(const tools::Rectangle &rRect, DrawHighlightFrameStyle nStyle)
Definition: decoview.cxx:817
void DrawRect(const tools::Rectangle &rRect)
Definition: rect.cxx:51
constexpr bool IsEmpty() const
DocumentType eType
const Color & GetDarkShadowColor() const
void SetLineColor()
Definition: line.cxx:36
bool IsRTLEnabled() const
Definition: outdev.hxx:1284
void DecreaseLuminance(sal_uInt8 cLumDec)
int i
VclPtr< OutputDevice > mpOutDev
Definition: decoview.hxx:75
bool IsDark() const
bool IsNativeWidgetEnabled() const
Definition: window.cxx:3709
void SetSize(const Size &rSize)
const Color & GetColor() const
Definition: wall.hxx:71
virtual bool HasMirroredGraphics() const
Definition: outdev.cxx:719
constexpr tools::Long Right() const
void SetFillColor()
Definition: fill.cxx:29
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_GRAY
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:175
const Color & GetLineColor() const
Definition: outdev.hxx:521
bool GetNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
Query the native control's actual drawing region (including adornment)
Definition: window3.cxx:79
DrawSymbolFlags
Definition: decoview.hxx:34
constexpr tools::Long Top() const
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.
const AllSettings & GetSettings() const
Definition: outdev.hxx:295
DecorationView(OutputDevice *pOutDev)
Definition: decoview.cxx:757
const Color & GetCheckedColor() const
void DrawPixel(const Point &rPt)
Definition: pixel.cxx:56
sal_Int32 nLineWidth
void DrawSeparator(const Point &rStart, const Point &rStop, bool bVertical=true)
Definition: decoview.cxx:977
constexpr Point Center() const
constexpr Point TopLeft() const
StyleSettingsOptions GetOptions() const
tools::Long AdjustTop(tools::Long nVertMoveDelta)
vcl::Window * GetWindow(GetWindowType nType) const
Definition: stacking.cxx:1035
DrawFrameStyle
Definition: vclenum.hxx:335
B3DVector cross(const B3DVector &rVecA, const B3DVector &rVecB)
constexpr tools::Long Bottom() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1164
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:933
const Color & GetMenuBorderColor() const
constexpr Size GetSize() const
bool IsGradient() const
Definition: wall.cxx:213
Definition: ctrl.hxx:81
constexpr tools::Long Height() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
void DrawHandle(const tools::Rectangle &rRectangle)
Definition: decoview.cxx:1017
constexpr Point TopRight() const
::OutputDevice const * GetOutDev() const
Definition: window.cxx:567
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
virtual Size GetButtonBorderSize()
Definition: outdev.hxx:428
void DrawEllipse(const tools::Rectangle &rRect)
bool IsBitmap() const
Definition: wall.cxx:189
constexpr Point BottomRight() const
DrawHighlightFrameStyle
Definition: decoview.hxx:46
WindowType GetType() const
Definition: window2.cxx:997
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
constexpr auto BUTTON_DRAW_FLATTEST
Definition: decoview.cxx:26
void DrawSymbol(const tools::Rectangle &rRect, SymbolType eType, const Color &rColor, DrawSymbolFlags nStyle=DrawSymbolFlags::NONE)
Definition: decoview.cxx:761
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
Definition: window3.cxx:74
DrawFrameFlags
Definition: vclenum.hxx:347
SAL_DLLPRIVATE sal_Int32 GetDPIY() const
Get the output device's DPI y-axis value.
Definition: outdev.hxx:398
virtual vcl::Window * GetOwnerWindow() const
Get the vcl::Window that this OutputDevice belongs to, if any.
Definition: outdev.hxx:1923
SAL_DLLPRIVATE sal_Int32 GetDPIX() const
Get the output device's DPI x-axis value.
Definition: outdev.hxx:392
const Color & GetMonoColor() const
const Color & GetFillColor() const
Definition: outdev.hxx:526
bool GetUseFlatBorders() const
constexpr tools::Long GetHeight() const