20#ifndef INCLUDED_VCL_TEXTVIEW_HXX
21#define INCLUDED_VCL_TEXTVIEW_HXX
23#include <config_options.h>
44 struct SearchOptions2;
51class UNLESS_MERGELIBS(VCL_DLLPUBLIC) TETextDataObject final :
public css::datatransfer::XTransferable,
60 explicit TETextDataObject( OUString aText );
65 css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type & rType )
override;
70 css::uno::Any SAL_CALL getTransferData(
const css::datatransfer::DataFlavor& aFlavor )
override;
71 css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( )
override;
72 sal_Bool SAL_CALL isDataFlavorSupported(
const css::datatransfer::DataFlavor& aFlavor )
override;
88 bool ImpIndentBlock(
bool bRight );
92 void ImpShowHideSelection(
const TextSelection* pRange =
nullptr );
96 bool IsInSelection(
const TextPaM& rPaM )
const;
100 void ImpShowCursor(
bool bGotoCursor,
bool bForceVisCursor,
bool bEndKey );
102 Point ImpGetOutputStartPos(
const Point& rStartDocPos )
const;
104 void ImpHideDDCursor();
105 void ImpShowDDCursor();
107 bool ImplTruncateNewText( OUString& rNewText )
const;
108 bool ImplCheckTextLen( std::u16string_view rNewText )
const;
111 virtual void dragGestureRecognized(
const css::datatransfer::dnd::DragGestureEvent& dge )
override;
112 virtual void dragDropEnd(
const css::datatransfer::dnd::DragSourceDropEvent& dsde )
override;
113 virtual void drop(
const css::datatransfer::dnd::DropTargetDropEvent& dtde )
override;
114 virtual void dragEnter(
const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee )
override;
115 virtual void dragExit(
const css::datatransfer::dnd::DropTargetEvent& dte )
override;
116 virtual void dragOver(
const css::datatransfer::dnd::DropTargetDragEvent& dtde )
override;
118 using DragAndDropClient::dragEnter;
119 using DragAndDropClient::dragExit;
120 using DragAndDropClient::dragOver;
132 void ShowCursor(
bool bGotoCursor =
true,
bool bForceVisCursor =
true );
135 void EnableCursor(
bool bEnable );
136 bool IsCursorEnabled()
const;
141 void SetSelection(
const TextSelection& rNewSel,
bool bGotoCursor );
142 bool HasSelection()
const;
144 OUString GetSelected()
const;
145 OUString GetSelected(
LineEnd aSeparator )
const;
146 void DeleteSelected();
161 void Copy( css::uno::Reference< css::datatransfer::clipboard::XClipboard >
const & rxClipboard );
162 void Paste( css::uno::Reference< css::datatransfer::clipboard::XClipboard >
const & rxClipboard );
169 void SetStartDocPos(
const Point& rPos );
170 const Point& GetStartDocPos()
const;
172 Point GetDocPos(
const Point& rWindowPos )
const;
173 Point GetWindowPos(
const Point& rDocPos )
const;
175 void SetInsertMode(
bool bInsert );
176 bool IsInsertMode()
const;
178 void SetAutoIndentMode(
bool bAutoIndent );
180 void SetReadOnly(
bool bReadOnly );
183 void SetAutoScroll(
bool bAutoScroll );
184 bool IsAutoScroll()
const;
189 void SetPaintSelection(
bool bPaint);
197 TextPaM CursorLeft(
const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode );
198 TextPaM CursorRight(
const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode );
206 static TextPaM CursorStartOfDoc();
213 sal_Int32 GetLineNumberOfCursorInSelection()
const;
218 void CenterPaM(
const TextPaM& rPaM );
224 bool UnindentBlock();
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
virtual bool IsSelectionAtPoint(const Point &rPointPixel) override
virtual void SetCursorAtPoint(const Point &rPointPixel, bool bDontSelectAtCursor=false) override
std::unique_ptr< ImpTextView > mpImpl
TextView(const TextView &)=delete
TextView & operator=(const TextView &)=delete
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) SAL_OVERRIDE
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
void GetSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept