#include "popupshl.h"
#include <Xm/DialogS.h>


@implementation WDCPopupShell

- initWithName:(char*)aName managedBy:anObject
{

  [self setArg:XmNdeleteResponse to:(char*)XmUNMAP];
  [self setWidget:XtCreatePopupShell(aName,
				     [self getWidgetClass],
				     [[anObject getShellObject] getWidget],
				     [self getArgList],
				     [self getNumArgs])];
  [self setParentObject: anObject];
//  [self unManage];
  return self;
}

- (WidgetClass)getWidgetClass
{
  // xmDialogShellWidgetClass : will appear at initialization.
  // transientShellWidgetClass : will not show up at start up.
  // however, the second one will cause "Segmentation fault" if a user
  // clase the shell menually.

  return transientShellWidgetClass;
}

- manage
{
  id child=[self getChildObject];
  if (![child isManaged]) [child manage];
  [super manage];
  return self;
}

- unManage
{
/*
   id child=[self getChildObject];
   if ([child isManaged]) [child unManage];
   */
  [super unManage];
  return self;
}

@end
