22#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS)
23#error "don't use this in new code"
31#include <rtl/ustrbuf.hxx>
36#include <com/sun/star/uno/Reference.h>
40 class XExtendedInputSequenceChecker;
51#define EDIT_NOLIMIT SAL_MAX_INT32
60 std::unique_ptr<DDInfo, o3tl::default_delete<DDInfo>>
mpDDInfo;
87 css::uno::Reference<css::i18n::XExtendedInputSequenceChecker>
mxISC;
88 css::uno::Reference<css::datatransfer::dnd::XDragSourceListener >
mxDnDListener;
90 SAL_DLLPRIVATE
bool ImplTruncateToMaxLen( OUString&, sal_Int32 nSelectionLen )
const;
91 SAL_DLLPRIVATE
void ImplInitEditData();
92 SAL_DLLPRIVATE OUString ImplGetText()
const;
94 SAL_DLLPRIVATE
void ImplInvalidateOrRepaint();
96 SAL_DLLPRIVATE
void ImplSetText(
const OUString& rStr,
const Selection* pNewSelection );
97 SAL_DLLPRIVATE
void ImplInsertText(
const OUString& rStr,
const Selection* pNewSelection =
nullptr,
bool bIsUserInput =
false );
98 SAL_DLLPRIVATE
static OUString ImplGetValidString(
const OUString& rString );
101 SAL_DLLPRIVATE
void ImplShowCursor(
bool bOnlyIfVisible =
true );
102 SAL_DLLPRIVATE
void ImplAlign();
103 SAL_DLLPRIVATE
void ImplAlignAndPaint();
104 SAL_DLLPRIVATE sal_Int32 ImplGetCharPos(
const Point& rWindowPos )
const;
105 SAL_DLLPRIVATE
void ImplSetCursorPos( sal_Int32 nChar,
bool bSelect );
106 SAL_DLLPRIVATE
void ImplShowDDCursor();
107 SAL_DLLPRIVATE
void ImplHideDDCursor();
108 SAL_DLLPRIVATE
bool ImplHandleKeyEvent(
const KeyEvent& rKEvt );
109 SAL_DLLPRIVATE
void ImplCopyToSelectionClipboard();
110 SAL_DLLPRIVATE
void ImplCopy(css::uno::Reference<css::datatransfer::clipboard::XClipboard>
const & rxClipboard);
111 SAL_DLLPRIVATE
void ImplPaste(css::uno::Reference<css::datatransfer::clipboard::XClipboard>
const & rxClipboard);
112 SAL_DLLPRIVATE
tools::Long ImplGetTextYPosition()
const;
113 SAL_DLLPRIVATE css::uno::Reference<css::i18n::XExtendedInputSequenceChecker>
const& ImplGetInputSequenceChecker();
114 SAL_DLLPRIVATE css::uno::Reference<css::i18n::XBreakIterator>
const& ImplGetBreakIterator();
115 SAL_DLLPRIVATE
void filterText();
122 SAL_DLLPRIVATE
void ImplSetSelection(
const Selection& rSelection,
bool bPaint =
true );
123 SAL_DLLPRIVATE
ControlType ImplGetNativeControlType()
const;
124 SAL_DLLPRIVATE
tools::Long ImplGetExtraXOffset()
const;
125 SAL_DLLPRIVATE
tools::Long ImplGetExtraYOffset()
const;
126 static SAL_DLLPRIVATE
void ImplInvalidateOutermostBorder(
vcl::Window* pWin );
133 virtual void dragDropEnd(
const css::datatransfer::dnd::DragSourceDropEvent& dsde)
override;
134 virtual void drop(
const css::datatransfer::dnd::DropTargetDropEvent& dtde)
override;
135 virtual void dragEnter(
const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee)
override;
136 virtual void dragExit(
const css::datatransfer::dnd::DropTargetEvent& dte)
override;
137 virtual void dragOver(
const css::datatransfer::dnd::DropTargetDragEvent& dtde)
override;
148 virtual ~Edit()
override;
149 virtual void dispose()
override;
155 virtual void Resize()
override;
167 static bool IsCharInput(
const KeyEvent& rKEvt );
169 virtual void SetModifyFlag();
174 virtual void SetReadOnly(
bool bReadOnly =
true );
177 void SetInsertMode(
bool bInsert );
178 bool IsInsertMode()
const;
180 virtual void SetMaxTextLen( sal_Int32 nMaxLen );
183 void SetWidthInChars(sal_Int32 nWidthInChars);
186 void setMaxWidthChars(sal_Int32 nWidth);
188 virtual void SetSelection(
const Selection& rSelection );
191 virtual void ReplaceSelected(
const OUString& rStr );
192 virtual void DeleteSelected();
193 virtual OUString GetSelected()
const;
197 virtual void Paste();
200 virtual void SetText(
const OUString& rStr )
override;
201 virtual void SetText(
const OUString& rStr,
const Selection& rNewSelection );
202 virtual OUString
GetText()
const override;
204 void SetCursorAtLast();
206 void SetPlaceholderText(
const OUString& rStr );
216 void SetSubEdit(
Edit* pEdit );
222 virtual Size CalcMinimumSize()
const;
223 virtual Size CalcMinimumSizeForText(
const OUString &rString)
const;
225 virtual Size CalcSize(sal_Int32 nChars)
const;
226 sal_Int32 GetMaxVisChars()
const;
229 static void ShowTruncationWarning(
weld::Widget* pParent);
236 virtual bool set_property(
const OUString &rKey,
const OUString &rValue)
override;
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
virtual void FillLayoutData() const
virtual void StateChanged(StateChangedType nStateChange) override
virtual void Resize() override
virtual void SetText(const OUString &rStr) override
virtual Size GetOptimalSize() const override
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
Link< Edit &, bool > maActivateHdl
sal_Int32 mnMaxWidthChars
std::unique_ptr< DDInfo, o3tl::default_delete< DDInfo > > mpDDInfo
void SetTextFilter(TextFilter *pFilter)
virtual const Link< Edit &, void > & GetModifyHdl() const
bool mbClickedInSelection
css::uno::Reference< css::i18n::XExtendedInputSequenceChecker > mxISC
virtual sal_Int32 GetMaxTextLen() const
std::unique_ptr< Impl_IMEInfos > mpIMEInfos
const OUString & GetSavedValue() const
css::uno::Reference< css::i18n::XBreakIterator > mxBreakIterator
bool mbForceControlBackground
css::uno::Reference< css::datatransfer::dnd::XDragSourceListener > mxDnDListener
void SetActivateHdl(const Link< Edit &, bool > &rLink)
Edit * GetSubEdit() const
OUString maPlaceholderText
Link< Edit &, void > maAutocompleteHdl
void SetAutocompleteHdl(const Link< Edit &, void > &rLink)
virtual void SetModifyHdl(const Link< Edit &, void > &rLink)
TextFilter * mpFilterText
std::unique_ptr< VclBuilder > mpUIBuilder
virtual bool IsReadOnly() const
const Link< Edit &, void > & GetAutocompleteHdl() const
sal_Int32 GetWidthInChars() const
void SetForceControlBackground(bool b)
sal_Unicode GetEchoChar() const
Link< Edit &, void > maModifyHdl
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Creates a hierarchy of vcl::Windows (widgets) from a .ui file for dialogs, sidebar,...
virtual Selection GetSurroundingTextSelection() const
virtual void Tracking(const TrackingEvent &rTEvt)
virtual void Command(const CommandEvent &rCEvt)
virtual void MouseButtonDown(const MouseEvent &rMEvt)
virtual void MouseButtonUp(const MouseEvent &rMEvt)
virtual void KeyInput(const KeyEvent &rKEvt)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
virtual OUString GetSurroundingText() const
virtual bool PreNotify(NotifyEvent &rNEvt)
virtual bool DeleteSurroundingText(const Selection &rSelection)
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
virtual void Draw(::OutputDevice *pDev, const Point &rPos, SystemTextColorFlags nFlags)
virtual void DataChanged(const DataChangedEvent &rDCEvt)
virtual OUString GetText() const
virtual bool set_property(const OUString &rKey, const OUString &rValue)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
virtual FactoryFunction GetUITestFactory() const
virtual void drop(const css::datatransfer::dnd::DropTargetDropEvent &dtde)
virtual void dragDropEnd(const css::datatransfer::dnd::DragSourceDropEvent &dsde)
virtual void dragEnter(const css::datatransfer::dnd::DropTargetDragEnterEvent &dtdee)
virtual void dragOver(const css::datatransfer::dnd::DropTargetDragEvent &dtde)
virtual void dragGestureRecognized(const css::datatransfer::dnd::DragGestureEvent &dge)
virtual void dragExit(const css::datatransfer::dnd::DropTargetEvent &dte)
Link< ColorFieldControl &, void > maModifyHdl
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
void GetSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept