/******************************************************************************
 CLibrary.h

			Header File For CLibrary Document Class
	

	Copyright (C) 1985-1992  New York University
	Copyright (C) 1994 George Washington University
	 
	This file is part of the GWAdaEd system, an extension of the Ada/Ed-C
	system.  See the Ada/Ed README file for warranty (none) and distribution
	info and also the GNU General Public License for more details.


	Generated by Classyª (Object Factory) 8:29 PM Mon, Sep 27, 1993

	This file is only generated once. You can modify it by extending
	the placeholder definitions and adding any new methods and
	data members you wish.

	If you change the name of the document class, a fresh version of this
	file will be generated. If you have made any changes to the file
	with the old name, you will have to copy those changes to the new
	file by hand.

 ******************************************************************************/

#pragma once

#include "x_CLibrary.h"
#include "MacAdaLib.h"
#include <stdio.h>

class CLibrary : public x_CLibrary

{
public:
		Library		lib;
		Boolean		libAllocated;
		FSSpec		libSpec;
		Str255		libPath;
		Boolean		libFileFound;		// have lib file in folder
		Boolean		initLibrary;		// need to (re)initialize

			void	ICLibrary(FSSpec spec);
			void	Dispose(void);
	
			void	ForceClassReferences( void);

			void	NewLibrary(void);
			void	OpenLibrary(void);
	virtual	Boolean	Close(Boolean quitting);
			void	ReadLibrary(void);
			void	WriteOptions(FILE *fp);

	virtual	void	ContentsToWindow(void);
			void	LibraryChanged(void);
			void	UpdateContents(void);

private:
			void	BuildMenu(MenuHandle menu, Boolean bind);
public:

			Boolean	HasContents(void);
			void	GetFullName(Str255 fullName);
			void	BuildBindMenu(MenuHandle menu);
			void	BuildExecuteMenu(MenuHandle menu);
	virtual	void	UpdateMenus(void);
	virtual	void	DoCommand(long theCommand);

			void	DoCmdInitializeLibrary(void);
			void	ProviderChanged( CCollaborator *aProvider,
						long reason, void* info);
};

