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 
20 #include <vcl/treelistbox.hxx>
21 #include <vcl/svlbitm.hxx>
22 #include <vcl/treelistentry.hxx>
23 #include <vcl/viewdataentry.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 )
54  : pImpl( new SvLBoxButtonData_Impl )
55 {
56  InitData( false, pControlForSettings );
57 }
58 
59 SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings, bool _bRadioBtn )
60  : pImpl( new SvLBoxButtonData_Impl )
61 {
62  InitData( _bRadioBtn, pControlForSettings );
63 }
64 
66 {
67 }
68 
70 {
71  aLink.Call( this );
72 }
73 
75 {
76  SvBmp nIdx;
77  if (nItemState == SvItemStateFlags::UNCHECKED)
78  nIdx = SvBmp::UNCHECKED;
79  else if (nItemState == SvItemStateFlags::CHECKED)
80  nIdx = SvBmp::CHECKED;
81  else if (nItemState == SvItemStateFlags::TRISTATE)
82  nIdx = SvBmp::TRISTATE;
84  nIdx = SvBmp::HIUNCHECKED;
85  else if (nItemState == (SvItemStateFlags::CHECKED | SvItemStateFlags::HILIGHTED))
86  nIdx = SvBmp::HICHECKED;
88  nIdx = SvBmp::HITRISTATE;
89  else
90  nIdx = SvBmp::UNCHECKED;
91  return nIdx;
92 }
93 
95 {
96  Size aSize = aBmps[int(SvBmp::UNCHECKED)].GetSizePixel();
97  nWidth = aSize.Width();
98  nHeight = aSize.Height();
99  bDataOk = true;
100 }
101 
103 {
104  pImpl->pEntry = pActEntry;
105  pImpl->pBox = pActBox;
106 }
107 
109 {
110  nItemFlags &= SvItemStateFlags::UNCHECKED |
113  switch( nItemFlags )
114  {
118  return SvButtonState::Checked;
121  default:
123  }
124 }
125 
127 {
128  assert(pImpl && "-SvLBoxButtonData::GetActEntry(): don't use me that way!");
129  return pImpl->pEntry;
130 }
131 
133 {
134  assert(pImpl && "-SvLBoxButtonData::GetActBox(): don't use me that way!");
135  return pImpl->pBox;
136 }
137 
139 {
140  const AllSettings& rSettings = pCtrl? pCtrl->GetSettings() : Application::GetSettings();
141 
142  if ( pImpl->bShowRadioButton )
143  {
150  }
151  else
152  {
159  }
160 }
161 
163 {
164  return pImpl->bDefaultImages;
165 }
166 
168  return pImpl->bShowRadioButton;
169 }
170 
171 // ***************************************************************
172 // class SvLBoxString
173 // ***************************************************************
174 
175 
176 SvLBoxString::SvLBoxString(const OUString& rStr)
177  : mbEmphasized(false)
178  , mbCustom(false)
179  , mfAlign(0.0)
180  , maText(rStr)
181 {
182 }
183 
185  : mbEmphasized(false)
186  , mbCustom(false)
187  , mfAlign(0.0)
188 {
189 }
190 
192 {
193 }
194 
196 {
197  return SvLBoxItemType::String;
198 }
199 
200 namespace
201 {
202  void drawSeparator(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRegion)
203  {
204  Color aOldLineColor(rRenderContext.GetLineColor());
205  const StyleSettings& rStyle = rRenderContext.GetSettings().GetStyleSettings();
206  Point aTmpPos = rRegion.TopLeft();
207  Size aSize = rRegion.GetSize();
208  aTmpPos.AdjustY(aSize.Height() / 2 );
209  rRenderContext.SetLineColor(rStyle.GetShadowColor());
210  rRenderContext.DrawLine(aTmpPos, Point(aSize.Width() + aTmpPos.X(), aTmpPos.Y()));
211  rRenderContext.SetLineColor(aOldLineColor);
212  }
213 }
214 
216  const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
217  const SvViewDataEntry* /*pView*/, const SvTreeListEntry& rEntry)
218 {
220  if (bool(rEntry.GetFlags() & SvTLEntryFlags::IS_SEPARATOR))
221  {
222  Point aStartPos(0, rPos.Y() - 2);
223  tools::Rectangle aRegion(aStartPos, Size(rDev.GetSizePixel().Width(), 4));
224  drawSeparator(rRenderContext, aRegion);
225  return;
226  }
227 
228  Size aSize;
229  if (rDev.IsEntryMnemonicsEnabled())
230  nStyle |= DrawTextFlags::Mnemonic;
231  if (rDev.TextCenterAndClipEnabled())
232  {
234  aSize.setWidth( rDev.GetEntryWidth() );
235  }
236  else
237  {
238  if (mfAlign < 0.5 )
239  {
240  nStyle |= DrawTextFlags::Left;
241  aSize.setWidth(GetWidth(&rDev, &rEntry));
242  }
243  else if (mfAlign == 0.5)
244  {
245  nStyle |= DrawTextFlags::Center;
246  aSize.setWidth(rDev.GetBoundingRect(&rEntry).getWidth());
247  }
248  else if (mfAlign > 0.5)
249  {
250  nStyle |= DrawTextFlags::Right;
251  aSize.setWidth(rDev.GetBoundingRect(&rEntry).getWidth());
252  }
253  }
254  aSize.setHeight(GetHeight(&rDev, &rEntry));
255 
256  if (mbEmphasized)
257  {
258  rRenderContext.Push();
259  vcl::Font aFont(rRenderContext.GetFont());
260  aFont.SetWeight(WEIGHT_BOLD);
261  rRenderContext.SetFont(aFont);
262  }
263 
264  tools::Rectangle aRect(rPos, aSize);
265 
266  if (mbCustom)
267  rDev.DrawCustomEntry(rRenderContext, aRect, rEntry);
268  else
269  rRenderContext.DrawText(aRect, maText, nStyle);
270 
271  if (mbEmphasized)
272  rRenderContext.Pop();
273 }
274 
275 std::unique_ptr<SvLBoxItem> SvLBoxString::Clone(SvLBoxItem const * pSource) const
276 {
277  std::unique_ptr<SvLBoxString> pNew(new SvLBoxString);
278 
279  const SvLBoxString* pOther = static_cast<const SvLBoxString*>(pSource);
280  pNew->maText = pOther->maText;
281  pNew->mbEmphasized = pOther->mbEmphasized;
282  pNew->mbCustom = pOther->mbCustom;
283  pNew->mfAlign = pOther->mfAlign;
284 
285  return std::unique_ptr<SvLBoxItem>(pNew.release());
286 }
287 
289  SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData)
290 {
291  if( !pViewData )
292  pViewData = pView->GetViewDataItem( pEntry, this );
293 
294  if (bool(pEntry->GetFlags() & SvTLEntryFlags::IS_SEPARATOR))
295  {
296  pViewData->mnWidth = -1;
297  pViewData->mnHeight = 0;
298  return;
299  }
300 
301  if (mbEmphasized)
302  {
303  pView->Push();
304  vcl::Font aFont( pView->GetFont());
305  aFont.SetWeight(WEIGHT_BOLD);
306  pView->Control::SetFont( aFont );
307  }
308 
309  if (mbCustom)
310  {
311  Size aSize = pView->MeasureCustomEntry(*pView, *pEntry);
312  pViewData->mnWidth = aSize.Width();
313  pViewData->mnHeight = aSize.Height();
314  }
315  else
316  {
317  pViewData->mnWidth = -1; // calc on demand
318  pViewData->mnHeight = pView->GetTextHeight();
319  }
320 
321  if (mbEmphasized)
322  pView->Pop();
323 }
324 
325 int SvLBoxString::CalcWidth(const SvTreeListBox* pView) const
326 {
327  return pView->GetTextWidth(maText);
328 }
329 
330 // ***************************************************************
331 // class SvLBoxButton
332 // ***************************************************************
333 
334 
336  : isVis(true)
337  , pData(pBData)
338  , nItemFlags(SvItemStateFlags::NONE)
339 {
341 }
342 
344  : SvLBoxItem()
345  , isVis(false)
346  , pData(nullptr)
347  , nItemFlags(SvItemStateFlags::NONE)
348 {
350 }
351 
353 {
354 }
355 
357 {
358  return SvLBoxItemType::Button;
359 }
360 
362 {
363  if ( IsStateChecked() )
365  else
366  SetStateChecked();
367  pData->StoreButtonState(pEntry, this);
368  pData->CallLink();
369 }
370 
372  const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
373  const SvViewDataEntry* /*pView*/, const SvTreeListEntry& /*rEntry*/)
374 {
377 
378  //Native drawing
379  bool bNativeOK = false;
381  if ( rRenderContext.IsNativeControlSupported( eCtrlType, ControlPart::Entire) )
382  {
383  Size aSize(pData->Width(), pData->Height());
384  ImplAdjustBoxSize(aSize, eCtrlType, rRenderContext);
385  ImplControlValue aControlValue;
386  tools::Rectangle aCtrlRegion( rPos, aSize );
388 
389  //states ControlState::DEFAULT, ControlState::PRESSED and ControlState::ROLLOVER are not implemented
390  if (IsStateHilighted())
391  nState |= ControlState::FOCUSED;
392  if (nStyle != DrawImageFlags::Disable)
393  nState |= ControlState::ENABLED;
394  if (IsStateChecked())
395  aControlValue.setTristateVal(ButtonValue::On);
396  else if (IsStateUnchecked())
397  aControlValue.setTristateVal(ButtonValue::Off);
398  else if (IsStateTristate())
399  aControlValue.setTristateVal( ButtonValue::Mixed );
400 
401  if (isVis)
402  bNativeOK = rRenderContext.DrawNativeControl(eCtrlType, ControlPart::Entire,
403  aCtrlRegion, nState, aControlValue, OUString());
404  }
405 
406  if (!bNativeOK && isVis)
407  rRenderContext.DrawImage(rPos, pData->GetImage(nIndex), nStyle);
408 }
409 
410 std::unique_ptr<SvLBoxItem> SvLBoxButton::Clone(SvLBoxItem const * pSource) const
411 {
412  std::unique_ptr<SvLBoxButton> pNew(new SvLBoxButton);
413  pNew->pData = static_cast<SvLBoxButton const *>(pSource)->pData;
414  return std::unique_ptr<SvLBoxItem>(pNew.release());
415 }
416 
417 void SvLBoxButton::ImplAdjustBoxSize(Size& io_rSize, ControlType i_eType, vcl::RenderContext const & rRenderContext)
418 {
419  if (!rRenderContext.IsNativeControlSupported( i_eType, ControlPart::Entire) )
420  return;
421 
422  ImplControlValue aControlValue;
423  tools::Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize );
424 
425  aControlValue.setTristateVal( ButtonValue::On );
426 
427  tools::Rectangle aNativeBounds, aNativeContent;
428  bool bNativeOK = rRenderContext.GetNativeControlRegion( i_eType,
430  aCtrlRegion,
432  aControlValue,
433  aNativeBounds,
434  aNativeContent );
435  if( bNativeOK )
436  {
437  Size aContentSize( aNativeContent.GetSize() );
438  // leave a little space around the box image (looks better)
439  if( aContentSize.Height() + 2 > io_rSize.Height() )
440  io_rSize.setHeight( aContentSize.Height() + 2 );
441  if( aContentSize.Width() + 2 > io_rSize.Width() )
442  io_rSize.setWidth( aContentSize.Width() + 2 );
443  }
444 }
445 
447 {
448  if( !pViewData )
449  pViewData = pView->GetViewDataItem( pEntry, this );
450  Size aSize( pData->Width(), pData->Height() );
451 
453  if ( pView )
454  ImplAdjustBoxSize(aSize, eCtrlType, *pView);
455  pViewData->mnWidth = aSize.Width();
456  pViewData->mnHeight = aSize.Height();
457 }
458 
459 // ***************************************************************
460 // class SvLBoxContextBmp
461 // ***************************************************************
462 
464 {
467 
469 };
470 
471 // ***************************************************************
472 
473 SvLBoxContextBmp::SvLBoxContextBmp(const Image& aBmp1, const Image& aBmp2,
474  bool bExpanded)
476 {
477 
478  m_pImpl->m_bExpanded = bExpanded;
479  SetModeImages( aBmp1, aBmp2 );
480 }
481 
483  :SvLBoxItem( )
485 {
486  m_pImpl->m_bExpanded = false;
487 }
488 
490 {
491 }
492 
494 {
496 }
497 
498 void SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2 )
499 {
500  m_pImpl->m_aImage1 = _rBitmap1;
501  m_pImpl->m_aImage2 = _rBitmap2;
502 }
503 
505 {
506 
507  // OJ: #i27071# wrong mode so we just return the normal images
508  return _bFirst ? m_pImpl->m_aImage1 : m_pImpl->m_aImage2;
509 }
510 
512  SvViewDataItem* pViewData)
513 {
514  if( !pViewData )
515  pViewData = pView->GetViewDataItem( pEntry, this );
516  Size aSize = m_pImpl->m_aImage1.GetSizePixel();
517  pViewData->mnWidth = aSize.Width();
518  pViewData->mnHeight = aSize.Height();
519 }
520 
522  const Point& _rPos, SvTreeListBox& _rDev, vcl::RenderContext& rRenderContext,
523  const SvViewDataEntry* pView, const SvTreeListEntry& rEntry)
524 {
525 
526  // get the image.
527  const Image& rImage = implGetImageStore(pView->IsExpanded() != m_pImpl->m_bExpanded);
528 
529  bool _bSemiTransparent = bool( SvTLEntryFlags::SEMITRANSPARENT & rEntry.GetFlags( ) );
530  // draw
532  if (_bSemiTransparent)
534  rRenderContext.DrawImage(_rPos, rImage, nStyle);
535 }
536 
537 std::unique_ptr<SvLBoxItem> SvLBoxContextBmp::Clone(SvLBoxItem const * pSource) const
538 {
539  std::unique_ptr<SvLBoxContextBmp> pNew(new SvLBoxContextBmp);
540  pNew->m_pImpl->m_aImage1 = static_cast< SvLBoxContextBmp const * >( pSource )->m_pImpl->m_aImage1;
541  pNew->m_pImpl->m_aImage2 = static_cast< SvLBoxContextBmp const * >( pSource )->m_pImpl->m_aImage2;
542  pNew->m_pImpl->m_bExpanded = static_cast<SvLBoxContextBmp const *>(pSource)->m_pImpl->m_bExpanded;
543  return std::unique_ptr<SvLBoxItem>(pNew.release());
544 }
545 
547 {
548  if ( !bDataOk )
550  return nWidth;
551 }
552 
554 {
555  if ( !bDataOk )
557  return nHeight;
558 }
559 
560 /* 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:787
Image & GetImage(SvBmp nIndex)
Definition: svlbitm.hxx:94
VCL_DLLPRIVATE void InitData(bool _bRadioBtn, const Control *pControlForSettings)
Definition: svlbitm.cxx:40
bool IsRadio() const
Definition: svlbitm.cxx:167
SvLBoxButton * GetActBox() const
Definition: svlbitm.cxx:132
bool mbCustom
Definition: svlbitm.hxx:108
sal_Int32 nIndex
tools::Rectangle GetBoundingRect(const SvTreeListEntry *pEntry)
Calculate and return the bounding rectangle of an entry.
virtual ~SvLBoxContextBmp() override
Definition: svlbitm.cxx:489
static SvButtonState ConvertToButtonState(SvItemStateFlags nItemFlags)
Definition: svlbitm.cxx:108
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:2683
bool DrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption)
Request rendering of a particular control and/or part.
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:417
Image & implGetImageStore(bool bFirst)
Definition: svlbitm.cxx:504
std::unique_ptr< SvLBoxButtonData_Impl > pImpl
Definition: svlbitm.hxx:66
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:215
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:715
void SetImage(SvBmp nIndex, const Image &aImage)
Definition: svlbitm.hxx:93
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
SvItemStateFlags
Definition: svlbitm.hxx:45
bool HasDefaultImages() const
Definition: svlbitm.cxx:162
virtual Size GetSizePixel() const
Definition: window.cxx:2396
double mfAlign
Definition: svlbitm.hxx:109
SvTreeListEntry * GetActEntry() const
Definition: svlbitm.cxx:126
void SetWeight(FontWeight)
Definition: font/font.cxx:215
bool mbEmphasized
Definition: svlbitm.hxx:107
void setTristateVal(ButtonValue nTristate)
SvLBoxButtonData(const Control *pControlForSettings)
Definition: svlbitm.cxx:53
virtual SvLBoxItemType GetType() const override
Definition: svlbitm.cxx:195
bool IsEntryMnemonicsEnabled() const
SvLBoxButtonData * pData
Definition: svlbitm.hxx:152
View-dependent data for a tree list entry created in the virtual function SvTreeListBox::CreateViewDa...
virtual SvLBoxItemType GetType() const override
Definition: svlbitm.cxx:493
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
std::unique_ptr< SvLBoxContextBmp_Impl > m_pImpl
Definition: svlbitm.hxx:233
NONE
WEIGHT_BOLD
bool IsExpanded() const
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr) override
Definition: svlbitm.cxx:511
SvLBoxItemType
int GetHeight(const SvTreeListBox *pView, const SvTreeListEntry *pEntry) const
bool IsStateHilighted() const
Definition: svlbitm.hxx:195
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:275
VCL_DLLPRIVATE Size MeasureCustomEntry(vcl::RenderContext &rRenderContext, const SvTreeListEntry &rEntry)
static Image GetCheckImage(const AllSettings &rSettings, DrawButtonFlags nFlags)
Definition: button.cxx:3501
void SetModeImages(const Image &rBitmap1, const Image &rBitmap2)
Definition: svlbitm.cxx:498
virtual void Paint(const Point &rPos, SvTreeListBox &rOutDev, vcl::RenderContext &rRenderContext, const SvViewDataEntry *pView, const SvTreeListEntry &rEntry) override
Definition: svlbitm.cxx:371
void DrawLine(const Point &rStartPt, const Point &rEndPt)
Definition: line.cxx:88
static SvBmp GetIndex(SvItemStateFlags nItemState)
Definition: svlbitm.cxx:74
std::vector< Image > aBmps
Definition: svlbitm.hxx:68
virtual void Paint(const Point &rPos, SvTreeListBox &rOutDev, vcl::RenderContext &rRenderContext, const SvViewDataEntry *pView, const SvTreeListEntry &rEntry) override
Definition: svlbitm.cxx:521
short GetEntryWidth() const
void SetLineColor()
SvTreeListEntry * pEntry
Definition: svlbitm.cxx:32
VCL_DLLPRIVATE void SetWidthAndHeight()
Definition: svlbitm.cxx:94
SvBmp
Definition: svlbitm.hxx:35
void SetStateUnchecked()
Definition: svlbitm.hxx:211
void CallLink()
Definition: svlbitm.cxx:69
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr) override
Definition: svlbitm.cxx:446
Link< SvLBoxButtonData *, void > aLink
Definition: svlbitm.hxx:63
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:183
virtual std::unique_ptr< SvLBoxItem > Clone(SvLBoxItem const *pSource) const override
Definition: svlbitm.cxx:410
SvButtonState
Definition: treelistbox.hxx:57
bool TextCenterAndClipEnabled() const
const AllSettings & GetSettings() const
Definition: outdev.hxx:418
SvItemStateFlags nItemFlags
Definition: svlbitm.hxx:153
DrawTextFlags
Definition: outdev.hxx:142
long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: text.cxx:895
Size GetSize() const
virtual ~SvLBoxButton() override
Definition: svlbitm.cxx:352
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:537
virtual SvLBoxItemType GetType() const override
Definition: svlbitm.cxx:356
virtual ~SvLBoxString() override
Definition: svlbitm.cxx:191
int GetWidth(const SvTreeListBox *pView, const SvTreeListEntry *pEntry) const
bool IsStateTristate() const
Definition: svlbitm.hxx:191
Text maText
void ClickHdl(SvTreeListEntry *)
Definition: svlbitm.cxx:361
Definition: ctrl.hxx:33
void SetFont(const vcl::Font &rNewFont)
void SetDefaultImages(const Control *pControlForSettings)
Definition: svlbitm.cxx:138
Definition: image.hxx:40
bool IsStateUnchecked() const
Definition: svlbitm.hxx:187
OUString maText
Definition: svlbitm.hxx:111
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:884
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:288
void setWidth(long nWidth)
sal_Int32 nState
DrawImageFlags
Definition: outdev.hxx:170
virtual int CalcWidth(const SvTreeListBox *pView) const override
Definition: svlbitm.cxx:325
void SetStateChecked()
Definition: svlbitm.hxx:205
void StoreButtonState(SvTreeListEntry *pActEntry, SvLBoxButton *pActBox)
Definition: svlbitm.cxx:102
void setHeight(long nHeight)