summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/osx/registersview.mm
blob: ae202fa488e6a844ae5105a7b759708737aebfd1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// license:BSD-3-Clause
// copyright-holders:Vas Crabb
//============================================================
//
//  registersview.m - MacOS X Cocoa debug window handling
//
//============================================================

#import "registersview.h"

#include "emu.h"
#include "debugger.h"
#include "debug/debugcpu.h"
#include "debug/debugvw.h"


@implementation MAMERegistersView

- (id)initWithFrame:(NSRect)f machine:(running_machine &)m {
	if (!(self = [super initWithFrame:f type:DVT_STATE machine:m wholeLineScroll:NO]))
		return nil;
	return self;
}


- (void)dealloc {
	[super dealloc];
}


- (NSSize)maximumFrameSize {
	debug_view_xy           max;
	device_t                *curcpu = machine->debugger().cpu().get_visible_cpu();
	const debug_view_source *source = view->source_for_device(curcpu);

	max.x = max.y = 0;
	for (auto &source : view->source_list())
	{
		debug_view_xy   current;
		view->set_source(*source);
		current = view->total_size();
		if (current.x > max.x)
			max.x = current.x;
		if (current.y > max.y)
			max.y = current.y;
	}
	view->set_source(*source);
	return NSMakeSize(max.x * fontWidth, max.y * fontHeight);
}


- (NSString *)selectedSubviewName {
	return @"";
}


- (int)selectedSubviewIndex {
	return -1;
}


- (void)selectSubviewAtIndex:(int)index {
}


- (void)selectSubviewForDevice:(device_t *)device {
	view->set_source(*view->source_for_device(device));
}

@end