#include "sopnamsp.h"
#include "pippapplmac.h"
#include "piupdattachment.h"
#include "pippmenubar.h"
#include "pippwindowmac.h"
#include <LClipboard.h>

PIPPApplMac::PIPPApplMac()
:LApplication()
{
  RegisterClass_(PIPPWindowMac);
  AddAttachment(new LClipboard);
}


PIPPApplMac::~PIPPApplMac()
{}

void
PIPPApplMac::AdjustCursor(const EventRecord &inMacEvent)
{
  PIUpdAttachment::hit = false;
  LApplication::AdjustCursor(inMacEvent);
  if (!PIUpdAttachment::hit) {
    if (PIUpdAttachment::lastCursPane)
       PIUpdAttachment::lastCursPane->myWdg->Leave();
    PIUpdAttachment::lastCursPane = NULL;
  }   
}

void
PIPPApplMac::MakeMenuBar()
{
	//new PIPPMenuBar();
}



// $CHECK$
// Gerer AllowSubRemoval, qui envoie un evenement a l'application PI.
// Eventuellement avoir des fenetres qui se cachent lors d'un close et d'autres
// qui se detruisent ??