// (c) MIT 2003.  All rights reserved.

package rec.core;

import java.util.*;
import java.awt.*;
import rec.util.*;
import rec.sys.*;

// bail stuff in version of this file tagged BAIL_STUFF

public class ModifyModeModule extends BasicRecognizerModule
{

  protected WSelection m_Selection;
  protected VisibleWidget m_TargetWidget;

  protected Recognizer m_DeleteTargetRecognizer;
  protected Recognizer m_MoveTargetRecognizer;
  protected Recognizer m_CopyTargetRecognizer;



  public ModifyModeModule( WSelection targetWidget )
  {
    this( "ModifyMode", targetWidget );
  }

  protected ModifyModeModule( String name,
			      WSelection targetWidget )
  {
    super( name );

    // highlight the targetWidget color and store away the previous color
    m_Selection = targetWidget;
    m_TargetWidget = (VisibleWidget) targetWidget.getSelected();
    Console.writeln( "Target Widget: " + m_TargetWidget );

    add( new UnselectTargetRecognizer( m_Selection ) );
    
//      m_MoveTargetRecognizer =
//        new MoveTargetRecognizer( m_TargetWidget );
//      add( m_MoveTargetRecognizer );

    m_DeleteTargetRecognizer =
      new DeleteTargetRecognizer(  m_TargetWidget );
    add( m_DeleteTargetRecognizer );

//      m_CopyTargetRecognizer =
//        new CopyTargetRecognizer(  m_TargetWidget );
//      add( m_CopyTargetRecognizer );

  }

}

