1 # ifndef TED_APP_H 2 # define TED_APP_H 3 4 # include <appFrame.h> 5 6 # include <utilPropMask.h> 7 # include <utilMemoryBuffer.h> 8 9 # include <geo2DInteger.h> 10 # include <docBuf.h> 11 # include <utilIndexMapping.h> 12 13 /************************************************************************/ 14 15 struct TedDocument; 16 struct DocumentStatistics; 17 18 /************************************************************************/ 19 /* */ 20 /* Shared resources. */ 21 /* */ 22 /************************************************************************/ 23 24 extern const int TedClipboardTextTargetCount; 25 extern AppSelectionTargetType TedClipboardTextTargets[]; 26 27 extern const int TedPrimaryTargetCount; 28 extern AppSelectionTargetType TedPrimaryTargets[]; 29 30 extern const int TedRulerTargetCount; 31 extern AppSelectionTargetType TedRulerTargets[]; 32 33 extern const int TedFontTargetCount; 34 extern AppSelectionTargetType TedFontTargets[]; 35 36 /************************************************************************/ 37 /* */ 38 /* Routine Declarations. */ 39 /* */ 40 /************************************************************************/ 41 42 extern void tedDocCopy( EditDocument * ed ); 43 extern void tedDocCut( EditDocument * ed ); 44 45 extern void tedDocSelAll( EditDocument * ed ); 46 47 48 extern void tedAdaptFontIndicatorsToSelection( EditDocument * ed ); 49 50 extern void tedAdaptToolsToSelection( EditDocument * ed ); 51 52 extern int tedExtendSelectionToPosition( 53 EditDocument * ed, 54 const DocumentPosition * dpAnchor, 55 const DocumentPosition * dpFound ); 56 57 extern void tedScrollToSelection( EditDocument * ed, 58 int * pScrolledX, 59 int * pScrolledY ); 60 61 extern void tedAdaptPageToolToDocument( EditApplication * ea, 62 EditDocument * ed ); 63 64 extern void tedGetNamedPictures( EditApplication * ea ); 65 66 extern void tedUndrawIBar( const EditDocument * ed ); 67 68 extern void tedStartCursorBlink( EditDocument * ed ); 69 extern void tedStopCursorBlink( EditDocument * ed ); 70 extern void tedCleanCursorBlink( struct TedDocument * td ); 71 72 extern void tedMoveObjectWindows( EditDocument * ed ); 73 74 extern int tedSaveObjectPicture( RasterImage * abiTo, 75 const InsertedObject * io ); 76 77 extern void tedDrawRectangle( EditDocument * ed, 78 DocumentRectangle * drClip, 79 int ox, 80 int oy ); 81 82 extern int tedFinishDocumentSetup( EditDocument * ed ); 83 extern void tedDocumentFirstVisible( EditDocument * ed ); 84 85 extern int tedLayoutDocument( DocumentRectangle * drScreen, 86 DocumentRectangle * drVisible, 87 void * privateData, 88 int format, 89 DrawingSurface ds, 90 const PostScriptFontList * psfl, 91 const DocumentGeometry * defDg ); 92 93 extern int tedMakeDocumentWidget( EditApplication * ea, 94 EditDocument * ed ); 95 96 extern void tedAdaptFormatToolToDocument( EditDocument * ed, 97 int choosePage ); 98 99 extern int tedRunPropertyDialog( EditDocument * ed, 100 const struct DocumentStatistics * ds, 101 APP_WIDGET option, 102 const char * pixmapName ); 103 104 extern int tedSaveDocument( EditApplication * ea, 105 DrawingSurface ds, 106 const void * privateData, 107 int format, 108 const MemoryBuffer * documentTitle, 109 int suggestStdout, 110 const MemoryBuffer * filename, 111 int isDocName ); 112 113 extern void * tedMakePrivateData( void ); 114 115 extern int tedNewDocument( EditDocument * ed, 116 const MemoryBuffer * filename ); 117 118 extern int tedPrintDocument( SimpleOutputStream * sos, 119 const struct PrintJob * pj, 120 const struct PrintGeometry * pg ); 121 122 extern void tedSuggestPageSetup( struct PrintGeometry * pg, 123 void * privateData, 124 int sheetSize ); 125 126 extern void tedFreeDocument( void * voidtd, 127 int format ); 128 129 extern void tedRedoDocumentLayout( EditDocument * ed ); 130 131 extern void tedFormatSetFindPattern( 132 EditApplication * ea, 133 const char * findPattern, 134 int findRegexp ); 135 136 extern void tedHideObjectWindows( EditDocument * ed ); 137 138 extern int tedSetIBarSelection( EditDocument * ed, 139 const DocumentPosition * dp, 140 int lastLine, 141 int * pScrolledX, 142 int * pScrolledY ); 143 144 extern int tedOpenDocumentFile( unsigned char * digest, 145 int * pFormat, 146 BufferDocument ** pBd, 147 EditApplication * ea, 148 int suggestStdin, 149 int formatHint, 150 const MemoryBuffer * filename, 151 int complain, 152 APP_WIDGET relative, 153 APP_WIDGET option ); 154 155 extern int tedObjectDrag( APP_WIDGET w, 156 EditDocument * ed, 157 APP_EVENT * downEvent ); 158 159 extern int tedOpenDocument( EditApplication * ea, 160 void * voidtd, 161 int * pFormat, 162 APP_WIDGET relative, 163 APP_WIDGET option, 164 int readOnly, 165 int suggestStdin, 166 int formatHint, 167 const MemoryBuffer * filename ); 168 169 extern void tedManagePrimarySelection( EditDocument * ed ); 170 171 extern void tedToggleTextAttribute( EditDocument * ed, 172 int set, 173 int prop ); 174 175 extern void tedSetFontSupersub( EditDocument * ed, 176 int supersub ); 177 178 extern int tedDocFindNext( EditDocument * ed ); 179 extern int tedDocFindPrev( EditDocument * ed ); 180 181 extern void tedShowFindTool( EditDocument * ed ); 182 183 extern void tedObserveFocus( EditDocument * ed, 184 int inout ); 185 186 extern int tedMakeDocumentCursor( EditApplication * ea ); 187 188 extern int tedDocUnlock( EditDocument * ed ); 189 extern int tedDocRecover( EditDocument * ed ); 190 191 extern void tedMakeDocumentReadonly( EditDocument * ed, 192 int readonly ); 193 194 extern void tedSetTracedChangedFlag( EditDocument * ed ); 195 196 # endif /* TED_APP_H */ 197