home *** CD-ROM | disk | FTP | other *** search
- /*
- * DrawRefoldMarks.fw
- *
- * USAGE: DrawRefoldMarks.fw
- *
- * DrawRefoldMarks.fw draw the refold marks in a document of Final Writer.
- *
- * HISTORY:
- * v1.01 now this is an OLE module
- *
- * v1.02 refold marks refer to the section setup
- *
- * v1.03 all marks are grouped
- *
- * v1.04 aligned with the new server design v1.10
- *
- * $(C): (1994, Rocco Coluccelli, Bologna)
- * $VER: DrawRefoldMarks.fw 1.04 (30.Nov.1994)
- */
-
- OPTIONS RESULTS
-
- PARSE ARG oleclip
- PARSE VALUE GETCLIP(oleclip) WITH jobID modID . . . . . oleport . . userport olepipe .
-
- /*
- * olepipe = doallpages fold1 fold2 ...
- */
- fold. = 0
- result = GETCLIP(olepipe)
- refolds = WORDS(result) - 1
- DO i = 1 TO refolds
- fold.i = WORD(result,i + 1)
- END
-
-
- ADDRESS VALUE userport
-
- SetMeasure "MICROPOINTS"
- View 50
-
- /*
- * Marks position and dimension
- */
- GetSectionSetup 'Inside'
- x1 = 2 * result % 10
- x2 = x1 + MIN(5 * result % 10,144)
-
- GetPageSetup 'Height'
- y0 = result % 100
-
- /*
- * store current values for lines
- */
- GetLinePrefs 'LineWt' 'LineColor'
- PARSE VAR result linewt linecolor
-
- LinePrefs 'LineWt' 'HairLine' 'LineColor' 'Black'
-
- IF WORD(olepipe,1) = 1 THEN DO
-
- EditRightMaster
- CALL DrawMarks(1)
-
- GetPageSetup 'Pages'
- IF UPPER(result) = 'LEFTRIGHT' THEN DO
- EditLeftMaster
- CALL DrawMarks(1)
- END
-
- EditBody
- END
-
- ELSE DO
-
- Status 'Page'
- CALL DrawMarks(result)
- END
-
-
- Redraw
-
- /*
- * restore last values for lines
- */
- LinePrefs 'LineWt' linewt 'LineColor' linecolor
-
- ADDRESS VALUE oleport
- SETJOB jobID 'end'
-
- EXIT 0
-
-
- DrawMarks:
-
- DO i = 1 TO refolds
- DrawLine ARG(1) x1 (y0 * fold.i) x2 (y0 * fold.i)
- line.i = result
- END
-
- DO i = 1 TO refolds
- SelectObject line.i 'MULTIPLE'
- END
- Redraw
-
- RETURN
-