home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / getstart / start2 / start2ch.cpp < prev    next >
Text File  |  1996-10-29  |  970b  |  37 lines

  1. //*********************************************************
  2. // Getting Started - Simple Program, Version 2
  3. //
  4. // Copyright (C) 1994, Law, Leong, Love, Olson, Tsuji.
  5. // Copyright (c) 1997 John Wiley & Sons, Inc. 
  6. // All Rights Reserved.
  7. //*********************************************************
  8. #include "start2ch.hpp"
  9. #include "start2w.hpp"
  10. #include "start2.h"
  11.  
  12. IBase::Boolean 
  13.   CutCopyPasteHandler::command ( ICommandEvent& event )
  14. {
  15.   Boolean stopProcessingEvent = false;
  16.   CodeWindow* codeWindow =
  17.                 (CodeWindow*)event.dispatchingWindow();
  18.   switch ( event.commandId() )
  19.   {
  20.     case CMD_CUT:
  21.       codeWindow->cut();
  22.       stopProcessingEvent = true;
  23.       break;
  24.     case CMD_COPY:
  25.       codeWindow->copy();
  26.       stopProcessingEvent = true;
  27.       break;
  28.     case CMD_PASTE:
  29.       codeWindow->paste();
  30.       stopProcessingEvent = true;
  31.       break;
  32.     default:
  33.       break;
  34.   }
  35.   return stopProcessingEvent;
  36. }
  37.