/* 
Copyright (c) 1991-2000 UserLand Software, Inc. 

Permission is hereby granted, free of charge, to any person obtaining a 
copy of this software and associated documentation files (the 
"Software"), to deal in the Software without restriction, including 
without limitation the rights to use, copy, modify, merge, publish, 
distribute, sublicense, and/or sell copies of the Software, and to 
permit persons to whom the Software is furnished to do so, subject to the 
following conditions: 

The above copyright notice and this permission notice shall be 
included in all copies or substantial portions of the Software. 

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
*/ 


#define iowainclude


#ifndef appletpopupinclude

	#include <appletpopup.h>
	
#endif

#ifndef iowacoreinclude

	#include "iowacore.h"

#endif

#ifndef iowaruntimeinclude

	#include "iowaruntime.h"

#endif

#ifndef iowaprefsinclude

	#include "iowaprefs.h"

#endif


typedef struct tyeditinfo { /*linked into refcon field of card record*/

	short mode; /*indicates which palette item is selected*/
	
	typopuprecord stylingpopup;
	
	short stylingarrowmode;
	
	Rect rname, rscript, rcolorpopup, rpopup; /*rectangles for object name, linked script, popups*/
	
	boolean flnameempty, flscriptempty; /*used to optimize display of edit rectangles*/
	
	boolean flstatusbaredit;
	
	hdlobject hobjectinstatusbar;
	
	boolean fleditname;
	
	Rect redit;
	
	hdleditrecord heditbuffer;
	
	boolean initcalculatedobjects;
	
	Point lastclickpoint;
	
	boolean flnubonborder;
	} tyeditinfo, **hdleditinfo;
	

#undef flstatusbar /*DW 12/4/93 -- I'm turning off the status bar*/

#define crosshaircursor 500

#define nubsize 5 /*the size of the nub box on a selected object*/

#define vertdamagecontrol /*doctitlebarheight*/0

#define draggingpix 3 /*distance to initiate drag*/
#define draggingticks 10 /*time before drag initiation*/


#define undocutstring 4 /*first app-specific slot in undo stringlist*/
#define undocopystring 5
#define undopastestring 6
#define undoclearstring 7
#define undotypingstring 8
#define undomovestring 9
#define undocleanstring 10
#define undoalignstring 11
#define undoresizestring 12
#define undodeletionstring 13
#define undoformatstring 14
#define undogroupstring 15
#define undoungroupstring 16



boolean packlist (hdlobject firstobject, Handle hpacked);

void disposeobject (hdlobject h);

boolean inselection (hdlobject x);

boolean editobjectdialog (tyobject *);
	
void madechanges (void);

void selectiondirty (void);

void putchildobjectlist (hdlobject, hdlobject);

boolean newobject (tyobject, hdlobject *);

boolean newgroupobject (hdlobject *);

boolean getnthsortedobject (short, hdlobject *);

boolean nothingselected (void);

void makeselectionempty (void);

void makefrontobject (hdlobject);

void sendobjecttoback (hdlobject);

void addtoselection (hdlobject);

boolean visitselectedobjects (tyobjectvisitroutine);

boolean flatvisitselectedobjects (tyobjectvisitroutine);

boolean firstselectedobject (hdlobject *);

boolean caneditobjecttext (hdlobject);

hdlobject findeditableobject (void);

boolean alignselectedobjects (tydirection);

boolean groupselectedobjects (void);

boolean ungroupselectedobjects (void);

boolean iowaiacmessage (void);

boolean iowafastiacmessage (void);

boolean getsingleselectedobject (hdlobject *);

hdleditrecord getanyactiveeditrecord (void);

void setselectionto (hdlobject);

void drawselectionframe (hdlobject, Rect, boolean);

boolean pointinnub (hdlobject, Point);

void invalnub (hdlobject);

boolean iowaedittable (void);

boolean setcardsize (short, short);

void zapcardwindow (void);

void enterarrowmode (void);