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 <utility>
25#include <vcl/svapp.hxx>
27#include <vcl/decoview.hxx>
29#include <vcl/settings.hxx>
30
32{
37
38 SvLBoxButtonData_Impl() : pEntry(nullptr), pBox(nullptr), bDefaultImages(false), bShowRadioButton(false) {}
39};
40
41void SvLBoxButtonData::InitData( bool _bRadioBtn, const Control* pCtrl )
42{
43 nWidth = nHeight = 0;
44
45 aBmps.resize(int(SvBmp::HITRISTATE)+1);
46
47 bDataOk = false;
48 pImpl->bDefaultImages = true;
49 pImpl->bShowRadioButton = _bRadioBtn;
50
51 SetDefaultImages( pCtrl );
52}
53
54SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings, bool _bRadioBtn )
55 : pImpl( new SvLBoxButtonData_Impl )
56{
57 InitData( _bRadioBtn, pControlForSettings );
58}
59
61{
62}
63
65{
66 aLink.Call( this );
67}
68
70{
71 SvBmp nIdx;
72 if (nItemState == SvItemStateFlags::UNCHECKED)
73 nIdx = SvBmp::UNCHECKED;
74 else if (nItemState == SvItemStateFlags::CHECKED)
75 nIdx = SvBmp::CHECKED;
76 else if (nItemState == SvItemStateFlags::TRISTATE)
77 nIdx = SvBmp::TRISTATE;
79 nIdx = SvBmp::HIUNCHECKED;
81 nIdx = SvBmp::HICHECKED;
83 nIdx = SvBmp::HITRISTATE;
84 else
85 nIdx = SvBmp::UNCHECKED;
86 return nIdx;
87}
88
90{
91 Size aSize = aBmps[int(SvBmp::UNCHECKED)].GetSizePixel();
92 nWidth = aSize.Width();
93 nHeight = aSize.Height();
94 bDataOk = true;
95}
96
98{
99 pImpl->pEntry = pActEntry;
100 pImpl->pBox = pActBox;
101}
102
104{
105 nItemFlags &= SvItemStateFlags::UNCHECKED |
108 switch( nItemFlags )
109 {
116 default:
118 }
119}
120
122{
123 assert(pImpl && "-SvLBoxButtonData::GetActEntry(): don't use me that way!");
124 return pImpl->pEntry;
125}
126
128{
129 assert(pImpl && "-SvLBoxButtonData::GetActBox(): don't use me that way!");
130 return pImpl->pBox;
131}
132
134{
135 const AllSettings& rSettings = pCtrl? pCtrl->GetSettings() : Application::GetSettings();
136
137 if ( pImpl->bShowRadioButton )
138 {
145 }
146 else
147 {
154 }
155}
156
158{
159 return pImpl->bDefaultImages;
160}
161
163 return pImpl->bShowRadioButton;
164}
165
166// ***************************************************************
167// class SvLBoxString
168// ***************************************************************
169
170
172 : mbEmphasized(false)
173 , mbCustom(false)
174 , mfAlign(0.0)
175 , maText(std::move(aStr))
176{
177}
178
180 : mbEmphasized(false)
181 , mbCustom(false)
182 , mfAlign(0.0)
183{
184}
185
187{
188}
189
191{
193}
194
195namespace
196{
197 void drawSeparator(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRegion)
198 {
199 Color aOldLineColor(rRenderContext.GetLineColor());
200 const StyleSettings& rStyle = rRenderContext.GetSettings().GetStyleSettings();
201 Point aTmpPos = rRegion.TopLeft();
202 Size aSize = rRegion.GetSize();
203 aTmpPos.AdjustY(aSize.Height() / 2 );
204 rRenderContext.SetLineColor(rStyle.GetShadowColor());
205 rRenderContext.DrawLine(aTmpPos, Point(aSize.Width() + aTmpPos.X(), aTmpPos.Y()));
206 rRenderContext.SetLineColor(aOldLineColor);
207 }
208}
209
211 const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
212 const SvViewDataEntry* /*pView*/, const SvTreeListEntry& rEntry)
213{
215 if (bool(rEntry.GetFlags() & SvTLEntryFlags::IS_SEPARATOR))
216 {
217 Point aStartPos(0, rPos.Y() - 2);
218 tools::Rectangle aRegion(aStartPos, Size(rDev.GetSizePixel().Width(), 4));
219 drawSeparator(rRenderContext, aRegion);
220 return;
221 }
222
223 Size aSize;
224 if (rDev.TextCenterAndClipEnabled())
225 {
227 aSize.setWidth( rDev.GetEntryWidth() );
228 }
229 else
230 {
231 if (mfAlign < 0.5 )
232 {
233 nStyle |= DrawTextFlags::Left;
234 aSize.setWidth(GetWidth(&rDev, &rEntry));
235 }
236 else if (mfAlign == 0.5)
237 {
238 nStyle |= DrawTextFlags::Center;
239 aSize.setWidth(rDev.GetBoundingRect(&rEntry).getOpenWidth());
240 }
241 else if (mfAlign > 0.5)
242 {
243 nStyle |= DrawTextFlags::Right;
244 aSize.setWidth(rDev.GetBoundingRect(&rEntry).getOpenWidth());
245 }
246 }
247 aSize.setHeight(GetHeight(&rDev, &rEntry));
248
249 if (mbEmphasized)
250 {
251 rRenderContext.Push();
252 vcl::Font aFont(rRenderContext.GetFont());
253 aFont.SetWeight(WEIGHT_BOLD);
254 rRenderContext.SetFont(aFont);
255 }
256
257 tools::Rectangle aRect(rPos, aSize);
258
259 if (mbCustom)
260 rDev.DrawCustomEntry(rRenderContext, aRect, rEntry);
261 else
262 rRenderContext.DrawText(aRect, maText, nStyle);
263
264 if (mbEmphasized)
265 rRenderContext.Pop();
266}
267
268std::unique_ptr<SvLBoxItem> SvLBoxString::Clone(SvLBoxItem const * pSource) const
269{
270 std::unique_ptr<SvLBoxString> pNew(new SvLBoxString);
271
272 const SvLBoxString* pOther = static_cast<const SvLBoxString*>(pSource);
273 pNew->maText = pOther->maText;
274 pNew->mbEmphasized = pOther->mbEmphasized;
275 pNew->mbCustom = pOther->mbCustom;
276 pNew->mfAlign = pOther->mfAlign;
277
278 return std::unique_ptr<SvLBoxItem>(pNew.release());
279}
280
282 SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData)
283{
284 if( !pViewData )
285 pViewData = pView->GetViewDataItem( pEntry, this );
286
287 if (bool(pEntry->GetFlags() & SvTLEntryFlags::IS_SEPARATOR))
288 {
289 pViewData->mnWidth = -1;
290 pViewData->mnHeight = 0;
291 return;
292 }
293
294 if (mbEmphasized)
295 {
296 pView->GetOutDev()->Push();
297 vcl::Font aFont( pView->GetFont());
298 aFont.SetWeight(WEIGHT_BOLD);
299 pView->Control::SetFont( aFont );
300 }
301
302 if (mbCustom)
303 {
304 Size aSize = pView->MeasureCustomEntry(*pView->GetOutDev(), *pEntry);
305 pViewData->mnWidth = aSize.Width();
306 pViewData->mnHeight = aSize.Height();
307 }
308 else
309 {
310 pViewData->mnWidth = -1; // calc on demand
311 pViewData->mnHeight = pView->GetTextHeight();
312 }
313
314 if (mbEmphasized)
315 pView->GetOutDev()->Pop();
316}
317
319{
320 return pView->GetTextWidth(maText);
321}
322
323// ***************************************************************
324// class SvLBoxButton
325// ***************************************************************
326
327
329 : isVis(true)
330 , pData(pBData)
331 , nItemFlags(SvItemStateFlags::NONE)
332{
334}
335
337 : isVis(false)
338 , pData(nullptr)
339 , nItemFlags(SvItemStateFlags::NONE)
340{
342}
343
345{
346}
347
349{
351}
352
354{
355 if ( IsStateChecked() )
357 else
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())
384 if (nStyle != DrawImageFlags::Disable)
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
402std::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
409void 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->GetOutDev());
447 pViewData->mnWidth = aSize.Width();
448 pViewData->mnHeight = aSize.Height();
449}
450
451// ***************************************************************
452// class SvLBoxContextBmp
453// ***************************************************************
454
456{
459
461};
462
463// ***************************************************************
464
466 bool bExpanded)
468{
469
470 m_pImpl->m_bExpanded = bExpanded;
471 SetModeImages( aBmp1, aBmp2 );
472}
473
476{
477 m_pImpl->m_bExpanded = false;
478}
479
481{
482}
483
485{
487}
488
489void SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2 )
490{
491 m_pImpl->m_aImage1 = _rBitmap1;
492 m_pImpl->m_aImage2 = _rBitmap2;
493}
494
496{
497
498 // OJ: #i27071# wrong mode so we just return the normal images
499 return _bFirst ? m_pImpl->m_aImage1 : m_pImpl->m_aImage2;
500}
501
503 SvViewDataItem* pViewData)
504{
505 if( !pViewData )
506 pViewData = pView->GetViewDataItem( pEntry, this );
507 Size aSize = m_pImpl->m_aImage1.GetSizePixel();
508 pViewData->mnWidth = aSize.Width();
509 pViewData->mnHeight = aSize.Height();
510}
511
513 const Point& _rPos, SvTreeListBox& _rDev, vcl::RenderContext& rRenderContext,
514 const SvViewDataEntry* pView, const SvTreeListEntry& rEntry)
515{
516
517 // get the image.
518 const Image& rImage = implGetImageStore(pView->IsExpanded() != m_pImpl->m_bExpanded);
519
520 bool _bSemiTransparent = bool( SvTLEntryFlags::SEMITRANSPARENT & rEntry.GetFlags( ) );
521 // draw
523 if (_bSemiTransparent)
525 rRenderContext.DrawImage(_rPos, rImage, nStyle);
526}
527
528std::unique_ptr<SvLBoxItem> SvLBoxContextBmp::Clone(SvLBoxItem const * pSource) const
529{
530 std::unique_ptr<SvLBoxContextBmp> pNew(new SvLBoxContextBmp);
531 pNew->m_pImpl->m_aImage1 = static_cast< SvLBoxContextBmp const * >( pSource )->m_pImpl->m_aImage1;
532 pNew->m_pImpl->m_aImage2 = static_cast< SvLBoxContextBmp const * >( pSource )->m_pImpl->m_aImage2;
533 pNew->m_pImpl->m_bExpanded = static_cast<SvLBoxContextBmp const *>(pSource)->m_pImpl->m_bExpanded;
534 return std::unique_ptr<SvLBoxItem>(pNew.release());
535}
536
538{
539 if ( !bDataOk )
541 return nWidth;
542}
543
545{
546 if ( !bDataOk )
548 return nHeight;
549}
550
551/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DrawImageFlags
DrawTextFlags
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
Text maText
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:638
static Image GetCheckImage(const AllSettings &rSettings, DrawButtonFlags nFlags)
Definition: button.cxx:3651
Definition: ctrl.hxx:80
Definition: image.hxx:40
void setTristateVal(ButtonValue nTristate)
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
const vcl::Font & GetFont() const
Definition: outdev.hxx:529
void SetFont(const vcl::Font &rNewFont)
Definition: outdev/font.cxx:56
void DrawLine(const Point &rStartPt, const Point &rEndPt)
Definition: line.cxx:161
void SetLineColor()
Definition: line.cxx:37
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...
const Color & GetLineColor() const
Definition: outdev.hxx:510
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
Definition: stack.cxx:32
void Pop()
Definition: stack.cxx:91
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)
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.
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:797
const AllSettings & GetSettings() const
Definition: outdev.hxx:288
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
constexpr tools::Long X() const
static Image GetRadioImage(const AllSettings &rSettings, DrawButtonFlags nFlags)
Definition: button.cxx:2862
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetShadowColor() const
SvLBoxButtonData(const Control *pControlForSettings, bool _bRadioBtn)
Definition: svlbitm.cxx:54
static SvButtonState ConvertToButtonState(SvItemStateFlags nItemFlags)
Definition: svlbitm.cxx:103
void InitData(bool _bRadioBtn, const Control *pControlForSettings)
Definition: svlbitm.cxx:41
void SetWidthAndHeight()
Definition: svlbitm.cxx:89
tools::Long Width()
Definition: svlbitm.cxx:537
SvLBoxButton * GetActBox() const
Definition: svlbitm.cxx:127
bool HasDefaultImages() const
Definition: svlbitm.cxx:157
SvTreeListEntry * GetActEntry() const
Definition: svlbitm.cxx:121
std::vector< Image > aBmps
Definition: svlbitm.hxx:70
void SetDefaultImages(const Control *pControlForSettings)
Definition: svlbitm.cxx:133
void SetImage(SvBmp nIndex, const Image &aImage)
Definition: svlbitm.hxx:94
Link< SvLBoxButtonData *, void > aLink
Definition: svlbitm.hxx:65
void StoreButtonState(SvTreeListEntry *pActEntry, SvLBoxButton *pActBox)
Definition: svlbitm.cxx:97
static SvBmp GetIndex(SvItemStateFlags nItemState)
Definition: svlbitm.cxx:69
tools::Long nWidth
Definition: svlbitm.hxx:66
tools::Long nHeight
Definition: svlbitm.hxx:67
tools::Long Height()
Definition: svlbitm.cxx:544
void CallLink()
Definition: svlbitm.cxx:64
Image & GetImage(SvBmp nIndex)
Definition: svlbitm.hxx:95
std::unique_ptr< SvLBoxButtonData_Impl > pImpl
Definition: svlbitm.hxx:68
bool IsRadio() const
Definition: svlbitm.cxx:162
void ClickHdl(SvTreeListEntry *)
Definition: svlbitm.cxx:353
bool IsStateChecked() const
Definition: svlbitm.hxx:184
virtual ~SvLBoxButton() override
Definition: svlbitm.cxx:344
bool IsStateTristate() const
Definition: svlbitm.hxx:192
bool IsStateHilighted() const
Definition: svlbitm.hxx:196
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr) override
Definition: svlbitm.cxx:438
virtual SvLBoxItemType GetType() const override
Definition: svlbitm.cxx:348
SvItemStateFlags nItemFlags
Definition: svlbitm.hxx:154
SvLBoxButtonData * pData
Definition: svlbitm.hxx:153
void SetStateChecked()
Definition: svlbitm.hxx:206
bool IsStateUnchecked() const
Definition: svlbitm.hxx:188
void SetStateUnchecked()
Definition: svlbitm.hxx:212
virtual void Paint(const Point &rPos, SvTreeListBox &rOutDev, vcl::RenderContext &rRenderContext, const SvViewDataEntry *pView, const SvTreeListEntry &rEntry) override
Definition: svlbitm.cxx:363
static void ImplAdjustBoxSize(Size &io_rCtrlSize, ControlType i_eType, vcl::RenderContext const &pRenderContext)
Definition: svlbitm.cxx:409
virtual std::unique_ptr< SvLBoxItem > Clone(SvLBoxItem const *pSource) const override
Definition: svlbitm.cxx:402
virtual SvLBoxItemType GetType() const override
Definition: svlbitm.cxx:484
std::unique_ptr< SvLBoxContextBmp_Impl > m_pImpl
Definition: svlbitm.hxx:234
virtual ~SvLBoxContextBmp() override
Definition: svlbitm.cxx:480
virtual void Paint(const Point &rPos, SvTreeListBox &rOutDev, vcl::RenderContext &rRenderContext, const SvViewDataEntry *pView, const SvTreeListEntry &rEntry) override
Definition: svlbitm.cxx:512
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr) override
Definition: svlbitm.cxx:502
Image & implGetImageStore(bool bFirst)
Definition: svlbitm.cxx:495
void SetModeImages(const Image &rBitmap1, const Image &rBitmap2)
Definition: svlbitm.cxx:489
virtual std::unique_ptr< SvLBoxItem > Clone(SvLBoxItem const *pSource) const override
Definition: svlbitm.cxx:528
int GetHeight(const SvTreeListBox *pView, const SvTreeListEntry *pEntry) const
int GetWidth(const SvTreeListBox *pView, const SvTreeListEntry *pEntry) const
double mfAlign
Definition: svlbitm.hxx:110
bool mbEmphasized
Definition: svlbitm.hxx:108
virtual int CalcWidth(const SvTreeListBox *pView) const override
Definition: svlbitm.cxx:318
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr) override
Definition: svlbitm.cxx:281
virtual void Paint(const Point &rPos, SvTreeListBox &rOutDev, vcl::RenderContext &rRenderContext, const SvViewDataEntry *pView, const SvTreeListEntry &rEntry) override
Definition: svlbitm.cxx:210
OUString maText
Definition: svlbitm.hxx:112
virtual ~SvLBoxString() override
Definition: svlbitm.cxx:186
bool mbCustom
Definition: svlbitm.hxx:109
virtual SvLBoxItemType GetType() const override
Definition: svlbitm.cxx:190
virtual std::unique_ptr< SvLBoxItem > Clone(SvLBoxItem const *pSource) const override
Definition: svlbitm.cxx:268
VCL_DLLPRIVATE void DrawCustomEntry(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect, const SvTreeListEntry &rEntry)
bool TextCenterAndClipEnabled() const
tools::Rectangle GetBoundingRect(const SvTreeListEntry *pEntry)
Calculate and return the bounding rectangle of an entry.
SvViewDataItem * GetViewDataItem(SvTreeListEntry const *, SvLBoxItem const *)
VCL_DLLPRIVATE Size MeasureCustomEntry(vcl::RenderContext &rRenderContext, const SvTreeListEntry &rEntry) const
short GetEntryWidth() const
SvTLEntryFlags GetFlags() const
View-dependent data for a tree list entry created in the virtual function SvTreeListBox::CreateViewDa...
bool IsExpanded() const
constexpr Point TopLeft() const
constexpr Size GetSize() const
tools::Long getOpenWidth() const
void SetWeight(FontWeight)
Definition: font/font.cxx:236
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
Definition: window3.cxx:66
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: window3.cxx:65
const AllSettings & GetSettings() const
Definition: window3.cxx:129
::OutputDevice const * GetOutDev() const
Definition: window.cxx:567
const vcl::Font & GetFont() const
Definition: window3.cxx:58
virtual Size GetSizePixel() const
Definition: window.cxx:2402
bool IsEnabled() const
Definition: window2.cxx:1148
sal_Int32 nState
WEIGHT_BOLD
sal_Int32 nIndex
aStr
std::unique_ptr< sal_Int32[]> pData
NONE
long Long
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
SvLBoxButton * pBox
Definition: svlbitm.cxx:34
SvTreeListEntry * pEntry
Definition: svlbitm.cxx:33
SvItemStateFlags
Definition: svlbitm.hxx:48
SvBmp
Definition: svlbitm.hxx:38
@ HICHECKED
@ TRISTATE
@ UNCHECKED
@ HITRISTATE
@ HIUNCHECKED
SvButtonState
Definition: treelistbox.hxx:52
SvLBoxItemType
Definition: treelistbox.hxx:96