patch #7318
[mldonkey.git] / src / gtk / newgui / gui_queries_base.ml
blob155cd0cd202382dafab2d34674a9b9e8f92473a0
1 class box () =
2 let vbox = GPack.vbox ~homogeneous:false () in
3 let hbox =
4 GPack.hbox ~homogeneous:false
5 ~packing:(vbox#pack ~expand:false ~fill:true) () in
6 let wt_frame =
7 GBin.frame ~border_width:1 ~shadow_type:`ETCHED_OUT
8 ~packing:(hbox#pack ~expand:false ~fill:true) () in
9 let hbox_wt =
10 GPack.hbox ~homogeneous:false
11 ~packing:(wt_frame#add) () in
12 let wtool1 =
13 GButton.toolbar ~orientation:`HORIZONTAL ~style:`BOTH ~space_style:`LINE
14 ~tooltips:true ~button_relief:`NONE
15 ~packing:(hbox_wt#pack ~expand:false ~fill:true) ()
17 let wtool2 =
18 GButton.toolbar ~orientation:`HORIZONTAL ~style:`BOTH ~space_style:`LINE
19 ~tooltips:true ~button_relief:`NONE
20 ~packing:(hbox_wt#pack ~expand:false ~fill:true) ()
22 let common_frame =
23 GBin.frame ~border_width:1 ~shadow_type:`ETCHED_OUT
24 ~packing:(hbox#pack ~expand:true ~fill:true) ()
26 let _anonymous_container_1 =
27 GPack.hbox ~homogeneous:false
28 ~packing:(common_frame#add) ()
30 let network_label =
31 GMisc.label ~text:(Gui_messages.qT_lb_network)
32 ~justify:`LEFT ~line_wrap:true
33 ~packing:(_anonymous_container_1#pack ~expand:false ~fill:true ~padding: 2) ()
35 let (nets, nets_wcombo) = Gui_global.networks_combo true in
36 let _ =
37 _anonymous_container_1#pack nets_wcombo#coerce ~padding: 5
39 let max_hits_label =
40 GMisc.label ~text:(Gui_messages.qT_lb_max_hits)
41 ~justify:`LEFT ~line_wrap:true
42 ~packing:(_anonymous_container_1#pack ~expand:false ~fill:true) ()
44 let we_max_hits =
45 GEdit.entry ~text:"200" ~visibility:true ~editable:true
46 ~packing:(_anonymous_container_1#pack ~expand:false ~fill:true ~padding: 5) ()
48 let hbox_show =
49 GPack.hbox ~homogeneous:false
50 ~packing:(_anonymous_container_1#pack ~expand:false ~fill:true ~padding: 5) ()
52 let wchk_show =
53 GButton.check_button ~active:false ~draw_indicator:true
54 ~packing:(hbox_show#pack ~expand:false ~fill:true) ()
56 let show_hidden_fields_label =
57 GMisc.label ~text:(Gui_messages.qT_lb_show_hidden_fields)
58 ~justify:`LEFT ~line_wrap:true ~xpad:2
59 ~packing:(hbox_show#pack ~expand:false ~fill:true) ()
61 let bf_frame =
62 GBin.frame ~border_width:2 ~shadow_type:`ETCHED_OUT
63 ~packing:(vbox#pack ~expand:true ~fill:true) ()
65 let box_fields =
66 GPack.vbox ~homogeneous:false
67 ~packing:(bf_frame#add) ()
69 object
70 val vbox = vbox
71 val hbox = hbox
72 val wtool1 = wtool1
73 val wtool2 = wtool2
74 val box_fields = box_fields
75 val we_max_hits = we_max_hits
76 val hbox_show = hbox_show
77 val wchk_show = wchk_show
78 (* nets becomes mutable to be able to update the combo box in the search tab *)
79 val mutable nets = nets
80 val nets_wcombo = nets_wcombo
81 val network_label = network_label
82 val max_hits_label = max_hits_label
83 val show_hidden_fields_label = show_hidden_fields_label
84 method vbox = vbox
85 method hbox = hbox
86 method wtool1 = wtool1
87 method wtool2 = wtool2
88 method box_fields = box_fields
89 method we_max_hits = we_max_hits
90 method hbox_show = hbox_show
91 method wchk_show = wchk_show
92 method nets_wcombo = nets_wcombo
93 method network_label = network_label
94 method max_hits_label = max_hits_label
95 method show_hidden_fields_label = show_hidden_fields_label
96 method coerce = vbox#coerce
97 end
99 class paned () =
100 let vbox = GPack.vbox ~homogeneous:false () in
101 let wnote_queries =
102 GPack.notebook ~tab_pos:`TOP ~show_tabs:true ~homogeneous_tabs:false
103 ~show_border:true ~scrollable:true ~popup:true
104 ~packing:(vbox#pack ~padding:2 ~expand:false ~fill:false) ()
106 let wnote_results =
107 GPack.notebook ~tab_pos:`TOP ~show_tabs:true ~homogeneous_tabs:true
108 ~show_border:true ~scrollable:true ~popup:true
109 ~packing:(vbox#pack ~expand:true ~fill:true) ()
111 object
112 val vbox = vbox
113 val wnote_queries = wnote_queries
114 val wnote_results = wnote_results
115 method vbox = vbox
116 method wnote_queries = wnote_queries
117 method wnote_results = wnote_results
118 method coerce = vbox#coerce