// Swarm library. Copyright (C) 1996 Santa Fe Institute.
// This library is distributed without any warranty; without even the
// implied warranty of merchantability or fitness for a particular purpose.
// See file LICENSE for details and terms of copying.

#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#import <swarmgraph/Button.h>

@implementation Button

-createEnd {
  [super createEnd];
#ifdef _TK_
  // create the button
  [globalTkInterp eval: "button %s", widgetName];
#endif
  return self;
}

-setText: (char *) t {
#ifdef _TK_
  [globalTkInterp eval: "%s configure -text \"%s\"", widgetName, t];
#endif
  return self;
}

-setCommand: (char *) c {
#ifdef _TK_
  [globalTkInterp eval: "%s configure -command \"%s\"", widgetName, c];
#endif
  return self;
}

@end

