quakeforge/ruamoko/qwaq/debugger/views/indexview.r
Bill Currie 0a60f46a64 [qwaq] Implement more debugger def views
Structs and arrays now work (though could be better, eg collapsible).
2021-09-25 01:42:36 +09:00

33 lines
556 B
R

#include <string.h>
#include "ruamoko/qwaq/debugger/views/indexview.h"
@implementation IndexView
-initWithIndex:(int)index
{
if (!(self = [super initWithDef:def type:nil])) {
return nil;
}
self.index = index;
return self;
}
+(IndexView *)withIndex:(int)index
{
return [[[self alloc] initWithIndex:index] autorelease];
}
-draw
{
[super draw];
string val = sprintf ("[%d]", index);
[self mvprintf:{0, 0}, "%*.*s", xlen, xlen, val];
return self;
}
-(View *) viewAtRow:(int) row forColumn:(TableViewColumn *)column
{
return self;
}
@end