LibreOffice Module vcl (master)  1
vclmedit.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 <memory>
22 #include <vcl/commandevent.hxx>
23 #include <vcl/builder.hxx>
24 #include <vcl/decoview.hxx>
25 #include <vcl/event.hxx>
26 #include <vcl/timer.hxx>
27 #include <vcl/vclmedit.hxx>
28 #include <vcl/xtextedt.hxx>
29 #include <vcl/textview.hxx>
30 #include <vcl/ptrstyle.hxx>
31 
32 #include <svl/undo.hxx>
33 #include <svl/lstner.hxx>
34 #include <vcl/uitest/uiobject.hxx>
35 
36 #include <vcl/scrbar.hxx>
37 #include <vcl/settings.hxx>
38 #include <vcl/weld.hxx>
39 #include <osl/diagnose.h>
40 
41 class ImpVclMEdit : public SfxListener
42 {
43 private:
45 
50 
53 
54 protected:
55  virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
56  void ImpUpdateSrollBarVis( WinBits nWinStyle );
57  void ImpInitScrollBars();
58  void ImpSetScrollBarRanges();
60  DECL_LINK( ScrollHdl, ScrollBar*, void );
61 
62 public:
63  ImpVclMEdit( VclMultiLineEdit* pVclMultiLineEdit, WinBits nWinStyle );
64  virtual ~ImpVclMEdit() override;
65 
66  void SetModified( bool bMod );
67  bool IsModified() const;
68 
69  void SetReadOnly( bool bRdOnly );
70  bool IsReadOnly() const;
71 
72  void SetMaxTextLen(sal_Int32 nLen);
73  sal_Int32 GetMaxTextLen() const;
74 
75  void SetMaxTextWidth(long nMaxWidth);
76 
77  void InsertText( const OUString& rStr );
78  OUString GetSelected() const;
79  OUString GetSelected( LineEnd aSeparator ) const;
80 
81  void SetSelection( const Selection& rSelection );
82  const Selection& GetSelection() const;
83 
84  void Cut();
85  void Copy();
86  void Paste();
87 
88  void SetText( const OUString& rStr );
89  OUString GetText() const;
90  OUString GetText( LineEnd aSeparator ) const;
91  OUString GetTextLines( LineEnd aSeparator ) const;
92 
93  void Resize();
94  void GetFocus();
95 
96  bool HandleCommand( const CommandEvent& rCEvt );
97 
98  void Enable( bool bEnable );
99 
100  Size CalcMinimumSize() const;
101  Size CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const;
102  void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const;
103 
104  void SetAlign( WinBits nWinStyle );
105 
106  void InitFromStyle( WinBits nWinStyle );
107 
111 };
112 
114  : pVclMultiLineEdit(pEdt)
115  , mpTextWindow(VclPtr<TextWindow>::Create(pEdt))
116  , mpHScrollBar(VclPtr<ScrollBar>::Create(pVclMultiLineEdit, WB_HSCROLL|WB_DRAG))
117  , mpVScrollBar(VclPtr<ScrollBar>::Create(pVclMultiLineEdit, WB_VSCROLL|WB_DRAG))
118  , mpScrollBox(VclPtr<ScrollBarBox>::Create(pVclMultiLineEdit, WB_SIZEABLE))
119  , mnTextWidth(0)
120 {
121  mpVScrollBar->SetScrollHdl( LINK( this, ImpVclMEdit, ScrollHdl ) );
122  mpHScrollBar->SetScrollHdl( LINK( this, ImpVclMEdit, ScrollHdl ) );
123  mpTextWindow->Show();
124  InitFromStyle( nWinStyle );
126 }
127 
129 {
130  const bool bHaveVScroll = mpVScrollBar->IsVisible();
131  const bool bHaveHScroll = mpHScrollBar->IsVisible();
132  const bool bHaveScrollBox = mpScrollBox->IsVisible();
133 
134  bool bNeedVScroll = ( nWinStyle & WB_VSCROLL ) == WB_VSCROLL;
135  const bool bNeedHScroll = ( nWinStyle & WB_HSCROLL ) == WB_HSCROLL;
136 
137  const bool bAutoVScroll = ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL;
138  if ( !bNeedVScroll && bAutoVScroll )
139  {
140  TextEngine& rEngine( *mpTextWindow->GetTextEngine() );
141  long nOverallTextHeight(0);
142  for ( sal_uInt32 i=0; i<rEngine.GetParagraphCount(); ++i )
143  nOverallTextHeight += rEngine.GetTextHeight( i );
144  if ( nOverallTextHeight > mpTextWindow->GetOutputSizePixel().Height() )
145  bNeedVScroll = true;
146  }
147 
148  const bool bNeedScrollBox = bNeedVScroll && bNeedHScroll;
149 
150  bool bScrollbarsChanged = false;
151  if ( bHaveVScroll != bNeedVScroll )
152  {
153  mpVScrollBar->Show(bNeedVScroll);
154  bScrollbarsChanged = true;
155  }
156 
157  if ( bHaveHScroll != bNeedHScroll )
158  {
159  mpHScrollBar->Show(bNeedHScroll);
160  bScrollbarsChanged = true;
161  }
162 
163  if ( bHaveScrollBox != bNeedScrollBox )
164  {
165  mpScrollBox->Show(bNeedScrollBox);
166  }
167 
168  if ( bScrollbarsChanged )
169  {
171  Resize();
172  }
173 }
174 
176 {
177  ImpUpdateSrollBarVis( nWinStyle );
178  SetAlign( nWinStyle );
179 
180  if ( nWinStyle & WB_NOHIDESELECTION )
181  mpTextWindow->SetAutoFocusHide( false );
182  else
184 
185  if ( nWinStyle & WB_READONLY )
187  else
188  mpTextWindow->GetTextView()->SetReadOnly( false );
189 
190  if ( nWinStyle & WB_IGNORETAB )
191  {
192  mpTextWindow->SetIgnoreTab( true );
193  }
194  else
195  {
196  mpTextWindow->SetIgnoreTab( false );
197  // #103667# VclMultiLineEdit has the flag, but focusable window also needs this flag
198  WinBits nStyle = mpTextWindow->GetStyle();
199  nStyle |= WB_NODIALOGCONTROL;
200  mpTextWindow->SetStyle( nStyle );
201  }
202 }
203 
205 {
212 }
213 
215 {
216  const long nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
217  mpVScrollBar->SetRange( Range( 0, nTextHeight-1 ) );
218 
220 }
221 
223 {
224  static const sal_Unicode sampleChar = { 'x' };
225 
227 
228  Size aCharBox;
229  aCharBox.setWidth( mpTextWindow->GetTextWidth( OUString(sampleChar) ) );
230  aCharBox.setHeight( mpTextWindow->GetTextHeight() );
232 
233  mpHScrollBar->SetVisibleSize( aOutSz.Width() );
234  mpHScrollBar->SetPageSize( aOutSz.Width() * 8 / 10 );
235  mpHScrollBar->SetLineSize( aCharBox.Width()*10 );
237 
238  mpVScrollBar->SetVisibleSize( aOutSz.Height() );
239  mpVScrollBar->SetPageSize( aOutSz.Height() * 8 / 10 );
240  mpVScrollBar->SetLineSize( aCharBox.Height() );
242 }
243 
245 {
246  long nX = mpTextWindow->GetTextView()->GetStartDocPos().X();
248  mpHScrollBar->SetThumbPos( nX );
249  else
251 
252 }
253 
254 IMPL_LINK( ImpVclMEdit, ScrollHdl, ScrollBar*, pCurScrollBar, void )
255 {
256  long nDiffX = 0, nDiffY = 0;
257 
258  if ( pCurScrollBar == mpVScrollBar )
259  nDiffY = mpTextWindow->GetTextView()->GetStartDocPos().Y() - pCurScrollBar->GetThumbPos();
260  else if ( pCurScrollBar == mpHScrollBar )
261  nDiffX = mpTextWindow->GetTextView()->GetStartDocPos().X() - pCurScrollBar->GetThumbPos();
262 
263  mpTextWindow->GetTextView()->Scroll( nDiffX, nDiffY );
264  // mpTextWindow->GetTextView()->ShowCursor( false, true );
265 }
266 
268 {
269  bool bRTL = AllSettings::GetLayoutRTL();
271 
272  if ( nWinStyle & WB_CENTER )
274  else if ( nWinStyle & WB_RIGHT )
276  else if ( nWinStyle & WB_LEFT )
277  mpTextWindow->GetTextEngine()->SetTextAlign( !bRTL ? TxtAlign::Left : TxtAlign::Right );
278 }
279 
280 void ImpVclMEdit::SetModified( bool bMod )
281 {
283 }
284 
286 {
288 }
289 
290 void ImpVclMEdit::SetReadOnly( bool bRdOnly )
291 {
292  mpTextWindow->GetTextView()->SetReadOnly( bRdOnly );
293  // TODO: Adjust color?
294 }
295 
297 {
298  return mpTextWindow->GetTextView()->IsReadOnly();
299 }
300 
301 void ImpVclMEdit::SetMaxTextLen(sal_Int32 nLen)
302 {
304 }
305 
306 sal_Int32 ImpVclMEdit::GetMaxTextLen() const
307 {
309 }
310 
311 void ImpVclMEdit::InsertText( const OUString& rStr )
312 {
313  mpTextWindow->GetTextView()->InsertText( rStr );
314 }
315 
316 OUString ImpVclMEdit::GetSelected() const
317 {
318  return mpTextWindow->GetTextView()->GetSelected();
319 }
320 
321 OUString ImpVclMEdit::GetSelected( LineEnd aSeparator ) const
322 {
323  return mpTextWindow->GetTextView()->GetSelected( aSeparator );
324 }
325 
326 void ImpVclMEdit::SetMaxTextWidth(long nMaxWidth)
327 {
329 }
330 
332 {
333  int nIteration = 1;
334  do
335  {
336  WinBits nWinStyle( pVclMultiLineEdit->GetStyle() );
337  if ( ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL )
338  ImpUpdateSrollBarVis( nWinStyle );
339 
341  Size aEditSize = aSz;
343  nSBWidth = pVclMultiLineEdit->CalcZoom( nSBWidth );
344 
345  if (mpHScrollBar->IsVisible())
346  aSz.AdjustHeight( -(nSBWidth+1) );
347  if (mpVScrollBar->IsVisible())
348  aSz.AdjustWidth( -(nSBWidth+1) );
349 
350  if (!mpHScrollBar->IsVisible())
352  else
353  mpHScrollBar->setPosSizePixel( 0, aEditSize.Height()-nSBWidth, aSz.Width(), nSBWidth );
354 
355  Point aTextWindowPos;
356  if (mpVScrollBar->IsVisible())
357  {
359  {
360  mpVScrollBar->setPosSizePixel( 0, 0, nSBWidth, aSz.Height() );
361  aTextWindowPos.AdjustX(nSBWidth );
362  }
363  else
364  mpVScrollBar->setPosSizePixel( aEditSize.Width()-nSBWidth, 0, nSBWidth, aSz.Height() );
365  }
366 
367  if (mpScrollBox->IsVisible())
368  mpScrollBox->setPosSizePixel( aSz.Width(), aSz.Height(), nSBWidth, nSBWidth );
369 
370  Size aTextWindowSize( aSz );
371  if ( aTextWindowSize.Width() < 0 )
372  aTextWindowSize.setWidth( 0 );
373  if ( aTextWindowSize.Height() < 0 )
374  aTextWindowSize.setHeight( 0 );
375 
376  Size aOldTextWindowSize( mpTextWindow->GetSizePixel() );
377  mpTextWindow->SetPosSizePixel( aTextWindowPos, aTextWindowSize );
378  if ( aOldTextWindowSize == aTextWindowSize )
379  break;
380 
381  // Changing the text window size might effectively have changed the need for
382  // scrollbars, so do another iteration.
383  ++nIteration;
384  OSL_ENSURE( nIteration < 3, "ImpVclMEdit::Resize: isn't this expected to terminate with the second iteration?" );
385 
386  } while ( nIteration <= 3 ); // artificial break after four iterations
387 
389 }
390 
392 {
394 }
395 
397 {
398  if ( !mpTextWindow->GetTextView()->IsReadOnly() )
400 }
401 
403 {
405 }
406 
408 {
409  if ( !mpTextWindow->GetTextView()->IsReadOnly() )
411 }
412 
413 void ImpVclMEdit::SetText( const OUString& rStr )
414 {
415  bool bWasModified = mpTextWindow->GetTextEngine()->IsModified();
416  mpTextWindow->GetTextEngine()->SetText( rStr );
417  if ( !bWasModified )
419 
421 
422  WinBits nWinStyle( pVclMultiLineEdit->GetStyle() );
423  if ( ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL )
424  ImpUpdateSrollBarVis( nWinStyle );
425 }
426 
427 OUString ImpVclMEdit::GetText() const
428 {
429  return mpTextWindow->GetTextEngine()->GetText();
430 }
431 
432 OUString ImpVclMEdit::GetText( LineEnd aSeparator ) const
433 {
434  return mpTextWindow->GetTextEngine()->GetText( aSeparator );
435 }
436 
437 OUString ImpVclMEdit::GetTextLines( LineEnd aSeparator ) const
438 {
439  return mpTextWindow->GetTextEngine()->GetTextLines( aSeparator );
440 }
441 
443 {
444  const TextHint* pTextHint = dynamic_cast<const TextHint*>(&rHint);
445  if ( !pTextHint )
446  return;
447 
448  switch (pTextHint->GetId())
449  {
450  case SfxHintId::TextViewScrolled:
451  if (mpHScrollBar->IsVisible())
453  if (mpVScrollBar->IsVisible())
455  break;
456 
457  case SfxHintId::TextHeightChanged:
459  {
460  long nOutHeight = mpTextWindow->GetOutputSizePixel().Height();
461  long nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
462  if ( nTextHeight < nOutHeight )
464  }
466  break;
467 
468  case SfxHintId::TextFormatted:
469  if (mpHScrollBar->IsVisible())
470  {
471  const long nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
472  if ( nWidth != mnTextWidth )
473  {
474  mnTextWidth = nWidth;
477  }
478  }
479  break;
480 
481  case SfxHintId::TextModified:
484  break;
485 
486  case SfxHintId::TextViewSelectionChanged:
488  break;
489 
490  case SfxHintId::TextViewCaretChanged:
492  break;
493 
494  default: break;
495  }
496 }
497 
498 void ImpVclMEdit::SetSelection( const Selection& rSelection )
499 {
500  OUString aText = mpTextWindow->GetTextEngine()->GetText();
501 
502  Selection aNewSelection( rSelection );
503  if ( aNewSelection.Min() < 0 )
504  aNewSelection.Min() = 0;
505  else if ( aNewSelection.Min() > aText.getLength() )
506  aNewSelection.Min() = aText.getLength();
507  if ( aNewSelection.Max() < 0 )
508  aNewSelection.Max() = 0;
509  else if ( aNewSelection.Max() > aText.getLength() )
510  aNewSelection.Max() = aText.getLength();
511 
512  long nEnd = std::max( aNewSelection.Min(), aNewSelection.Max() );
513  TextSelection aTextSel;
514  sal_uInt32 nPara = 0;
515  sal_Int32 nChar = 0;
516  long x = 0;
517  while ( x <= nEnd )
518  {
519  if ( x == aNewSelection.Min() )
520  aTextSel.GetStart() = TextPaM( nPara, nChar );
521  if ( x == aNewSelection.Max() )
522  aTextSel.GetEnd() = TextPaM( nPara, nChar );
523 
524  if ( ( x < aText.getLength() ) && ( aText[ x ] == '\n' ) )
525  {
526  nPara++;
527  nChar = 0;
528  }
529  else
530  nChar++;
531  x++;
532  }
533  mpTextWindow->GetTextView()->SetSelection( aTextSel );
534 }
535 
537 {
540  aTextSel.Justify();
541  // flatten selection => every line-break a character
542 
543  ExtTextEngine* pExtTextEngine = mpTextWindow->GetTextEngine();
544  // paragraphs before
545  for ( sal_uInt32 n = 0; n < aTextSel.GetStart().GetPara(); ++n )
546  {
547  maSelection.Min() += pExtTextEngine->GetTextLen( n );
548  maSelection.Min()++;
549  }
550 
551  // first paragraph with selection
553  maSelection.Min() += aTextSel.GetStart().GetIndex();
554 
555  for ( sal_uInt32 n = aTextSel.GetStart().GetPara(); n < aTextSel.GetEnd().GetPara(); ++n )
556  {
557  maSelection.Max() += pExtTextEngine->GetTextLen( n );
558  maSelection.Max()++;
559  }
560 
561  maSelection.Max() += aTextSel.GetEnd().GetIndex();
562 
563  return maSelection;
564 }
565 
567 {
570 
571  if (mpHScrollBar->IsVisible())
573  if (mpVScrollBar->IsVisible())
574  aSz.AdjustWidth(mpVScrollBar->GetSizePixel().Width() );
575 
576  return aSz;
577 }
578 
579 Size ImpVclMEdit::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
580 {
581  static const sal_Unicode sampleChar = 'X';
582 
583  Size aSz;
584  Size aCharSz;
585  aCharSz.setWidth( mpTextWindow->GetTextWidth( OUString(sampleChar) ) );
586  aCharSz.setHeight( mpTextWindow->GetTextHeight() );
587 
588  if ( nLines )
589  aSz.setHeight( nLines*aCharSz.Height() );
590  else
592 
593  if ( nColumns )
594  aSz.setWidth( nColumns*aCharSz.Width() );
595  else
597 
598  if (mpHScrollBar->IsVisible())
600  if (mpVScrollBar->IsVisible())
602 
603  return aSz;
604 }
605 
606 void ImpVclMEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
607 {
608  static const sal_Unicode sampleChar = { 'x' };
610  Size aCharSz( mpTextWindow->GetTextWidth( OUString(sampleChar) ), mpTextWindow->GetTextHeight() );
611  rnCols = static_cast<sal_uInt16>(aOutSz.Width()/aCharSz.Width());
612  rnLines = static_cast<sal_uInt16>(aOutSz.Height()/aCharSz.Height());
613 }
614 
615 void ImpVclMEdit::Enable( bool bEnable )
616 {
617  mpTextWindow->Enable( bEnable );
618  if (mpHScrollBar->IsVisible())
619  mpHScrollBar->Enable( bEnable );
620  if (mpVScrollBar->IsVisible())
621  mpVScrollBar->Enable( bEnable );
622 }
623 
625 {
626  bool bDone = false;
627  CommandEventId nCommand = rCEvt.GetCommand();
628  if (nCommand == CommandEventId::Wheel ||
629  nCommand == CommandEventId::StartAutoScroll ||
630  nCommand == CommandEventId::AutoScroll ||
631  nCommand == CommandEventId::Gesture)
632  {
633  ScrollBar* pHScrollBar = mpHScrollBar->IsVisible() ? mpHScrollBar.get() : nullptr;
634  ScrollBar* pVScrollBar = mpVScrollBar->IsVisible() ? mpVScrollBar.get() : nullptr;
635  mpTextWindow->HandleScrollCommand(rCEvt, pHScrollBar, pVScrollBar);
636  bDone = true;
637  }
638  return bDone;
639 }
640 
642  : Window(pParent)
643  , mxParent(pParent)
644 {
645  mbInMBDown = false;
646  mbFocusSelectionHide = false;
647  mbIgnoreTab = false;
648  mbActivePopup = false;
649  mbSelectOnTab = true;
650 
652 
653  mpExtTextEngine.reset(new ExtTextEngine);
654  mpExtTextEngine->SetMaxTextLen(EDIT_NOLIMIT);
655  if( pParent->GetStyle() & WB_BORDER )
656  mpExtTextEngine->SetLeftMargin( 2 );
657  mpExtTextEngine->SetLocale( GetSettings().GetLanguageTag().getLocale() );
658  mpExtTextView.reset(new TextView( mpExtTextEngine.get(), this ));
659  mpExtTextEngine->InsertView( mpExtTextView.get() );
660  mpExtTextEngine->EnableUndo( true );
661  mpExtTextView->ShowCursor();
662 
663  Color aBackgroundColor = GetSettings().GetStyleSettings().GetWorkspaceColor();
664  SetBackground( aBackgroundColor );
665  pParent->SetBackground( aBackgroundColor );
666 }
667 
669 {
670  disposeOnce();
671 }
672 
674 {
675  mxParent.clear();
676  mpExtTextView.reset();
677  mpExtTextEngine.reset();
678  Window::dispose();
679 }
680 
681 void TextWindow::MouseMove( const MouseEvent& rMEvt )
682 {
683  mpExtTextView->MouseMove( rMEvt );
684  Window::MouseMove( rMEvt );
685 }
686 
688 {
689  mbInMBDown = true; // so that GetFocus does not select everything
690  mpExtTextView->MouseButtonDown( rMEvt );
691  GrabFocus();
692  mbInMBDown = false;
693 }
694 
696 {
697  mpExtTextView->MouseButtonUp( rMEvt );
698 }
699 
700 void TextWindow::KeyInput( const KeyEvent& rKEvent )
701 {
702  bool bDone = false;
703  sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode();
704  if ( nCode == css::awt::Key::SELECT_ALL ||
705  ( (nCode == KEY_A) && rKEvent.GetKeyCode().IsMod1() && !rKEvent.GetKeyCode().IsMod2() )
706  )
707  {
708  mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) );
709  bDone = true;
710  }
711  else if ( (nCode == KEY_S) && rKEvent.GetKeyCode().IsShift() && rKEvent.GetKeyCode().IsMod1() )
712  {
714  {
715  // to maintain the selection
716  mbActivePopup = true;
717  OUString aChars = Edit::GetGetSpecialCharsFunction()(GetFrameWeld(), GetFont());
718  if (!aChars.isEmpty())
719  {
720  mpExtTextView->InsertText( aChars );
721  mpExtTextView->GetTextEngine()->SetModified( true );
722  }
723  mbActivePopup = false;
724  bDone = true;
725  }
726  }
727  else if ( nCode == KEY_TAB )
728  {
729  if ( !mbIgnoreTab || rKEvent.GetKeyCode().IsMod1() )
730  bDone = mpExtTextView->KeyInput( rKEvent );
731  }
732  else
733  {
734  bDone = mpExtTextView->KeyInput( rKEvent );
735  }
736 
737  if ( !bDone )
738  Window::KeyInput( rKEvent );
739 }
740 
741 void TextWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
742 {
743  mpExtTextView->Paint(rRenderContext, rRect);
744 }
745 
747 {
748 }
749 
750 void TextWindow::Command( const CommandEvent& rCEvt )
751 {
752  if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
753  {
755  bool bEnableCut = true;
756  bool bEnableCopy = true;
757  bool bEnableDelete = true;
758  bool bEnablePaste = true;
759  bool bEnableSpecialChar = true;
760  bool bEnableUndo = true;
761 
762  if ( !mpExtTextView->HasSelection() )
763  {
764  bEnableCut = false;
765  bEnableCopy = false;
766  bEnableDelete = false;
767  }
768  if ( mpExtTextView->IsReadOnly() )
769  {
770  bEnableCut = false;
771  bEnablePaste = false;
772  bEnableDelete = false;
773  bEnableSpecialChar = false;
774  }
775  if ( !mpExtTextView->GetTextEngine()->HasUndoManager() || !mpExtTextView->GetTextEngine()->GetUndoManager().GetUndoActionCount() )
776  {
777  bEnableUndo = false;
778  }
779  pPopup->EnableItem(pPopup->GetItemId("cut"), bEnableCut);
780  pPopup->EnableItem(pPopup->GetItemId("copy"), bEnableCopy);
781  pPopup->EnableItem(pPopup->GetItemId("delete"), bEnableDelete);
782  pPopup->EnableItem(pPopup->GetItemId("paste"), bEnablePaste);
783  pPopup->EnableItem(pPopup->GetItemId("specialchar"), bEnableSpecialChar);
784  pPopup->EnableItem(pPopup->GetItemId("undo"), bEnableUndo);
785  pPopup->ShowItem(pPopup->GetItemId("specialchar"), !Edit::GetGetSpecialCharsFunction());
786 
787  mbActivePopup = true;
788  Point aPos = rCEvt.GetMousePosPixel();
789  if ( !rCEvt.IsMouseEvent() )
790  {
791  // Sometime do show Menu centered in the selection !!!
792  Size aSize = GetOutputSizePixel();
793  aPos = Point( aSize.Width()/2, aSize.Height()/2 );
794  }
795  sal_uInt16 n = pPopup->Execute( this, aPos );
796  OString sCommand = pPopup->GetItemIdent(n);
797  if (sCommand == "undo")
798  {
799  mpExtTextView->Undo();
800  mpExtTextEngine->SetModified( true );
801  mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
802  }
803  else if (sCommand == "cut")
804  {
805  mpExtTextView->Cut();
806  mpExtTextEngine->SetModified( true );
807  mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
808  }
809  else if (sCommand == "copy")
810  {
811  mpExtTextView->Copy();
812  }
813  else if (sCommand == "paste")
814  {
815  mpExtTextView->Paste();
816  mpExtTextEngine->SetModified( true );
817  mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
818  }
819  else if (sCommand == "delete")
820  {
821  mpExtTextView->DeleteSelected();
822  mpExtTextEngine->SetModified( true );
823  mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
824  }
825  else if (sCommand == "selectall")
826  {
827  mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) );
828  }
829  else if (sCommand == "specialchar")
830  {
831  OUString aChars = Edit::GetGetSpecialCharsFunction()(GetFrameWeld(), GetFont());
832  if (!aChars.isEmpty())
833  {
834  mpExtTextView->InsertText( aChars );
835  mpExtTextEngine->SetModified( true );
836  mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
837  }
838  }
839  pPopup.clear();
840  mbActivePopup = false;
841  }
842  else
843  {
844  mpExtTextView->Command( rCEvt );
845  }
846  Window::Command( rCEvt );
847 }
848 
850 {
851  Window::GetFocus();
852  if ( !mbActivePopup )
853  {
854  bool bGotoCursor = !mpExtTextView->IsReadOnly();
855  if ( mbFocusSelectionHide && IsReallyVisible() && !mpExtTextView->IsReadOnly()
856  && ( mbSelectOnTab &&
858  {
859  // select everything, but do not scroll
860  bool bAutoScroll = mpExtTextView->IsAutoScroll();
861  mpExtTextView->SetAutoScroll( false );
862  mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) );
863  mpExtTextView->SetAutoScroll( bAutoScroll );
864  bGotoCursor = false;
865  }
866  mpExtTextView->SetPaintSelection( true );
867  mpExtTextView->ShowCursor( bGotoCursor );
868  }
869 }
870 
872 {
873  Window::LoseFocus();
874 
876  mpExtTextView->SetPaintSelection( false );
877 }
878 
880  : Edit( pParent, nWinStyle )
881 {
882  SetType( WindowType::MULTILINEEDIT );
883  pImpVclMEdit.reset(new ImpVclMEdit( this, nWinStyle ));
884  ImplInitSettings( true );
885  pUpdateDataTimer = nullptr;
886 
887  SetCompoundControl( true );
888  SetStyle( ImplInitStyle( nWinStyle ) );
889 }
890 
892 {
893  disposeOnce();
894 }
895 
897 {
898  pImpVclMEdit.reset();
899  pUpdateDataTimer.reset();
900  Edit::dispose();
901 }
902 
904 {
905  if ( !(nStyle & WB_NOTABSTOP) )
906  nStyle |= WB_TABSTOP;
907 
908  if ( !(nStyle & WB_NOGROUP) )
909  nStyle |= WB_GROUP;
910 
911  if ( !(nStyle & WB_IGNORETAB ))
912  nStyle |= WB_NODIALOGCONTROL;
913 
914  return nStyle;
915 }
916 
918 {
919  if (IsPaintTransparent())
920  {
921  pImpVclMEdit->GetTextWindow()->SetPaintTransparent(true);
922  pImpVclMEdit->GetTextWindow()->SetBackground();
923  pImpVclMEdit->GetTextWindow()->SetControlBackground();
924  rRenderContext.SetBackground();
926  }
927  else
928  {
929  if (IsControlBackground())
930  pImpVclMEdit->GetTextWindow()->SetBackground(GetControlBackground());
931  else
932  pImpVclMEdit->GetTextWindow()->SetBackground(rStyleSettings.GetFieldColor());
933  // also adjust for VclMultiLineEdit as the TextComponent might hide Scrollbars
934  rRenderContext.SetBackground(pImpVclMEdit->GetTextWindow()->GetBackground());
935  }
936 }
937 
938 void VclMultiLineEdit::ApplyFontSettings(vcl::RenderContext& rRenderContext, const StyleSettings& rStyleSettings)
939 {
940  // The Font has to be adjusted, as the TextEngine does not take care of
941  // TextColor/Background
942 
943  Color aTextColor = rStyleSettings.GetFieldTextColor();
944  if (IsControlForeground())
945  aTextColor = GetControlForeground();
946  if (!IsEnabled())
947  aTextColor = rStyleSettings.GetDisableColor();
948 
949  vcl::Font aFont = rStyleSettings.GetFieldFont();
951  ApplyControlFont(rRenderContext, aFont);
952 
953  vcl::Font TheFont = rRenderContext.GetFont();
954  TheFont.SetColor(aTextColor);
955  if (IsPaintTransparent())
956  TheFont.SetFillColor(COL_TRANSPARENT);
957  else
958  TheFont.SetFillColor(IsControlBackground() ? GetControlBackground() : rStyleSettings.GetFieldColor());
959 
960  pImpVclMEdit->GetTextWindow()->SetFont(TheFont);
961  pImpVclMEdit->GetTextWindow()->GetTextEngine()->SetFont(TheFont);
962  pImpVclMEdit->GetTextWindow()->SetTextColor(aTextColor);
963 }
964 
966 {
967  const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
968 
969  ApplyFontSettings(rRenderContext, rStyleSettings);
970  ApplyBackgroundSettings(rRenderContext, rStyleSettings);
971 }
972 
974 {
975  const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
976 
977  ApplyFontSettings(*this, rStyleSettings);
978 
979  if (bBackground)
980  ApplyBackgroundSettings(*this, rStyleSettings);
981 }
982 
984 {
985  aModifyHdlLink.Call( *this );
986 
988 
989  if ( pUpdateDataTimer )
990  pUpdateDataTimer->Start();
991 }
992 
994 {
996 }
997 
999 {
1001 }
1002 
1003 IMPL_LINK_NOARG(VclMultiLineEdit, ImpUpdateDataHdl, Timer *, void)
1004 {
1005  UpdateData();
1006 }
1007 
1009 {
1010 }
1011 
1013 {
1014  pImpVclMEdit->SetModified( true );
1015 }
1016 
1018 {
1019  pImpVclMEdit->SetModified( false );
1020 }
1021 
1023 {
1024  return pImpVclMEdit->IsModified();
1025 }
1026 
1028 {
1029  if ( !nTimeout )
1031  else
1032  {
1033  if ( !pUpdateDataTimer )
1034  {
1035  pUpdateDataTimer.reset(new Timer("MultiLineEditTimer"));
1036  pUpdateDataTimer->SetInvokeHandler( LINK( this, VclMultiLineEdit, ImpUpdateDataHdl ) );
1037  }
1038  pUpdateDataTimer->SetTimeout( nTimeout );
1039  }
1040 }
1041 
1042 void VclMultiLineEdit::SetReadOnly( bool bReadOnly )
1043 {
1044  pImpVclMEdit->SetReadOnly( bReadOnly );
1045  Edit::SetReadOnly( bReadOnly );
1046 
1047  // #94921# ReadOnly can be overwritten in InitFromStyle() when WB not set.
1048  WinBits nStyle = GetStyle();
1049  if ( bReadOnly )
1050  nStyle |= WB_READONLY;
1051  else
1052  nStyle &= ~WB_READONLY;
1053  SetStyle( nStyle );
1054 }
1055 
1057 {
1058  return pImpVclMEdit->IsReadOnly();
1059 }
1060 
1061 void VclMultiLineEdit::SetMaxTextLen(sal_Int32 nMaxLen)
1062 {
1063  pImpVclMEdit->SetMaxTextLen(nMaxLen);
1064 }
1065 
1067 {
1068  pImpVclMEdit->SetMaxTextWidth(nMaxWidth );
1069 }
1070 
1072 {
1073  return pImpVclMEdit->GetMaxTextLen();
1074 }
1075 
1076 void VclMultiLineEdit::ReplaceSelected( const OUString& rStr )
1077 {
1078  pImpVclMEdit->InsertText( rStr );
1079 }
1080 
1082 {
1083  pImpVclMEdit->InsertText( OUString() );
1084 }
1085 
1087 {
1088  return pImpVclMEdit->GetSelected();
1089 }
1090 
1091 OUString VclMultiLineEdit::GetSelected( LineEnd aSeparator ) const
1092 {
1093  return pImpVclMEdit->GetSelected( aSeparator );
1094 }
1095 
1097 {
1098  pImpVclMEdit->Cut();
1099 }
1100 
1102 {
1103  pImpVclMEdit->Copy();
1104 }
1105 
1107 {
1108  pImpVclMEdit->Paste();
1109 }
1110 
1111 void VclMultiLineEdit::SetText( const OUString& rStr )
1112 {
1113  pImpVclMEdit->SetText( rStr );
1114 }
1115 
1117 {
1118  return pImpVclMEdit ? pImpVclMEdit->GetText() : OUString();
1119 }
1120 
1121 OUString VclMultiLineEdit::GetText( LineEnd aSeparator ) const
1122 {
1123  return pImpVclMEdit ? pImpVclMEdit->GetText( aSeparator ) : OUString();
1124 }
1125 
1126 OUString VclMultiLineEdit::GetTextLines( LineEnd aSeparator ) const
1127 {
1128  return pImpVclMEdit ? pImpVclMEdit->GetTextLines( aSeparator ) : OUString();
1129 }
1130 
1132 {
1133  pImpVclMEdit->Resize();
1134 }
1135 
1137 {
1138  if ( !pImpVclMEdit ) // might be called from within the dtor, when pImpVclMEdit == NULL is a valid state
1139  return;
1140 
1141  pImpVclMEdit->GetFocus();
1142 }
1143 
1145 {
1146  pImpVclMEdit->SetSelection( rSelection );
1147 }
1148 
1150 {
1151  return pImpVclMEdit->GetSelection();
1152 }
1153 
1155 {
1156  Size aSz = pImpVclMEdit->CalcMinimumSize();
1157 
1158  sal_Int32 nLeft, nTop, nRight, nBottom;
1159  static_cast<vcl::Window*>(const_cast<VclMultiLineEdit *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
1160  aSz.AdjustWidth(nLeft+nRight );
1161  aSz.AdjustHeight(nTop+nBottom );
1162 
1163  return aSz;
1164 }
1165 
1167 {
1168  Size aSz = rPrefSize;
1169  sal_Int32 nLeft, nTop, nRight, nBottom;
1170  static_cast<vcl::Window*>(const_cast<VclMultiLineEdit *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
1171 
1172  // center vertically for whole lines
1173 
1174  long nHeight = aSz.Height() - nTop - nBottom;
1175  long nLineHeight = pImpVclMEdit->CalcBlockSize( 1, 1 ).Height();
1176  long nLines = nHeight / nLineHeight;
1177  if ( nLines < 1 )
1178  nLines = 1;
1179 
1180  aSz.setHeight( nLines * nLineHeight );
1181  aSz.AdjustHeight(nTop+nBottom );
1182 
1183  return aSz;
1184 }
1185 
1186 Size VclMultiLineEdit::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
1187 {
1188  Size aSz = pImpVclMEdit->CalcBlockSize( nColumns, nLines );
1189 
1190  sal_Int32 nLeft, nTop, nRight, nBottom;
1191  static_cast<vcl::Window*>(const_cast<VclMultiLineEdit *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
1192  aSz.AdjustWidth(nLeft+nRight );
1193  aSz.AdjustHeight(nTop+nBottom );
1194  return aSz;
1195 }
1196 
1197 void VclMultiLineEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
1198 {
1199  pImpVclMEdit->GetMaxVisColumnsAndLines( rnCols, rnLines );
1200 }
1201 
1203 {
1204  if( nType == StateChangedType::Enable )
1205  {
1206  pImpVclMEdit->Enable( IsEnabled() );
1207  ImplInitSettings( false );
1208  }
1209  else if( nType == StateChangedType::ReadOnly )
1210  {
1211  pImpVclMEdit->SetReadOnly( IsReadOnly() );
1212  }
1213  else if ( nType == StateChangedType::Zoom )
1214  {
1215  pImpVclMEdit->GetTextWindow()->SetZoom( GetZoom() );
1216  ImplInitSettings( false );
1217  Resize();
1218  }
1219  else if ( nType == StateChangedType::ControlFont )
1220  {
1221  ImplInitSettings( false );
1222  Resize();
1223  Invalidate();
1224  }
1225  else if ( nType == StateChangedType::ControlForeground )
1226  {
1227  ImplInitSettings( false );
1228  Invalidate();
1229  }
1230  else if ( nType == StateChangedType::ControlBackground )
1231  {
1232  ImplInitSettings( true );
1233  Invalidate();
1234  }
1235  else if ( nType == StateChangedType::Style )
1236  {
1237  pImpVclMEdit->InitFromStyle( GetStyle() );
1239  }
1240  else if ( nType == StateChangedType::InitShow )
1241  {
1242  if( IsPaintTransparent() )
1243  {
1244  pImpVclMEdit->GetTextWindow()->SetPaintTransparent( true );
1245  pImpVclMEdit->GetTextWindow()->SetBackground();
1246  pImpVclMEdit->GetTextWindow()->SetControlBackground();
1247  SetBackground();
1249  }
1250  }
1251 
1252  Control::StateChanged( nType );
1253 }
1254 
1256 {
1257  if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
1258  (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
1259  {
1260  ImplInitSettings( true );
1261  Resize();
1262  Invalidate();
1263  }
1264  else
1265  Control::DataChanged( rDCEvt );
1266 }
1267 
1268 void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags )
1269 {
1270  ImplInitSettings(true);
1271 
1272  Point aPos = pDev->LogicToPixel( rPos );
1273  Size aSize = pDev->LogicToPixel( rSize );
1274 
1275  vcl::Font aFont = pImpVclMEdit->GetTextWindow()->GetDrawPixelFont(pDev);
1276  aFont.SetTransparent( true );
1277  OutDevType eOutDevType = pDev->GetOutDevType();
1278 
1279  pDev->Push();
1280  pDev->SetMapMode();
1281  pDev->SetFont( aFont );
1282  pDev->SetTextFillColor();
1283 
1284  // Border/Background
1285  pDev->SetLineColor();
1286  pDev->SetFillColor();
1287  bool bBorder = (GetStyle() & WB_BORDER);
1288  bool bBackground = IsControlBackground();
1289  if ( bBorder || bBackground )
1290  {
1291  tools::Rectangle aRect( aPos, aSize );
1292  if ( bBorder )
1293  {
1294  DecorationView aDecoView( pDev );
1295  aRect = aDecoView.DrawFrame( aRect, DrawFrameStyle::DoubleIn );
1296  }
1297  if ( bBackground )
1298  {
1300  pDev->DrawRect( aRect );
1301  }
1302  }
1303 
1304  // contents
1305  if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) )
1306  pDev->SetTextColor( COL_BLACK );
1307  else
1308  {
1309  if ( !IsEnabled() )
1310  {
1311  const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
1312  pDev->SetTextColor( rStyleSettings.GetDisableColor() );
1313  }
1314  else
1315  {
1316  pDev->SetTextColor( GetTextColor() );
1317  }
1318  }
1319 
1320  OUString aText = GetText();
1321  Size aTextSz( pDev->GetTextWidth( aText ), pDev->GetTextHeight() );
1322  sal_uLong nLines = static_cast<sal_uLong>(aSize.Height() / aTextSz.Height());
1323  if ( !nLines )
1324  nLines = 1;
1325  aTextSz.setHeight( nLines*aTextSz.Height() );
1326  long nOnePixel = GetDrawPixel( pDev, 1 );
1327  long nOffX = 3*nOnePixel;
1328  long nOffY = 2*nOnePixel;
1329 
1330  // Clipping?
1331  if ( ( nOffY < 0 ) || ( (nOffY+aTextSz.Height()) > aSize.Height() ) || ( (nOffX+aTextSz.Width()) > aSize.Width() ) )
1332  {
1333  tools::Rectangle aClip( aPos, aSize );
1334  if ( aTextSz.Height() > aSize.Height() )
1335  aClip.AdjustBottom(aTextSz.Height() - aSize.Height() + 1 ); // so that HP-printer does not 'optimize-away'
1336  pDev->IntersectClipRegion( aClip );
1337  }
1338 
1339  ExtTextEngine aTE;
1340  aTE.SetText( GetText() );
1341  aTE.SetMaxTextWidth( aSize.Width() );
1342  aTE.SetFont( aFont );
1343  aTE.SetTextAlign( pImpVclMEdit->GetTextWindow()->GetTextEngine()->GetTextAlign() );
1344  aTE.Draw( pDev, Point( aPos.X() + nOffX, aPos.Y() + nOffY ) );
1345 
1346  pDev->Pop();
1347 }
1348 
1350 {
1351  bool bDone = false;
1352  if( rNEvt.GetType() == MouseNotifyEvent::COMMAND )
1353  {
1354  bDone = pImpVclMEdit->HandleCommand( *rNEvt.GetCommandEvent() );
1355  }
1356  return bDone || Edit::EventNotify( rNEvt );
1357 }
1358 
1360 {
1361  bool bDone = false;
1362 
1363  if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && ( !GetTextView()->IsCursorEnabled() ) )
1364  {
1365  const KeyEvent& rKEvent = *rNEvt.GetKeyEvent();
1366  if ( !rKEvent.GetKeyCode().IsShift() && ( rKEvent.GetKeyCode().GetGroup() == KEYGROUP_CURSOR ) )
1367  {
1368  bDone = true;
1369  TextSelection aSel = pImpVclMEdit->GetTextWindow()->GetTextView()->GetSelection();
1370  if ( aSel.HasRange() )
1371  {
1372  aSel.GetStart() = aSel.GetEnd();
1373  pImpVclMEdit->GetTextWindow()->GetTextView()->SetSelection( aSel );
1374  }
1375  else
1376  {
1377  switch ( rKEvent.GetKeyCode().GetCode() )
1378  {
1379  case KEY_UP:
1380  {
1381  if ( pImpVclMEdit->GetVScrollBar().IsVisible() )
1382  pImpVclMEdit->GetVScrollBar().DoScrollAction( ScrollType::LineUp );
1383  }
1384  break;
1385  case KEY_DOWN:
1386  {
1387  if ( pImpVclMEdit->GetVScrollBar().IsVisible() )
1388  pImpVclMEdit->GetVScrollBar().DoScrollAction( ScrollType::LineDown );
1389  }
1390  break;
1391  case KEY_PAGEUP :
1392  {
1393  if ( pImpVclMEdit->GetVScrollBar().IsVisible() )
1394  pImpVclMEdit->GetVScrollBar().DoScrollAction( ScrollType::PageUp );
1395  }
1396  break;
1397  case KEY_PAGEDOWN:
1398  {
1399  if ( pImpVclMEdit->GetVScrollBar().IsVisible() )
1400  pImpVclMEdit->GetVScrollBar().DoScrollAction( ScrollType::PageDown );
1401  }
1402  break;
1403  case KEY_LEFT:
1404  {
1405  if ( pImpVclMEdit->GetHScrollBar().IsVisible() )
1406  pImpVclMEdit->GetHScrollBar().DoScrollAction( ScrollType::LineUp );
1407  }
1408  break;
1409  case KEY_RIGHT:
1410  {
1411  if ( pImpVclMEdit->GetHScrollBar().IsVisible() )
1412  pImpVclMEdit->GetHScrollBar().DoScrollAction( ScrollType::LineDown );
1413  }
1414  break;
1415  case KEY_HOME:
1416  {
1417  if ( rKEvent.GetKeyCode().IsMod1() )
1418  pImpVclMEdit->GetTextWindow()->GetTextView()->
1419  SetSelection( TextSelection( TextPaM( 0, 0 ) ) );
1420  }
1421  break;
1422  case KEY_END:
1423  {
1424  if ( rKEvent.GetKeyCode().IsMod1() )
1425  pImpVclMEdit->GetTextWindow()->GetTextView()->
1427  }
1428  break;
1429  default:
1430  {
1431  bDone = false;
1432  }
1433  }
1434  }
1435  }
1436  }
1437 
1438  return bDone || Edit::PreNotify( rNEvt );
1439 }
1440 
1441 // Internals for derived classes, e.g. TextComponent
1442 
1444 {
1445  return pImpVclMEdit->GetTextWindow()->GetTextEngine();
1446 }
1447 
1449 {
1450  return pImpVclMEdit->GetTextWindow()->GetTextView();
1451 }
1452 
1454 {
1455  return pImpVclMEdit->GetVScrollBar();
1456 }
1457 
1459 {
1460  pImpVclMEdit->GetTextWindow()->SetAutoFocusHide( bHide );
1461 }
1462 
1463 void VclMultiLineEdit::SetRightToLeft( bool bRightToLeft )
1464 {
1465  if ( GetTextEngine() )
1466  {
1467  GetTextEngine()->SetRightToLeft( bRightToLeft );
1468  GetTextView()->ShowCursor();
1469  }
1470 }
1471 
1473 {
1474  pImpVclMEdit->GetTextWindow()->DisableSelectionOnFocus();
1475 }
1476 
1478 {
1479  GetTextView()->EnableCursor( bEnable );
1480 }
1481 
1483 {
1484  return pImpVclMEdit->GetTextWindow();
1485 }
1486 
1488 {
1490 }
1491 
1492 bool VclMultiLineEdit::set_property(const OString &rKey, const OUString &rValue)
1493 {
1494  if (rKey == "cursor-visible")
1495  EnableCursor(toBool(rValue));
1496  else if (rKey == "accepts-tab")
1497  pImpVclMEdit->GetTextWindow()->SetIgnoreTab(!toBool(rValue));
1498  else
1499  return Edit::set_property(rKey, rValue);
1500  return true;
1501 }
1502 
1503 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long Width() const
const Color & GetTextColor() const
Definition: outdev.hxx:1110
OutDevType GetOutDevType() const
Definition: outdev.hxx:522
bool IsControlBackground() const
Definition: window2.cxx:1076
bool mbFocusSelectionHide
Definition: vclmedit.hxx:42
void ImpSetScrollBarRanges()
Definition: vclmedit.cxx:214
long GetTextHeight() const
Definition: texteng.cxx:1104
long GetVisibleSize() const
Definition: scrbar.hxx:128
void SetFillColor(const Color &)
Definition: font/font.cxx:88
std::unique_ptr< TextView > mpExtTextView
Definition: vclmedit.hxx:39
void StateChanged(StateChangedType nType) override
Definition: vclmedit.cxx:1202
VclPtr< ScrollBar > mpHScrollBar
Definition: vclmedit.cxx:47
#define KEYGROUP_CURSOR
Definition: keycodes.hxx:40
void SetAlign(WinBits nWinStyle)
Definition: vclmedit.cxx:267
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
virtual void GetFocus() override
Definition: vclmedit.cxx:849
bool IsRightToLeft() const
Definition: texteng.hxx:259
void InsertText(const OUString &rNew)
Definition: textview.cxx:1195
virtual void Resize() override
Definition: vclmedit.cxx:746
virtual void UpdateData()
Definition: vclmedit.cxx:1008
void SetFont(const vcl::Font &rFont)
Definition: texteng.cxx:168
Size CalcMinimumSize() const
Definition: vclmedit.cxx:566
long AdjustWidth(long n)
long AdjustX(long nHorzMove)
CommandEventId
void EnableFocusSelectionHide(bool bHide)
Definition: vclmedit.cxx:1458
bool HasRange() const
Definition: textdata.hxx:99
#define KEY_TAB
Definition: keycodes.hxx:121
#define KEY_PAGEDOWN
Definition: keycodes.hxx:117
const CommandEvent * GetCommandEvent() const
Definition: event.hxx:318
void SetMaxTextWidth(long nMaxWidth)
Definition: vclmedit.cxx:326
Selection maSelection
Definition: vclmedit.cxx:52
long Height() const
#define KEY_PAGEUP
Definition: keycodes.hxx:116
WinBits const WB_NODIALOGCONTROL
void SetRightToLeft(bool bR2L)
Definition: texteng.cxx:2662
WinBits const WB_NOGROUP
SelectionOptions GetSelectionOptions() const
OUString GetText(LineEnd aSeparator=LINEEND_LF) const
Definition: texteng.cxx:255
sal_uIntPtr sal_uLong
IMPL_LINK(ImpVclMEdit, ScrollHdl, ScrollBar *, pCurScrollBar, void)
Definition: vclmedit.cxx:254
void disposeAndClear()
Definition: vclptr.hxx:200
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
virtual void Copy() override
Definition: vclmedit.cxx:1101
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
virtual Size GetSizePixel() const
Definition: window.cxx:2364
WinBits const WB_RIGHT
void SetReadOnly(bool bRdOnly)
Definition: vclmedit.cxx:290
void EnableCursor(bool bEnable)
Definition: vclmedit.cxx:1477
const Color & GetWorkspaceColor() const
virtual void ClearModifyFlag() override
Definition: vclmedit.cxx:1017
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: edit.cxx:213
IMPL_LINK_NOARG(VclMultiLineEdit, ImpUpdateDataHdl, Timer *, void)
Definition: vclmedit.cxx:1003
WinBits const WB_AUTOVSCROLL
const TextPaM & GetEnd() const
Definition: textdata.hxx:94
sal_uInt16 GetGroup() const
Definition: keycod.hxx:66
void SetTextFillColor()
Definition: text.cxx:698
sal_uInt16 GetCode() const
Definition: keycod.hxx:53
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: vclmedit.cxx:673
DataChangedEventType GetType() const
Definition: event.hxx:348
const KeyEvent * GetKeyEvent() const
Definition: event.hxx:302
virtual void Paste() override
Definition: vclmedit.cxx:1106
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: vclmedit.cxx:741
bool mbActivePopup
Definition: vclmedit.hxx:44
void IntersectClipRegion(const tools::Rectangle &rRect)
sal_uInt16 Execute(vcl::Window *pWindow, const Point &rPopupPos)
Definition: menu.cxx:2767
long CalcZoom(long n) const
Definition: window2.cxx:397
WinBits const WB_VSCROLL
virtual bool set_property(const OString &rKey, const OUString &rValue) override
Definition: edit.cxx:176
void Copy()
Definition: vclmedit.cxx:402
const Color & GetControlBackground() const
Definition: window2.cxx:1071
TextView * GetTextView() const
Definition: vclmedit.cxx:1448
sal_Int32 GetMaxTextLen() const
Definition: vclmedit.cxx:306
void SetType(WindowType nType)
Definition: window2.cxx:957
void SetIgnoreTab(bool bIgnore)
Definition: vclmedit.hxx:70
float x
bool HandleScrollCommand(const CommandEvent &rCmd, ScrollBar *pHScrl, ScrollBar *pVScrl)
Definition: window2.cxx:609
#define KEY_LEFT
Definition: keycodes.hxx:112
long AdjustHeight(long n)
void Draw(OutputDevice *pDev, const Point &rPos)
Definition: texteng.cxx:2621
void SetMapMode()
Definition: map.cxx:655
const vcl::Font & GetFieldFont() const
const Color & GetFieldTextColor() const
SfxHintId GetId() const
long AdjustBottom(long nVertMoveDelta)
const Fraction & GetZoom() const
Definition: window2.cxx:1199
StateChangedType
Definition: window.hxx:311
void Paste()
Definition: textview.cxx:1045
weld::Window * GetFrameWeld() const
Definition: window2.cxx:853
void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: vclmedit.cxx:1255
virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
Definition: window.cxx:2685
bool IsReadOnly() const
Definition: vclmedit.cxx:296
sal_Int64 WinBits
sal_uInt16 sal_Unicode
constexpr::Color COL_TRANSPARENT(0xFF, 0xFF, 0xFF, 0xFF)
VclPtr< VclMultiLineEdit > pVclMultiLineEdit
Definition: vclmedit.cxx:44
void SetBackground()
void Scroll(long nHorzScroll, long nVertScroll)
Definition: textview.cxx:913
ESelection aNewSelection(GetSelection())
virtual void LoseFocus() override
Definition: vclmedit.cxx:871
void ApplyFontSettings(vcl::RenderContext &, const StyleSettings &)
Definition: vclmedit.cxx:938
void Enable(bool bEnable=true, bool bChild=true)
Definition: window.cxx:2395
virtual void Command(const CommandEvent &rCEvt) override
Definition: vclmedit.cxx:750
TextWindow * GetTextWindow()
Definition: vclmedit.cxx:1482
void ImpSetHScrollBarThumbPos()
Definition: vclmedit.cxx:244
const vcl::Font & GetFont() const
Definition: outdev.hxx:637
bool IsModified() const
Definition: vclmedit.cxx:285
virtual void Modify() override
Definition: vclmedit.cxx:983
bool IsControlForeground() const
Definition: window2.cxx:1066
WinBits const WB_HSCROLL
bool IsMouseEvent() const
void ApplySettings(vcl::RenderContext &) override
Definition: vclmedit.cxx:965
virtual bool IsReadOnly() const override
Definition: vclmedit.cxx:1056
AllSettingsFlags GetFlags() const
Definition: event.hxx:349
virtual void GetFocus() override
Definition: vclmedit.cxx:1136
Link< Edit &, void > aModifyHdlLink
Definition: vclmedit.hxx:82
void SetMaxTextWidth(long nWidth)
Definition: texteng.cxx:217
ScrollBar & GetVScrollBar()
Definition: vclmedit.cxx:110
void SetCompoundControl(bool bCompound)
Definition: window2.cxx:936
VclPtr< ScrollBar > mpVScrollBar
Definition: vclmedit.cxx:48
virtual bool set_property(const OString &rKey, const OUString &rValue) override
Definition: vclmedit.cxx:1492
void Cut()
Definition: textview.cxx:966
#define KEY_A
Definition: keycodes.hxx:56
void GetMaxVisColumnsAndLines(sal_uInt16 &rnCols, sal_uInt16 &rnLines) const
Definition: vclmedit.cxx:1197
virtual void SetModifyFlag() override
Definition: vclmedit.cxx:1012
Definition: edit.hxx:57
WinBits const WB_NOHIDESELECTION
std::unique_ptr< ImpVclMEdit > pImpVclMEdit
Definition: vclmedit.hxx:80
virtual void SetMaxTextLen(sal_Int32 nMaxLen) override
Definition: vclmedit.cxx:1061
OUString GetTextLines(LineEnd aSeparator=LINEEND_LF) const
Definition: texteng.cxx:260
const Point & GetStartDocPos() const
Definition: textview.cxx:2091
virtual ~TextWindow() override
Definition: vclmedit.cxx:668
virtual ~VclMultiLineEdit() override
Definition: vclmedit.cxx:891
TextView * GetTextView() const
Definition: vclmedit.hxx:53
void DrawRect(const tools::Rectangle &rRect)
Definition: rect.cxx:32
virtual ~ImpVclMEdit() override
Definition: vclmedit.cxx:204
const Color & GetControlForeground() const
Definition: window2.cxx:1061
long GetDrawPixel(::OutputDevice const *pDev, long nPixels) const
Definition: window2.cxx:563
void ShowCursor(bool bGotoCursor=true, bool bForceVisCursor=true)
Definition: textview.cxx:900
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition: vclmedit.cxx:687
void ImpInitScrollBars()
Definition: vclmedit.cxx:222
virtual FactoryFunction GetUITestFactory() const override
Definition: vclmedit.cxx:1487
long Min() const
void SetReadOnly(bool bReadOnly)
Definition: textview.cxx:1070
void SetLineColor()
void SetMaxTextLen(sal_Int32 nLen)
Definition: vclmedit.cxx:301
ScrollBar & GetVScrollBar() const
Definition: vclmedit.cxx:1453
void clear()
Definition: vclptr.hxx:190
VclPtr< PopupMenu > CreatePopupMenu()
Definition: edit.cxx:2721
const Color & GetDisableColor() const
TextWindow * GetTextWindow()
Definition: vclmedit.cxx:108
void Resize()
Definition: vclmedit.cxx:331
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
Definition: vclmedit.cxx:695
bool IsModified() const
Definition: texteng.hxx:274
void Paste()
Definition: vclmedit.cxx:407
virtual bool PreNotify(NotifyEvent &rNEvt)
Definition: event.cxx:51
void SelectionChanged()
Definition: vclmedit.cxx:993
DrawFlags
Definition: window.hxx:354
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: vclmedit.cxx:442
void SetMaxTextWidth(long nMaxWidth)
Definition: vclmedit.cxx:1066
void InsertText(const OUString &rStr)
Definition: vclmedit.cxx:311
OutDevType
Definition: outdev.hxx:278
void SetModified(bool bMod)
Definition: vclmedit.cxx:280
void DisableSelectionOnFocus()
Definition: vclmedit.cxx:1472
void SetControlBackground()
Definition: window2.cxx:497
void SetVisibleSize(long nNewSize)
Definition: scrbar.cxx:1378
virtual void SetReadOnly(bool bReadOnly=true)
Definition: edit.cxx:2340
int i
void SetRange(const Range &rRange)
Definition: scrbar.cxx:1339
virtual void Cut() override
Definition: vclmedit.cxx:1096
sal_uInt16 GetItemId(sal_uInt16 nPos) const
Definition: menu.cxx:632
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Definition: paint.cxx:1156
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: ctrl.cxx:297
bool IsReadOnly() const
Definition: textview.cxx:2095
void SetFillColor()
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
const Color & GetFieldColor() const
CommandEventId GetCommand() const
void SetTextColor(const Color &rColor)
Definition: text.cxx:663
static bool GetLayoutRTL()
const TextPaM & GetStart() const
Definition: textdata.hxx:91
std::unique_ptr< Timer > pUpdateDataTimer
Definition: vclmedit.hxx:84
virtual bool PreNotify(NotifyEvent &rNEvt) override
Definition: vclmedit.cxx:1359
Size CalcAdjustedSize(const Size &rPrefSize) const
Definition: vclmedit.cxx:1166
ExtTextEngine * GetTextEngine() const
Definition: vclmedit.cxx:1443
MouseNotifyEvent GetType() const
Definition: event.hxx:294
void SetSelection(const Selection &rSelection)
Definition: vclmedit.cxx:498
void SetPageSize(long nNewSize)
Definition: scrbar.hxx:125
virtual sal_Int32 GetMaxTextLen() const override
Definition: vclmedit.cxx:1071
sal_Int32 GetMaxTextLen() const
Definition: texteng.hxx:239
VclMultiLineEdit(vcl::Window *pParent, WinBits nWinStyle)
Definition: vclmedit.cxx:879
ScrollBar & GetHScrollBar()
Definition: vclmedit.cxx:109
virtual OUString GetSelected() const override
Definition: vclmedit.cxx:1086
void Enable(bool bEnable)
Definition: vclmedit.cxx:615
ExtTextEngine * GetTextEngine() const
Definition: vclmedit.hxx:52
static bool toBool(const OString &rValue)
Definition: builder.cxx:70
const AllSettings & GetSettings() const
Definition: outdev.hxx:420
Size GetOutputSizePixel() const
Definition: outdev.hxx:441
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
bool mbInMBDown
Definition: vclmedit.hxx:41
void EnableCursor(bool bEnable)
Definition: textview.cxx:2085
void SetSelection(const TextSelection &rNewSel)
Definition: textview.cxx:231
TextWindow(Edit *pParent)
Definition: vclmedit.cxx:641
#define TEXT_PARA_ALL
Definition: textdata.hxx:33
void EnableUpdateData(sal_uLong nTimeout)
Definition: vclmedit.cxx:1027
virtual void SetReadOnly(bool bReadOnly=true) override
Definition: vclmedit.cxx:1042
void GrabFocus()
Definition: window.cxx:2980
long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: text.cxx:889
Size CalcBlockSize(sal_uInt16 nColumns, sal_uInt16 nLines) const
Definition: vclmedit.cxx:579
sal_Int32 GetTextLen() const
Definition: texteng.cxx:286
WinBits const WB_LEFT
long X() const
bool mbIgnoreTab
Definition: vclmedit.hxx:43
void SetStyle(WinBits nStyle)
Definition: window.cxx:1925
bool IsCursorEnabled() const
Definition: textview.cxx:2087
#define KEY_END
Definition: keycodes.hxx:115
void EnableItem(sal_uInt16 nItemId, bool bEnable=true)
Definition: menu.cxx:903
virtual Size CalcMinimumSize() const override
Definition: vclmedit.cxx:1154
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
Definition: window2.cxx:1257
void SetColor(const Color &)
Definition: font/font.cxx:80
LineEnd
std::unique_ptr< ExtTextEngine > mpExtTextEngine
Definition: vclmedit.hxx:38
bool HandleCommand(const CommandEvent &rCEvt)
Definition: vclmedit.cxx:624
void SetLineSize(long nNewSize)
Definition: scrbar.hxx:123
void SetText(const OUString &rStr)
Definition: texteng.cxx:429
OUString GetTextLines(LineEnd aSeparator) const
Definition: vclmedit.cxx:1126
const Point & GetMousePosPixel() const
Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:940
DECL_LINK(ScrollHdl, ScrollBar *, void)
const TextSelection & GetSelection() const
Definition: textview.cxx:236
virtual void Resize() override
Definition: vclmedit.cxx:1131
WinBits const WB_SIZEABLE
void GetBorder(sal_Int32 &rLeftBorder, sal_Int32 &rTopBorder, sal_Int32 &rRightBorder, sal_Int32 &rBottomBorder) const
Definition: window.cxx:2386
virtual const Selection & GetSelection() const override
Definition: vclmedit.cxx:1149
void SetTextAlign(TxtAlign eAlign)
Definition: texteng.cxx:2487
void SetPointer(PointerStyle)
Definition: mouse.cxx:474
const vcl::KeyCode & GetKeyCode() const
Definition: event.hxx:53
bool IsShift() const
Definition: keycod.hxx:58
OUString GetTextLines(LineEnd aSeparator) const
Definition: vclmedit.cxx:437
#define KEY_DOWN
Definition: keycodes.hxx:110
Size CalcBlockSize(sal_uInt16 nColumns, sal_uInt16 nLines) const
Definition: vclmedit.cxx:1186
void SetMaxTextLen(sal_Int32 nLen)
Definition: texteng.cxx:212
void ImpUpdateSrollBarVis(WinBits nWinStyle)
Definition: vclmedit.cxx:128
WinBits const WB_BORDER
void SetFont(const vcl::Font &rNewFont)
WinBits const WB_IGNORETAB
virtual void DeleteSelected() override
Definition: vclmedit.cxx:1081
WinBits const WB_READONLY
void ShowItem(sal_uInt16 nItemId, bool bVisible=true)
Definition: menu.cxx:948
VclPtr< TextWindow > mpTextWindow
Definition: vclmedit.cxx:46
void SetTransparent(bool bTransparent)
Definition: font/font.cxx:95
bool IsVisible() const
Definition: window2.cxx:1091
void Create(SwFormatVertOrient &rItem, SvStream &rStrm, sal_uInt16 nVersionAbusedAsSize)
static FncGetSpecialChars GetGetSpecialCharsFunction()
Definition: edit.cxx:2716
bool mbSelectOnTab
Definition: vclmedit.hxx:45
virtual void ReplaceSelected(const OUString &rStr) override
Definition: vclmedit.cxx:1076
void Justify()
Definition: textdata.cxx:44
#define KEY_S
Definition: keycodes.hxx:74
const Selection & GetSelection() const
Definition: vclmedit.cxx:536
void SetScrollHdl(const Link< ScrollBar *, void > &rLink)
Definition: scrbar.hxx:133
void SetModified(bool bModified)
Definition: texteng.hxx:273
bool IsMod1() const
Definition: keycod.hxx:60
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
long CalcTextWidth()
Definition: texteng.cxx:1143
void Copy()
Definition: textview.cxx:996
void SetRightToLeft(bool bRightToLeft)
Definition: vclmedit.cxx:1463
void InitFromStyle(WinBits nWinStyle)
Definition: vclmedit.cxx:175
OUString GetSelected() const
Definition: vclmedit.cxx:316
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:878
WinBits const WB_TABSTOP
void GetMaxVisColumnsAndLines(sal_uInt16 &rnCols, sal_uInt16 &rnLines) const
Definition: vclmedit.cxx:606
void ImplInitSettings()
Definition: ctrl.cxx:428
virtual void KeyInput(const KeyEvent &rKEvent) override
Definition: vclmedit.cxx:700
bool IsPaintTransparent() const
Definition: window2.cxx:1026
WinBits const WB_CENTER
#define KEY_HOME
Definition: keycodes.hxx:114
OUString GetText() const
Definition: vclmedit.cxx:427
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
virtual bool EventNotify(NotifyEvent &rNEvt) override
Definition: vclmedit.cxx:1349
OUString GetSelected()
Definition: textview.cxx:1051
OUString GetText() const override
Definition: vclmedit.cxx:1116
bool IsEnabled() const
Definition: window2.cxx:1111
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: vclmedit.cxx:896
WinBits GetStyle() const
Definition: window2.cxx:942
Definition: timer.hxx:26
void GetFocus()
Definition: vclmedit.cxx:391
void ApplyControlFont(vcl::RenderContext &rRenderContext, const vcl::Font &rDefaultFont)
Definition: window2.cxx:449
long Max() const
WinBits const WB_GROUP
long GetScrollBarSize() const
virtual void MouseMove(const MouseEvent &rMEvt) override
Definition: vclmedit.cxx:681
bool IsReallyVisible() const
Definition: window2.cxx:1096
ImpVclMEdit(VclMultiLineEdit *pVclMultiLineEdit, WinBits nWinStyle)
Definition: vclmedit.cxx:113
#define TEXT_INDEX_ALL
Definition: textdata.hxx:34
void CaretChanged()
Definition: vclmedit.cxx:998
void ApplyBackgroundSettings(vcl::RenderContext &, const StyleSettings &)
Definition: vclmedit.cxx:917
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: outdevstate.cxx:60
OString GetItemIdent(sal_uInt16 nItemId) const
Definition: menu.cxx:674
void setWidth(long nWidth)
void SetAutoFocusHide(bool bAutoHide)
Definition: vclmedit.hxx:68
void Draw(OutputDevice *pDev, const Point &rPos, const Size &rSize, DrawFlags nFlags) override
Definition: vclmedit.cxx:1268
void SetText(const OUString &rStr)
Definition: vclmedit.cxx:413
WinBits const WB_NOTABSTOP
static WinBits ImplInitStyle(WinBits nStyle)
Definition: vclmedit.cxx:903
#define KEY_RIGHT
Definition: keycodes.hxx:113
void Cut()
Definition: vclmedit.cxx:396
virtual void SetText(const OUString &rStr) override
Definition: vclmedit.cxx:1111
void SetThumbPos(long nThumbPos)
Definition: scrbar.cxx:1364
virtual void SetSelection(const Selection &rSelection) override
Definition: vclmedit.cxx:1144
long Y() const
VclPtr< ScrollBarBox > mpScrollBox
Definition: vclmedit.cxx:49
#define EDIT_NOLIMIT
Definition: edit.hxx:51
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual void DataChanged(const DataChangedEvent &rDCEvt)
Definition: event.cxx:35
VclPtr< Edit > mxParent
Definition: vclmedit.hxx:37
void DisableUpdateData()
Definition: vclmedit.hxx:120
#define KEY_UP
Definition: keycodes.hxx:111
virtual bool EventNotify(NotifyEvent &rNEvt) override
Definition: ctrl.cxx:225
bool IsMod2() const
Definition: keycod.hxx:62
WinBits const WB_DRAG
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2150
virtual bool IsModified() const override
Definition: vclmedit.cxx:1022
void setHeight(long nHeight)
long mnTextWidth
Definition: vclmedit.cxx:51