LibreOffice Module vcl (master)  1
svlbitm.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 
21 #include <vcl/toolkit/svlbitm.hxx>
24 #include <vcl/svapp.hxx>
25 #include <vcl/toolkit/button.hxx>
26 #include <vcl/decoview.hxx>
27 #include <vcl/salnativewidgets.hxx>
28 #include <vcl/settings.hxx>
29 
31 {
36 
37  SvLBoxButtonData_Impl() : pEntry(nullptr), pBox(nullptr), bDefaultImages(false), bShowRadioButton(false) {}
38 };
39 
40 void SvLBoxButtonData::InitData( bool _bRadioBtn, const Control* pCtrl )
41 {
42  nWidth = nHeight = 0;
43 
44  aBmps.resize(int(SvBmp::HITRISTATE)+1);
45 
46  bDataOk = false;
47  pImpl->bDefaultImages = true;
48  pImpl->bShowRadioButton = _bRadioBtn;
49 
50  SetDefaultImages( pCtrl );
51 }
52 
53 SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings, bool _bRadioBtn )
54  : pImpl( new SvLBoxButtonData_Impl )
55 {
56  InitData( _bRadioBtn, pControlForSettings );
57 }
58 
60 {
61 }
62 
64 {
65  aLink.Call( this );
66 }
67 
69 {
70  SvBmp nIdx;
71  if (nItemState == SvItemStateFlags::UNCHECKED)
72  nIdx = SvBmp::UNCHECKED;
73  else if (nItemState == SvItemStateFlags::CHECKED)
74  nIdx = SvBmp::CHECKED;
75  else if (nItemState == SvItemStateFlags::TRISTATE)
76  nIdx = SvBmp::TRISTATE;
78  nIdx = SvBmp::HIUNCHECKED;
79  else if (nItemState == (SvItemStateFlags::CHECKED | SvItemStateFlags::HILIGHTED))
80  nIdx = SvBmp::HICHECKED;
82  nIdx = SvBmp::HITRISTATE;
83  else
84  nIdx = SvBmp::UNCHECKED;
85  return nIdx;
86 }
87 
89 {
90  Size aSize = aBmps[int(SvBmp::UNCHECKED)].GetSizePixel();
91  nWidth = aSize.Width();
92  nHeight = aSize.Height();
93  bDataOk = true;
94 }
95 
97 {
98  pImpl->pEntry = pActEntry;
99  pImpl->pBox = pActBox;
100 }
101 
103 {
104  nItemFlags &= SvItemStateFlags::UNCHECKED |
107  switch( nItemFlags )
108  {
112  return SvButtonState::Checked;
115  default:
117  }
118 }
119 
121 {
122  assert(pImpl && "-SvLBoxButtonData::GetActEntry(): don't use me that way!");
123  return pImpl->pEntry;
124 }
125 
127 {
128  assert(pImpl && "-SvLBoxButtonData::GetActBox(): don't use me that way!");
129  return pImpl->pBox;
130 }
131 
133 {
134  const AllSettings& rSettings = pCtrl? pCtrl->GetSettings() : Application::GetSettings();
135 
136  if ( pImpl->bShowRadioButton )
137  {
144  }
145  else
146  {
153  }
154 }
155 
157 {
158  return pImpl->bDefaultImages;
159 }
160 
162  return pImpl->bShowRadioButton;
163 }
164 
165 // ***************************************************************
166 // class SvLBoxString
167 // ***************************************************************
168 
169 
170 SvLBoxString::SvLBoxString(const OUString& rStr)
171  : mbEmphasized(false)
172  , mbCustom(false)
173  , mfAlign(0.0)
174  , maText(rStr)
175 {
176 }
177 
179  : mbEmphasized(false)
180  , mbCustom(false)
181  , mfAlign(0.0)
182 {
183 }
184 
186 {
187 }
188 
190 {
191  return SvLBoxItemType::String;
192 }
193 
194 namespace
195 {
196  void drawSeparator(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRegion)
197  {
198  Color aOldLineColor(rRenderContext.GetLineColor());
199  const StyleSettings& rStyle = rRenderContext.GetSettings().GetStyleSettings();
200  Point aTmpPos = rRegion.TopLeft();
201  Size aSize = rRegion.GetSize();
202  aTmpPos.AdjustY(aSize.Height() / 2 );
203  rRenderContext.SetLineColor(rStyle.GetShadowColor());
204  rRenderContext.DrawLine(aTmpPos, Point(aSize.Width() + aTmpPos.X(), aTmpPos.Y()));
205  rRenderContext.SetLineColor(aOldLineColor);
206  }
207 }
208 
210  const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
211  const SvViewDataEntry* /*pView*/, const SvTreeListEntry& rEntry)
212 {
214  if (bool(rEntry.GetFlags() & SvTLEntryFlags::IS_SEPARATOR))
215  {
216  Point aStartPos(0, rPos.Y() - 2);
217  tools::Rectangle aRegion(aStartPos, Size(rDev.GetSizePixel().Width(), 4));
218  drawSeparator(rRenderContext, aRegion);
219  return;
220  }
221 
222  Size aSize;
223  if (rDev.TextCenterAndClipEnabled())
224  {
226  aSize.setWidth( rDev.GetEntryWidth() );
227  }
228  else
229  {
230  if (mfAlign < 0.5 )
231  {
232  nStyle |= DrawTextFlags::Left;
233  aSize.setWidth(GetWidth(&rDev, &rEntry));
234  }
235  else if (mfAlign == 0.5)
236  {
237  nStyle |= DrawTextFlags::Center;
238  aSize.setWidth(rDev.GetBoundingRect(&rEntry).getWidth());
239  }
240  else if (mfAlign > 0.5)
241  {
242  nStyle |= DrawTextFlags::Right;
243  aSize.setWidth(rDev.GetBoundingRect(&rEntry).getWidth());
244  }
245  }
246  aSize.setHeight(GetHeight(&rDev, &rEntry));
247 
248  if (mbEmphasized)
249  {
250  rRenderContext.Push();
251  vcl::Font aFont(rRenderContext.GetFont());
252  aFont.SetWeight(WEIGHT_BOLD);
253  rRenderContext.SetFont(aFont);
254  }
255 
256  tools::Rectangle aRect(rPos, aSize);
257 
258  if (mbCustom)
259  rDev.DrawCustomEntry(rRenderContext, aRect, rEntry);
260  else
261  rRenderContext.DrawText(aRect, maText, nStyle);
262 
263  if (mbEmphasized)
264  rRenderContext.Pop();
265 }
266 
267 std::unique_ptr<SvLBoxItem> SvLBoxString::Clone(SvLBoxItem const * pSource) const
268 {
269  std::unique_ptr<SvLBoxString> pNew(new SvLBoxString);
270 
271  const SvLBoxString* pOther = static_cast<const SvLBoxString*>(pSource);
272  pNew->maText = pOther->maText;
273  pNew->mbEmphasized = pOther->mbEmphasized;
274  pNew->mbCustom = pOther->mbCustom;
275  pNew->mfAlign = pOther->mfAlign;
276 
277  return std::unique_ptr<SvLBoxItem>(pNew.release());
278 }
279 
281  SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData)
282 {
283  if( !pViewData )
284  pViewData = pView->GetViewDataItem( pEntry, this );
285 
286  if (bool(pEntry->GetFlags() & SvTLEntryFlags::IS_SEPARATOR))
287  {
288  pViewData->mnWidth = -1;
289  pViewData->mnHeight = 0;
290  return;
291  }
292 
293  if (mbEmphasized)
294  {
295  pView->Push();
296  vcl::Font aFont( pView->GetFont());
297  aFont.SetWeight(WEIGHT_BOLD);
298  pView->Control::SetFont( aFont );
299  }
300 
301  if (mbCustom)
302  {
303  Size aSize = pView->MeasureCustomEntry(*pView, *pEntry);
304  pViewData->mnWidth = aSize.Width();
305  pViewData->mnHeight = aSize.Height();
306  }
307  else
308  {
309  pViewData->mnWidth = -1; // calc on demand
310  pViewData->mnHeight = pView->GetTextHeight();
311  }
312 
313  if (mbEmphasized)
314  pView->Pop();
315 }
316 
317 int SvLBoxString::CalcWidth(const SvTreeListBox* pView) const
318 {
319  return pView->GetTextWidth(maText);
320 }
321 
322 // ***************************************************************
323 // class SvLBoxButton
324 // ***************************************************************
325 
326 
328  : isVis(true)
329  , pData(pBData)
330  , nItemFlags(SvItemStateFlags::NONE)
331 {
333 }
334 
336  : SvLBoxItem()
337  , isVis(false)
338  , pData(nullptr)
339  , nItemFlags(SvItemStateFlags::NONE)
340 {
342 }
343 
345 {
346 }
347 
349 {
350  return SvLBoxItemType::Button;
351 }
352 
354 {
355  if ( IsStateChecked() )
357  else
358  SetStateChecked();
359  pData->StoreButtonState(pEntry, this);
360  pData->CallLink();
361 }
362 
364  const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
365  const SvViewDataEntry* /*pView*/, const SvTreeListEntry& /*rEntry*/)
366 {
369 
370  //Native drawing
371  bool bNativeOK = false;
373  if ( rRenderContext.IsNativeControlSupported( eCtrlType, ControlPart::Entire) )
374  {
375  Size aSize(pData->Width(), pData->Height());
376  ImplAdjustBoxSize(aSize, eCtrlType, rRenderContext);
377  ImplControlValue aControlValue;
378  tools::Rectangle aCtrlRegion( rPos, aSize );
380 
381  //states ControlState::DEFAULT, ControlState::PRESSED and ControlState::ROLLOVER are not implemented
382  if (IsStateHilighted())
383  nState |= ControlState::FOCUSED;
384  if (nStyle != DrawImageFlags::Disable)
385  nState |= ControlState::ENABLED;
386  if (IsStateChecked())
387  aControlValue.setTristateVal(ButtonValue::On);
388  else if (IsStateUnchecked())
389  aControlValue.setTristateVal(ButtonValue::Off);
390  else if (IsStateTristate())
391  aControlValue.setTristateVal( ButtonValue::Mixed );
392 
393  if (isVis)
394  bNativeOK = rRenderContext.DrawNativeControl(eCtrlType, ControlPart::Entire,
395  aCtrlRegion, nState, aControlValue, OUString());
396  }
397 
398  if (!bNativeOK && isVis)
399  rRenderContext.DrawImage(rPos, pData->GetImage(nIndex), nStyle);
400 }
401 
402 std::unique_ptr<SvLBoxItem> SvLBoxButton::Clone(SvLBoxItem const * pSource) const
403 {
404  std::unique_ptr<SvLBoxButton> pNew(new SvLBoxButton);
405  pNew->pData = static_cast<SvLBoxButton const *>(pSource)->pData;
406  return std::unique_ptr<SvLBoxItem>(pNew.release());
407 }
408 
409 void SvLBoxButton::ImplAdjustBoxSize(Size& io_rSize, ControlType i_eType, vcl::RenderContext const & rRenderContext)
410 {
411  if (!rRenderContext.IsNativeControlSupported( i_eType, ControlPart::Entire) )
412  return;
413 
414  ImplControlValue aControlValue;
415  tools::Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize );
416 
417  aControlValue.setTristateVal( ButtonValue::On );
418 
419  tools::Rectangle aNativeBounds, aNativeContent;
420  bool bNativeOK = rRenderContext.GetNativeControlRegion( i_eType,
422  aCtrlRegion,
424  aControlValue,
425  aNativeBounds,
426  aNativeContent );
427  if( bNativeOK )
428  {
429  Size aContentSize( aNativeContent.GetSize() );
430  // leave a little space around the box image (looks better)
431  if( aContentSize.Height() + 2 > io_rSize.Height() )
432  io_rSize.setHeight( aContentSize.Height() + 2 );
433  if( aContentSize.Width() + 2 > io_rSize.Width() )
434  io_rSize.setWidth( aContentSize.Width() + 2 );
435  }
436 }
437 
439 {
440  if( !pViewData )
441  pViewData = pView->GetViewDataItem( pEntry, this );
442  Size aSize( pData->Width(), pData->Height() );
443 
445  if ( pView )
446  ImplAdjustBoxSize(aSize, eCtrlType, *pView);
447  pViewData->mnWidth = aSize.Width();
448  pViewData->mnHeight = aSize.Height();
449 }
450 
451 // ***************************************************************
452 // class SvLBoxContextBmp
453 // ***************************************************************
454 
456 {
459 
461 };
462 
463 // ***************************************************************
464 
465 SvLBoxContextBmp::SvLBoxContextBmp(const Image& aBmp1, const Image& aBmp2,
466  bool bExpanded)
468 {
469 
470  m_pImpl->m_bExpanded = bExpanded;
471  SetModeImages( aBmp1, aBmp2 );
472 }
473 
475  :SvLBoxItem( )
477 {
478  m_pImpl->m_bExpanded = false;
479 }
480 
482 {
483 }
484 
486 {
488 }
489 
490 void SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2 )
491 {
492  m_pImpl->m_aImage1 = _rBitmap1;
493  m_pImpl->m_aImage2 = _rBitmap2;
494 }
495 
497 {
498 
499  // OJ: #i27071# wrong mode so we just return the normal images
500  return _bFirst ? m_pImpl->m_aImage1 : m_pImpl->m_aImage2;
501 }
502 
504  SvViewDataItem* pViewData)
505 {
506  if( !pViewData )
507  pViewData = pView->GetViewDataItem( pEntry, this );
508  Size aSize = m_pImpl->m_aImage1.GetSizePixel();
509  pViewData->mnWidth = aSize.Width();
510  pViewData->mnHeight = aSize.Height();
511 }
512 
514  const Point& _rPos, SvTreeListBox& _rDev, vcl::RenderContext& rRenderContext,
515  const SvViewDataEntry* pView, const SvTreeListEntry& rEntry)
516 {
517 
518  // get the image.
519  const Image& rImage = implGetImageStore(pView->IsExpanded() != m_pImpl->m_bExpanded);
520 
521  bool _bSemiTransparent = bool( SvTLEntryFlags::SEMITRANSPARENT & rEntry.GetFlags( ) );
522  // draw
524  if (_bSemiTransparent)
526  rRenderContext.DrawImage(_rPos, rImage, nStyle);
527 }
528 
529 std::unique_ptr<SvLBoxItem> SvLBoxContextBmp::Clone(SvLBoxItem const * pSource) const
530 {
531  std::unique_ptr<SvLBoxContextBmp> pNew(new SvLBoxContextBmp);
532  pNew->m_pImpl->m_aImage1 = static_cast< SvLBoxContextBmp const * >( pSource )->m_pImpl->m_aImage1;
533  pNew->m_pImpl->m_aImage2 = static_cast< SvLBoxContextBmp const * >( pSource )->m_pImpl->m_aImage2;
534  pNew->m_pImpl->m_bExpanded = static_cast<SvLBoxContextBmp const *>(pSource)->m_pImpl->m_bExpanded;
535  return std::unique_ptr<SvLBoxItem>(pNew.release());
536 }
537 
539 {
540  if ( !bDataOk )
542  return nWidth;
543 }
544 
546 {
547  if ( !bDataOk )
549  return nHeight;
550 }
551 
552 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvLBoxButton * pBox
Definition: svlbitm.cxx:33
Point TopLeft() const
long Width() const
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:795
Image & GetImage(SvBmp nIndex)
Definition: svlbitm.hxx:95
VCL_DLLPRIVATE void InitData(bool _bRadioBtn, const Control *pControlForSettings)
Definition: svlbitm.cxx:40
bool IsRadio() const
Definition: svlbitm.cxx:161
SvLBoxButton * GetActBox() const
Definition: svlbitm.cxx:126
bool mbCustom
Definition: svlbitm.hxx:109
sal_Int32 nIndex
tools::Rectangle GetBoundingRect(const SvTreeListEntry *pEntry)
Calculate and return the bounding rectangle of an entry.
virtual ~SvLBoxContextBmp() override
Definition: svlbitm.cxx:481
static SvButtonState ConvertToButtonState(SvItemStateFlags nItemFlags)
Definition: svlbitm.cxx:102
void DrawImage(const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static Image GetRadioImage(const AllSettings &rSettings, DrawButtonFlags nFlags)
Definition: button.cxx:2688
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)
std::unique_ptr< ContentProperties > pData
long Height() const
static void ImplAdjustBoxSize(Size &io_rCtrlSize, ControlType i_eType, vcl::RenderContext const &pRenderContext)
Definition: svlbitm.cxx:409
Image & implGetImageStore(bool bFirst)
Definition: svlbitm.cxx:496
std::unique_ptr< SvLBoxButtonData_Impl > pImpl
Definition: svlbitm.hxx:68
SvTLEntryFlags GetFlags() const
long getWidth() const
virtual void Paint(const Point &rPos, SvTreeListBox &rOutDev, vcl::RenderContext &rRenderContext, const SvViewDataEntry *pView, const SvTreeListEntry &rEntry) override
Definition: svlbitm.cxx:209
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:706
void SetImage(SvBmp nIndex, const Image &aImage)
Definition: svlbitm.hxx:94
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
SvItemStateFlags
Definition: svlbitm.hxx:47
bool HasDefaultImages() const
Definition: svlbitm.cxx:156
virtual Size GetSizePixel() const
Definition: window.cxx:2395
double mfAlign
Definition: svlbitm.hxx:110
SvTreeListEntry * GetActEntry() const
Definition: svlbitm.cxx:120
void SetWeight(FontWeight)
Definition: font/font.cxx:215
bool mbEmphasized
Definition: svlbitm.hxx:108
void setTristateVal(ButtonValue nTristate)
virtual SvLBoxItemType GetType() const override
Definition: svlbitm.cxx:189
SvLBoxButtonData * pData
Definition: svlbitm.hxx:153
View-dependent data for a tree list entry created in the virtual function SvTreeListBox::CreateViewDa...
virtual SvLBoxItemType GetType() const override
Definition: svlbitm.cxx:485
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
std::unique_ptr< SvLBoxContextBmp_Impl > m_pImpl
Definition: svlbitm.hxx:234
NONE
WEIGHT_BOLD
bool IsExpanded() const
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr) override
Definition: svlbitm.cxx:503
SvLBoxItemType
int GetHeight(const SvTreeListBox *pView, const SvTreeListEntry *pEntry) const
bool IsStateHilighted() const
Definition: svlbitm.hxx:196
SvViewDataItem * GetViewDataItem(SvTreeListEntry const *, SvLBoxItem const *)
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
const vcl::Font & GetFont() const
Definition: outdev.hxx:649
virtual std::unique_ptr< SvLBoxItem > Clone(SvLBoxItem const *pSource) const override
Definition: svlbitm.cxx:267
VCL_DLLPRIVATE Size MeasureCustomEntry(vcl::RenderContext &rRenderContext, const SvTreeListEntry &rEntry)
static Image GetCheckImage(const AllSettings &rSettings, DrawButtonFlags nFlags)
Definition: button.cxx:3500
void SetModeImages(const Image &rBitmap1, const Image &rBitmap2)
Definition: svlbitm.cxx:490
virtual void Paint(const Point &rPos, SvTreeListBox &rOutDev, vcl::RenderContext &rRenderContext, const SvViewDataEntry *pView, const SvTreeListEntry &rEntry) override
Definition: svlbitm.cxx:363
void DrawLine(const Point &rStartPt, const Point &rEndPt)
Definition: line.cxx:88
static SvBmp GetIndex(SvItemStateFlags nItemState)
Definition: svlbitm.cxx:68
std::vector< Image > aBmps
Definition: svlbitm.hxx:70
virtual void Paint(const Point &rPos, SvTreeListBox &rOutDev, vcl::RenderContext &rRenderContext, const SvViewDataEntry *pView, const SvTreeListEntry &rEntry) override
Definition: svlbitm.cxx:513
short GetEntryWidth() const
void SetLineColor()
SvTreeListEntry * pEntry
Definition: svlbitm.cxx:32
VCL_DLLPRIVATE void SetWidthAndHeight()
Definition: svlbitm.cxx:88
SvBmp
Definition: svlbitm.hxx:37
void SetStateUnchecked()
Definition: svlbitm.hxx:212
void CallLink()
Definition: svlbitm.cxx:63
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr) override
Definition: svlbitm.cxx:438
Link< SvLBoxButtonData *, void > aLink
Definition: svlbitm.hxx:65
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:302
const Color & GetLineColor() const
Definition: outdev.hxx:630
bool IsStateChecked() const
Definition: svlbitm.hxx:184
virtual std::unique_ptr< SvLBoxItem > Clone(SvLBoxItem const *pSource) const override
Definition: svlbitm.cxx:402
SvButtonState
Definition: treelistbox.hxx:57
bool TextCenterAndClipEnabled() 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:418
SvItemStateFlags nItemFlags
Definition: svlbitm.hxx:154
DrawTextFlags
Definition: outdev.hxx:142
long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: text.cxx:903
Size GetSize() const
virtual ~SvLBoxButton() override
Definition: svlbitm.cxx:344
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
virtual std::unique_ptr< SvLBoxItem > Clone(SvLBoxItem const *pSource) const override
Definition: svlbitm.cxx:529
virtual SvLBoxItemType GetType() const override
Definition: svlbitm.cxx:348
virtual ~SvLBoxString() override
Definition: svlbitm.cxx:185
int GetWidth(const SvTreeListBox *pView, const SvTreeListEntry *pEntry) const
bool IsStateTristate() const
Definition: svlbitm.hxx:192
SvLBoxButtonData(const Control *pControlForSettings, bool _bRadioBtn)
Definition: svlbitm.cxx:53
Text maText
void ClickHdl(SvTreeListEntry *)
Definition: svlbitm.cxx:353
Definition: ctrl.hxx:33
void SetFont(const vcl::Font &rNewFont)
void SetDefaultImages(const Control *pControlForSettings)
Definition: svlbitm.cxx:132
Definition: image.hxx:39
bool IsStateUnchecked() const
Definition: svlbitm.hxx:188
OUString maText
Definition: svlbitm.hxx:112
long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
Definition: text.cxx:892
VCL_DLLPRIVATE void DrawCustomEntry(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect, const SvTreeListEntry &rEntry)
bool IsEnabled() const
Definition: window2.cxx:1122
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: outdevstate.cxx:60
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr) override
Definition: svlbitm.cxx:280
void setWidth(long nWidth)
sal_Int32 nState
DrawImageFlags
Definition: outdev.hxx:170
virtual int CalcWidth(const SvTreeListBox *pView) const override
Definition: svlbitm.cxx:317
void SetStateChecked()
Definition: svlbitm.hxx:206
void StoreButtonState(SvTreeListEntry *pActEntry, SvLBoxButton *pActBox)
Definition: svlbitm.cxx:96
void setHeight(long nHeight)