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 <o3tl/safeint.hxx>
21 #include <vcl/svapp.hxx>
22 #include <vcl/event.hxx>
23 #include <vcl/ctrl.hxx>
24 #include <vcl/decoview.hxx>
25 #include <vcl/settings.hxx>
26 #include <vcl/uitest/logger.hxx>
27 #include <sal/log.hxx>
28 
29 #include <textlayout.hxx>
30 #include <svdata.hxx>
31 
32 using namespace vcl;
33 
35 {
36  mbHasControlFocus = false;
37  mbShowAccelerator = false;
38 }
39 
41  Window( nType )
42 {
44 }
45 
46 Control::Control( vcl::Window* pParent, WinBits nStyle ) :
48 {
50  ImplInit( pParent, nStyle, nullptr );
51 }
52 
54 {
55  disposeOnce();
56 }
57 
59 {
60  mxLayoutData.reset();
62  Window::dispose();
63 }
64 
65 void Control::EnableRTL( bool bEnable )
66 {
67  // convenience: for controls also switch layout mode
71  Window::EnableRTL(bEnable);
72 }
73 
75 {
77  Window::Resize();
78 }
79 
81 {
82 }
83 
85 {
86  SAL_WARN_IF( mxLayoutData, "vcl", "Control::CreateLayoutData: should be called with non-existent layout data only!" );
87  mxLayoutData.emplace();
88 }
89 
91 {
92  return bool(mxLayoutData);
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 && o3tl::make_unsigned(nIndex) < m_aUnicodeBoundRects.size()) ? m_aUnicodeBoundRects[ nIndex ] : tools::Rectangle();
108 }
109 
111 {
112  if( !HasLayoutData() )
113  FillLayoutData();
114  return mxLayoutData ? mxLayoutData->GetCharacterBounds( nIndex ) : tools::Rectangle();
115 }
116 
118 {
119  tools::Long nIndex = -1;
120  for( tools::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 tools::Long Control::GetIndexForPoint( const Point& rPoint ) const
135 {
136  if( ! HasLayoutData() )
137  FillLayoutData();
138  return mxLayoutData ? mxLayoutData->GetIndexForPoint( rPoint ) : -1;
139 }
140 
142 {
143  tools::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 
173 {
174  if( !HasLayoutData() )
175  FillLayoutData();
176  return mxLayoutData ? mxLayoutData->GetLineStartEnd( nLine ) : Pair( -1, -1 );
177 }
178 
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 
212 {
213  if( !HasLayoutData() )
214  FillLayoutData();
215  return mxLayoutData ? mxLayoutData->ToRelativeLineIndex( nIndex ) : -1;
216 }
217 
218 OUString Control::GetDisplayText() const
219 {
220  if( !HasLayoutData() )
221  FillLayoutData();
222  return mxLayoutData ? mxLayoutData->m_aDisplayText : GetText();
223 }
224 
226 {
227  if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )
228  {
229  if ( !mbHasControlFocus )
230  {
231  mbHasControlFocus = true;
232  CompatStateChanged( StateChangedType::ControlFocus );
233  if ( ImplCallEventListenersAndHandler( VclEventId::ControlGetFocus, {} ) )
234  // been destroyed within the handler
235  return true;
236  }
237  }
238  else
239  {
240  if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS )
241  {
243  if ( !pFocusWin || !ImplIsWindowOrChild( pFocusWin ) )
244  {
245  mbHasControlFocus = false;
246  CompatStateChanged( StateChangedType::ControlFocus );
247  if ( ImplCallEventListenersAndHandler( VclEventId::ControlLoseFocus, [this] () { maLoseFocusHdl.Call(*this); } ) )
248  // been destroyed within the handler
249  return true;
250  }
251  }
252  }
253  return Window::EventNotify( rNEvt );
254 }
255 
257 {
258  if( nStateChange == StateChangedType::InitShow ||
259  nStateChange == StateChangedType::Visible ||
260  nStateChange == StateChangedType::Zoom ||
261  nStateChange == StateChangedType::ControlFont
262  )
263  {
264  ImplClearLayoutData();
265  }
266  Window::StateChanged( nStateChange );
267 }
268 
269 void Control::AppendLayoutData( const Control& rSubControl ) const
270 {
271  if( !rSubControl.HasLayoutData() )
272  rSubControl.FillLayoutData();
273  if( !rSubControl.HasLayoutData() || rSubControl.mxLayoutData->m_aDisplayText.isEmpty() )
274  return;
275 
276  tools::Long nCurrentIndex = mxLayoutData->m_aDisplayText.getLength();
277  mxLayoutData->m_aDisplayText += rSubControl.mxLayoutData->m_aDisplayText;
278  int nLines = rSubControl.mxLayoutData->m_aLineIndices.size();
279  int n;
280  mxLayoutData->m_aLineIndices.push_back( nCurrentIndex );
281  for( n = 1; n < nLines; n++ )
282  mxLayoutData->m_aLineIndices.push_back( rSubControl.mxLayoutData->m_aLineIndices[n] + nCurrentIndex );
283  int nRectangles = rSubControl.mxLayoutData->m_aUnicodeBoundRects.size();
284  tools::Rectangle aRel = rSubControl.GetWindowExtentsRelative(this);
285  for( n = 0; n < nRectangles; n++ )
286  {
287  tools::Rectangle aRect = rSubControl.mxLayoutData->m_aUnicodeBoundRects[n];
288  aRect.Move( aRel.Left(), aRel.Top() );
289  mxLayoutData->m_aUnicodeBoundRects.push_back( aRect );
290  }
291 }
292 
293 void Control::CallEventListeners( VclEventId nEvent, void* pData)
294 {
295  VclPtr<Control> xThis(this);
296  UITestLogger::getInstance().logAction(xThis, nEvent);
297 
298  vcl::Window::CallEventListeners(nEvent, pData);
299 }
300 
301 bool Control::ImplCallEventListenersAndHandler( VclEventId nEvent, std::function<void()> const & callHandler )
302 {
303  VclPtr<Control> xThis(this);
304 
305  Control::CallEventListeners( nEvent );
306 
307  if ( !xThis->isDisposed() )
308  {
309  if (callHandler)
310  {
311  callHandler();
312  }
313 
314  if ( !xThis->isDisposed() )
315  return false;
316  }
317  return true;
318 }
319 
320 void Control::SetLayoutDataParent( const Control* pParent ) const
321 {
322  if( HasLayoutData() )
323  mxLayoutData->m_pParent = pParent;
324 }
325 
327 {
328  mxLayoutData.reset();
329 }
330 
332 {
333  // use a deco view to draw the frame
334  // However, since there happens a lot of magic there, we need to fake some (style) settings
335  // on the device
336  AllSettings aOriginalSettings( pDev->GetSettings() );
337 
338  AllSettings aNewSettings( aOriginalSettings );
339  StyleSettings aStyle( aNewSettings.GetStyleSettings() );
340 
341  // The *only known* clients of the Draw methods of the various VCL-controls are form controls:
342  // During print preview, and during printing, Draw is called. Thus, drawing always happens with a
343  // mono (colored) border
344  aStyle.SetOptions( aStyle.GetOptions() | StyleSettingsOptions::Mono );
345  aStyle.SetMonoColor( GetSettings().GetStyleSettings().GetMonoColor() );
346 
347  aNewSettings.SetStyleSettings( aStyle );
348  // #i67023# do not call data changed listeners for this fake
349  // since they may understandably invalidate on settings changed
350  pDev->OutputDevice::SetSettings( aNewSettings );
351 
352  DecorationView aDecoView( pDev );
353  rRect = aDecoView.DrawFrame( rRect, DrawFrameStyle::Out, DrawFrameFlags::WindowBorder );
354 
355  pDev->OutputDevice::SetSettings( aOriginalSettings );
356 }
357 
359 {
360  mbShowAccelerator = bVal;
361 };
362 
364 {
365  if( m_pParent )
367 }
368 
370 {
371  return Size( GetTextWidth( GetText() ) + 2 * 12,
372  GetTextHeight() + 2 * 6 );
373 }
374 
375 void Control::SetReferenceDevice( OutputDevice* _referenceDevice )
376 {
377  if ( mpReferenceDevice == _referenceDevice )
378  return;
379 
380  mpReferenceDevice = _referenceDevice;
381  Invalidate();
382 }
383 
385 {
386  // tdf#118377 It can happen that mpReferenceDevice is already disposed and
387  // stays disposed (see task, even when Dialog is closed). I have no idea if
388  // this may be very bad - someone who knows more about lifetime of OutputDevice's
389  // will have to decide.
390  // To secure this, I changed all accesses to mpControlData->mpReferenceDevice to
391  // use Control::GetReferenceDevice() - only use mpControlData->mpReferenceDevice
392  // inside Control::SetReferenceDevice and Control::GetReferenceDevice().
393  // Control::GetReferenceDevice() will now reset mpReferenceDevice if it is already
394  // disposed. This way all usages will do a kind of 'test-and-get' call.
395  if(nullptr != mpReferenceDevice && mpReferenceDevice->isDisposed())
396  {
397  const_cast<Control*>(this)->SetReferenceDevice(nullptr);
398  }
399 
400  return mpReferenceDevice;
401 }
402 
403 const vcl::Font& Control::GetCanonicalFont( const StyleSettings& _rStyle ) const
404 {
405  return _rStyle.GetLabelFont();
406 }
407 
408 const Color& Control::GetCanonicalTextColor( const StyleSettings& _rStyle ) const
409 {
410  return _rStyle.GetLabelTextColor();
411 }
412 
414 {
415  const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
416 
417  ApplyControlFont(rRenderContext, GetCanonicalFont(rStyleSettings));
418 
419  ApplyControlForeground(rRenderContext, GetCanonicalTextColor(rStyleSettings));
420  rRenderContext.SetTextFillColor();
421 }
422 
424 {
425  ApplySettings(*GetOutDev());
426 }
427 
428 tools::Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const tools::Rectangle& rRect, const OUString& _rStr,
429  DrawTextFlags _nStyle, std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ) const
430 {
431  OUString rPStr = _rStr;
432  DrawTextFlags nPStyle = _nStyle;
433 
434  bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
435 
436  if (autoacc && !mbShowAccelerator)
437  {
438  rPStr = GetNonMnemonicString( _rStr );
439  nPStyle &= ~DrawTextFlags::HideMnemonic;
440  }
441 
442  if( !GetReferenceDevice() || ( GetReferenceDevice() == &_rTargetDevice ) )
443  {
444  const tools::Rectangle aRet = _rTargetDevice.GetTextRect(rRect, rPStr, nPStyle);
445  _rTargetDevice.DrawText(aRet, rPStr, nPStyle, _pVector, _pDisplayText);
446  return aRet;
447  }
448 
449  ControlTextRenderer aRenderer( *this, _rTargetDevice, *GetReferenceDevice() );
450  return aRenderer.DrawText(rRect, rPStr, nPStyle, _pVector, _pDisplayText, i_pDeviceSize);
451 }
452 
454  const OUString& _rStr, DrawTextFlags _nStyle, Size* o_pDeviceSize ) const
455 {
456  OUString rPStr = _rStr;
457  DrawTextFlags nPStyle = _nStyle;
458 
459  bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel;
460 
461  if (autoacc && !mbShowAccelerator)
462  {
463  rPStr = GetNonMnemonicString( _rStr );
464  nPStyle &= ~DrawTextFlags::HideMnemonic;
465  }
466 
467  if ( !GetReferenceDevice() || ( GetReferenceDevice() == &_rTargetDevice ) )
468  {
469  tools::Rectangle aRet = _rTargetDevice.GetTextRect( rRect, rPStr, nPStyle );
470  if (o_pDeviceSize)
471  {
472  *o_pDeviceSize = aRet.GetSize();
473  }
474  return aRet;
475  }
476 
477  ControlTextRenderer aRenderer( *this, _rTargetDevice, *GetReferenceDevice() );
478  return aRenderer.GetTextRect(rRect, rPStr, nPStyle, o_pDeviceSize);
479 }
480 
481 Font
483 {
484  Font aFont(GetCanonicalFont(GetSettings().GetStyleSettings()));
485  if (IsControlFont())
486  aFont.Merge(GetControlFont());
487  return aFont;
488 }
489 
491 {
492  MouseButtonDown(rEvent);
493 }
494 
496 {
497  MouseButtonUp(rEvent);
498 }
499 
501 {
502  MouseMove(rEvent);
503 }
504 
505 /* 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
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:301
tools::Long GetLineCount() const
Definition: ctrl.cxx:141
sal_Int32 nIndex
void LogicMouseMove(const MouseEvent &rMouseEvent) override
Same as MouseMove(), but coordinates are in logic unit. used for LOK.
Definition: ctrl.cxx:500
SAL_DLLPRIVATE void ImplInitControlData()
Definition: ctrl.cxx:34
Pair GetLineStartEnd(tools::Long nLine) const
Definition: ctrl.cxx:172
std::vector< tools::Long > m_aLineIndices
Definition: ctrl.hxx:48
std::optional< vcl::ControlLayoutData > mxLayoutData
Definition: ctrl.hxx:84
SAL_DLLPRIVATE void ImplDrawFrame(OutputDevice *pDev, tools::Rectangle &rRect)
draws a frame around the give rectangle, onto the given device
Definition: ctrl.cxx:331
constexpr tools::Long Left() const
SAL_DLLPRIVATE void ImplClearLayoutData() const
Definition: ctrl.cxx:326
long Long
const StyleSettings & GetStyleSettings() const
virtual void StateChanged(StateChangedType nStateChange) override
Definition: ctrl.cxx:256
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
Definition: decoview.cxx:804
ImplSVNWFData maNWFData
Definition: svdata.hxx:404
sal_Int64 n
virtual void FillLayoutData() const
Definition: ctrl.cxx:80
SAL_DLLPRIVATE void CompatStateChanged(StateChangedType nStateChange)
Definition: window.cxx:3897
void SetTextFillColor()
Definition: text.cxx:732
const Color & GetLabelTextColor() const
void AppendLayoutData(const Control &rSubControl) const
Definition: ctrl.cxx:269
tools::Rectangle DrawControlText(OutputDevice &_rTargetDevice, const tools::Rectangle &_rRect, const OUString &_rStr, DrawTextFlags _nStyle, std::vector< tools::Rectangle > *_pVector, OUString *_pDisplayText, const Size *i_pDeviceSize=nullptr) const
draws the given text onto the given device
Definition: ctrl.cxx:428
virtual const Color & GetCanonicalTextColor(const StyleSettings &_rStyle) const
Definition: ctrl.cxx:408
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
Definition: ctrl.cxx:413
DrawTextFlags
void logAction(VclPtr< Control > const &xUIElement, VclEventId nEvent)
Definition: logger.cxx:147
tools::Rectangle GetControlTextRect(OutputDevice &_rTargetDevice, const tools::Rectangle &rRect, const OUString &_rStr, DrawTextFlags _nStyle, Size *o_pDeviceSize=nullptr) const
Definition: ctrl.cxx:453
StateChangedType
Definition: window.hxx:289
std::vector< tools::Rectangle > m_aUnicodeBoundRects
Definition: ctrl.hxx:46
static UITestLogger & getInstance()
Definition: logger.cxx:611
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:1921
sal_Int64 WinBits
OUString m_aDisplayText
Definition: ctrl.hxx:43
tools::Long GetIndexForPoint(const Point &rPoint) const
Definition: ctrl.cxx:117
const vcl::Font & GetLabelFont() const
void SetLayoutMode(vcl::text::ComplexTextLayoutFlags nTextLayoutMode)
Definition: text.cxx:58
virtual ~Control() override
Definition: ctrl.cxx:53
void SetOptions(StyleSettingsOptions nOptions)
VclEventId
Definition: vclevent.hxx:37
a class which allows rendering text of a Control onto a device, by taking into account the metrics of...
Definition: textlayout.hxx:87
tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
Definition: window.cxx:2915
bool mbAutoAccel
Definition: svdata.hxx:340
void LogicMouseButtonUp(const MouseEvent &rMouseEvent) override
Same as MouseButtonUp(), but coordinates are in logic unit. used for LOK.
Definition: ctrl.cxx:495
VclPtr< OutputDevice > mpReferenceDevice
Definition: ctrl.hxx:85
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:76
tools::Long ToRelativeLineIndex(tools::Long nIndex) const
ToRelativeLineIndex changes a layout data index to a count relative to its line.
Definition: ctrl.cxx:179
void clear()
Definition: vclptr.hxx:190
OutputDevice * GetReferenceDevice() const
Definition: ctrl.cxx:384
tools::Rectangle GetCharacterBounds(tools::Long nIndex) const
Definition: ctrl.cxx:105
virtual bool EventNotify(NotifyEvent &rNEvt)
Definition: event.cxx:104
int i
virtual void SetText(const OUString &rStr) override
Definition: ctrl.cxx:95
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: ctrl.cxx:293
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:175
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
vcl::Font GetUnzoomedControlPointFont() const
Definition: ctrl.cxx:482
void Merge(const Font &rFont)
Definition: font/font.cxx:347
tools::Rectangle GetTextRect(const tools::Rectangle &_rRect, const OUString &_rText, DrawTextFlags _nStyle, Size *o_pDeviceSize)
Definition: textlayout.cxx:341
constexpr tools::Long Top() const
MouseNotifyEvent GetType() const
Definition: event.hxx:308
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: ctrl.cxx:58
const AllSettings & GetSettings() const
Definition: outdev.hxx:295
void SetShowAccelerator(bool val)
Definition: ctrl.cxx:358
VclPtr< const Control > m_pParent
Definition: ctrl.hxx:50
tools::Rectangle DrawText(const tools::Rectangle &_rRect, const OUString &_rText, DrawTextFlags _nStyle, std::vector< tools::Rectangle > *_pVector, OUString *_pDisplayText, const Size *i_pDeviceSize)
Definition: textlayout.cxx:335
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
Definition: window.cxx:940
virtual Size GetOptimalSize() const override
Definition: ctrl.cxx:369
tools::Long A() const
static vcl::Window * GetFocusWindow()
Get the currently focused window.
Definition: svapp.cxx:1159
constexpr Size GetSize() const
virtual void Resize() override
Definition: ctrl.cxx:74
tools::Long GetIndexForPoint(const Point &rPoint) const
Definition: ctrl.cxx:134
Control(const Control &)=delete
WindowType
Definition: ctrl.hxx:81
#define SAL_WARN_IF(condition, area, stream)
void LogicMouseButtonDown(const MouseEvent &rMouseEvent) override
Same as MouseButtonDown(), but coordinates are in logic unit. used for LOK.
Definition: ctrl.cxx:490
virtual const vcl::Font & GetCanonicalFont(const StyleSettings &_rStyle) const
Definition: ctrl.cxx:403
::OutputDevice const * GetOutDev() const
Definition: window.cxx:567
tools::Rectangle GetCharacterBounds(tools::Long nIndex) const
Definition: ctrl.cxx:110
::Pair GetLineStartEnd(tools::Long nLine) const
Definition: ctrl.cxx:149
void ImplInitSettings()
Definition: ctrl.cxx:423
virtual void StateChanged(StateChangedType nStateChange)
Definition: window.cxx:1942
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
tools::Long B() const
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: event.cxx:219
void SetReferenceDevice(OutputDevice *_referenceDevice)
sets a reference device used for rendering control text
Definition: ctrl.cxx:375
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:795
bool isDisposed() const
bool HasLayoutData() const
determines whether we currently have layout data
Definition: ctrl.cxx:90
tools::Long ToRelativeLineIndex(tools::Long nIndex) const
ToRelativeLineIndex changes a layout data index to a count relative to its line.
Definition: ctrl.cxx:211
void SetLayoutDataParent(const Control *pParent) const
Definition: ctrl.cxx:320
virtual bool EventNotify(NotifyEvent &rNEvt) override
Definition: ctrl.cxx:225