The graphics objects of Camlwin have functions in their definition.
So, they cannot be saved directly with output_value. The
next two functions are used to save and restore a window. All the
callback functions of the restored window are set to gr_do_nothing.
gr_output_window : out_channel -> window -> unit
- gr_output_window Channel Window saves the window Window on the
output stream Channel.
gr_input_window : in_channel -> gr_window -> window
- gr_input_window Window_def Channel returns the window saved in the
input stream Channel. This function must be used in
complement to gr_output_window. All the objects have there attached window
set to Window_def.