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
  
/* -*- C -*- */ 
class GTK2.Viewport; 
inherit GTK2.Bin; 
 
//! This is a container that can be scrolled around, but it has no scrollbars. 
//! You can connect scrollbars to it using the adjustment objects. 
//! IMG: GTK2.Viewport(GTK2.Adjustment(),GTK2.Adjustment())->set_size_request(100,100) 
//! IMG: GTK2.Viewport(GTK2.Adjustment(),GTK2.Adjustment())->set_size_request(100,100)->set_shadow_type(GTK2.SHADOW_ETCHED_IN) 
//! IMG: GTK2.Viewport(GTK2.Adjustment(),GTK2.Adjustment())->set_size_request(100,100)->add(GTK2.Label("A label with a very long text on it, it will not fit"))->set_shadow_type(GTK2.SHADOW_ETCHED_IN) 
//! IMG: lambda(){ object a1;object v = GTK2.Viewport(a1=GTK2.Adjustment(),GTK2.Adjustment())->set_size_request(100,100)->add(GTK2.Label("A label with a very long text on it, it will not fit"))->set_shadow_type(GTK2.SHADOW_ETCHED_IN);call_out(a1->set_value,0,100.0);return v;}() 
 
//! Properties: 
//! GTK2.Adjustment hadjustment 
//! int shadow-type 
//! GTK2.Adjustment vadjustment 
 
signal set_scroll_adjustments; 
 
void create(GTK2.Adjustment|mapping(string:mixed)|void xscroll_or_props, 
            ?GTK2.Adjustment yscroll) 
//! Create a new viewport.  The adjustments are used to select what 
//! part of the viewport to view to the user. They are normally 
//! connected to a scrollbar or something similar. 
{ 
  pgtk2_verify_not_inited(); 
  pgtk2_verify_setup(); 
  if (args) { 
    if (TYPEOF(Pike_sp[-args]) == PIKE_T_OBJECT) { 
      struct object *o1,*o2=NULL; 
      GtkWidget *gv; 
      get_all_args(NULL,args,"%o.%o",&o1,&o2); 
      gv=gtk_viewport_new(GTK_ADJUSTMENT(get_gobject(o1)), 
                        GTK_ADJUSTMENT(get_gobject(o2))); 
      THIS->obj=G_OBJECT(gv); 
    } else { 
      INIT_WITH_PROPS(GTK_TYPE_VIEWPORT); 
    } 
    pgtk2_pop_n_elems(args); 
  } else { 
    GtkWidget *gv; 
    gv=gtk_viewport_new(NULL,NULL); 
    THIS->obj=G_OBJECT(gv); 
  } 
  pgtk2__init_this_object(); 
} 
 
+GTK2.Adjustment get_hadjustment(); 
//! Return the current horizontal adjustment object 
 
+GTK2.Adjustment get_vadjustment(); 
//! Return the current vertical adjustment object 
 
int get_shadow_type(); 
//! Get the shadow type.  One Of CONST(GTK_SHADOW_) 
 
void set_hadjustment(GTK2.Adjustment xscroll); 
//! Set a new horizontal adjustment object. 
 
void set_vadjustment(GTK2.Adjustment yscroll); 
//! Set a new vertical adjustment object. 
 
void set_shadow_type(int type); 
//! Set the shadow style. One of CONST(GTK_SHADOW)