#include "checkbox.h"
#include "prdialog.h"
#include <Xm/RowColumn.h>

@implementation WDCCheckBox : WDCRadioBox

- initWithName:(char*)aName managedBy:anObject
{
  if (![anObject isKindOfClassNamed:"WDCWindow"]
      && ![anObject isKindOfClassNamed:"WDCFrame"])
    {
      [self setPopupShell : [[WDCPromptDialog alloc]
			     initWithName : aName 
			     managedBy : anObject]];
      [self setWidget:XmCreateSimpleCheckBox([[self getPopupShell] getWidget],
					     aName,
					     [self getArgList],
					     [self getNumArgs])];
    }
  else
    [self setWidget:XmCreateSimpleCheckBox([anObject getWidget],
					   aName,
					   [self getArgList],
					   [self getNumArgs])];
  [self setParentObject: anObject];
  
  // I don't like this, however, it does work.

  XtManageChild([self getWidget]);

  return self;
}

@end
