%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % HyperTIES C<=>NeWS interface. % Don Hopkins % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C: #define GET_METRICS_TAG 1 C: #define NO_FONT_TAG 2 C: #define FOUND_FONT_TAG 3 C: #define GET_RECT_TAG 4 C: #define PAGE_SIZE_TAG 5 C: #define MEASURE_STAMP_TAG 6 C: #define USE_LINKED_PILE_TAG 7 C: #define USE_PARENT_PILE_TAG 8 #define GET_METRICS_TAG 1 #define NO_FONT_TAG 2 #define FOUND_FONT_TAG 3 #define GET_RECT_TAG 4 #define PAGE_SIZE_TAG 5 #define MEASURE_STAMP_TAG 6 #define USE_LINKED_PILE_TAG 7 #define USE_PARENT_PILE_TAG 8 cdef do_initialize(string pathname) newprocessgroup false setprintermatch /Font null def /FontName null def /FontSize null def /TiesRootDirectory pathname (/) append def /FilePos null def /LastTID null def /LastSelectionTime 0 def /Pile null def /PileDict 100 dict def /StampDict 300 dict def /TargetDict 300 dict def /RasterDict 300 dict def % Fake PileDict stuff /Pages [] def systemdict /PileDict PileDict put systemdict /StampDict StampDict put systemdict /TargetDict TargetDict put systemdict /RasterDict RasterDict put /polite {pause pause} def systemdict /PieMenu known not { TiesRootDirectory (ties/piemenu.ps) append run } if systemdict /NeatWindow known not { TiesRootDirectory (ties/neatwin.ps) append run } if systemdict /TIESWindow known not { TiesRootDirectory (ties/win.ps) append run } if systemdict /TextCanvas known not { TiesRootDirectory (ties/textcan.ps) append run } if systemdict /Target known not { TiesRootDirectory (ties/target.ps) append run } if systemdict /Stamp known not { TiesRootDirectory (ties/stamp.ps) append run } if systemdict /FmtDict known not { TiesRootDirectory (ties/fmt.ps) append run } if % systemdict /EmacsDict known { EmacsDict begin } if % systemdict /EmacsUserDict known { EmacsUserDict begin } if FmtDict begin userdict begin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% cdef do_get_rect(x, y, width, height) => GET_RECT_TAG(x, y, width, height) name id GR cdef do_make_pile(string class, int id, x, y, w, h) x y w h class id MP cdef do_use_pile(id) id UP cdef do_set_pile_name(string name) name SN cdef do_find_font(string name, int size) name size FF cdef no_font() => NO_FONT_TAG cdef found_font() => FOUND_FONT_TAG cdef do_use_font(string name, int size) name size UF cdef do_get_metrics(height, ascent, descent) => GET_METRICS_TAG(height, ascent, descent) GM cdef do_def_file_pos(string dir, string file, int offset, int len) [dir file offset len] DFP cdef do_def_picture(string class, string name, int id) name id class DP cdef do_put_picture(id, x, y) x y id PP cdef do_measure_stamp(id, width, height) => MEASURE_STAMP_TAG(width, height) id MS cdef do_put_string(string s, int x, int y) s x y PS cdef do_def_target(string class, string name, int id) class name id DT cdef do_put_target(id, string ref, x, y, width, height) x y width height ref id PT cdef do_get_page_size(width, height) => PAGE_SIZE_TAG(width, height) GPS cdef do_start_page() SP cdef do_end_page() EP cdef do_zap_pages() ZP cdef do_start_line() SL cdef do_end_line(x, y, w, h, name, pos, len) x y w h name pos len EL cdef do_free_stamps() FS cdef do_setup_definition_pile() SDP cdef do_setup_controls_pile() SCP cdef do_setup_contents_pile() SAP cdef do_name_pile(string name) name NP cdef do_use_linked_pile(string name, id) => USE_LINKED_PILE_TAG(id) name ULP cdef do_use_parent_pile(id) => USE_PARENT_PILE_TAG(id) UPP cdef do_def_local(string name) name DFL cdef do_def_global(string name) name DFG cdef do_send_ps_string(string str) str cdef do_send_ps_int(i) i