summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/osx/debugview.h
blob: 774a2898705a98096926a31404a6bff3a57dd20b (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
71
72
73
74
75
76
77
78
79
80
// license:BSD-3-Clause
// copyright-holders:Vas Crabb
//============================================================
//
//  debugview.h - MacOS X Cocoa debug window handling
//
//============================================================

#import "debugosx.h"

#include "debug/debugvw.h"

#import <Cocoa/Cocoa.h>


@interface MAMEDebugView : NSView
{
	int             type;
	running_machine *machine;
	debug_view      *view;
	BOOL            wholeLineScroll;

	int32_t         totalWidth, totalHeight, originTop;

	NSFont          *font;
	CGFloat         fontWidth, fontHeight, fontAscent;

	NSTextStorage   *text;
	NSTextContainer *textContainer;
	NSLayoutManager *layoutManager;
}

+ (NSFont *)defaultFontForMachine:(running_machine &)m;

- (id)initWithFrame:(NSRect)f type:(debug_view_type)t machine:(running_machine &)m wholeLineScroll:(BOOL)w;

- (void)update;

- (NSSize)maximumFrameSize;

- (NSFont *)font;
- (void)setFont:(NSFont *)f;

- (BOOL)cursorSupported;
- (BOOL)cursorVisible;
- (debug_view_xy)cursorPosition;

- (IBAction)copyVisible:(id)sender;
- (IBAction)paste:(id)sender;

- (void)viewBoundsDidChange:(NSNotification *)notification;
- (void)viewFrameDidChange:(NSNotification *)notification;

- (void)windowDidBecomeKey:(NSNotification *)notification;
- (void)windowDidResignKey:(NSNotification *)notification;

- (void)addContextMenuItemsToMenu:(NSMenu *)menu;

- (void)saveConfigurationToNode:(util::xml::data_node *)node;
- (void)restoreConfigurationFromNode:(util::xml::data_node const *)node;

@end


@protocol MAMEDebugViewSubviewSupport <NSObject>

- (NSString *)selectedSubviewName;
- (int)selectedSubviewIndex;
- (void)selectSubviewAtIndex:(int)index;
- (BOOL)selectSubviewForDevice:(device_t *)device;

@end


@protocol MAMEDebugViewExpressionSupport <NSObject>

- (NSString *)expression;
- (void)setExpression:(NSString *)exp;

@end