home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / Pedestal / Source / Sources / Commands / PedCommandPaste.cc < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-24  |  582 b   |  32 lines

  1. /*    ==================
  2.  *    PedCommandPaste.cc
  3.  *    ==================
  4.  */
  5.  
  6. #include "PedestalDebugging.h"
  7.  
  8. #include <Windows.h>
  9.  
  10. #include "PedCommandPaste.hh"
  11. #include "PedWindow.hh"
  12. #include "PedPane.hh"
  13.  
  14. void
  15. PedCommandPaste::Execute()
  16. {
  17.     WindowPtr w = ::FrontWindow();
  18.     if (w != NULL)
  19.         if (((WindowPeek)w)->windowKind == kPedestalWindowKind) {
  20.             PedWindow *window = (PedWindow *)((WindowPeek)w)->refCon;
  21.             ThrowIfNULL_(window);
  22.             PedPane *pane = window->Pane();
  23.             if (pane != NULL) {
  24.                 pane->Paste();
  25.             } else
  26.                 DebugBeep();
  27.         } else
  28.             DebugBeep();
  29.     else
  30.         DebugBeep();
  31. }
  32.