Added some missing wxTextCtrl functions: Undo, Redo, CanUndo, CanRedo,
CanCopy, CanCut, CanPaste, GetSelection, IsEditable. Also added wxNotebook::SetTabSize (only implemented on wxMSW but necessary when using just an icon). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -703,6 +703,71 @@ void wxTextCtrl::Paste()
|
||||
#endif
|
||||
}
|
||||
|
||||
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
|
||||
wxFAIL_MSG( "wxTextCtrl::Undo not implemented" );
|
||||
}
|
||||
|
||||
void wxTextCtrl::Redo()
|
||||
{
|
||||
// TODO
|
||||
wxFAIL_MSG( "wxTextCtrl::Redo not implemented" );
|
||||
}
|
||||
|
||||
bool wxTextCtrl::CanUndo() const
|
||||
{
|
||||
// TODO
|
||||
wxFAIL_MSG( "wxTextCtrl::CanUndo not implemented" );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxTextCtrl::CanRedo() const
|
||||
{
|
||||
// TODO
|
||||
wxFAIL_MSG( "wxTextCtrl::CanRedo not implemented" );
|
||||
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;
|
||||
wxFAIL_MSG( "wxTextCtrl::GetSelection not implemented" );
|
||||
}
|
||||
|
||||
bool wxTextCtrl::IsEditable() const
|
||||
{
|
||||
// TODO
|
||||
wxFAIL_MSG( "wxTextCtrl::IsEditable not implemented" );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxTextCtrl::Clear()
|
||||
{
|
||||
SetValue( "" );
|
||||
|
Reference in New Issue
Block a user