X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/13c21be5eb535c82e53bc64f3a65da1477bbf47a..b59bf2db65896d128d72016c201dc1df9ff6c94e:/src/stubs/textctrl.cpp?ds=inline diff --git a/src/stubs/textctrl.cpp b/src/stubs/textctrl.cpp index a9ede8a5a4..a43a38acc9 100644 --- a/src/stubs/textctrl.cpp +++ b/src/stubs/textctrl.cpp @@ -267,10 +267,65 @@ wxString wxTextCtrl::GetLineText(long lineNo) const return wxString(""); } -/* - * Text item - */ - +bool wxTextCtrl::CanCopy() const +{ + // Can copy if there's a selection + long from, to; + GetSelection(& from, & to); + return (from != to) ; +} + +bool wxTextCtrl::CanCut() const +{ + // Can cut if there's a selection + long from, to; + GetSelection(& from, & to); + return (from != to) ; +} + +bool wxTextCtrl::CanPaste() const +{ + return IsEditable() ; +} + +// Undo/redo +void wxTextCtrl::Undo() +{ + // TODO +} + +void wxTextCtrl::Redo() +{ + // TODO +} + +bool wxTextCtrl::CanUndo() const +{ + // TODO + return FALSE; +} + +bool wxTextCtrl::CanRedo() const +{ + // TODO + return FALSE; +} + +// If the return values from and to are the same, there is no +// selection. +void wxTextCtrl::GetSelection(long* from, long* to) const +{ + // TODO + *from = 0; + *to = 0; +} + +bool wxTextCtrl::IsEditable() const +{ + // TODO + return FALSE; +} + void wxTextCtrl::Command(wxCommandEvent & event) { SetValue (event.GetString());