/* Copyright 1990-1992 Laboratoire de Recherche en Informatique (LRI)Permission to use, copy, and modify this software and its documentationfor your own purposes is hereby granted without fee, provided thatthe above copyright notice appear in all copies and that both thatcopyright notice and this permission notice appear in supportingdocumentation, and use acknowledge that the software was developedby Laboratoire de Recherche en Informatique, Universite de Paris-Sud,Orsay, France. LRI makes no representations about the suitability ofthis software for any purpose.  It is provided "as is" without expressor implied warranty.This software or modified versions of this software cannot bedistributed in source or binary form, nor included into productswithout prior written permission of the author.LRI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALLIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL LRIBE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGESWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTIONOF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.Author:   ___    0  Thomas Baudel                 e-mail: thomas@lri.fr  /   \  /   LRI - Bat 490 /  __/ /    Universite de Paris-Sud       voice : +33 (1) 69 41 69 10/__   \/     91 405 ORSAY Cedex - FRANCE   fax   : +33 (1) 69 41 65 86*//*  CONSTANTES  */#define appleID		128 		#define fileID 		129 			#define editID 		130 			#define BaseId	131#define		MFontID	133#define MStyleID	134# define	undoCommand 	1# define  redoCommand	2# define	cutCommand		3# define	copyCommand 	4# define	pasteCommand	5# define	clearCommand	6# define	SelectCommand	8 /* DEFINITIONS DE MACROS */#define SETRECT(rectp, _left, _top, _right, _bottom)	\	(rectp)->left = (_left), (rectp)->top = (_top), 	\	(rectp)->right = (_right), (rectp)->bottom = (_bottom)	#define SETPOINT(point, _left, _top)	(point)->h = (_left), (point)->v = (_top)#define HIBYTE(aLong)		(((aLong) >> 24) & 0x00FF)#define HIWORD(aLong)		(((aLong) >> 16) & 0xFFFF)#define LOWORD(aLong)		((aLong) & 0xFFFF)/* TYPES */typedef enum {oui, non, rien} resultat;class FENETRE {public:			CWindowRecord Fen;		short TypeFenetre, LeFichier, Change, LeVolume;		MenuHandle LeMenu;		FENETRE *Suivant;		ControlHandle ControlH, ControlV;		Boolean Refait;								FENETRE (Str255, int, Boolean, Boolean);							~FENETRE ();					void Imprime (THPrint); 					void Update (RgnHandle);					inline	Str255 Name () { return (Str255) *(Fen.titleHandle); }virtual	void SetFontInfo(short, TextStyle, Boolean);virtual		int Enregistre (int );virtual		void Oisif (Boolean);virtual		void MenuEdition(short);virtual		int Dessine (RgnHandle); virtual		void Active (int); virtual		void Touche (EventRecord*); virtual		void Clique (EventRecord*); virtual 		void ControlClique (EventRecord*, ControlHandle, int);virtual		void Menu (int);virtual		void Scrolle (short, short); } ;		/* VARIABLES GLOBALES */extern FENETRE	*Fenetres, *CurFenetre;extern THPrint		PrInfos;extern Boolean 		DoneFlag, ImpressionCur;extern int 					CurCursor;extern SysEnvRec	Environnement; /* fonctions globales */extern "C" _DataInit ();extern "C" void Alerte (char*);extern "C" int Confirme3 (char*);extern "C" int Confirme (char*);extern "C" short GetDocument (Str255, SFTypeList*, short);extern "C" int Demande (Str255, Str255);extern "C" void AProposDialogue ();extern void escape ();extern FENETRE *TrouveFenetre (FENETRE *);	 
