home *** CD-ROM | disk | FTP | other *** search
- /* ====================
- * PedCommandClose.cpp
- * ====================
- */
-
- #include "PedestalDebugging.h"
-
- #include <Windows.h>
-
- #include "PedCommandClose.hh"
- #include "PedWindow.hh"
- #include "PedAgent.hh"
-
- void
- PedCommandClose::Execute()
- {
- // Same as 'close front window'
- //PedWindow::Frontmost->Close();
- WindowPtr w = ::FrontWindow();
- if (w != NULL)
- if (((WindowPeek)w)->windowKind == kPedestalWindowKind) {
- PedAgent *agent = ((PedWindow *)((WindowPeek)w)->refCon)->Agent();
- if (agent)
- (void)agent->CloseWindow();
- } else
- DebugBeep();
- else
- DebugBeep();
- }
-