/* Dock.h created by fred on Wed 22-Sep-1999 */

#import <AppKit/AppKit.h>

@class DockPreferences;
@class DockTileView;
@class DockBackgroundView;
@class DockHandleView;

//	This class represent the dock
//	It manages both the tiles (dock elements) and the window, hence is both a model and a controller object (which is bad)
@interface Dock : NSObject
{		//	The path where the dock is stored
	NSString *itsPath;

		//	The dock tiles
	NSMutableArray *itsTiles;

		//	The dock window
	NSWindow *itsWindow;

		//	The background view (content view of the dock)
	DockBackgroundView *itsBackgroundView;

		//	The dock handle view
	DockHandleView *itsHandleView;
	DockHandleView *itsAlternateHandleView;

		//	The dock preferences
	DockPreferences *itsPreferences;

		//	Boolean indicating collapsed state
	BOOL itsfCollapsed;

		//	Boolean indicating a tmeporary uncollapsed state
	BOOL itsfIsTemporaryUncollapsed;

		//	External size of the tiles
	int itsTileSize;

		//	Position of window
	NSPoint itsWindowPosition;
}

	//	Create the dock from a property list
- initFromPropertyList:(NSDictionary *)aDictionary;

	//	Create a dock from a dock file. Warning: release the object and returns nil if the file does not exists
- initFromPath:(NSString *)aPath;

	//	Return a property list representing the dock
- (NSDictionary *)propertyList;

	//	Return the path (if any)
- (NSString *)path;

	//	Set the path
- (void)setPath:(NSString *)aPath;

	//	Bring the dock to front
- (void)makeKeyAndOrderFront:sender;

- (void)setPreferences:(DockPreferences *)aPreference;
- (void)addTile:(DockTileView *)aTile;
- (void)doSave:sender;

	//	Resize everything to match internal state
- (void)layout;

	//	Called when a tile changes
- (void)tileChanged:(DockTileView *)aTile;


	//	Return YES if the app passed in parameter is laucnhed
- (BOOL)applicationLaunched:(NSString *)aPath;

- (int)imageSize;
- (void)setImageSize:(int)aSize;
- (NSPoint)windowPosition;
- (void)setWindowPosition:(NSPoint)aPosition;

@end
