Mercurial > projects > dwt-addons
diff dwtx/jface/text/IEventConsumer.d @ 129:eb30df5ca28b
Added JFace Text sources
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 23 Aug 2008 19:10:48 +0200 |
parents | |
children | c4fb132a086c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/jface/text/IEventConsumer.d Sat Aug 23 19:10:48 2008 +0200 @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2000, 2005 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 + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> + *******************************************************************************/ +module dwtx.jface.text.IEventConsumer; + +import dwt.dwthelper.utils; + + + +import dwt.events.VerifyEvent; + +/** + * Implementers can register with a text viewer and receive + * <code>VerifyEvent</code>s before the text viewer they are registered with. + * If the event consumer marks events as processed by turning their + * <code>doit</code> field to <code>false</code> the text viewer + * subsequently ignores them.</p> + * <p> + * Clients may implement this interface.</p> + * <p> + * {@link dwtx.jface.text.ITextViewerExtension2}allows clients to manage + * the {@link dwt.events.VerifyListener}s of a text viewer. This + * makes <code>IEventConsumer</code> obsolete.</p> + * + * @see dwtx.jface.text.ITextViewer + * @see dwtx.jface.text.ITextViewerExtension2 + * @see dwt.events.VerifyEvent + */ +public interface IEventConsumer { + + /** + * Processes the given event and marks it as done if it should + * be ignored by subsequent receivers. + * + * @param event the verify event which will be investigated + */ + public void processEvent(VerifyEvent event); +}