Oolite 1.91.0.7604-240417-a536cbe
Loading...
Searching...
No Matches
OODebugController.h
Go to the documentation of this file.
1/*
2
3OODebugController.h
4
5Add debug utility GUI to debug builds of Oolite.
6
7
8Oolite Debug Bundle
9
10Copyright © 2007-2013 Jens Ayton
11
12Permission is hereby granted, free of charge, to any person obtaining a copy
13of this software and associated documentation files (the “Software”), to deal
14in the Software without restriction, including without limitation the rights
15to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16copies of the Software, and to permit persons to whom the Software is
17furnished to do so, subject to the following conditions:
18
19The above copyright notice and this permission notice shall be included in all
20copies or substantial portions of the Software.
21
22THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28SOFTWARE.
29
30*/
31
32
33/*
34
35Note on the Log Message Classes submenu: for ease of editing, items in this
36submenu with no action specified are used to toggle (and display) the log
37message class specified in their title. Display titles (optional) are set in
38the Attributed Title property. Thus, to add a menu item to control the foo.bar
39message class, simply add an item titled foo.bar in the nib.
40
41Note on extra menu items: some esoteric commands are hidden by default. To
42show them, set the preference debug-show-extra-menu-items:
43
44 defaults write org.aegidian.oolite debug-show-extra-menu-items -bool YES
45
46*/
47
48
49#import "OOCocoa.h"
50
52
53
54@interface OODebugController: NSObject
55{
56@private
57 IBOutlet NSMenu *menu;
58 IBOutlet NSMenu *logMessageClassSubMenu;
59
60 IBOutlet NSPanel *logMessageClassPanel;
61 IBOutlet NSTextField *logMsgClassPanelTextField;
62
63 IBOutlet NSWindow *logPrefsWindow;
64 IBOutlet NSButton *logShowFunctionCheckBox;
65 IBOutlet NSButton *logShowFileAndLineCheckBox;
66 IBOutlet NSButton *logShowMessageClassCheckBox;
67 IBOutlet NSButton *logShowTimeStampCheckBox;
68
69 IBOutlet NSPanel *createShipPanel;
70 IBOutlet NSTextField *createShipPanelTextField;
71
73
74 NSBundle *_bundle;
75
76}
77
78+ (OODebugController *) sharedDebugController;
79
80- (NSBundle *) bundle;
81- (NSString *) pathForResource:(NSString *)name ofType:(NSString *)type;
82
83// Debug menu commands
84- (IBAction) showLogAction:sender;
85- (IBAction) graphicsResetAction:sender;
86- (IBAction) clearTextureCacheAction:sender;
87- (IBAction) resetAndClearAction:sender;
88- (IBAction) dumpEntityListAction:sender;
89- (IBAction) dumpPlayerStateAction:sender;
90- (IBAction) createShipAction:sender;
91- (IBAction) clearAllCachesAction:sender;
92- (IBAction) toggleWireframeModeAction:sender;
93- (IBAction) hideShowHUD:sender;
94- (IBAction) inspectPlayer:sender;
95- (IBAction) inspectTarget:sender;
96- (IBAction) cleanUpInspectors:sender;
97
98// Log Message Classes submenu
99- (IBAction) toggleThisLogMessageClassAction:sender;
100- (IBAction) otherLogMessageClassAction:sender;
101
102// Log Message Classes -> Other... alert
103- (IBAction) logMsgClassPanelEnableAction:sender;
104- (IBAction) logMsgClassPanelDisableAction:sender;
105
106// Debug Flags submenu
107- (IBAction) toggleThisDebugFlagAction:sender;
108
109// Shader Mode submenu
110- (IBAction) setShaderModeToTag:(NSMenuItem *)sender;
111
112// Log Preferences window
113- (IBAction) showLogPreferencesAction:sender;
114- (IBAction) logSetShowFunctionAction:sender;
115- (IBAction) logSetShowFileAndLineAction:sender;
116- (IBAction) logSetShowMessageClassAction:sender;
117- (IBAction) logSetShowTimeStampAction:sender;
118
119- (IBAction) insertLogSeparatorAction:sender;
120
121// Create Ship... alert
122- (IBAction) createShipPanelOKAction:sender;
123
124- (IBAction) modalPanelCancelAction:sender;
125
126@end
IBOutlet NSMenu * menu
IBOutlet NSButton * logShowTimeStampCheckBox
IBOutlet NSWindow * logPrefsWindow
IBOutlet NSButton * logShowMessageClassCheckBox
IBOutlet NSTextField * logMsgClassPanelTextField
IBOutlet NSTextField * createShipPanelTextField
IBOutlet NSMenu * logMessageClassSubMenu
IBOutlet NSPanel * createShipPanel
IBOutlet NSPanel * logMessageClassPanel
IBOutlet OOJavaScriptConsoleController * jsConsoleController
IBOutlet NSButton * logShowFunctionCheckBox
IBOutlet NSButton * logShowFileAndLineCheckBox