diff options
Diffstat (limited to 'src/osd/modules/debugger/osx/debugwindowhandler.h')
-rw-r--r-- | src/osd/modules/debugger/osx/debugwindowhandler.h | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/src/osd/modules/debugger/osx/debugwindowhandler.h b/src/osd/modules/debugger/osx/debugwindowhandler.h new file mode 100644 index 00000000000..ba0f75fadad --- /dev/null +++ b/src/osd/modules/debugger/osx/debugwindowhandler.h @@ -0,0 +1,98 @@ +// license:BSD-3-Clause +// copyright-holders:Vas Crabb +//============================================================ +// +// debugosxdebugwindowhandler.h - MacOS X Cocoa debug window handling +// +// Copyright (c) 1996-2015, Nicola Salmoria and the MAME Team. +// Visit http://mamedev.org for licensing and usage restrictions. +// +//============================================================ + +#import "debugosx.h" + +#include "emu.h" + +#import <Cocoa/Cocoa.h> + + +@protocol MAMEDebugViewExpressionSupport; +@class MAMEDebugCommandHistory, MAMEDebugConsole; + + +extern NSString *const MAMEHideDebuggerNotification; +extern NSString *const MAMEShowDebuggerNotification; +extern NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification; + + +@interface MAMEDebugWindowHandler : NSObject <NSWindowDelegate> +{ + NSWindow *window; + running_machine *machine; +} + ++ (void)addCommonActionItems:(NSMenu *)menu; ++ (NSPopUpButton *)newActionButtonWithFrame:(NSRect)frame; + +- (id)initWithMachine:(running_machine &)m title:(NSString *)t; + +- (void)activate; + +- (IBAction)debugRun:(id)sender; +- (IBAction)debugRunAndHide:(id)sender; +- (IBAction)debugRunToNextCPU:(id)sender; +- (IBAction)debugRunToNextInterrupt:(id)sender; +- (IBAction)debugRunToNextVBLANK:(id)sender; + +- (IBAction)debugStepInto:(id)sender; +- (IBAction)debugStepOver:(id)sender; +- (IBAction)debugStepOut:(id)sender; + +- (IBAction)debugSoftReset:(id)sender; +- (IBAction)debugHardReset:(id)sender; + +- (IBAction)debugExit:(id)sender; + +- (void)showDebugger:(NSNotification *)notification; +- (void)hideDebugger:(NSNotification *)notification; + +@end + + +@interface MAMEAuxiliaryDebugWindowHandler : MAMEDebugWindowHandler +{ + MAMEDebugConsole *console; +} + ++ (void)cascadeWindow:(NSWindow *)window; + +- (id)initWithMachine:(running_machine &)m title:(NSString *)t console:(MAMEDebugConsole *)c; + +- (IBAction)debugNewMemoryWindow:(id)sender; +- (IBAction)debugNewDisassemblyWindow:(id)sender; +- (IBAction)debugNewErrorLogWindow:(id)sender; +- (IBAction)debugNewPointsWindow:(id)sender; + +- (void)windowWillClose:(NSNotification *)notification; + +- (void)cascadeWindowWithDesiredSize:(NSSize)desired forView:(NSView *)view; + +@end + + +@interface MAMEExpressionAuxiliaryDebugWindowHandler : MAMEAuxiliaryDebugWindowHandler <NSTextFieldDelegate> +{ + MAMEDebugCommandHistory *history; + NSTextField *expressionField; +} + +- (id)initWithMachine:(running_machine &)m title:(NSString *)t console:(MAMEDebugConsole *)c; + +- (id <MAMEDebugViewExpressionSupport>)documentView; + +- (IBAction)doExpression:(id)sender; + +- (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor; +- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command; + +@end |