~ubuntu-branches/ubuntu/gutsy/basilisk2/gutsy

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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
 *	PrefsEditor.h - GUI stuff for Basilisk II preferences
 *					(which is a text file in the user's home directory)
 *
 *	$Id: PrefsEditor.h,v 1.3 2003/04/02 02:18:05 nigel Exp $
 *
 *  Basilisk II (C) 1997-2001 Christian Bauer
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#import <Cocoa/Cocoa.h>

@interface TableDS : NSObject
{
	int				numItems;
	NSMutableArray	*col1,
					*col2;
}

- (void) addInt: (int)target
	   withPath: (NSString *)path;

- (void) addObject: (NSObject *)obj
		  withPath: (NSString *)path;

- (void) deleteAll;

- (BOOL) deleteRow: (int)row;

- (int) intAtRow: (int)row;

- (int) numberOfRowsInTableView: (NSTableView *)tView;

- (NSString *) pathAtRow: (int)row;

- (id)	tableView: (NSTableView *)tView
		objectValueForTableColumn: (NSTableColumn *)tColumn
		row: (int)rowIndex;
@end

#include "Emulator.h"

@interface PrefsEditor : NSObject
{
	IBOutlet NSSlider		*emuFreq;
	IBOutlet NSView			*newVolumeView;
	IBOutlet NSTextField	*newVolumeSize;
	IBOutlet NSWindow		*panel;
	IBOutlet Emulator		*theEmulator;


	IBOutlet NSButton		*bootFromAny,
							*bootFromCD;
	IBOutlet NSTextField	*bytes;
	IBOutlet NSButton		*classic,
							*CPU68000,
							*CPU68020,
							*CPU68030,
							*CPU68040;
	IBOutlet NSTextField	*delay,
							*depth;
	IBOutlet NSButton		*disableCD,
							*disableSound;
	IBOutlet NSTableView	*diskImages;
	IBOutlet NSTextField	*etherNet,
							*extFS;
	IBOutlet NSButton		*FPU;
	IBOutlet NSTextField	*frequency,
							*height;
    IBOutlet NSButton		*IIci;
	IBOutlet NSTextField	*MB,
							*modem;
	IBOutlet NSButton		*openGL;
	IBOutlet NSTextField	*prefsFile,
							*printer;
	IBOutlet NSButton		*quadra900;
	IBOutlet NSTextField	*ROMfile;
	IBOutlet NSButton		*screen;
	IBOutlet NSTableView	*SCSIdisks;
	IBOutlet NSTextField	*width;
	IBOutlet NSButton		*window;

	NSString	*devs,
				*home;

	TableDS		*volsDS,	// Object managing tha data in the Volumes,
				*SCSIds;	// and SCSI devices, tables

	NSImage		*locked,
				*blank;
	NSImageCell	*lockCell;

	BOOL		edited;		// Set if the user changes anything, reset on save
}

- (BOOL) hasEdited;
- (NSWindow *) window;

- (IBAction) AddSCSI:		(id)sender;
- (IBAction) AddVolume:		(id)sender;
- (IBAction) BrowseExtFS:	(id)sender;
- (IBAction) BrowsePrefs:	(id)sender;
- (IBAction) BrowseROM:		(id)sender;
- (IBAction) ChangeBootFrom:	(NSMatrix *)sender;
- (IBAction) ChangeCPU:			(NSMatrix *)sender;
- (IBAction) ChangeDisableCD:	(NSButton *)sender;
- (IBAction) ChangeDisableSound:(NSButton *)sender;
- (IBAction) ChangeFPU:			(NSButton *)sender;
- (IBAction) ChangeModel:		(NSMatrix *)sender;
- (IBAction) ChangeScreen:	(id)sender;
- (IBAction) CreateVolume:	(id)sender;
- (IBAction) DeleteVolume:	(id)sender;
- (IBAction) EditBytes:			(NSTextField *)sender;
- (IBAction) EditDelay:			(NSTextField *)sender;
- (IBAction) EditEtherNetDevice:(NSTextField *)sender;
- (IBAction) EditExtFS:			(NSTextField *)sender;
- (IBAction) EditFrequency:		(NSTextField *)sender;
- (IBAction) EditMB:			(NSTextField *)sender;
- (IBAction) EditModemDevice:	(NSTextField *)sender;
- (IBAction) EditPrinterDevice:	(NSTextField *)sender;
- (IBAction) EditROMpath:		(NSTextField *)sender;
- (IBAction) LoadPrefs:		(id)sender;
- (IBAction) RemoveSCSI:	(id)sender;
- (IBAction) RemoveVolume:	(id)sender;
- (NSString *) RemoveVolumeEntry;
- (IBAction) ResetPrefs:	(id)sender;
- (IBAction) ShowPrefs: 	(id)sender;
- (IBAction) SavePrefs:		(id)sender;

@end