diff options
author | Silenio Quarti | 2012-03-16 18:49:57 +0000 |
---|---|---|
committer | Silenio Quarti | 2012-03-16 18:49:57 +0000 |
commit | 28c088e52ae46fc9da6497a12e25dc62b56ffa40 (patch) | |
tree | 91ac5693d071b568ccc3a79c7ccfa2673d760c3c /bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa | |
parent | 636180aff5bfa10aac67244a1cf386398eb5e399 (diff) | |
download | eclipse.platform.swt-28c088e52ae46fc9da6497a12e25dc62b56ffa40.tar.gz eclipse.platform.swt-28c088e52ae46fc9da6497a12e25dc62b56ffa40.tar.xz eclipse.platform.swt-28c088e52ae46fc9da6497a12e25dc62b56ffa40.zip |
Bug 241644 - Text widget with no SWT.BORDER style has no Undo or Select All key bindings
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java new file mode 100644 index 0000000000..47615dddfc --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2000, 2012 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.swt.internal.cocoa; + +public class NSUndoManager extends NSObject { + +public NSUndoManager() { + super(); +} + +public NSUndoManager(int /*long*/ id) { + super(id); +} + +public NSUndoManager(id id) { + super(id); +} + +public boolean canRedo() { + return OS.objc_msgSend_bool(this.id, OS.sel_canRedo); +} + +public boolean canUndo() { + return OS.objc_msgSend_bool(this.id, OS.sel_canUndo); +} + +public void redo() { + OS.objc_msgSend(this.id, OS.sel_redo); +} + +public void undo() { + OS.objc_msgSend(this.id, OS.sel_undo); +} + +} |