123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990(**************************************************************************)(* Lablgtk *)(* *)(* This program is free software; you can redistribute it *)(* and/or modify it under the terms of the GNU Library General *)(* Public License as published by the Free Software Foundation *)(* version 2, with the exception described in file COPYING which *)(* comes with the library. *)(* *)(* This program is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU Library General Public License for more details. *)(* *)(* You should have received a copy of the GNU Library General *)(* Public License along with this program; if not, write to the *)(* Free Software Foundation, Inc., 59 Temple Place, Suite 330, *)(* Boston, MA 02111-1307 USA *)(* *)(* *)(**************************************************************************)(* $Id: gWindow.ml 1347 2007-06-20 07:40:34Z guesdon $ *)openGauxopenGtkopenGtkBaseopenGtkContainersopenGtkAssistantopenGtkMiscopenGObjopenOgtkAssistantPropsopenGContainer(** Assistants **)classassistant_signalsobj=objectinheritcontainer_signals_impl(obj:[>assistant]obj)inheritassistant_sigsendclassassistantobj=object(self)inheritGWindow.window_skelobjmethodconnect=newassistant_signalsobjmethodcurrent_page=Assistant.get_current_pageobjmethodset_current_page=Assistant.set_current_pageobjmethodn_pages=Assistant.get_n_pagesobjmethodnth_page=Assistant.get_nth_pageobjmethodinsert_page?page_type?title?header_image?side_image?complete~positionw=letn=Assistant.insert_pageobjwpositioninmay(self#set_page_typew)page_type;may(self#set_page_titlew)title;may(self#set_page_header_imagew)header_image;may(self#set_page_side_imagew)side_image;may(self#set_page_completew)complete;nmethodappend_page?page_type?title?header_image?side_image?completew=self#insert_page?page_type?title?header_image?side_image?complete~position:(-1)wmethodprepend_page?page_type?title?header_image?side_image?completew=self#insert_page?page_type?title?header_image?side_image?complete~position:0wmethodset_page_type=Assistant.set_page_typeobjmethodpage_type=Assistant.get_page_typeobjmethodset_page_title=Assistant.set_page_titleobjmethodpage_title=Assistant.get_page_titleobjmethodset_page_header_image=Assistant.set_page_header_imageobjmethodpage_header_image=Assistant.get_page_header_imageobjmethodset_page_side_image=Assistant.set_page_side_imageobjmethodpage_side_image=Assistant.get_page_side_imageobjmethodset_page_complete=Assistant.set_page_completeobjmethodpage_complete=Assistant.get_page_completeobjmethodadd_action_widget=Assistant.add_action_widgetobjmethodremove_action_widget=Assistant.remove_action_widgetobjmethodupdate_buttons_state=Assistant.update_buttons_stateobjend(*let assistant () =
new assistant (Assistant.create [])
*)letmake_assistant~create=GtkWindow.Window.make_params~cont:(funpl?wmclass->Container.make_paramspl~cont:(funpl?(show=false)()->let(w:#GWindow.window_skel)=createplinmay(fun(name,clas)->w#set_wmclass~name~clas)wmclass;ifshowthenw#show();w))letassistant=make_assistant[]~create:(funpl->newassistant(Assistant.create[]))