123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231(**************************************************************************)(* 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$ *)openGauxopenGobjectopenGtkopenGtkBaseopenGtkContainersopenGtkMiscopenOgtkMiscPropsopenGObjletseparatordir?packing?show()=letw=Separator.createdir[]inpack_return(newwidget_fullw)~packing~showclassstatusbar_contextobjctx=object(self)valobj:statusbarobj=objvalcontext:Gtk.statusbar_context=ctxmethodcontext=contextmethodpushtext=Statusbar.pushobjcontext~textmethodpop()=Statusbar.popobjcontextmethodremove=Statusbar.removeobjcontextmethodflash?(delay=1000)text=letmsg=self#pushtextinGlib.Timeout.adddelay(fun()->self#removemsg;false);()endclassstatusbarobj=objectinheritGPack.box(obj:Gtk.statusbarobj)methodnew_context~name=newstatusbar_contextobj(Statusbar.get_context_idobjname)endletstatusbar=GContainer.pack_container[]~create:(funp->newstatusbar(Statusbar.createp))classstatus_icon_signals(obj:Gtk.status_iconGobject.obj)=object(* inherit [Gtk.status_icon] gobject_signals obj*)inheritgtk_status_icon_sigsmethodprivateconnectsgn~callback=GtkSignal.connect~sgn~callback~after:trueobjmethodprivatenotifyprop~callback=GtkSignal.connect_propertyobj~prop~callbackendclassstatus_iconobj=objectvalobj:Gtk.status_iconGobject.obj=objinheritgtk_status_icon_propsmethodconnect=newstatus_icon_signalsobjmethodset_from_pixbuf=StatusIcon.set_from_pixbufobjmethodset_from_file=StatusIcon.set_from_fileobjmethodset_from_stock=StatusIcon.set_from_stockobjmethodset_from_icon_name=StatusIcon.set_from_icon_nameobjmethodget_pixbuf=StatusIcon.get_pixbufobjmethodget_stock=StatusIcon.get_stockobjmethodget_icon_name=StatusIcon.get_icon_nameobjmethodget_size=StatusIcon.get_sizeobjmethodis_embedded=StatusIcon.is_embeddedobjendletstatus_icon=StatusIcon.make_params[]~cont:(funp()->newstatus_icon(StatusIcon.createp))letstatus_icon_from_pixbuf=StatusIcon.make_params[]~cont:(funppb->leto=newstatus_icon(StatusIcon.createp)ino#set_from_pixbufpb;o)letstatus_icon_from_file=StatusIcon.make_params[]~cont:(funpfile->leto=newstatus_icon(StatusIcon.createp)ino#set_from_filefile;o)letstatus_icon_from_stock=StatusIcon.make_params[]~cont:(funps->leto=newstatus_icon(StatusIcon.createp)ino#set_from_stocks;o)letstatus_icon_from_icon_name=StatusIcon.make_params[]~cont:(funps->leto=newstatus_icon(StatusIcon.createp)ino#set_from_icon_names;o)classcalendar_signalsobj=objectinheritwidget_signals_implobjinheritcalendar_sigsendclasscalendarobj=objectinherit['a]widget_impl(obj:Gtk.calendarobj)inheritcalendar_propsmethodevent=newGObj.event_opsobjmethodconnect=newcalendar_signalsobjmethodselect_month=Calendar.select_monthobjmethodselect_day=Calendar.select_dayobjmethodmark_day=Calendar.mark_dayobjmethodunmark_day=Calendar.unmark_dayobjmethodclear_marks=Calendar.clear_marksobjmethoddate=Calendar.get_dateobjmethodset_display_options=Calendar.set_display_optionsobjendletcalendar?options?packing?show()=letw=Calendar.create[]inmayoptions~f:(Calendar.set_display_optionsw);pack_return(newcalendarw)~packing~showclassdrawing_areaobj=objectinheritwidget_full(obj:[>Gtk.drawing_area]obj)methodevent=newGObj.event_opsobjendletdrawing_area?packing?show()=letw=DrawingArea.create[]inpack_return(newdrawing_areaw)~packing~showclassmiscobj=objectinherit['a]widget_implobjinheritmisc_propsendclassarrowobj=objectinheritmiscobjinheritarrow_propsendletarrow=Arrow.make_params[]~cont:(Misc.all_params~cont:(funp?packing?show()->pack_return(newarrow(Arrow.createp))~packing~show))classimageobj=object(self)inheritmiscobjinheritimage_propsmethodclear()=Image.clearobjendtypeimage_type=[`EMPTY|`PIXBUF|`STOCK|`ICON_SET|`ANIMATION|`ICON_NAME|`GICON|`SURFACE]letimage=Image.make_params[]~cont:(Misc.all_params~cont:(funp?packing?show()->pack_return(newimage(Image.createp))~packing~show))classlabel_skelobj=object(self)inheritmiscobjinheritlabel_propsmethodtext=GtkMiscProps.Label.get_textobjmethodset_text=GtkMiscProps.Label.set_textobjmethodget_layout=GtkMiscProps.Label.get_layoutobjmethodselection_bounds=GtkMiscProps.Label.get_selection_boundsobjmethodselect_region=GtkMiscProps.Label.select_regionobjendclasslabelobj=objectinheritlabel_skel(obj:Gtk.labelobj)methodconnect=newwidget_signals_implobjendletlabel?text?markup?use_underline?mnemonic_widget=letlabel,use_markup=ifmarkup=Nonethentext,Noneelsemarkup,Sometrueinletmnemonic_widget=may_map(funw->w#as_widget)mnemonic_widgetinLabel.make_params[]?label?use_markup?use_underline?mnemonic_widget~cont:(Misc.all_params~cont:(funp?packing?show()->pack_return(newlabel(Label.createp))~packing~show))letlabel_castw=newlabel(Label.castw#as_widget)classcolor_selectionobj=objectinherit[Gtk.color_selection]GObj.widget_implobjmethodconnect=newGObj.widget_signals_implobjmethodset_border_width=setContainer.P.border_widthobjinheritcolor_selection_propsendletcolor_selection=ColorSelection.make_params[]~cont:(GContainer.pack_container~create:(funp->newcolor_selection(ColorSelection.createp)))classfont_selectionobj=objectinherit[Gtk.font_selection]widget_implobjinheritfont_selection_propsmethodevent=newevent_opsobjmethodconnect=newGObj.widget_signals_implobjmethodset_border_width=setContainer.P.border_widthobjendletfont_selection=FontSelection.make_params[]~cont:(GContainer.pack_container~create:(funp->newfont_selection(FontSelection.createp)))