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 <osl/diagnose.h>
39 
40 class ImpVclMEdit : public SfxListener
41 {
42 private:
44 
49 
52 
53 protected:
54  virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
55  void ImpUpdateSrollBarVis( WinBits nWinStyle );
56  void ImpInitScrollBars();
57  void ImpSetScrollBarRanges();
59  DECL_LINK( ScrollHdl, ScrollBar*, void );
60 
61 public:
62  ImpVclMEdit( VclMultiLineEdit* pVclMultiLineEdit, WinBits nWinStyle );
63  virtual ~ImpVclMEdit() override;
64 
65  void SetModified( bool bMod );
66  bool IsModified() const;
67 
68  void SetReadOnly( bool bRdOnly );
69  bool IsReadOnly() const;
70 
71  void SetMaxTextLen(sal_Int32 nLen);
72  sal_Int32 GetMaxTextLen() const;
73 
74  void SetMaxTextWidth(long nMaxWidth);
75 
76  void InsertText( const OUString& rStr );
77  OUString GetSelected() const;
78  OUString GetSelected( LineEnd aSeparator ) const;
79 
80  void SetSelection( const Selection& rSelection );
81  const Selection& GetSelection() const;
82 
83  void Cut();
84  void Copy();
85  void Paste();
86 
87  void SetText( const OUString& rStr );
88  OUString GetText() const;
89  OUString GetText( LineEnd aSeparator ) const;
90  OUString GetTextLines( LineEnd aSeparator ) const;
91 
92  void Resize();
93  void GetFocus();
94 
95  bool HandleCommand( const CommandEvent& rCEvt );
96 
97  void Enable( bool bEnable );
98 
99  Size CalcMinimumSize() const;
100  Size CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const;
101  void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const;
102 
103  void SetAlign( WinBits nWinStyle );
104 
105  void InitFromStyle( WinBits nWinStyle );
106 
110 };
111 
113  : pVclMultiLineEdit(pEdt)
114  , mpTextWindow(VclPtr<TextWindow>::Create(pEdt))
115  , mpHScrollBar(VclPtr<ScrollBar>::Create(pVclMultiLineEdit, WB_HSCROLL|WB_DRAG))
116  , mpVScrollBar(VclPtr<ScrollBar>::Create(pVclMultiLineEdit, WB_VSCROLL|WB_DRAG))
117  , mpScrollBox(VclPtr<ScrollBarBox>::Create(pVclMultiLineEdit, WB_SIZEABLE))
118  , mnTextWidth(0)
119 {
120  mpVScrollBar->SetScrollHdl( LINK( this, ImpVclMEdit, ScrollHdl ) );
121  mpHScrollBar->SetScrollHdl( LINK( this, ImpVclMEdit, ScrollHdl ) );
122  mpTextWindow->Show();
123  InitFromStyle( nWinStyle );
125 }
126 
128 {
129  const bool bHaveVScroll = mpVScrollBar->IsVisible();
130  const bool bHaveHScroll = mpHScrollBar->IsVisible();
131  const bool bHaveScrollBox = mpScrollBox->IsVisible();
132 
133  bool bNeedVScroll = ( nWinStyle & WB_VSCROLL ) == WB_VSCROLL;
134  const bool bNeedHScroll = ( nWinStyle & WB_HSCROLL ) == WB_HSCROLL;
135 
136  const bool bAutoVScroll = ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL;
137  if ( !bNeedVScroll && bAutoVScroll )
138  {
139  TextEngine& rEngine( *mpTextWindow->GetTextEngine() );
140  long nOverallTextHeight(0);
141  for ( sal_uInt32 i=0; i<rEngine.GetParagraphCount(); ++i )
142  nOverallTextHeight += rEngine.GetTextHeight( i );
143  if ( nOverallTextHeight > mpTextWindow->GetOutputSizePixel().Height() )
144  bNeedVScroll = true;
145  }
146 
147  const bool bNeedScrollBox = bNeedVScroll && bNeedHScroll;
148 
149  bool bScrollbarsChanged = false;
150  if ( bHaveVScroll != bNeedVScroll )
151  {
152  mpVScrollBar->Show(bNeedVScroll);
153  bScrollbarsChanged = true;
154  }
155 
156  if ( bHaveHScroll != bNeedHScroll )
157  {
158  mpHScrollBar->Show(bNeedHScroll);
159  bScrollbarsChanged = true;
160  }
161 
162  if ( bHaveScrollBox != bNeedScrollBox )
163  {
164  mpScrollBox->Show(bNeedScrollBox);
165  }
166 
167  if ( bScrollbarsChanged )
168  {
170  Resize();
171  }
172 }
173 
175 {
176  ImpUpdateSrollBarVis( nWinStyle );
177  SetAlign( nWinStyle );
178 
179  if ( nWinStyle & WB_NOHIDESELECTION )
180  mpTextWindow->SetAutoFocusHide( false );
181  else
183 
184  if ( nWinStyle & WB_READONLY )
186  else
187  mpTextWindow->GetTextView()->SetReadOnly( false );
188 
189  if ( nWinStyle & WB_IGNORETAB )
190  {
191  mpTextWindow->SetIgnoreTab( true );
192  }
193  else
194  {
195  mpTextWindow->SetIgnoreTab( false );
196  // #103667# VclMultiLineEdit has the flag, but focusable window also needs this flag
197  WinBits nStyle = mpTextWindow->GetStyle();
198  nStyle |= WB_NODIALOGCONTROL;
199  mpTextWindow->SetStyle( nStyle );
200  }
201 }
202 
204 {
211 }
212 
214 {
215  const long nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
216  mpVScrollBar->SetRange( Range( 0, nTextHeight-1 ) );
217 
219 }
220 
222 {
223  static const sal_Unicode sampleChar = { 'x' };
224 
226 
227  Size aCharBox;
228  aCharBox.setWidth( mpTextWindow->GetTextWidth( OUString(sampleChar) ) );
229  aCharBox.setHeight( mpTextWindow->GetTextHeight() );
231 
232  mpHScrollBar->SetVisibleSize( aOutSz.Width() );
233  mpHScrollBar->SetPageSize( aOutSz.Width() * 8 / 10 );
234  mpHScrollBar->SetLineSize( aCharBox.Width()*10 );
236 
237  mpVScrollBar->SetVisibleSize( aOutSz.Height() );
238  mpVScrollBar->SetPageSize( aOutSz.Height() * 8 / 10 );
239  mpVScrollBar->SetLineSize( aCharBox.Height() );
241 }
242 
244 {
245  long nX = mpTextWindow->GetTextView()->GetStartDocPos().X();
247  mpHScrollBar->SetThumbPos( nX );
248  else
250 
251 }
252 
253 IMPL_LINK( ImpVclMEdit, ScrollHdl, ScrollBar*, pCurScrollBar, void )
254 {
255  long nDiffX = 0, nDiffY = 0;
256 
257  if ( pCurScrollBar == mpVScrollBar )
258  nDiffY = mpTextWindow->GetTextView()->GetStartDocPos().Y() - pCurScrollBar->GetThumbPos();
259  else if ( pCurScrollBar == mpHScrollBar )
260  nDiffX = mpTextWindow->GetTextView()->GetStartDocPos().X() - pCurScrollBar->GetThumbPos();
261 
262  mpTextWindow->GetTextView()->Scroll( nDiffX, nDiffY );
263  // mpTextWindow->GetTextView()->ShowCursor( false, true );
264 }
265 
267 {
268  bool bRTL = AllSettings::GetLayoutRTL();
270 
271  if ( nWinStyle & WB_CENTER )
273  else if ( nWinStyle & WB_RIGHT )
275  else if ( nWinStyle & WB_LEFT )
276  mpTextWindow->GetTextEngine()->SetTextAlign( !bRTL ? TxtAlign::Left : TxtAlign::Right );
277 }
278 
279 void ImpVclMEdit::SetModified( bool bMod )
280 {
282 }
283 
285 {
287 }
288 
289 void ImpVclMEdit::SetReadOnly( bool bRdOnly )
290 {
291  mpTextWindow->GetTextView()->SetReadOnly( bRdOnly );
292  // TODO: Adjust color?
293 }
294 
296 {
297  return mpTextWindow->GetTextView()->IsReadOnly();
298 }
299 
300 void ImpVclMEdit::SetMaxTextLen(sal_Int32 nLen)
301 {
303 }
304 
305 sal_Int32 ImpVclMEdit::GetMaxTextLen() const
306 {
308 }
309 
310 void ImpVclMEdit::InsertText( const OUString& rStr )
311 {
312  mpTextWindow->GetTextView()->InsertText( rStr );
313 }
314 
315 OUString ImpVclMEdit::GetSelected() const
316 {
317  return mpTextWindow->GetTextView()->GetSelected();
318 }
319 
320 OUString ImpVclMEdit::GetSelected( LineEnd aSeparator ) const
321 {
322  return mpTextWindow->GetTextView()->GetSelected( aSeparator );
323 }
324 
325 void ImpVclMEdit::SetMaxTextWidth(long nMaxWidth)
326 {
328 }
329 
331 {
332  int nIteration = 1;
333  do
334  {
335  WinBits nWinStyle( pVclMultiLineEdit->GetStyle() );
336  if ( ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL )
337  ImpUpdateSrollBarVis( nWinStyle );
338 
340  Size aEditSize = aSz;
342  nSBWidth = pVclMultiLineEdit->CalcZoom( nSBWidth );
343 
344  if (mpHScrollBar->IsVisible())
345  aSz.AdjustHeight( -(nSBWidth+1) );
346  if (mpVScrollBar->IsVisible())
347  aSz.AdjustWidth( -(nSBWidth+1) );
348 
349  if (!mpHScrollBar->IsVisible())
351  else
352  mpHScrollBar->setPosSizePixel( 0, aEditSize.Height()-nSBWidth, aSz.Width(), nSBWidth );
353 
354  Point aTextWindowPos;
355  if (mpVScrollBar->IsVisible())
356  {
358  {
359  mpVScrollBar->setPosSizePixel( 0, 0, nSBWidth, aSz.Height() );
360  aTextWindowPos.AdjustX(nSBWidth );
361  }
362  else
363  mpVScrollBar->setPosSizePixel( aEditSize.Width()-nSBWidth, 0, nSBWidth, aSz.Height() );
364  }
365 
366  if (mpScrollBox->IsVisible())
367  mpScrollBox->setPosSizePixel( aSz.Width(), aSz.Height(), nSBWidth, nSBWidth );
368 
369  Size aTextWindowSize( aSz );
370  if ( aTextWindowSize.Width() < 0 )
371  aTextWindowSize.setWidth( 0 );
372  if ( aTextWindowSize.Height() < 0 )
373  aTextWindowSize.setHeight( 0 );
374 
375  Size aOldTextWindowSize( mpTextWindow->GetSizePixel() );
376  mpTextWindow->SetPosSizePixel( aTextWindowPos, aTextWindowSize );
377  if ( aOldTextWindowSize == aTextWindowSize )
378  break;
379 
380  // Changing the text window size might effectively have changed the need for
381  // scrollbars, so do another iteration.
382  ++nIteration;
383  OSL_ENSURE( nIteration < 3, "ImpVclMEdit::Resize: isn't this expected to terminate with the second iteration?" );
384 
385  } while ( nIteration <= 3 ); // artificial break after four iterations
386 
388 }
389 
391 {
393 }
394 
396 {
397  if ( !mpTextWindow->GetTextView()->IsReadOnly() )
399 }
400 
402 {
404 }
405 
407 {
408  if ( !mpTextWindow->GetTextView()->IsReadOnly() )
410 }
411 
412 void ImpVclMEdit::SetText( const OUString& rStr )
413 {
414  bool bWasModified = mpTextWindow->GetTextEngine()->IsModified();
415  mpTextWindow->GetTextEngine()->SetText( rStr );
416  if ( !bWasModified )
418 
420 
421  WinBits nWinStyle( pVclMultiLineEdit->GetStyle() );
422  if ( ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL )
423  ImpUpdateSrollBarVis( nWinStyle );
424 }
425 
426 OUString ImpVclMEdit::GetText() const
427 {
428  return mpTextWindow->GetTextEngine()->GetText();
429 }
430 
431 OUString ImpVclMEdit::GetText( LineEnd aSeparator ) const
432 {
433  return mpTextWindow->GetTextEngine()->GetText( aSeparator );
434 }
435 
436 OUString ImpVclMEdit::GetTextLines( LineEnd aSeparator ) const
437 {
438  return mpTextWindow->GetTextEngine()->GetTextLines( aSeparator );
439 }
440 
442 {
443  const TextHint* pTextHint = dynamic_cast<const TextHint*>(&rHint);
444  if ( !pTextHint )
445  return;
446 
447  switch (pTextHint->GetId())
448  {
449  case SfxHintId::TextViewScrolled:
450  if (mpHScrollBar->IsVisible())
452  if (mpVScrollBar->IsVisible())
454  break;
455 
456  case SfxHintId::TextHeightChanged:
458  {
459  long nOutHeight = mpTextWindow->GetOutputSizePixel().Height();
460  long nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
461  if ( nTextHeight < nOutHeight )
463  }
465  break;
466 
467  case SfxHintId::TextFormatted:
468  if (mpHScrollBar->IsVisible())
469  {
470  const long nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
471  if ( nWidth != mnTextWidth )
472  {
473  mnTextWidth = nWidth;
476  }
477  }
478  break;
479 
480  case SfxHintId::TextModified:
483  break;
484 
485  case SfxHintId::TextViewSelectionChanged:
487  break;
488 
489  case SfxHintId::TextViewCaretChanged:
491  break;
492 
493  default: break;
494  }
495 }
496 
497 void ImpVclMEdit::SetSelection( const Selection& rSelection )
498 {
499  OUString aText = mpTextWindow->GetTextEngine()->GetText();
500 
501  Selection aNewSelection( rSelection );
502  if ( aNewSelection.Min() < 0 )
503  aNewSelection.Min() = 0;
504  else if ( aNewSelection.Min() > aText.getLength() )
505  aNewSelection.Min() = aText.getLength();
506  if ( aNewSelection.Max() < 0 )
507  aNewSelection.Max() = 0;
508  else if ( aNewSelection.Max() > aText.getLength() )
509  aNewSelection.Max() = aText.getLength();
510 
511  long nEnd = std::max( aNewSelection.Min(), aNewSelection.Max() );
512  TextSelection aTextSel;
513  sal_uInt32 nPara = 0;
514  sal_Int32 nChar = 0;
515  long x = 0;
516  while ( x <= nEnd )
517  {
518  if ( x == aNewSelection.Min() )
519  aTextSel.GetStart() = TextPaM( nPara, nChar );
520  if ( x == aNewSelection.Max() )
521  aTextSel.GetEnd() = TextPaM( nPara, nChar );
522 
523  if ( ( x < aText.getLength() ) && ( aText[ x ] == '\n' ) )
524  {
525  nPara++;
526  nChar = 0;
527  }
528  else
529  nChar++;
530  x++;
531  }
532  mpTextWindow->GetTextView()->SetSelection( aTextSel );
533 }
534 
536 {
539  aTextSel.Justify();
540  // flatten selection => every line-break a character
541 
542  ExtTextEngine* pExtTextEngine = mpTextWindow->GetTextEngine();
543  // paragraphs before
544  for ( sal_uInt32 n = 0; n < aTextSel.GetStart().GetPara(); ++n )
545  {
546  maSelection.Min() += pExtTextEngine->GetTextLen( n );
547  maSelection.Min()++;
548  }
549 
550  // first paragraph with selection
552  maSelection.Min() += aTextSel.GetStart().GetIndex();
553 
554  for ( sal_uInt32 n = aTextSel.GetStart().GetPara(); n < aTextSel.GetEnd().GetPara(); ++n )
555  {
556  maSelection.Max() += pExtTextEngine->GetTextLen( n );
557  maSelection.Max()++;
558  }
559 
560  maSelection.Max() += aTextSel.GetEnd().GetIndex();
561 
562  return maSelection;
563 }
564 
566 {
569 
570  if (mpHScrollBar->IsVisible())
572  if (mpVScrollBar->IsVisible())
573  aSz.AdjustWidth(mpVScrollBar->GetSizePixel().Width() );
574 
575  return aSz;
576 }
577 
578 Size ImpVclMEdit::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
579 {
580  static const sal_Unicode sampleChar = 'X';
581 
582  Size aSz;
583  Size aCharSz;
584  aCharSz.setWidth( mpTextWindow->GetTextWidth( OUString(sampleChar) ) );
585  aCharSz.setHeight( mpTextWindow->GetTextHeight() );
586 
587  if ( nLines )
588  aSz.setHeight( nLines*aCharSz.Height() );
589  else
591 
592  if ( nColumns )
593  aSz.setWidth( nColumns*aCharSz.Width() );
594  else
596 
597  if (mpHScrollBar->IsVisible())
599  if (mpVScrollBar->IsVisible())
601 
602  return aSz;
603 }
604 
605 void ImpVclMEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
606 {
607  static const sal_Unicode sampleChar = { 'x' };
609  Size aCharSz( mpTextWindow->GetTextWidth( OUString(sampleChar) ), mpTextWindow->GetTextHeight() );
610  rnCols = static_cast<sal_uInt16>(aOutSz.Width()/aCharSz.Width());
611  rnLines = static_cast<sal_uInt16>(aOutSz.Height()/aCharSz.Height());
612 }
613 
614 void ImpVclMEdit::Enable( bool bEnable )
615 {
616  mpTextWindow->Enable( bEnable );
617  if (mpHScrollBar->IsVisible())
618  mpHScrollBar->Enable( bEnable );
619  if (mpVScrollBar->IsVisible())
620  mpVScrollBar->Enable( bEnable );
621 }
622 
624 {
625  bool bDone = false;
626  CommandEventId nCommand = rCEvt.GetCommand();
627  if (nCommand == CommandEventId::Wheel ||
628  nCommand == CommandEventId::StartAutoScroll ||
629  nCommand == CommandEventId::AutoScroll ||
630  nCommand == CommandEventId::Gesture)
631  {
632  ScrollBar* pHScrollBar = mpHScrollBar->IsVisible() ? mpHScrollBar.get() : nullptr;
633  ScrollBar* pVScrollBar = mpVScrollBar->IsVisible() ? mpVScrollBar.get() : nullptr;
634  mpTextWindow->HandleScrollCommand(rCEvt, pHScrollBar, pVScrollBar);
635  bDone = true;
636  }
637  return bDone;
638 }
639 
641  : Window(pParent)
642  , mxParent(pParent)
643 {
644  mbInMBDown = false;
645  mbFocusSelectionHide = false;
646  mbIgnoreTab = false;
647  mbActivePopup = false;
648  mbSelectOnTab = true;
649 
651 
652  mpExtTextEngine.reset(new ExtTextEngine);
653  mpExtTextEngine->SetMaxTextLen(EDIT_NOLIMIT);
654  if( pParent->GetStyle() & WB_BORDER )
655  mpExtTextEngine->SetLeftMargin( 2 );
656  mpExtTextEngine->SetLocale( GetSettings().GetLanguageTag().getLocale() );
657  mpExtTextView.reset(new TextView( mpExtTextEngine.get(), this ));
658  mpExtTextEngine->InsertView( mpExtTextView.get() );
659  mpExtTextEngine->EnableUndo( true );
660  mpExtTextView->ShowCursor();
661 
662  Color aBackgroundColor = GetSettings().GetStyleSettings().GetWorkspaceColor();
663  SetBackground( aBackgroundColor );
664  pParent->SetBackground( aBackgroundColor );
665 }
666 
668 {
669  disposeOnce();
670 }
671 
673 {
674  mxParent.clear();
675  mpExtTextView.reset();
676  mpExtTextEngine.reset();
677  Window::dispose();
678 }
679 
680 void TextWindow::MouseMove( const MouseEvent& rMEvt )
681 {
682  mpExtTextView->MouseMove( rMEvt );
683  Window::MouseMove( rMEvt );
684 }
685 
687 {
688  mbInMBDown = true; // so that GetFocus does not select everything
689  mpExtTextView->MouseButtonDown( rMEvt );
690  GrabFocus();
691  mbInMBDown = false;
692 }
693 
695 {
696  mpExtTextView->MouseButtonUp( rMEvt );
697 }
698 
699 void TextWindow::KeyInput( const KeyEvent& rKEvent )
700 {
701  bool bDone = false;
702  sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode();
703  if ( nCode == css::awt::Key::SELECT_ALL ||
704  ( (nCode == KEY_A) && rKEvent.GetKeyCode().IsMod1() && !rKEvent.GetKeyCode().IsMod2() )
705  )
706  {
707  mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) );
708  bDone = true;
709  }
710  else if ( (nCode == KEY_S) && rKEvent.GetKeyCode().IsShift() && rKEvent.GetKeyCode().IsMod1() )
711  {
713  {
714  // to maintain the selection
715  mbActivePopup = true;
716  OUString aChars = Edit::GetGetSpecialCharsFunction()(GetFrameWeld(), GetFont());
717  if (!aChars.isEmpty())
718  {
719  mpExtTextView->InsertText( aChars );
720  mpExtTextView->GetTextEngine()->SetModified( true );
721  }
722  mbActivePopup = false;
723  bDone = true;
724  }
725  }
726  else if ( nCode == KEY_TAB )
727  {
728  if ( !mbIgnoreTab || rKEvent.GetKeyCode().IsMod1() )
729  bDone = mpExtTextView->KeyInput( rKEvent );
730  }
731  else
732  {
733  bDone = mpExtTextView->KeyInput( rKEvent );
734  }
735 
736  if ( !bDone )
737  Window::KeyInput( rKEvent );
738 }
739 
740 void TextWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
741 {
742  mpExtTextView->Paint(rRenderContext, rRect);
743 }
744 
746 {
747 }
748 
749 void TextWindow::Command( const CommandEvent& rCEvt )
750 {
751  if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
752  {
754  bool bEnableCut = true;
755  bool bEnableCopy = true;
756  bool bEnableDelete = true;
757  bool bEnablePaste = true;
758  bool bEnableSpecialChar = true;
759  bool bEnableUndo = true;
760 
761  if ( !mpExtTextView->HasSelection() )
762  {
763  bEnableCut = false;
764  bEnableCopy = false;
765  bEnableDelete = false;
766  }
767  if ( mpExtTextView->IsReadOnly() )
768  {
769  bEnableCut = false;
770  bEnablePaste = false;
771  bEnableDelete = false;
772  bEnableSpecialChar = false;
773  }
774  if ( !mpExtTextView->GetTextEngine()->HasUndoManager() || !mpExtTextView->GetTextEngine()->GetUndoManager().GetUndoActionCount() )
775  {
776  bEnableUndo = false;
777  }
778  pPopup->EnableItem(pPopup->GetItemId("cut"), bEnableCut);
779  pPopup->EnableItem(pPopup->GetItemId("copy"), bEnableCopy);
780  pPopup->EnableItem(pPopup->GetItemId("delete"), bEnableDelete);
781  pPopup->EnableItem(pPopup->GetItemId("paste"), bEnablePaste);
782  pPopup->EnableItem(pPopup->GetItemId("specialchar"), bEnableSpecialChar);
783  pPopup->EnableItem(pPopup->GetItemId("undo"), bEnableUndo);
784  pPopup->ShowItem(pPopup->GetItemId("specialchar"), !Edit::GetGetSpecialCharsFunction());
785 
786  mbActivePopup = true;
787  Point aPos = rCEvt.GetMousePosPixel();
788  if ( !rCEvt.IsMouseEvent() )
789  {
790  // Sometime do show Menu centered in the selection !!!
791  Size aSize = GetOutputSizePixel();
792  aPos = Point( aSize.Width()/2, aSize.Height()/2 );
793  }
794  sal_uInt16 n = pPopup->Execute( this, aPos );
795  OString sCommand = pPopup->GetItemIdent(n);
796  if (sCommand == "undo")
797  {
798  mpExtTextView->Undo();
799  mpExtTextEngine->SetModified( true );
800  mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
801  }
802  else if (sCommand == "cut")
803  {
804  mpExtTextView->Cut();
805  mpExtTextEngine->SetModified( true );
806  mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
807  }
808  else if (sCommand == "copy")
809  {
810  mpExtTextView->Copy();
811  }
812  else if (sCommand == "paste")
813  {
814  mpExtTextView->Paste();
815  mpExtTextEngine->SetModified( true );
816  mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
817  }
818  else if (sCommand == "delete")
819  {
820  mpExtTextView->DeleteSelected();
821  mpExtTextEngine->SetModified( true );
822  mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
823  }
824  else if (sCommand == "selectall")
825  {
826  mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) );
827  }
828  else if (sCommand == "specialchar")
829  {
830  OUString aChars = Edit::GetGetSpecialCharsFunction()(GetFrameWeld(), GetFont());
831  if (!aChars.isEmpty())
832  {
833  mpExtTextView->InsertText( aChars );
834  mpExtTextEngine->SetModified( true );
835  mpExtTextEngine->Broadcast( TextHint( SfxHintId::TextModified ) );
836  }
837  }
838  pPopup.clear();
839  mbActivePopup = false;
840  }
841  else
842  {
843  mpExtTextView->Command( rCEvt );
844  }
845  Window::Command( rCEvt );
846 }
847 
849 {
850  Window::GetFocus();
851  if ( !mbActivePopup )
852  {
853  bool bGotoCursor = !mpExtTextView->IsReadOnly();
854  if ( mbFocusSelectionHide && IsReallyVisible() && !mpExtTextView->IsReadOnly()
855  && ( mbSelectOnTab &&
857  {
858  // select everything, but do not scroll
859  bool bAutoScroll = mpExtTextView->IsAutoScroll();
860  mpExtTextView->SetAutoScroll( false );
861  mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, TEXT_INDEX_ALL ) ) );
862  mpExtTextView->SetAutoScroll( bAutoScroll );
863  bGotoCursor = false;
864  }
865  mpExtTextView->SetPaintSelection( true );
866  mpExtTextView->ShowCursor( bGotoCursor );
867  }
868 }
869 
871 {
872  Window::LoseFocus();
873 
875  mpExtTextView->SetPaintSelection( false );
876 }
877 
879  : Edit( pParent, nWinStyle )
880 {
881  SetType( WindowType::MULTILINEEDIT );
882  pImpVclMEdit.reset(new ImpVclMEdit( this, nWinStyle ));
883  ImplInitSettings( true );
884  pUpdateDataTimer = nullptr;
885 
886  SetCompoundControl( true );
887  SetStyle( ImplInitStyle( nWinStyle ) );
888 }
889 
891 {
892  disposeOnce();
893 }
894 
896 {
897  pImpVclMEdit.reset();
898  pUpdateDataTimer.reset();
899  Edit::dispose();
900 }
901 
903 {
904  if ( !(nStyle & WB_NOTABSTOP) )
905  nStyle |= WB_TABSTOP;
906 
907  if ( !(nStyle & WB_NOGROUP) )
908  nStyle |= WB_GROUP;
909 
910  if ( !(nStyle & WB_IGNORETAB ))
911  nStyle |= WB_NODIALOGCONTROL;
912 
913  return nStyle;
914 }
915 
917 {
918  if (IsPaintTransparent())
919  {
920  pImpVclMEdit->GetTextWindow()->SetPaintTransparent(true);
921  pImpVclMEdit->GetTextWindow()->SetBackground();
922  pImpVclMEdit->GetTextWindow()->SetControlBackground();
923  rRenderContext.SetBackground();
925  }
926  else
927  {
928  if (IsControlBackground())
929  pImpVclMEdit->GetTextWindow()->SetBackground(GetControlBackground());
930  else
931  pImpVclMEdit->GetTextWindow()->SetBackground(rStyleSettings.GetFieldColor());
932  // also adjust for VclMultiLineEdit as the TextComponent might hide Scrollbars
933  rRenderContext.SetBackground(pImpVclMEdit->GetTextWindow()->GetBackground());
934  }
935 }
936 
937 void VclMultiLineEdit::ApplyFontSettings(vcl::RenderContext& rRenderContext, const StyleSettings& rStyleSettings)
938 {
939  // The Font has to be adjusted, as the TextEngine does not take care of
940  // TextColor/Background
941 
942  Color aTextColor = rStyleSettings.GetFieldTextColor();
943  if (IsControlForeground())
944  aTextColor = GetControlForeground();
945  if (!IsEnabled())
946  aTextColor = rStyleSettings.GetDisableColor();
947 
948  vcl::Font aFont = rStyleSettings.GetFieldFont();
950  ApplyControlFont(rRenderContext, aFont);
951 
952  vcl::Font TheFont = rRenderContext.GetFont();
953  TheFont.SetColor(aTextColor);
954  if (IsPaintTransparent())
955  TheFont.SetFillColor(COL_TRANSPARENT);
956  else
957  TheFont.SetFillColor(IsControlBackground() ? GetControlBackground() : rStyleSettings.GetFieldColor());
958 
959  pImpVclMEdit->GetTextWindow()->SetFont(TheFont);
960  pImpVclMEdit->GetTextWindow()->GetTextEngine()->SetFont(TheFont);
961  pImpVclMEdit->GetTextWindow()->SetTextColor(aTextColor);
962 }
963 
965 {
966  const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
967 
968  ApplyFontSettings(rRenderContext, rStyleSettings);
969  ApplyBackgroundSettings(rRenderContext, rStyleSettings);
970 }
971 
973 {
974  const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
975 
976  ApplyFontSettings(*this, rStyleSettings);
977 
978  if (bBackground)
979  ApplyBackgroundSettings(*this, rStyleSettings);
980 }
981 
983 {
984  aModifyHdlLink.Call( *this );
985 
987 
988  if ( pUpdateDataTimer )
989  pUpdateDataTimer->Start();
990 }
991 
993 {
995 }
996 
998 {
1000 }
1001 
1002 IMPL_LINK_NOARG(VclMultiLineEdit, ImpUpdateDataHdl, Timer *, void)
1003 {
1004  UpdateData();
1005 }
1006 
1008 {
1009  aUpdateDataHdlLink.Call( *this );
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:1081
bool mbFocusSelectionHide
Definition: vclmedit.hxx:42
void ImpSetScrollBarRanges()
Definition: vclmedit.cxx:213
long GetTextHeight() const
Definition: texteng.cxx:1104
long GetVisibleSize() const
Definition: scrbar.hxx:128
void SetFillColor(const Color &)
Definition: font/font.cxx:87
std::unique_ptr< TextView > mpExtTextView
Definition: vclmedit.hxx:39
void StateChanged(StateChangedType nType) override
Definition: vclmedit.cxx:1202
VclPtr< ScrollBar > mpHScrollBar
Definition: vclmedit.cxx:46
#define KEYGROUP_CURSOR
Definition: keycodes.hxx:40
void SetAlign(WinBits nWinStyle)
Definition: vclmedit.cxx:266
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
virtual void GetFocus() override
Definition: vclmedit.cxx:848
bool IsRightToLeft() const
Definition: texteng.hxx:259
void InsertText(const OUString &rNew)
Definition: textview.cxx:1238
virtual void Resize() override
Definition: vclmedit.cxx:745
void SetFont(const vcl::Font &rFont)
Definition: texteng.cxx:168
Size CalcMinimumSize() const
Definition: vclmedit.cxx:565
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:325
Selection maSelection
Definition: vclmedit.cxx:51
long Height() const
#define KEY_PAGEUP
Definition: keycodes.hxx:116
WinBits const WB_NODIALOGCONTROL
void SetRightToLeft(bool bR2L)
Definition: texteng.cxx:2665
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:253
virtual void DisableUpdateData() override
Definition: vclmedit.hxx:121
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:289
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:1002
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:697
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:672
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:740
bool mbActivePopup
Definition: vclmedit.hxx:44
void IntersectClipRegion(const tools::Rectangle &rRect)
sal_uInt16 Execute(vcl::Window *pWindow, const Point &rPopupPos)
Definition: menu.cxx:2771
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:401
const Color & GetControlBackground() const
Definition: window2.cxx:1076
virtual void UpdateData() override
Definition: vclmedit.cxx:1007
TextView * GetTextView() const
Definition: vclmedit.cxx:1448
sal_Int32 GetMaxTextLen() const
Definition: vclmedit.cxx:305
void SetType(WindowType nType)
Definition: window2.cxx:962
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:2624
void SetMapMode()
Definition: map.cxx:655
const vcl::Font & GetFieldFont() const
const Color & GetFieldTextColor() const
virtual void EnableUpdateData(sal_uLong nTimeout=EDIT_UPDATEDATA_TIMEOUT) override
Definition: vclmedit.cxx:1027
SfxHintId GetId() const
long AdjustBottom(long nVertMoveDelta)
const Fraction & GetZoom() const
Definition: window2.cxx:1204
StateChangedType
Definition: window.hxx:309
void Paste()
Definition: textview.cxx:1088
weld::Window * GetFrameWeld() const
Definition: window2.cxx:858
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:295
sal_Int64 WinBits
sal_uInt16 sal_Unicode
constexpr::Color COL_TRANSPARENT(0xFF, 0xFF, 0xFF, 0xFF)
VclPtr< VclMultiLineEdit > pVclMultiLineEdit
Definition: vclmedit.cxx:43
void SetBackground()
void Scroll(long nHorzScroll, long nVertScroll)
Definition: textview.cxx:956
ESelection aNewSelection(GetSelection())
virtual void LoseFocus() override
Definition: vclmedit.cxx:870
void ApplyFontSettings(vcl::RenderContext &, const StyleSettings &)
Definition: vclmedit.cxx:937
void Enable(bool bEnable=true, bool bChild=true)
Definition: window.cxx:2395
virtual void Command(const CommandEvent &rCEvt) override
Definition: vclmedit.cxx:749
TextWindow * GetTextWindow()
Definition: vclmedit.cxx:1482
void ImpSetHScrollBarThumbPos()
Definition: vclmedit.cxx:243
const vcl::Font & GetFont() const
Definition: outdev.hxx:637
bool IsModified() const
Definition: vclmedit.cxx:284
virtual void Modify() override
Definition: vclmedit.cxx:982
bool IsControlForeground() const
Definition: window2.cxx:1071
WinBits const WB_HSCROLL
bool IsMouseEvent() const
void ApplySettings(vcl::RenderContext &) override
Definition: vclmedit.cxx:964
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:109
void SetCompoundControl(bool bCompound)
Definition: window2.cxx:941
VclPtr< ScrollBar > mpVScrollBar
Definition: vclmedit.cxx:47
virtual bool set_property(const OString &rKey, const OUString &rValue) override
Definition: vclmedit.cxx:1492
void Cut()
Definition: textview.cxx:1009
#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:58
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:2153
virtual ~TextWindow() override
Definition: vclmedit.cxx:667
virtual ~VclMultiLineEdit() override
Definition: vclmedit.cxx:890
TextView * GetTextView() const
Definition: vclmedit.hxx:53
void DrawRect(const tools::Rectangle &rRect)
Definition: rect.cxx:32
virtual ~ImpVclMEdit() override
Definition: vclmedit.cxx:203
const Color & GetControlForeground() const
Definition: window2.cxx:1066
long GetDrawPixel(::OutputDevice const *pDev, long nPixels) const
Definition: window2.cxx:563
void ShowCursor(bool bGotoCursor=true, bool bForceVisCursor=true)
Definition: textview.cxx:943
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition: vclmedit.cxx:686
void ImpInitScrollBars()
Definition: vclmedit.cxx:221
virtual FactoryFunction GetUITestFactory() const override
Definition: vclmedit.cxx:1487
long Min() const
void SetReadOnly(bool bReadOnly)
Definition: textview.cxx:1113
void SetLineColor()
void SetMaxTextLen(sal_Int32 nLen)
Definition: vclmedit.cxx:300
ScrollBar & GetVScrollBar() const
Definition: vclmedit.cxx:1453
void clear()
Definition: vclptr.hxx:190
VclPtr< PopupMenu > CreatePopupMenu()
Definition: edit.cxx:2779
const Color & GetDisableColor() const
TextWindow * GetTextWindow()
Definition: vclmedit.cxx:107
void Resize()
Definition: vclmedit.cxx:330
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
Definition: vclmedit.cxx:694
bool IsModified() const
Definition: texteng.hxx:274
void Paste()
Definition: vclmedit.cxx:406
virtual bool PreNotify(NotifyEvent &rNEvt)
Definition: event.cxx:51
void SelectionChanged()
Definition: vclmedit.cxx:992
DrawFlags
Definition: window.hxx:352
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: vclmedit.cxx:441
void SetMaxTextWidth(long nMaxWidth)
Definition: vclmedit.cxx:1066
void InsertText(const OUString &rStr)
Definition: vclmedit.cxx:310
OutDevType
Definition: outdev.hxx:278
void SetModified(bool bMod)
Definition: vclmedit.cxx:279
void DisableSelectionOnFocus()
Definition: vclmedit.cxx:1472
void SetControlBackground()
Definition: window2.cxx:497
void SetVisibleSize(long nNewSize)
Definition: scrbar.cxx:1378
Link< Edit &, void > aUpdateDataHdlLink
Definition: vclmedit.hxx:85
virtual void SetReadOnly(bool bReadOnly=true)
Definition: edit.cxx:2390
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:1153
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: ctrl.cxx:297
bool IsReadOnly() const
Definition: textview.cxx:2157
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:662
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:497
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:878
ScrollBar & GetHScrollBar()
Definition: vclmedit.cxx:108
virtual OUString GetSelected() const override
Definition: vclmedit.cxx:1086
void Enable(bool bEnable)
Definition: vclmedit.cxx:614
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:2147
void SetSelection(const TextSelection &rNewSel)
Definition: textview.cxx:234
TextWindow(Edit *pParent)
Definition: vclmedit.cxx:640
#define TEXT_PARA_ALL
Definition: textdata.hxx:33
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:888
Size CalcBlockSize(sal_uInt16 nColumns, sal_uInt16 nLines) const
Definition: vclmedit.cxx:578
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:2149
#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:1262
void SetColor(const Color &)
Definition: font/font.cxx:79
LineEnd
std::unique_ptr< ExtTextEngine > mpExtTextEngine
Definition: vclmedit.hxx:38
bool HandleCommand(const CommandEvent &rCEvt)
Definition: vclmedit.cxx:623
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:239
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:2490
void SetPointer(PointerStyle)
Definition: mouse.cxx:473
const vcl::KeyCode & GetKeyCode() const
Definition: event.hxx:53
bool IsShift() const
Definition: keycod.hxx:58
OUString GetTextLines(LineEnd aSeparator) const
Definition: vclmedit.cxx:436
#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:127
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:45
void SetTransparent(bool bTransparent)
Definition: font/font.cxx:94
bool IsVisible() const
Definition: window2.cxx:1096
void Create(SwFormatVertOrient &rItem, SvStream &rStrm, sal_uInt16 nVersionAbusedAsSize)
static FncGetSpecialChars GetGetSpecialCharsFunction()
Definition: edit.cxx:2774
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:535
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:1039
void SetRightToLeft(bool bRightToLeft)
Definition: vclmedit.cxx:1463
void InitFromStyle(WinBits nWinStyle)
Definition: vclmedit.cxx:174
OUString GetSelected() const
Definition: vclmedit.cxx:315
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:877
WinBits const WB_TABSTOP
void GetMaxVisColumnsAndLines(sal_uInt16 &rnCols, sal_uInt16 &rnLines) const
Definition: vclmedit.cxx:605
void ImplInitSettings()
Definition: ctrl.cxx:428
virtual void KeyInput(const KeyEvent &rKEvent) override
Definition: vclmedit.cxx:699
bool IsPaintTransparent() const
Definition: window2.cxx:1031
WinBits const WB_CENTER
#define KEY_HOME
Definition: keycodes.hxx:114
OUString GetText() const
Definition: vclmedit.cxx:426
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:1094
OUString GetText() const override
Definition: vclmedit.cxx:1116
bool IsEnabled() const
Definition: window2.cxx:1116
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: vclmedit.cxx:895
WinBits GetStyle() const
Definition: window2.cxx:947
Definition: timer.hxx:26
void GetFocus()
Definition: vclmedit.cxx:390
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:680
bool IsReallyVisible() const
Definition: window2.cxx:1101
ImpVclMEdit(VclMultiLineEdit *pVclMultiLineEdit, WinBits nWinStyle)
Definition: vclmedit.cxx:112
#define TEXT_INDEX_ALL
Definition: textdata.hxx:34
void CaretChanged()
Definition: vclmedit.cxx:997
void ApplyBackgroundSettings(vcl::RenderContext &, const StyleSettings &)
Definition: vclmedit.cxx:916
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:412
WinBits const WB_NOTABSTOP
static WinBits ImplInitStyle(WinBits nStyle)
Definition: vclmedit.cxx:902
#define KEY_RIGHT
Definition: keycodes.hxx:113
void Cut()
Definition: vclmedit.cxx:395
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:48
#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
#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:50