LibreOffice Module vcl (master)  1
ctrl.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/svapp.hxx>
21 #include <vcl/event.hxx>
22 #include <vcl/ctrl.hxx>
23 #include <vcl/decoview.hxx>
24 #include <vcl/settings.hxx>
25 #include <vcl/uitest/logger.hxx>
26 #include <sal/log.hxx>
27 
28 #include <textlayout.hxx>
29 #include <svdata.hxx>
30 #include <controldata.hxx>
31 
32 using namespace vcl;
33 
35 {
36  mbHasControlFocus = false;
37  mbShowAccelerator = false;
38  mpControlData.reset(new ImplControlData);
39 }
40 
42  Window( nType )
43 {
45 }
46 
47 Control::Control( vcl::Window* pParent, WinBits nStyle ) :
49 {
51  ImplInit( pParent, nStyle, nullptr );
52 }
53 
55 {
56  disposeOnce();
57 }
58 
60 {
61  mpControlData.reset();
62  Window::dispose();
63 }
64 
65 void Control::EnableRTL( bool bEnable )
66 {
67  // convenience: for controls also switch layout mode
71  OutputDevice::EnableRTL(bEnable);
72 }
73 
75 {
77  Window::Resize();
78 }
79 
81 {
82 }
83 
85 {
86  SAL_WARN_IF( mpControlData->mpLayoutData, "vcl", "Control::CreateLayoutData: should be called with non-existent layout data only!" );
87  mpControlData->mpLayoutData.reset( new vcl::ControlLayoutData );
88 }
89 
91 {
92  return mpControlData && mpControlData->mpLayoutData != nullptr;
93 }
94 
95 void Control::SetText( const OUString& rStr )
96 {
98  Window::SetText( rStr );
99 }
100 
101 ControlLayoutData::ControlLayoutData() : m_pParent( nullptr )
102 {
103 }
104 
106 {
107  return (nIndex >= 0 && nIndex < static_cast<long>(m_aUnicodeBoundRects.size())) ? m_aUnicodeBoundRects[ nIndex ] : tools::Rectangle();
108 }
109 
111 {
112  if( !HasLayoutData() )
113  FillLayoutData();
114  return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetCharacterBounds( nIndex ) : tools::Rectangle();
115 }
116 
117 long ControlLayoutData::GetIndexForPoint( const Point& rPoint ) const
118 {
119  long nIndex = -1;
120  for( long i = m_aUnicodeBoundRects.size()-1; i >= 0; i-- )
121  {
122  Point aTopLeft = m_aUnicodeBoundRects[i].TopLeft();
123  Point aBottomRight = m_aUnicodeBoundRects[i].BottomRight();
124  if (rPoint.X() >= aTopLeft.X() && rPoint.Y() >= aTopLeft.Y() &&
125  rPoint.X() <= aBottomRight.X() && rPoint.Y() <= aBottomRight.Y())
126  {
127  nIndex = i;
128  break;
129  }
130  }
131  return nIndex;
132 }
133 
134 long Control::GetIndexForPoint( const Point& rPoint ) const
135 {
136  if( ! HasLayoutData() )
137  FillLayoutData();
138  return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetIndexForPoint( rPoint ) : -1;
139 }
140 
142 {
143  long nLines = m_aLineIndices.size();
144  if( nLines == 0 && !m_aDisplayText.isEmpty() )
145  nLines = 1;
146  return nLines;
147 }
148 
150 {
151  Pair aPair( -1, -1 );
152 
153  int nDisplayLines = m_aLineIndices.size();
154  if( nLine >= 0 && nLine < nDisplayLines )
155  {
156  aPair.A() = m_aLineIndices[nLine];
157  if( nLine+1 < nDisplayLines )
158  aPair.B() = m_aLineIndices[nLine+1]-1;
159  else
160  aPair.B() = m_aDisplayText.getLength()-1;
161  }
162  else if( nLine == 0 && nDisplayLines == 0 && !m_aDisplayText.isEmpty() )
163  {
164  // special case for single line controls so the implementations
165  // in that case do not have to fill in the line indices
166  aPair.A() = 0;
167  aPair.B() = m_aDisplayText.getLength()-1;
168  }
169  return aPair;
170 }
171 
172 Pair Control::GetLineStartEnd( long nLine ) const
173 {
174  if( !HasLayoutData() )
175  FillLayoutData();
176  return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetLineStartEnd( nLine ) : Pair( -1, -1 );
177 }
178 
179 long ControlLayoutData::ToRelativeLineIndex( long nIndex ) const
180 {
181  // is the index sensible at all ?
182  if( nIndex >= 0 && nIndex < m_aDisplayText.getLength() )
183  {
184  int nDisplayLines = m_aLineIndices.size();
185  // if only 1 line exists, then absolute and relative index are
186  // identical -> do nothing
187  if( nDisplayLines > 1 )
188  {
189  int nLine;
190  for( nLine = nDisplayLines-1; nLine >= 0; nLine-- )
191  {
192  if( m_aLineIndices[nLine] <= nIndex )
193  {
194  nIndex -= m_aLineIndices[nLine];
195  break;
196  }
197  }
198  if( nLine < 0 )
199  {
200  SAL_WARN_IF( nLine < 0, "vcl", "ToRelativeLineIndex failed" );
201  nIndex = -1;
202  }
203  }
204  }
205  else
206  nIndex = -1;
207 
208  return nIndex;
209 }
210 
211 long Control::ToRelativeLineIndex( long nIndex ) const
212 {
213  if( !HasLayoutData() )
214  FillLayoutData();
215  return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->ToRelativeLineIndex( nIndex ) : -1;
216 }
217 
218 OUString Control::GetDisplayText() const
219 {
220  if( !HasLayoutData() )
221  FillLayoutData();
222  return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->m_aDisplayText : GetText();
223 }
224 
226 {
227  // tdf#91081 if control is not valid, skip the emission - chaining to the parent
228  if (mpControlData)
229  {
230  if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )
231  {
232  if ( !mbHasControlFocus )
233  {
234  mbHasControlFocus = true;
235  CompatStateChanged( StateChangedType::ControlFocus );
236  if ( ImplCallEventListenersAndHandler( VclEventId::ControlGetFocus, [this] () { maGetFocusHdl.Call(*this); } ) )
237  // been destroyed within the handler
238  return true;
239  }
240  }
241  else
242  {
243  if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS )
244  {
246  if ( !pFocusWin || !ImplIsWindowOrChild( pFocusWin ) )
247  {
248  mbHasControlFocus = false;
249  CompatStateChanged( StateChangedType::ControlFocus );
250  if ( ImplCallEventListenersAndHandler( VclEventId::ControlLoseFocus, [this] () { maLoseFocusHdl.Call(*this); } ) )
251  // been destroyed within the handler
252  return true;
253  }
254  }
255  }
256  }
257  return Window::EventNotify( rNEvt );
258 }
259 
261 {
262  if( nStateChange == StateChangedType::InitShow ||
263  nStateChange == StateChangedType::Visible ||
264  nStateChange == StateChangedType::Zoom ||
265  nStateChange == StateChangedType::ControlFont
266  )
267  {
268  ImplClearLayoutData();
269  }
270  Window::StateChanged( nStateChange );
271 }
272 
273 void Control::AppendLayoutData( const Control& rSubControl ) const
274 {
275  if( !rSubControl.HasLayoutData() )
276  rSubControl.FillLayoutData();
277  if( !rSubControl.HasLayoutData() || rSubControl.mpControlData->mpLayoutData->m_aDisplayText.isEmpty() )
278  return;
279 
280  long nCurrentIndex = mpControlData->mpLayoutData->m_aDisplayText.getLength();
281  mpControlData->mpLayoutData->m_aDisplayText += rSubControl.mpControlData->mpLayoutData->m_aDisplayText;
282  int nLines = rSubControl.mpControlData->mpLayoutData->m_aLineIndices.size();
283  int n;
284  mpControlData->mpLayoutData->m_aLineIndices.push_back( nCurrentIndex );
285  for( n = 1; n < nLines; n++ )
286  mpControlData->mpLayoutData->m_aLineIndices.push_back( rSubControl.mpControlData->mpLayoutData->m_aLineIndices[n] + nCurrentIndex );
287  int nRectangles = rSubControl.mpControlData->mpLayoutData->m_aUnicodeBoundRects.size();
288  tools::Rectangle aRel = const_cast<Control&>(rSubControl).GetWindowExtentsRelative( const_cast<Control*>(this) );
289  for( n = 0; n < nRectangles; n++ )
290  {
291  tools::Rectangle aRect = rSubControl.mpControlData->mpLayoutData->m_aUnicodeBoundRects[n];
292  aRect.Move( aRel.Left(), aRel.Top() );
293  mpControlData->mpLayoutData->m_aUnicodeBoundRects.push_back( aRect );
294  }
295 }
296 
297 void Control::CallEventListeners( VclEventId nEvent, void* pData)
298 {
299  VclPtr<Control> xThis(this);
300  UITestLogger::getInstance().logAction(xThis, nEvent);
301 
302  vcl::Window::CallEventListeners(nEvent, pData);
303 }
304 
305 bool Control::ImplCallEventListenersAndHandler( VclEventId nEvent, std::function<void()> const & callHandler )
306 {
307  VclPtr<Control> xThis(this);
308 
309  Control::CallEventListeners( nEvent );
310 
311  if ( !xThis->IsDisposed() )
312  {
313  if (callHandler)
314  {
315  callHandler();
316  }
317 
318  if ( !xThis->IsDisposed() )
319  return false;
320  }
321  return true;
322 }
323 
324 void Control::SetLayoutDataParent( const Control* pParent ) const
325 {
326  if( HasLayoutData() )
327  mpControlData->mpLayoutData->m_pParent = pParent;
328 }
329 
331 {
332  if (mpControlData)
333  mpControlData->mpLayoutData.reset();
334 }
335 
337 {
338  // use a deco view to draw the frame
339  // However, since there happens a lot of magic there, we need to fake some (style) settings
340  // on the device
341  AllSettings aOriginalSettings( pDev->GetSettings() );
342 
343  AllSettings aNewSettings( aOriginalSettings );
344  StyleSettings aStyle( aNewSettings.GetStyleSettings() );
345 
346  // The *only known* clients of the Draw methods of the various VCL-controls are form controls:
347  // During print preview, and during printing, Draw is called. Thus, drawing always happens with a
348  // mono (colored) border
349  aStyle.SetOptions( aStyle.GetOptions() | StyleSettingsOptions::Mono );
350  aStyle.SetMonoColor( GetSettings().GetStyleSettings().GetMonoColor() );
351 
352  aNewSettings.SetStyleSettings( aStyle );
353  // #i67023# do not call data changed listeners for this fake
354  // since they may understandably invalidate on settings changed
355  pDev->OutputDevice::SetSettings( aNewSettings );
356 
357  DecorationView aDecoView( pDev );
358  rRect = aDecoView.DrawFrame( rRect, DrawFrameStyle::Out, DrawFrameFlags::WindowBorder );
359 
360  pDev->OutputDevice::SetSettings( aOriginalSettings );
361 }
362 
364 {
365  mbShowAccelerator = bVal;
366 };
367 
369 {
370  if( m_pParent )
372 }
373 
375 {
376  return Size( GetTextWidth( GetText() ) + 2 * 12,
377  GetTextHeight() + 2 * 6 );
378 }
379 
380 void Control::SetReferenceDevice( OutputDevice* _referenceDevice )
381 {
382  if ( mpControlData->mpReferenceDevice == _referenceDevice )
383  return;
384 
385  mpControlData->mpReferenceDevice = _referenceDevice;
386  Invalidate();
387 }
388 
390 {
391  // tdf#118377 It can happen that mpReferenceDevice is already disposed and
392  // stays disposed (see task, even when Dialog is closed). I have no idea if
393  // this may be very bad - someone who knows more about lifetime of OutputDevice's
394  // will have to decide.
395  // To secure this, I changed all accesses to mpControlData->mpReferenceDevice to
396  // use Control::GetReferenceDevice() - only use mpControlData->mpReferenceDevice
397  // inside Control::SetReferenceDevice and Control::GetReferenceDevice().
398  // Control::GetReferenceDevice() will now reset mpReferenceDevice if it is already
399  // disposed. This way all usages will do a kind of 'test-and-get' call.
400  if(nullptr != mpControlData->mpReferenceDevice && mpControlData->mpReferenceDevice->isDisposed())
401  {
402  const_cast<Control*>(this)->SetReferenceDevice(nullptr);
403  }
404 
405  return mpControlData->mpReferenceDevice;
406 }
407 
408 const vcl::Font& Control::GetCanonicalFont( const StyleSettings& _rStyle ) const
409 {
410  return _rStyle.GetLabelFont();
411 }
412 
413 const Color& Control::GetCanonicalTextColor( const StyleSettings& _rStyle ) const
414 {
415  return _rStyle.GetLabelTextColor();
416 }
417 
419 {
420  const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
421 
422  ApplyControlFont(rRenderContext, GetCanonicalFont(rStyleSettings));
423 
424  ApplyControlForeground(rRenderContext, GetCanonicalTextColor(rStyleSettings));
425  rRenderContext.SetTextFillColor();
426 }
427 
429 {
430  ApplySettings(*this);
431 }
432 
433 tools::Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const tools::Rectangle& rRect, const OUString& _rStr,
434  DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ) const
435 {
436  OUString rPStr = _rStr;
437  DrawTextFlags nPStyle = _nStyle;
438 
439  bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
440 
441  if (autoacc && !mbShowAccelerator)
442  {
443  rPStr = GetNonMnemonicString( _rStr );
444  nPStyle &= ~DrawTextFlags::HideMnemonic;
445  }
446 
447  if( !GetReferenceDevice() || ( GetReferenceDevice() == &_rTargetDevice ) )
448  {
449  const tools::Rectangle aRet = _rTargetDevice.GetTextRect(rRect, rPStr, nPStyle);
450  _rTargetDevice.DrawText(aRet, rPStr, nPStyle, _pVector, _pDisplayText);
451  return aRet;
452  }
453 
454  ControlTextRenderer aRenderer( *this, _rTargetDevice, *GetReferenceDevice() );
455  return aRenderer.DrawText(rRect, rPStr, nPStyle, _pVector, _pDisplayText, i_pDeviceSize);
456 }
457 
459  const OUString& _rStr, DrawTextFlags _nStyle, Size* o_pDeviceSize ) const
460 {
461  OUString rPStr = _rStr;
462  DrawTextFlags nPStyle = _nStyle;
463 
464  bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
465 
466  if (autoacc && !mbShowAccelerator)
467  {
468  rPStr = GetNonMnemonicString( _rStr );
469  nPStyle &= ~DrawTextFlags::HideMnemonic;
470  }
471 
472  if ( !GetReferenceDevice() || ( GetReferenceDevice() == &_rTargetDevice ) )
473  {
474  tools::Rectangle aRet = _rTargetDevice.GetTextRect( rRect, rPStr, nPStyle );
475  if (o_pDeviceSize)
476  {
477  *o_pDeviceSize = aRet.GetSize();
478  }
479  return aRet;
480  }
481 
482  ControlTextRenderer aRenderer( *this, _rTargetDevice, *GetReferenceDevice() );
483  return aRenderer.GetTextRect(rRect, rPStr, nPStyle, o_pDeviceSize);
484 }
485 
486 Font
488 {
489  Font aFont(GetCanonicalFont(GetSettings().GetStyleSettings()));
490  if (IsControlFont())
491  aFont.Merge(GetControlFont());
492  return aFont;
493 }
494 
495 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString GetDisplayText() const override
Definition: ctrl.cxx:218
void CreateLayoutData() const
creates the mpData->mpLayoutData structure
Definition: ctrl.cxx:84
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:779
virtual void EnableRTL(bool bEnable=true) override
Definition: ctrl.cxx:65
bool ImplCallEventListenersAndHandler(VclEventId nEvent, std::function< void()> const &callHandler)
this calls both our event listeners, and a specified handler
Definition: ctrl.cxx:305
tools::Rectangle GetCharacterBounds(long nIndex) const
Definition: ctrl.cxx:110
long ToRelativeLineIndex(long nIndex) const
ToRelativeLineIndex changes a layout data index to a count relative to its line.
Definition: ctrl.cxx:211
std::vector< tools::Rectangle > MetricVector
Definition: outdev.hxx:139
SAL_DLLPRIVATE void ImplInitControlData()
Definition: ctrl.cxx:34
SAL_DLLPRIVATE void ImplDrawFrame(OutputDevice *pDev, tools::Rectangle &rRect)
draws a frame around the give rectangle, onto the given device
Definition: ctrl.cxx:336
SAL_DLLPRIVATE void ImplClearLayoutData() const
Definition: ctrl.cxx:330
const StyleSettings & GetStyleSettings() const
virtual void StateChanged(StateChangedType nStateChange) override
Definition: ctrl.cxx:260
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
Definition: decoview.cxx:848
ImplSVNWFData maNWFData
Definition: svdata.hxx:352
virtual void FillLayoutData() const
Definition: ctrl.cxx:80
void CompatStateChanged(StateChangedType nStateChange)
Definition: window.cxx:3853
void SetTextFillColor()
Definition: text.cxx:697
void SetLayoutMode(ComplexTextLayoutFlags nTextLayoutMode)
long GetIndexForPoint(const Point &rPoint) const
Definition: ctrl.cxx:117
const Color & GetLabelTextColor() const
void AppendLayoutData(const Control &rSubControl) const
Definition: ctrl.cxx:273
virtual const Color & GetCanonicalTextColor(const StyleSettings &_rStyle) const
Definition: ctrl.cxx:413
Pair GetLineStartEnd(long nLine) const
Definition: ctrl.cxx:172
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
Definition: ctrl.cxx:418
void Move(long nHorzMoveDelta, long nVertMoveDelta)
void logAction(VclPtr< Control > const &xUIElement, VclEventId nEvent)
Definition: logger.cxx:149
tools::Rectangle GetControlTextRect(OutputDevice &_rTargetDevice, const tools::Rectangle &rRect, const OUString &_rStr, DrawTextFlags _nStyle, Size *o_pDeviceSize=nullptr) const
Definition: ctrl.cxx:458
long GetLineCount() const
Definition: ctrl.cxx:141
StateChangedType
Definition: window.hxx:311
std::vector< tools::Rectangle > m_aUnicodeBoundRects
static UITestLogger & getInstance()
Definition: logger.cxx:538
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
Definition: text.cxx:1789
sal_Int64 WinBits
const vcl::Font & GetLabelFont() const
virtual ~Control() override
Definition: ctrl.cxx:54
void SetOptions(StyleSettingsOptions nOptions)
VclEventId
Definition: vclevent.hxx:41
long Top() const
virtual void EnableRTL(bool bEnable=true)
Definition: outdev.cxx:596
a class which allows rendering text of a Control onto a device, by taking into account the metrics of...
Definition: textlayout.hxx:87
bool mbAutoAccel
Definition: svdata.hxx:288
tools::Rectangle DrawControlText(OutputDevice &_rTargetDevice, const tools::Rectangle &_rRect, const OUString &_rStr, DrawTextFlags _nStyle, MetricVector *_pVector, OUString *_pDisplayText, const Size *i_pDeviceSize=nullptr) const
draws the given text onto the given device
Definition: ctrl.cxx:433
long B() const
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:67
OutputDevice * GetReferenceDevice() const
Definition: ctrl.cxx:389
virtual bool EventNotify(NotifyEvent &rNEvt)
Definition: event.cxx:103
virtual void SetText(const OUString &rStr) override
Definition: ctrl.cxx:95
int i
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: ctrl.cxx:297
::Pair GetLineStartEnd(long nLine) const
Definition: ctrl.cxx:149
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
vcl::Font GetUnzoomedControlPointFont() const
Definition: ctrl.cxx:487
long A() const
void Merge(const Font &rFont)
Definition: font/font.cxx:298
tools::Rectangle GetTextRect(const tools::Rectangle &_rRect, const OUString &_rText, DrawTextFlags _nStyle, Size *o_pDeviceSize)
Definition: textlayout.cxx:345
MouseNotifyEvent GetType() const
Definition: event.hxx:294
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: ctrl.cxx:59
const AllSettings & GetSettings() const
Definition: outdev.hxx:420
DrawTextFlags
Definition: outdev.hxx:144
void SetShowAccelerator(bool val)
Definition: ctrl.cxx:363
long X() const
long ToRelativeLineIndex(long nIndex) const
ToRelativeLineIndex changes a layout data index to a count relative to its line.
Definition: ctrl.cxx:179
VclPtr< const Control > m_pParent
Size GetSize() const
long GetIndexForPoint(const Point &rPoint) const
Definition: ctrl.cxx:134
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
Definition: window.cxx:932
virtual Size GetOptimalSize() const override
Definition: ctrl.cxx:374
static vcl::Window * GetFocusWindow()
Get the currently focused window.
Definition: svapp.cxx:1049
virtual void Resize() override
Definition: ctrl.cxx:74
Control(const Control &)=delete
WindowType
Definition: ctrl.hxx:33
#define SAL_WARN_IF(condition, area, stream)
virtual const vcl::Font & GetCanonicalFont(const StyleSettings &_rStyle) const
Definition: ctrl.cxx:408
std::unique_ptr< vcl::ImplControlData > mpControlData
Definition: ctrl.hxx:36
tools::Rectangle DrawText(const tools::Rectangle &_rRect, const OUString &_rText, DrawTextFlags _nStyle, MetricVector *_pVector, OUString *_pDisplayText, const Size *i_pDeviceSize)
Definition: textlayout.cxx:339
long Left() const
bool IsDisposed() const
Definition: window.cxx:137
void ImplInitSettings()
Definition: ctrl.cxx:428
virtual void StateChanged(StateChangedType nStateChange)
Definition: window.cxx:1904
std::vector< long > m_aLineIndices
tools::Rectangle GetCharacterBounds(long nIndex) const
Definition: ctrl.cxx:105
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: event.cxx:213
void SetReferenceDevice(OutputDevice *_referenceDevice)
sets a reference device used for rendering control text
Definition: ctrl.cxx:380
bool HasLayoutData() const
determines whether we currently have layout data
Definition: ctrl.cxx:90
long Y() const
void SetLayoutDataParent(const Control *pParent) const
Definition: ctrl.cxx:324
virtual bool EventNotify(NotifyEvent &rNEvt) override
Definition: ctrl.cxx:225