X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47cd661014b0bcf3311d8b6b01e87a13a04a2465..7b4a652a8bf3da1b2dd20dd22c9e6db5dd03db59:/include/wx/x11/textctrl.h?ds=sidebyside diff --git a/include/wx/x11/textctrl.h b/include/wx/x11/textctrl.h index 0f1706da59..2e3b528c74 100644 --- a/include/wx/x11/textctrl.h +++ b/include/wx/x11/textctrl.h @@ -19,12 +19,12 @@ #include "wx/univ/textctrl.h" #else -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "textctrl.h" #endif #include "wx/scrolwin.h" -#include "wx/dynarray.h" +#include "wx/arrstr.h" #include "wx/datetime.h" //----------------------------------------------------------------------------- @@ -101,6 +101,7 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString &name = wxTextCtrlNameStr); + virtual ~wxTextCtrl(); bool Create(wxWindow *parent, wxWindowID id, @@ -132,9 +133,12 @@ public: // more readable flag testing methods // ---------------------------------- +#if 0 + // it seems now in wxTextCtrlBase bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); } +#endif bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; } - bool WrapLines() const { return FALSE; } + bool WrapLines() const { return false; } // If the return values from and to are the same, there is no selection. virtual void GetSelection(long* from, long* to) const; @@ -179,18 +183,18 @@ public: virtual void Redo() {} virtual bool CanUndo() const { return (m_undos.GetCount() > 0); } - virtual bool CanRedo() const { return FALSE; } + virtual bool CanRedo() const { return false; } // Insertion point virtual void SetInsertionPoint(long pos); virtual void SetInsertionPointEnd(); virtual long GetInsertionPoint() const; - virtual long GetLastPosition() const; + virtual wxTextPos GetLastPosition() const; virtual void SetSelection(long from, long to); virtual void SetEditable(bool editable); - virtual bool Enable( bool enable = TRUE ); + virtual bool Enable( bool enable = true ); void OnCut(wxCommandEvent& event); void OnCopy(wxCommandEvent& event); @@ -208,7 +212,7 @@ public: bool SetForegroundColour(const wxColour& colour); bool SetBackgroundColour(const wxColour& colour); - void SetModified() { m_modified = TRUE; } + void SetModified() { m_modified = true; } virtual void Freeze(); virtual void Thaw(); @@ -262,7 +266,7 @@ public: void OnInternalIdle(); void RefreshLine( int n ); void RefreshDown( int n ); - void MoveCursor( int new_x, int new_y, bool shift = FALSE, bool centre = FALSE ); + void MoveCursor( int new_x, int new_y, bool shift = false, bool centre = false ); void MyAdjustScrollbars(); protected: @@ -366,13 +370,6 @@ private: // wxTextCtrl types // ---------------------------------------------------------------------------- -// wxTextPos is the position in the text -typedef long wxTextPos; - -// wxTextCoord is the line or row number (which should have been unsigned but -// is long for backwards compatibility) -typedef long wxTextCoord; - class WXDLLEXPORT wxStdTextCtrlInputHandler : public wxStdInputHandler { public: @@ -380,10 +377,10 @@ public: virtual bool HandleKey(wxInputConsumer *consumer, const wxKeyEvent& event, - bool pressed) { return FALSE; } - virtual bool HandleMouse(wxInputConsumer *consumer, const wxMouseEvent& event) { return FALSE; } - virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event) { return FALSE; } - virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event) { return FALSE; } + bool pressed) { return false; } + virtual bool HandleMouse(wxInputConsumer *consumer, const wxMouseEvent& event) { return false; } + virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event) { return false; } + virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event) { return false; } protected: // get the position of the mouse click