mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-10-06 07:00:16 +08:00
CMake builds / ${{ matrix.name }} (-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe, Ninja, SOME, CONSOLE_ONLY, Windows MSVC, 1, windows-latest) (push) Waiting to run
CMake builds / ${{ matrix.name }} (-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO, Xcode, OFF, OFF, macOS 14 wxIOS, macos-14) (push) Waiting to run
CMake builds / ${{ matrix.name }} (Unix Makefiles, ALL, Ubuntu 22.04 wxGTK 3, ubuntu-22.04) (push) Waiting to run
CMake builds / ${{ matrix.name }} (Xcode, macOS 14 wxOSX, macos-14) (push) Waiting to run
Mac builds / ${{ matrix.name }} (arm64, --with-cxx=14 --enable-universal_binary=arm64,x86_64 --disable-shared --disable-debug --enable-optimise, wxMac Universal C++14, self-hosted) (push) Waiting to run
Mac builds / ${{ matrix.name }} (arm64, wxMac ARM with ASAN, self-hosted, true) (push) Waiting to run
Mac builds / ${{ matrix.name }} (true, x86_64, PKG_CONFIG_LIBDIR=/dev/null, --with-osx_iphone --enable-monolithic --disable-sys-libs --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0, wxiOS, macos-14, true, true, iphonesimulator) (push) Waiting to run
Mac builds / ${{ matrix.name }} (x86_64, --disable-sys-libs, wxMac macOS 14, macos-14) (push) Waiting to run
Mac builds / ${{ matrix.name }} (x86_64, --with-cxx=17 --with-macosx-version-min=10.12 --enable-debug, wxMac Intel C++17, self-hosted) (push) Waiting to run
Mac Xcode builds / ${{ matrix.name }} (x86_64, Debug, generic/platform=iOS, iOS static Debug, build/osx/wxiphone.xcodeproj, macos-latest, static) (push) Waiting to run
Mac Xcode builds / ${{ matrix.name }} (x86_64, Release, generic/platform=iOS Simulator, iOS Simulator static, samples/minimal/minimal_iphone.xcodeproj, macos-latest, app-static) (push) Waiting to run
Mac Xcode builds / ${{ matrix.name }} (x86_64, Release, generic/platform=macOS, macOS dynamic Release, samples/minimal/minimal_cocoa.xcodeproj, self-hosted, app-dynamic) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (DLL Debug, x64, true, 2022) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (DLL Release, x64, 2019) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (Debug, Win32, 2019) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (Release, arm64, 2022) (push) Waiting to run
MSW builds / msw-msys2-clang (push) Waiting to run
MSW cross-builds / ${{ matrix.name }} (--disable-compat32, testing, wxMSW 64 bits) (push) Waiting to run
MSW cross-builds / ${{ matrix.name }} (--enable-universal --disable-compat32 --disable-debug --disable-optimise, testing, true, wxMSW/Univ) (push) Waiting to run
MSW cross-builds / ${{ matrix.name }} (stable, wxMSW 32 bits, i686-w64-mingw32) (push) Waiting to run
Code Checks / Check Spelling (push) Waiting to run
Code Checks / Check Whitespace (push) Waiting to run
Code Checks / Check Mixed EOL (push) Waiting to run
Code Checks / Check C++ Style (push) Waiting to run
Update Documentation / Update Online Documentation (push) Waiting to run
Closes #24899.
106 lines
3.7 KiB
C++
106 lines
3.7 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/qt/textctrl.h
|
|
// Author: Mariano Reingart, Peter Most
|
|
// Copyright: (c) 2010 wxWidgets dev team
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_QT_TEXTCTRL_H_
|
|
#define _WX_QT_TEXTCTRL_H_
|
|
|
|
class wxQtEdit;
|
|
|
|
class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase
|
|
{
|
|
public:
|
|
wxTextCtrl() = default;
|
|
|
|
wxTextCtrl(wxWindow *parent,
|
|
wxWindowID id,
|
|
const wxString &value = wxEmptyString,
|
|
const wxPoint &pos = wxDefaultPosition,
|
|
const wxSize &size = wxDefaultSize,
|
|
long style = 0,
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
const wxString &name = wxASCII_STR(wxTextCtrlNameStr));
|
|
|
|
virtual ~wxTextCtrl();
|
|
|
|
bool Create(wxWindow *parent,
|
|
wxWindowID id,
|
|
const wxString &value = wxEmptyString,
|
|
const wxPoint &pos = wxDefaultPosition,
|
|
const wxSize &size = wxDefaultSize,
|
|
long style = 0,
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
const wxString &name = wxASCII_STR(wxTextCtrlNameStr));
|
|
|
|
virtual int GetLineLength(long lineNo) const override;
|
|
virtual wxString GetLineText(long lineNo) const override;
|
|
virtual int GetNumberOfLines() const override;
|
|
|
|
virtual bool IsModified() const override;
|
|
virtual void MarkDirty() override;
|
|
virtual void DiscardEdits() override;
|
|
|
|
virtual bool SetStyle(long start, long end, const wxTextAttr& style) override;
|
|
virtual bool GetStyle(long position, wxTextAttr& style) override;
|
|
virtual bool SetDefaultStyle(const wxTextAttr& style) override;
|
|
|
|
virtual long XYToPosition(long x, long y) const override;
|
|
virtual bool PositionToXY(long pos, long *x, long *y) const override;
|
|
|
|
virtual void ShowPosition(long pos) override;
|
|
|
|
virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const override;
|
|
virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
|
|
wxTextCoord *col,
|
|
wxTextCoord *row) const override
|
|
{
|
|
return wxTextCtrlBase::HitTest(pt, col, row);
|
|
}
|
|
|
|
virtual void SetInsertionPoint(long pos) override;
|
|
virtual long GetInsertionPoint() const override;
|
|
virtual void SetSelection( long from, long to ) override;
|
|
virtual void GetSelection(long *from, long *to) const override;
|
|
|
|
virtual void Copy() override;
|
|
virtual void Cut() override;
|
|
virtual void Paste() override;
|
|
|
|
virtual void Undo() override;
|
|
virtual void Redo() override;
|
|
virtual bool CanUndo() const override;
|
|
virtual bool CanRedo() const override;
|
|
|
|
virtual void EmptyUndoBuffer() override;
|
|
|
|
virtual bool IsEditable() const override;
|
|
virtual void SetEditable(bool editable) override;
|
|
|
|
virtual wxString DoGetValue() const override;
|
|
virtual void DoSetValue(const wxString &text, int flags = 0) override;
|
|
virtual void WriteText(const wxString& text) override;
|
|
|
|
virtual void SetMaxLength(unsigned long len) override;
|
|
|
|
virtual wxTextSearchResult SearchText(const wxTextSearch& search) const override;
|
|
|
|
protected:
|
|
virtual wxSize DoGetBestSize() const override;
|
|
|
|
virtual bool DoLoadFile(const wxString& file, int fileType) override;
|
|
virtual bool DoSaveFile(const wxString& file, int fileType) override;
|
|
|
|
// From wxTextEntry:
|
|
virtual wxWindow *GetEditableWindow() override { return this; }
|
|
|
|
private:
|
|
wxQtEdit *m_qtEdit = nullptr;
|
|
|
|
wxDECLARE_DYNAMIC_CLASS( wxTextCtrl );
|
|
};
|
|
|
|
#endif // _WX_QT_TEXTCTRL_H_
|