���
PCE version 4���C���
hlp_buffer������	���first_fragment���
last_fragment���editors���modified���undo_buffer_size���syntax���
generation���request_renumber���fileO���I���xC���hlp_fragment���������text_buffer���next���previous���style���labelO���I���xRI���C���
hlp_header���������text_buffer���next���previous���style���labelO���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���	xRI���O���I���
xRI���O���I���xRI���O���I���xRI���O���I���
xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I���xRI���O���I��� xRI���O���I���!xRI���O���I���"xRI���O���I���#xRI���O���I���$xRI���O���I���%xRI���O���I���&xRI���O���I���'xRI���O���I���(xRI���O���I���)xRI���O���I���*xRI���O���I���+xRI���O���I���,xRI���O���I���-xRI���O���I���.xRI���O���I���/xRI���O���I���0xRI���O���I���1xRI���O���I���2xRI���O���I���3xRI���O���I���4xRI���O���I���5xRI���O���I���6xRI���O���I���7xRI���O���I���8xRI���O���I���9xRI���O���I���:xRI���O���I���;xRI���O���I���<xRI���O���I���=xRI���O���I���>xRI���O���I���?xRI���O���I���@xRI���O���I���AxRI���O���I���BxRI���O���I���CxRI���O���I���DxRI���O���I���ExRI���O���I���FxRI���O���I���GxRI���O���I���HxRI���O���I���IxRI���O���I���JxRI���O���I���KxRI���O���I���LxRI���O���I���MxRI���O���I���NxRI���O���I���OxRI���O���I���PxRI���O���I���QxRI���O���I���RxRI���O���I���SxRI���O���I���TxRI���O���I���UxRI���O���I���VxRI���O���I���WxRI���O���I���XxRI���O���I���YxRI���O���I���ZxRI���O���I���[xRI���O���I���\xRI���O���I���]xRI���O���I���^xRI���O���I���_xRI���O���I���`xRI���O���I���axRI���O���I���bxRI���O���I���cxRI���O���I���dxRI���O���I���exRI���O���I���fxRI���O���I���gxRI���O���I���hxRI���O���I���ixRI���O���I���jxRI���O���I���kxRI���O���I���lxRI���O���I���mxRI���O���I���nxRI���O���I���oxRI���O���I���pxRI���O���I���qxRI���O���I���rxRI���O���I���sxRI���O���I���txRI���O���I���uxRI���O���I���vxRI���O���I���wxRI���O���I���xxRI���O���I���yxRI���O���I���zxRI���O���I���{xRI���O���I���|xRI���O���I���}xRI���O���I���~xRI���O���I���xRI���O���I���€xRI���O���I���xRI���O���I���‚xRI���O���I���ƒxRI���O���I���„xRI���O���I���…xRI���O���I���†xRI���O���I���‡xRI���O���I���ˆxRI���O���I���‰xRI���O���I���ŠxRI���O���I���‹xRI���O���I���ŒxRI���O���I���xRI���O���I���ŽxRI���O���I���xRI���O���I���xRI���O���I���‘xRI���O���I���’xRI���O���I���“xRI���O���I���”xRI���O���I���•xRI���O���I���–xRI���O���I���—xRI���O���I���˜xRI���O���I���™xRI���O���I���šxRI���O���I���›xRI���O���I���œxRI���O���I���xRI���O���I���žxRI���O���I���ŸxRI���O���I��� xRI���O���I���¡xRI���O���I���¢xRI���O���I���£xRI���O���I���¤xRI���O���I���¥xRI���O���I���¦xRI���O���I���§xRI���O���I���¨xRI���O���I���©xRI���O���I���ªxRI���O���I���«xRI���O���I���¬xRI���O���I���­xRI���O���I���®xRI���O���I���¯xRI���O���I���°xRI���O���I���±xRI���O���I���²xRI���O���I���³xRI���O���I���´xRI���O���I���µxRI���O���I���¶xRI���O���I���·xRI���O���I���¸xRI���O���I���¹xRI���O���I���ºxRI���O���I���»xRI���O���I���¼xRI���O���I���½xRI���O���I���¾xRI���O���I���¿xRI���O���I���ÀxRI���O���I���ÁxRI���O���I���ÂxRI���O���I���ÃxRI���O���I���ÄxRI���O���I���ÅxRI���O���I���ÆxRI���O���I���ÇxRI���O���I���ÈxRI���O���I���ÉxRI���O���I���ÊxRI���O���I���ËxRI���O���I���ÌxRI���O���I���ÍxRI���O���I���ÎxRI���O���I���ÏxRI���O���I���ÐxRI���O���I���ÑxRI���O���I���ÒxRI���O���I���ÓxRI���O���I���ÔxRI���O���I���ÕxRI���O���I���ÖxRI���O���I���×xRI���O���I���ØxRI���O���I���ÙxRI���O���I���ÚxRI���O���I���ÛxRI���O���I���ÜxRI���O���I���ÝxRI���O���I���ÞxRI���O���I���ßxRI���O���I���àxRI���O���I���áxRI���O���I���âxRI���O���I���ãxRI���O���I���äxRI���O���I���åxRI���O���I���æxRI���O���I���çxRI���O���I���èxRI���O���I���éxRI���O���I���êxRI���O���I���ëxRI���O���I���ìxRI���O���I���íxRI���O���I���îxRI���O���I���ïxRI���O���I���ðxRI���O���I���ñxRI���O���I���òxRI���O���I���óxRI���O���I���ôxRI���O���I���õxRI���O���I���öxRI���O���I���÷xRI���O���I���øxRI���O���I���ùxRI���O���I���úxRI���O���I���ûxRI���O���I���üxRI���O���I���ýxRI���O���I���þxRI���O���I���ÿxRI���O���I���xRI���O���I��xRI���O���I��xRI���O���I��xRI���O���I��xRI���O���I��xRI���O���I��xRI���O���I��xRI���O���I��xRI���O���I��	xRI���O���I��
xRI���O���I��xRI���nRI��
N���buttonN���33��8��RI��	N���buttonN���14��8��RI��N���buttonN���31��8���
RI��N���buttonN���36��8Ð���RI��N���buttonN���35��8Æ���	RI��N���buttonN���47��8º���RI��N���buttonN���34��8³���RI��N���buttonN���33��8§���RI��N���buttonN���32��8œ���
RI��N���buttonN���31��8‰���RI���N���buttonN���30��8{���
RI���ÿN���buttonN���29��8t���RI���þN���buttonN���26��8b���RI���ýN���buttonN���28��8\���RI���üN���buttonN���27��8Q���
RI���ûN���buttonN���26��8=���RI���úN���buttonN���25��8*���RI���ùN���buttonN���24��8���RI���øN���buttonN���24��8���RI���÷N���buttonN���25��8���
RI���öN���buttonN���24��7ù���
RI���õN���buttonN���23��7ó���RI���ôN���buttonN���9��7ë���RI���óN���buttonN���21��7â���RI���òN���buttonN���34��7Ü���RI���ñN���buttonN���22��7×���RI���ðN���buttonN���21��7Ã���RI���ïN���buttonN���8��7º���RI���îN���buttonN���26��7©���RI���íN���buttonN���18��7���RI���ìN���buttonN���20��7}���RI���ëN���buttonN���19��7p���RI���êN���buttonN���18��7c���RI���éN���buttonN���17��7]���RI���èN���buttonN���26��7X���RI���çN���buttonN���25��7M���
RI���æN���buttonN���6��77���RI���åN���buttonN���24��70���RI���äN���buttonN���15��7���RI���ãN���buttonN���6��7���	RI���âN���buttonN���22��6þ���RI���áN���buttonN���21��6ô���	RI���àN���buttonN���20��6ê���	RI���ßN���buttonN���14��6á���RI���ÞN���buttonN���11��6Ñ���RI���ÝN���buttonN���10��6¾���RI���ÜN���buttonN���
cut_buffer��6³���
RI���ÛN���buttonN���cut��6¯���RI���ÚN���buttonN���16��6ª���RI���ÙN���buttonN���13��6 ���	RI���ØN���buttonN���12��6’���
RI���×N���buttonN���11��6ˆ���	RI���ÖN���buttonN���10��6~���	RI���ÕN���buttonN���3��6t���	RI���ÔN���buttonN���9��6c���RI���ÓN���buttonN���6��6\���RI���ÒN���buttonN���9��6Q���
RI���ÑN���buttonN���7��6@���RI���ÐN���buttonN���4��60���RI���ÏN���buttonN���6��6)���RI���ÎN���buttonN���5��6���	RI���ÍN���buttonN���5��6���RI���ÌN���buttonN���1��6���RI���ËN���buttonN���4��6���RI���ÊN���buttonN���2��6���RI���ÉN���buttonN���3��6���RI���ÈN���buttonN���1��5ù���
RI���ÇN���buttonN���0��5ï���	RI���ÆN���sectionN���6.__concept_index��5Û���RI���ÅN���sectionN���
5.__status��5-���
RI���ÄN���boldn��4i���RI���ÃN���boldn��4I���RI���ÂN���boldn��47���
RI���ÁN���examplen��3ý���RI���ÀN���boldn��3���
RI���¿N���boldn��3m���RI���¾N���sectionN���
4.__alignment��3Z���
RI���½N���examplen��31���&RI���¼N���boldn��1Ð��_RI���»N���keywordN���11��1y���RI���ºN���keywordN���10��1`���RI���¹N���boldn��0î���RI���¸N���examplen��.­��+RI���·N���keywordN���24��-ô���RI���¶N���keywordN���21��-á���RI���µN���keywordN���31��-Á���
RI���´N���keywordN���18��-g���RI���³N���keywordN���26��-P���RI���²N���keywordN���24��-���RI���±N���sectionN���exportpl��,���1RI���°N���
subsectionN���%5.2.__ms-windows:_using_the_clipboard��)À���%RI���¯N���keywordN���1��(ª���RI���®N���keywordN���9��(w���RI���­N���	emphasizen��'Ÿ���RI���¬N���keywordN���6��'i���RI���«N���keywordN���8��'H���RI���ªN���
subsectionN���$5.1.__ms-windows:_saving_as_metafile��&ð���$RI���©N���keywordN���25��&œ���
RI���¨N���keywordN���33��&���RI���§N���keywordN���3��&4���RI���¦N���keywordN���2��&"���RI���¥N���keywordN���26��%y���RI���¤N���keywordN���0��%:���	RI���£N���keywordN���15��$¶���RI���¢N���keywordN���36��$q���RI���¡N���keywordN���28��$���RI��� N���keywordN���17��$���RI���ŸN���keywordN���1��#×���
RI���žN���keywordN���4��#¾���RI���N���keywordN���24��#f���
RI���œN���sectionN���5.__printing��##���RI���›N���keywordN���32��#���
RI���šN���keywordN���19��"Õ���RI���™N���boldn��"ƒ���RI���˜N���
subsectionN���4.2.__tricks��!£���RI���—N���keywordN���27�� ÷���
RI���–N���keywordN���9�� Ø���RI���•N���
subsectionN���4.1.__compound_objects�� ³���RI���”N���boldn�� g���	RI���“N���boldn��î���RI���’N���boldn��U���RI���‘N���boldn��÷���	RI���N���boldn��Ä���RI���N���boldn��£���RI���ŽN���boldn��`���RI���N���keywordN���7�����RI���ŒN���sectionN���attribute_editor��´���RI���‹N���keywordN���6��B���	RI���ŠN���keywordN���3��Ó���	RI���‰N���keywordN���14��Š���RI���ˆN���sectionN���4.__undo��k���RI���‡N���keywordN���25��V���RI���†N���keywordN���4��ê���RI���…N���keywordN���26��v���RI���„N���keywordN���33�����RI���ƒN���
subsectionN���3.2.__creating_prototypes��t���RI���‚N���buttonN���
cut_buffer��Y���
RI���N���keywordN���34��@���RI���€N���buttonN���select_mode�����RI���N���keywordN���47��þ���RI���~N���subsubsubsectionN���*3.1.3.2.__background_menu_in_drawing_plane��¡���*RI���}N���keywordN���25��”���
RI���|N���keywordN���24��{���RI���{N���keywordN���9��m���
RI���zN���keywordN���26��V���RI���yN���buttonN���attribute_editor��Ç���RI���xN���keywordN���22��±���RI���wN���buttonN���cut��‰���RI���vN���keywordN���16��{���RI���uN���keywordN���
cut_buffer��°���
RI���tN���keywordN���cut��•���RI���sN���keywordN���21��(���	RI���rN���keywordN���20��(���	RI���qN���keywordN���5��¡���RI���pN���subsubsubsectionN���	edit_menu��ý���4RI���oN���
subsubsectionN���
3.1.3.__menus����
RI���nN���boldn��¼���RI���mN���subsubsubsectionN���!3.1.2.8.__user_defined_prototypes��I���!RI���lN���boldn��
���RI���kN���subsubsubsectionN���3.1.2.7.__create_link_mode_(2)��º���RI���jN���boldn��†���RI���iN���boldn��J���RI���hN���boldn�����	RI���gN���subsubsubsectionN���3.1.2.6.__create_link_mode_(1)��½���RI���fN���boldn��§���
RI���eN���boldn��–���RI���dN���boldn��q���RI���cN���boldn��W���RI���bN���boldn��L���
RI���aN���boldn�� ���
RI���`N���subsubsubsectionN���3.1.2.5.__path_create_mode�����RI���_N���boldn��Ö���RI���^N���boldn��©���	RI���]N���subsubsubsectionN���&3.1.2.4.__box/ellipse/line_create_mode�����&RI���\N���boldn��š���
RI���[N���subsubsubsectionN���3.1.2.3.__text_create_mode��~���RI���ZN���boldn��G���
RI���YN���boldn��6���	RI���XN���boldn��
�RI���WN���keywordN���35��
���	RI���VN���boldn��
º���
RI���UN���subsubsubsectionN���select_mode��
£���RI���TN���buttonN���!3.1.2.8.__user_defined_prototypes��
€���!RI���SN���buttonN���3.1.2.7.__create_link_mode_(2)��
Z���RI���RN���buttonN���3.1.2.6.__create_link_mode_(1)��
4���RI���QN���buttonN���3.1.2.5.__path_create_mode��
���RI���PN���buttonN���&3.1.2.4.__box/ellipse/line_create_mode��ä���&RI���ON���buttonN���3.1.2.3.__text_create_mode��Â���RI���NN���buttonN���select_mode��¥���RI���MN���
subsubsectionN���palet�����RI���LN���keywordN���30�����
RI���KN���keywordN���13��¤���	RI���JN���keywordN���10��t���	RI���IN���keywordN���18��d���RI���HN���keywordN���11��?���	RI���GN���subsubsubsectionN���3.1.1.3.__editing_text-objects�����RI���FN���keywordN���6��
���RI���EN���subsubsubsectionN��� 3.1.1.3.__editing_bezier_curves_��
³��� RI���DN���boldn��
r���RI���CN���boldn��
M���
RI���BN���boldn��
���RI���AN���boldn��	ö���
RI���@N���keywordN���12��	��
RI���?N���boldn��	±���
RI���>N���boldn��	Ÿ���RI���=N���subsubsubsectionN���+3.1.1.2.__editing_path_(multi-line)_objects��	o���+RI���<N���buttonN���	edit_menu��	a���	RI���;N���keywordN���23��	V���RI���:N���keywordN���34��	?���RI���9N���keywordN���31��	+���RI���8N���keywordN���22��	���RI���7N���boldn��	���RI���6N���keywordN���29��ý���RI���5N���boldn��à���
RI���4N���keywordN���21�����RI���3N���boldn��?���RI���2N���buttonN���palet�����
RI���1N���keywordN���20����RI���0N���subsubsubsectionN��� 3.1.1.1.__edit_`standard_object'����� RI���/N���
subsubsectionN���3.1.1.__drawing_window��^���RI���.N���boldn��ø���RI���-N���boldn��°���RI���,N���
subsectionN���
3.1.__windows��b���
RI���+N���sectionN���3.__user_interface��N���RI���*N���boldn��>���RI���)N���boldn��¥���RI���(N���boldn��?���
RI���'N���boldn��
���RI���&N���keywordN���5��¦���	RI���%N���keywordN���6��Œ���RI���$N���keywordN���14��o���RI���#N���sectionN���2.__introduction��ù���RI���"N���buttonN���6.__concept_index��ä���RI���!N���buttonN���
5.__status�����
RI��� N���buttonN���
4.__alignment�����
RI���N���buttonN���exportpl��–���1RI���N���buttonN���%5.2.__ms-windows:_using_the_clipboard��o���%RI���N���buttonN���$5.1.__ms-windows:_saving_as_metafile��G���$RI���N���buttonN���5.__printing��,���RI���N���buttonN���4.2.__tricks�����RI���N���buttonN���4.1.__compound_objects�����RI���N���buttonN���attribute_editor��é���RI���N���buttonN���4.__undo��ß���RI���N���buttonN���3.2.__creating_prototypes��Ä���RI���N���buttonN���*3.1.3.2.__background_menu_in_drawing_plane��–���*RI���N���buttonN���	edit_menu��Z���4RI���N���buttonN���
3.1.3.__menus��E���
RI���N���buttonN���!3.1.2.8.__user_defined_prototypes�����!RI���N���buttonN���3.1.2.7.__create_link_mode_(2)��ø���RI���N���buttonN���3.1.2.6.__create_link_mode_(1)��Ò���RI���N���buttonN���3.1.2.5.__path_create_mode��°���RI���N���buttonN���&3.1.2.4.__box/ellipse/line_create_mode��‚���&RI���N���buttonN���3.1.2.3.__text_create_mode��`���RI���
N���buttonN���select_mode��C���RI���N���buttonN���palet��)���RI���N���buttonN���3.1.1.3.__editing_text-objects�����RI���
N���buttonN��� 3.1.1.3.__editing_bezier_curves_���Ý��� RI���	N���buttonN���+3.1.1.2.__editing_path_(multi-line)_objects���ª���+RI���N���buttonN��� 3.1.1.1.__edit_`standard_object'���‚��� RI���N���buttonN���3.1.1.__drawing_window���d���RI���N���buttonN���
3.1.__windows���Q���
RI���N���buttonN���3.__user_interface���;���RI���N���buttonN���2.__introduction���)���RI���N���buttonN���1.__contents������RI���N���sectionN���1.__contents������nN���titleN���main������RI��naI��'A���default_syntax_tableI��?uC���file���������name���path���kind���status���filterO���I��xN���)/staff/jan/src/xpce/appl-help/pcedraw.hlpdN���binaryN���writen��8ÿ			PceDraw

1.  Contents

	1.  Contents
	2.  Introduction
	3.  User Interface
	  3.1.  Windows
	    3.1.1.  Drawing Window
	      3.1.1.1.  Edit `standard object'
	      3.1.1.2.  Editing path (multi-line) objects
	      3.1.1.3.  Editing Bezier curves 
	      3.1.1.4.  Editing text-objects
	    3.1.2.  The Pallet
	      3.1.2.1.  Select Mode
	      3.1.2.2.  Text Create Mode
	      3.1.2.3.  Box/Ellipse/Line Create Mode
	      3.1.2.4.  Path Create Mode
	      3.1.2.5.  Create Link Mode (1)
	      3.1.2.6.  Create Link Mode (2)
	      3.1.2.7.  User defined prototypes
	    3.1.3.  Menus
	      3.1.3.1.  Menu on graphical object and `edit' button
	      3.1.3.2.  Background menu in drawing plane
	  3.2.  Creating prototypes
	4.  Undo
	5.  Changing attributes
	  5.1.  Compound objects
	  5.2.  Tricks
	6.  Saving and Printing
	  6.1.  MS-Windows: saving as metafile
	  6.2.  MS-Windows: Using the clipboard
	7.  Using PceDraw drawings in Prolog applications
	8.  Alignment
	9.  Status
	10.  Concept Index


2.  Introduction

PceDraw is probably the most commonly used XPCE application.  The tool
is very suitable for drawing diagrams.   Painting like an artist or drawing
like an architect are not supported very well.

PceDraw has been written with the following goals in mind:

	* Testing XPCE and validating its functionality

	* Demonstration of the graphical features of XPCE

	* Its sources are intended to form a rich source of examples
	  for users with a little experience in writing PCE programs.
	  Its sources are probably too complex for entire novices.

	* Provide a usable drawing tool.


3.  User Interface

3.1.  Windows

PceDraw consists of a frame with three windows:

	* Dialog for menu-options and feedback (at the top)
	* Pallet of icons
	* The actual drawing area.

Optionally, there is a fourth window for setting attributes such as pen,
colour, etc.

3.1.1.  Drawing Window

Inside the drawing window, the following bindings of the mouse-buttons holds:

3.1.1.1.  Edit `standard object'

	# left-mouse-button
	Mode dependant.  See "The Pallet".  If the mode is `select', the
	selected object(s) may be moved and resized using the left-button
	similar to the mode-independent middle-button described below.	

	# middle-mouse-button
	Down near the edge of a graphical resizes it. Down in the middle moves
	it.

	# right-mouse-button
	Selects the object and popup the "edit menu".


3.1.1.2.  Editing path (multi-line) objects

	- Dragging with the middle-button on a control-point will move
	   the control-point.
	- left-click with the control-key down on a control-point will
	   delete this point.
	- left-click with the control-key down between two control-points will
	   insert a new control-point.

3.1.1.3.  Editing Bezier curves 

	- As editing path objects, but are either one or two control-points.

3.1.1.4.  Editing text-objects

	- Control-L makes a multiple-line text left-aligned
	- Control-C makes a multiple-line text centred
	- Control-R makes a multiple-line text right-aligned

3.1.2.  The Pallet

The palet consists of icons that switch the tool into a certain mode.  Except
for the above two, the modes allow you to create graphics of some sort.  The
standard options are:

	      3.1.2.1.  Select Mode
	      3.1.2.2.  Text Create Mode
	      3.1.2.3.  Box/Ellipse/Line Create Mode
	      3.1.2.4.  Path Create Mode
	      3.1.2.5.  Create Link Mode (1)
	      3.1.2.6.  Create Link Mode (2)
	      3.1.2.7.  User defined prototypes

3.1.2.1.  Select Mode

Left-click on an object sets the selection to this object shift-left-click adds
or removes the object to/from the selection left-drag in the background selects
all objects in the indicated area.

3.1.2.2.  Text Create Mode

Left-click creates a new text object and directs further input to it.
Left-click on an existing, selected, text enables the caret on the text object.
Typing while a text is selected will also modify the text and enable the caret.

3.1.2.3.  Box/Ellipse/Line Create Mode

Left-down creates such an object; subsequent dragging resizes it to the appropriate size.

3.1.2.4.  Path Create Mode

Left-click starts a path.  Each subsequence left-click adds a point to the path.
middle-, right-click or pressing the escape key (ESC) terminates the path.

3.1.2.5.  Create Link Mode (1)

Creates a link between two objects that is maintained.  Left-down on the object
at which the link starts and drag to the object to link to.  The link can only
attach at predefined positions indicated while the dragging.

3.1.2.6.  Create Link Mode (2)

Same as above, but the link is created between the exact indicated positions
instead of at predefined points.

3.1.2.7.  User defined prototypes

When user-defined prototypes exist.  They are shown below the standard options.
Left-click creates an instance of the prototype.

3.1.3.  Menus

3.1.3.1.  Menu on graphical object and `edit' button

There is a menu attached to each graphical objects.  As with all XPCE menus,
the menu is activated using the right mouse-button.  Hold it down, drag it to
the appropriate item and release it to activate the item.  Releasing the button
outside the menu cancels it.  If the menu is activated, the object below the
menu automatically becomes the selection.  Options:

	Align	Align this object only.  If you want to align this
		object with specific object(s), first select the
		objects to align with.

	Duplicate	Make a duplicate of the object, place it a little to
		the bottom-left and select the duplicate.

	Cut	Copy the object to the cut-buffer (shared my multiple
		PceDraw instances running in the same XPCE process),
		and then delete the object.

		The cut-buffer may be pasted using the `Paste'
		option from the background menu.

	Copy	Same as `Cut', but does not delete the object.

	Edit Attributes	Start attribute editor on this object.  If the
		attribute editor is already running, just selecting the
		object activates it on this object too.

	Hide	Put object in the background.

	Expose	Put object in the foreground.

3.1.3.2.  Background menu in drawing plane

Activated by the right mouse-button.  Options:

	Select Mode Same as selecting `select mode' from the
		palette.

	Paste	Paste value of the cut-buffer at this point.

3.2.  Creating prototypes

An important feature of PceDraw is to create and save `prototypes'.  There
are two types of prototypes.  From single objects, `virgin prototypes' may
be created.  A virgin prototype acts as the original, but with possibly modified
attributes.  For example, to create a prototype to draw a dotted line with
arrows attached, draw a line on the drawing area.  Then modify the attributes
to dotted and set the arrows using the attribute editor.  Select the object and
issue the menu-command Proto/Create/Virgin.

The second type of prototype is a (part of a) drawing that is to be reused.  We
call this an `As Is Prototype'.  A common usage for this type of prototype is
to deal with a box with centred text.  To create such a prototype, draw a box
and put a text inside.  The contents of the text is irrelevant, as it will be
cleared and prepared for editing if the prototype is instantiated.  Set all
attributes properly, select both objects and issue the menu-command
Proto/Create/As Is.

4.  Undo

PceDraw provides two undo interfaces.  The most simple one is bound to
the Emacs standard key Control-_, and undoes the last action.  Subsequent
typing toggles between the last two states.  The menu entry Edit/Undo opens
a dialog box that lets the user move forwards and backwards through the
history of the drawing.


5.  Changing attributes

Attributes of graphicals may be modified using the "attribute editor".  This is
a separate window with menus for defined editable attributes.  You start the
attribute editor on some object by either selecting the "edit attributes"
option from the popup associated with each graphical object, or by selecting
an object using the left-button and then selecting "edit attributes" from the
main "edit" menu.  Once the attribute editor is started, it will keep editing
the selection.

The attribute editor will only activate an attribute if there is at least one
graphical in the selection for which the attribute makes sense.  If an attribute
is modified, the effect is immediate and the modification applies to all
graphicals in the selection.

5.1.  Compound objects

When editing compound objects (instantiated prototypes), the displayed
attributes are from the first encountered object, while changes apply to
any object in the compound (just as if multiple objects are selected).

5.2.  Tricks

The attribute editor may be used to set some attribute of a collection of
objects to the same value: select all objects, start the attribute editor
(if not already open) and modify the attribute that should be equal over
the selection.

For example, typing an `X' value will make all objects left-aligned, typing
a `W' (width) value will make all objects same-width.

	
6.  Saving and Printing

Printing from PceDraw is done by creating PostScript for the drawing.  The
generated PostScript is scaled such that it fits on an A4 page.  It contains
a "%%BoundingBox" comment to allow direct including in LaTeX using
psfig or related packages.  PostScript generated by PceDraw does not
contain a PostScript showpage command as it will normally be included
in other documents (encapsulated PostScript).

When the "Print" option is selected, PostScript is sent to the printer from the
Unix environment variable $PRINTER.  When absent, the printer named
"postscript" (using lpr -Ppostscript) is choosen.

The menu-entry "Postscript" will dump encapsulated Postscript in a file next to
the file to which the drawing is related by replacing the .pd extenstion by
.eps.  If the drawing is not related to a file the PostScript is dumped in
scratch.eps

The menu-entry "Postscript As" will prompt for the name of a file in which
to dump the Postscript.

6.1.  MS-Windows: saving as metafile

The Win32 version of XPCE can handle the Windows `MetaFile' format.  The menu
item File/Save As Metafile provides 4 saving options.  The ...as versions prompt
for a file, while the versions without `...  as' generate the file as
the Postscript command does, i.e.  by replacing the extension of the current
file.

Metafiles can be saved in two formats: `picture' saves the drawing as a WIndows
3.x format ALDUS encapsulated metafile, which can be read by most Microsoft
applications.  'Enhanced Metafile' format is the win32 enhanced version of  this
format, which is advocated in the Microsoft programmers manual, but -for
example- Word 7.0 for Windows 95 cannot read this format.

6.2.  MS-Windows: Using the clipboard

Finally, the Windows clipboard can be used for transferring PceDraw diagrams or
parts thereof to other windows applications.  PceDraw can export diagrams both
as enhanced metafile and as clipboard picture encapsulated Windows 3.x
metafile.  At least on Windows-NT, the clipboard does the conversion, so the
actual choice is not very important.

Metafiles can also be `pasted' into PceDraw.  They act as a primitive graphical
that can be scaled.  The current release cannot save these objects, so the
result should be printed immediately.


7.  Using PceDraw drawings in Prolog applications

PceDraw diagrams consist of instances of subclasses of most of the XPCE
graphical primitives.   The subclass structures adds the PceDraw editing
capabilities.  It is possible to translate a drawing into a Prolog term, which
can be realised on a graphical device using the predicate realise_drawing/2
from library('draw/importpl').

A drawing is exported as a Prolog term, either by dragging the top-left icon
in PceDraw onto a PceEmacs editor in Prolog mode, or by placing it on the
clipboard using the popup-menu on this icon and pasting it in any text-editor.

The following example realises the Dutch flag in a picture window:

:- use_module(library('draw/importpl')).

flag(drawing([ display(box(142, 27) + 
			 fill_pattern(@black_image) +
		 	 colour(red),
		       point(153, 133)),
	       display(box(142, 27), point(153, 160)),
	       display(box(142, 27) +
			 fill_pattern(@black_image) +
	 		 colour(blue),
		       point(153, 187)),
	       display(box(142, 82), point(153, 133))
	     ])).

draw_flag :-
	new(Flag, device),
	flag(Drawing),
	realise_drawing(Flag, Drawing),
	send(Flag, reference),
	new(P, picture),
	send(P, display, Flag, point(20,20)),
	send(P, open).

The argument-term of flag/1 is imported from PceDraw.  The format of this term
is described in library('draw/exportpl').

The methods `device ->reference' and `device ->resize' may be useful to tailure
to drawing to the needs of the application.

NOTE: Variables occurring in the drawing will be bound by realise_drawing/2.
This should be regarded a feature, as it allows you to get access to parts of
the drawing.  If multiple drawings needs to be created from  the same term,
these bindings should be undone.  The simplest way to accomplish this is
using a failure-driven loop, or the construct:

	\+ \+ realise_drawing(Device, Drawing)


8.  Alignment

The settings options  auto-align switches automatic  alignment off/on.
Its default value is on, but may be switched off the Edit/Preferences editor.

When auto-align is switched on, PceDraw will attempt to reposition and/or resize
graphicals when they are created, resized or moved.  It tries to identify
standard alignments: centering, edges and making connections between graphicals
straight lines.  Conflicts are resolved using simple heuristics.


9.  Status

Various things still have to be done:

	* Edit existing prototypes
	* Modify handles of existing prototypes
	* Menu for driving the printer
	* Alignment options

10.  Concept Index

 $PRINTER
%%BoundingBox
.eps
.pd
A4
ALDUS
Align
architect
artist
As Is Prototype
attribute editor
background
Bezier
compound objects
Control-_
Control-C
Control-L
control-point
Control-R
Copy
Cut
cut-buffer
device ->reference
device ->resize
diagrams
Duplicate
Duplicate
Edit Attributes
Edit/Undo
encapsulated PostScript
Expose
File/Save As Metafile
foreground
Hide
LaTeX
left-aligned
left-aligned
left-mouse-button
library('draw/importpl').
lpr -Ppostscript
MetaFile
middle-mouse-button
move
Paste
PceEmacs
picture
popup
PostScript
Postscript As
Prolog mode
Prolog term
Proto/Create/As Is
Proto/Create/Virgin
prototypes
psfig
realise_drawing/2
resize
right-aligned
right-mouse-button
same-width
scratch.eps
Select
Select Mode
selection
showpage
top-left icon
undo
virgin prototypes'
r���I������xx