/usr/lib/ocaml/lablgtk2/gBin.ml is in liblablgtk2-ocaml-dev 2.16.0+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | (**************************************************************************)
(* 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$ *)
open Gaux
open Gtk
open GtkBinProps
open GtkBase
open GtkBin
open GObj
open OgtkBinProps
open GContainer
let param = Gobject.param
class scrolled_window obj = object
inherit [Gtk.scrolled_window] bin_impl obj
inherit scrolled_window_props
method connect = new container_signals_impl obj
method add_with_viewport w =
ScrolledWindow.add_with_viewport obj (as_widget w)
end
let scrolled_window ?hadjustment ?vadjustment =
ScrolledWindow.make_params []
?hadjustment:(may_map ~f:GData.as_adjustment hadjustment)
?vadjustment:(may_map ~f:GData.as_adjustment vadjustment)
~cont:(
pack_container ~create:(fun pl ->
new scrolled_window (ScrolledWindow.create pl)))
class event_box obj = object
inherit bin obj
method connect = new container_signals_impl obj
method event = new GObj.event_ops (obj :> Gtk.event_box obj)
end
let event_box =
pack_container [] ~create:(fun pl -> new event_box (EventBox.create pl))
class invisible obj = object
inherit bin obj
method connect = new container_signals_impl obj
method event = new GObj.event_ops (obj :> Gtk.invisible obj)
end
let invisible =
pack_container [] ~create:(fun pl -> new invisible (Invisible.create pl))
class handle_box_signals (obj : [> handle_box] obj) = object
inherit container_signals_impl obj
inherit handle_box_sigs
end
class handle_box obj = object
inherit [Gtk.handle_box] bin_impl obj
method connect = new handle_box_signals obj
method event = new GObj.event_ops obj
inherit handle_box_props
end
let handle_box =
HandleBox.make_params [] ~cont:(
pack_container ~create:(fun pl -> new handle_box (HandleBox.create pl)))
class frame_skel obj = object
inherit [[> frame]] bin_impl obj
inherit frame_props
end
class frame obj = object
inherit frame_skel (obj : Gtk.frame obj)
method connect = new container_signals_impl obj
end
let frame =
Frame.make_params [] ~cont:(
pack_container ~create:(fun pl -> new frame (Frame.create pl)))
class aspect_frame obj = object
inherit frame_skel (obj : Gtk.aspect_frame obj)
method connect = new container_signals_impl obj
inherit aspect_frame_props
end
let aspect_frame =
AspectFrame.make_params [] ~cont:(
Frame.make_params ~cont:(
pack_container ~create:(fun pl -> new aspect_frame (AspectFrame.create pl))))
class viewport obj = object
inherit [Gtk.viewport] bin_impl obj
method connect = new container_signals_impl obj
method event = new event_ops obj
inherit viewport_props
end
let viewport ?hadjustment ?vadjustment =
Viewport.make_params []
?hadjustment:(may_map ~f:GData.as_adjustment hadjustment)
?vadjustment:(may_map ~f:GData.as_adjustment vadjustment) ~cont:(
pack_container ~create:(fun pl -> new viewport (Viewport.create pl)))
class alignment obj = object
inherit [Gtk.alignment] bin_impl obj
method connect = new container_signals_impl obj
inherit alignment_props
end
let alignment ?padding =
let pl = match padding with
| None -> []
| Some (t, b, l, r) -> [ param Alignment.P.top_padding t ;
param Alignment.P.bottom_padding b ;
param Alignment.P.left_padding l ;
param Alignment.P.right_padding r ] in
Alignment.make_params pl ~cont:(
pack_container ~create:(fun pl -> new alignment (Alignment.create pl)))
let alignment_cast w = new alignment (Alignment.cast w#as_widget)
class expander_signals obj = object
inherit GContainer.container_signals_impl (obj : [> Gtk.expander] Gtk.obj)
inherit OgtkBinProps.expander_sigs
end
class expander obj = object
inherit [[> Gtk.expander]] GContainer.bin_impl obj
inherit OgtkBinProps.expander_props
method connect = new expander_signals obj
end
let expander =
GtkBin.Expander.make_params [] ~cont:(
GContainer.pack_container ~create:(fun pl ->
new expander (GtkBin.Expander.create pl)))
|