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
  
/* -*- C -*- */ 
class GTK2.Adjustment; 
inherit GTK2.Data; 
 
//! The GTK2.Adjustment object represents a value which has an associated 
//! lower and upper bound, together with step and page increments, and 
//! a page size. It is used within several GTK2+ widgets, including 
//! GtkSpinButton, GtkViewport, and GtkRange (which is a base class for 
//! GtkHScrollbar, GtkVScrollbar, GtkHScale, and GtkVScale). 
//! <p> 
//! The GtkAdjustment object does not update the value itself. Instead 
//! it is left up to the owner of the GtkAdjustment to control the 
//! value. 
//! </p><p> 
//! The owner of the GtkAdjustment typically calls the value_changed() 
//! and changed() functions after changing the value or its 
//! bounds. This results in the emission of the "value_changed" or 
//! "changed" signal respectively. 
//! </p> 
 
//! Properties: 
//! float lower 
//! float page-increment 
//! float page-size 
//! float step-increment 
//! float upper 
//! float value 
 
signal changed; 
//! The adjustment changed in some way 
signal value_changed; 
//! The value changed 
 
void create(float|mapping(string:mixed)|void value_or_props, 
            ?float lower, ?float upper, 
            ?float step_increment, ?float page_increment, 
            ?float page_size) 
//! The value argument is the initial value you want to give to the 
//! adjustment, usually corresponding to the topmost or leftmost 
//! position of an adjustable widget. The lower argument specifies the 
//! lowest value which the adjustment can hold. The step_increment 
//! argument specifies the "smaller" of the two increments by which 
//! the user can change the value, while the page_increment is the 
//! "larger" one. The page_size argument usually corresponds somehow 
//! to the visible area of a panning widget. The upper argument is 
//! used to represent the bottom most or right most coordinate in a 
//! panning widget's child. Therefore it is not always the largest 
//! number that value can take, since the page_size of such widgets is 
//! usually non-zero. 
//! 
//! All values are optional, they default to 0.0. 
//! For most widgets the unit is pixels. 
{ 
  pgtk2_verify_not_inited(); 
  pgtk2_verify_setup(); 
  if (args) { 
    GtkObject *ga; 
    if (TYPEOF(Pike_sp[-args]) == PIKE_T_FLOAT) { 
      FLOAT_TYPE val,lower,upper,step_inc,page_inc,page_size; 
      val=lower=upper=step_inc=page_inc=page_size=0.0; 
      get_all_args(NULL,args,"%f.%f%f%f%f%f",&val,&lower,&upper, 
                        &step_inc,&page_inc,&page_size); 
      ga=gtk_adjustment_new(val,lower,upper,step_inc,page_inc,page_size); 
      THIS->obj=G_OBJECT(ga); 
    } else { 
      INIT_WITH_PROPS(GTK_TYPE_ADJUSTMENT); 
    } 
    pgtk2_pop_n_elems(args); 
  } else { 
    GtkObject *ga; 
    ga=gtk_adjustment_new(0.0,0.0,0.0,0.0,0.0,0.0); 
    THIS->obj=G_OBJECT(ga); 
  } 
  pgtk2__init_this_object(); 
} 
 
float get_value(); 
//! Gets the current value. 
 
void set_value(float to); 
//! Sets the value.  The value is clamped to lie between lower and upper. 
//! <p> 
//! Note that for adjustments which are used in a W(Scrollbar), the effective 
//! range of allowed values goes from lower to upper-page_size. 
 
void clamp_page(float lower, float upper); 
//! Updates the W(Adjustment) value to ensure that the range between lower and 
//! upper is in the current page (i.e. between value and value+page_size).  If 
//! the range is larger than the page size, then only the start of it will be 
//! in the current page.  A "changed" signal will be emitted if the value is 
//! changed. 
 
void changed(); 
//! Emites a "changed" signal. 
 
void value_changed(); 
//! Emits a "value-changed" signal.