(by Michael Froehlich, 1993-10-26,
 updated Mattias Werner, 1994-03-31)

This file contains some command examples, which can be send to daVinci by
using the application. First you have to connect the application with daVinci 
(see README-file in this directory or the user manual). Then you can copy
one of the commands into the upper text subwindow of the application.

Before you do this, replace all occurances of '....' in this text by the
absolute path of the directory where you've installed the daVinci example
graphs!

	DON'T USE THE COMMENTS (---) HERE AS PART OF THE COMMAND!
	
Press 'Send Message' and the command will be transmitted to daVinci. 

	SEND ONLY ONE COMMAND AT A TIME! 

Commands are descripted in detail in the user manual.

--- Send a new graph in term representation to daVinci. ---
new_term ([l("Object A",n("anything",[a("OBJECT","Object A")],[e("anything",[],l("Object B",n("anything",[a("OBJECT","Object B")],[]))),e("anything",[],l("Object C",n("anything",[a("OBJECT","Object C")],[]))),e("anything",[],l("Object D",n("anything",[a("OBJECT","Object D")],[])))]))])

--- Create an application specific menu tree in daVinci. Don't do that ---
--- twice with the same menu identifiers! 			       ---
create_menu(submenu_entry("applmenu","Application",[menu_entry("applmenu A","Command A"),menu_entry("applmenu B","Command B"),blank,submenu_entry("applmenu_sub","Submenu",[menu_entry("applmenu C","Command C"),menu_entry("applmenu D","Command D"),])]))

--- Activate some menu entries in this menu tree (but create it first!). ---
activate_menu_entries(["applmenu","applmenu A","applmenu_sub","applmenu C","applmenu D"])

--- Trigger a user dialog (a text input). ---
question_string("A question",["Please enter","some text:"],"Delete this!")

--- Trigger a user dialog (a choice). ---
question_boolean("Another question",["How do you do?"],":->",":-{",true)

--- Trigger a user dialog (a confirmation). ---
confirmer("Please confirm",["You have to press","the button"],"Yes, this one")

--- Report a message in the left footer. ---
show_message("Here is a message for you!")

--- Report a status in the right footer. ---
show_status("Here is a status")

--- Load a graph in term representation from a file. Please use a ---
--- valid graph filename! 					  ---	
load_graph("..../example_graphs/graph_example.daVinci")

--- Load a status of daVinci from a file. Please use a ---
--- a valid status filename! 			       ---	
load_status("..../example_graphs/xerox_star.status")

--- Save the status of daVinci in a file. ---
save_status("..../example_graphs/xerox_star_new.status")

--- Set the scale of the visualization to 15%. ---
set_scale(15)

--- Start the layout algorithm (crossing minimization) for the ---
--- whole graph. 					       ---
place_all_nodes

--- Start the layout algorithm (crossing minimization) only for  ---
--- the subgraph represented by all visible nodes in the window. ---
place_visible_nodes

--- Shrink the width of the graph if it is possible. ---
compact_graph

--- Select one or more nodes of the displayed graph (do this with ---
--- 'xerox_star.status' loaded!).				  ---
select_nodes_labels(["Sketchpad","Alto"])

--- Activate the abstraction function for the currently selected  ---
--- nodes, i. e. the subgraph of each node is hidden (or shown if ---
--- it was hidden before).					  ---
hide_or_show_subgraph

--- Show all hidden subgraphs. ---
restore_subgraphs

--- Activate the encapsulation function for the currently selected  ---
--- nodes, i. e. all the incomming and outgoing edges of each nodes ---
--- are hidden (or shown if they were hidden before).	            ---	
hide_or_show_edges

--- Show all hidden edges. ---
restore_edges

--- Set the accuracy of the phase one of the crossing minimization ---
--- algorithm to the specified value (must be between 1 and 20).   ---
--- Values greater than 5 are not very useful.                     ---
set_accuracy_phase_1(3)

--- Set the accuracy of the phase two of the crossing minimization ---
--- algorithm to the specified value (must be between 1 and 40).   ---
set_accuracy_phase_2(8)

--- Set the font size to the specified value (must be in ---
--- {6,8,10,12,14,18,24,34}).   			 ---
set_font_size(34)

--- Set the gap width (minimal distance between two nodes) to the  ---
--- specified value.						   ---
set_gap_width(20)

--- Set the gap height (minimal distance between two layers) to the  ---
--- specified value.						     ---
set_gap_height(40)

--- Set the gap for multiple edges to the specified value (must be ---
--- between 2 and 20). Send 					   ---
load_graph("..../example_graphs/multiple_edges.daVinci")
--- before, to see the effect of this command.			   ---
set_multiple_edge_gap(20)

--- Set the radius for self refering edges to the specified value ---
--- (must be between 8 and 30). Send 				  ---
load_graph("..../example_graphs/self_refering_edges.daVinci")
--- before, to see the effect of this command.			  ---
set_self_refering_edge_radius(30)

--- Set the title of the visualization window. ---
set_window_title("My Title")

--- Set the size of the visualization window. ---
set_window_size(400,300)

--- Set the position of the visualization window. ---
set_window_position(100,100)

--- Open daVinci, i.e. deiconify it, if it was iconified before. ---
open_window

--- Close daVinci, i.e. iconify it. ---
close_window

--- Lock daVinci, i. e. disallow user input. ---
deactivation

--- Unlock daVinci, i. e. allow user input again. ---
activation

--- Quit daVinci. ---
quit

