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