+class WXDLLIMPEXP_CORE wxTextCtrl: public wxTextCtrlBase
+{
+public:
+ wxTextCtrl() { Init(); }
+ 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 = 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 = wxTextCtrlNameStr);
+
+ // implement base class pure virtuals
+ // ----------------------------------
+
+ virtual void WriteText(const wxString& text);
+ virtual wxString GetValue() const;
+ virtual bool IsEmpty() const;
+
+ virtual int GetLineLength(long lineNo) const;
+ virtual wxString GetLineText(long lineNo) const;
+ virtual int GetNumberOfLines() const;
+
+ virtual bool IsModified() const;
+ virtual bool IsEditable() const;
+
+ virtual void GetSelection(long* from, long* to) const;
+
+ virtual void Remove(long from, long to);
+
+ virtual void MarkDirty();
+ virtual void DiscardEdits();
+
+ virtual bool SetStyle(long start, long end, const wxTextAttr& style);
+
+ // translate between the position (which is just an index in the text ctrl
+ // considering all its contents as a single strings) and (x, y) coordinates
+ // which represent column and line.
+ virtual long XYToPosition(long x, long y) const;
+ virtual bool PositionToXY(long pos, long *x, long *y) const;
+
+ virtual void ShowPosition(long pos);
+
+ virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const;
+ virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
+ wxTextCoord *col,
+ wxTextCoord *row) const
+ {
+ return wxTextCtrlBase::HitTest(pt, col, row);
+ }
+
+ // Clipboard operations
+ virtual void Copy();
+ virtual void Cut();
+ virtual void Paste();
+
+ // Insertion point
+ virtual void SetInsertionPoint(long pos);
+ virtual long GetInsertionPoint() const;
+ virtual wxTextPos GetLastPosition() const;
+
+ virtual void SetSelection(long from, long to);
+ virtual void SetEditable(bool editable);
+
+ // Overridden wxWindow methods
+ virtual void SetWindowStyleFlag( long style );
+ virtual bool Enable( bool enable = true );
+
+ // Implementation from now on
+ void OnDropFiles( wxDropFilesEvent &event );
+ void OnChar( wxKeyEvent &event );