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

  1. /*    ================
  2.  *    PedCommandCut.cc
  3.  *    ================
  4.  */
  5.  
  6. #include "PedestalDebugging.h"
  7.  
  8. #include <Windows.h>
  9.  
  10. #include "PedCommandCut.hh"
  11. #include "PedWindow.hh"
  12. #include "PedPane.hh"
  13.  
  14. void
  15. PedCommandCut::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->Cut();
  25.             } else
  26.                 DebugBeep();
  27.         } else
  28.             DebugBeep();
  29.     else
  30.         DebugBeep();
  31. }
  32.