Add undo / redo support to OSX WebKit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
211da8a57d
commit
6368d96506
@ -92,10 +92,10 @@ public:
|
||||
virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> WXUNUSED(item)) {}
|
||||
|
||||
//Undo / redo functionality
|
||||
virtual bool CanUndo() { return false; }
|
||||
virtual bool CanRedo() { return false; }
|
||||
virtual void Undo() {}
|
||||
virtual void Redo() {}
|
||||
virtual bool CanUndo();
|
||||
virtual bool CanRedo();
|
||||
virtual void Undo();
|
||||
virtual void Redo();
|
||||
|
||||
//Clipboard functions
|
||||
virtual bool CanCut() { return false; }
|
||||
|
@ -961,6 +961,26 @@ void wxWebViewWebKit::EnableHistory(bool enable)
|
||||
[m_webView setMaintainsBackForwardList:enable];
|
||||
}
|
||||
|
||||
bool wxWebViewWebKit::CanUndo()
|
||||
{
|
||||
return [[m_webView undoManager] canUndo];
|
||||
}
|
||||
|
||||
bool wxWebViewWebKit::CanRedo()
|
||||
{
|
||||
return [[m_webView undoManager] canRedo];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::Undo()
|
||||
{
|
||||
[[m_webView undoManager] undo];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::Redo()
|
||||
{
|
||||
[[m_webView undoManager] redo];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
// Listener interfaces
|
||||
//------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user