2020-03-31 11:48:38 +00:00
|
|
|
#include <string.h>
|
2020-06-21 14:15:17 +00:00
|
|
|
#include "ruamoko/qwaq/debugger/views/nameview.h"
|
2020-03-31 11:48:38 +00:00
|
|
|
|
|
|
|
@implementation NameView
|
|
|
|
|
|
|
|
-initWithName:(string)name
|
|
|
|
{
|
2021-06-04 04:35:53 +00:00
|
|
|
if (!(self = [super initWithDef:def type:nil])) {
|
2020-03-31 11:48:38 +00:00
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
self.name = name;
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
-(void)dealloc
|
|
|
|
{
|
|
|
|
str_free (name);
|
|
|
|
[super dealloc];
|
|
|
|
}
|
|
|
|
|
|
|
|
+(NameView *)withName:(string)name
|
|
|
|
{
|
|
|
|
return [[[self alloc] initWithName:name] autorelease];
|
|
|
|
}
|
|
|
|
|
|
|
|
-draw
|
|
|
|
{
|
|
|
|
[super draw];
|
|
|
|
[self mvaddstr:{0, 0}, str_mid (name, 0, xlen)];
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2021-09-24 16:42:36 +00:00
|
|
|
-(View *) viewAtRow:(int) row forColumn:(TableViewColumn *)column
|
|
|
|
{
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2020-03-31 11:48:38 +00:00
|
|
|
@end
|