Adjustments
gtkmm has various widgets that can be visually adjusted using the mouse or the keyboard, such as the Range widgets (described in the Range Widgets section). There are also a few widgets that display some adjustable part of a larger area, such as the Viewport widget. These widgets have Gtk::Adjustment objects that express this common part of their API.
So that applications can react to changes, for instance when a user moves a scrollbar, Gtk::Adjustment has a value_changed signal. You can then use the get_value() method to discover the new value.

Creating an Adjustment
The Gtk::Adjustment is created by its create() method which is as follows:

Glib::RefPtr<Gtk::Adjustment> Gtk::Adjustment::create(
  double value,
  double lower,
  double upper,
  double step_increment = 1,
  double page_increment = 10,
  double page_size = 0);

The value argument is the initial value of the adjustment, usually corresponding to the topmost or leftmost position of an adjustable widget. The lower and upper arguments specify the possible range of values 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 bottommost or rightmost coordinate in a panning widget's child.

Using Adjustments the Easy Way
The adjustable widgets can be roughly divided into those which use and require specific units for these values, and those which treat them as arbitrary numbers.
The group which treats the values as arbitrary numbers includes the Range widgets (Scrollbar and Scale), the ScaleButton widget, and the SpinButton widget. These widgets are typically "adjusted" directly by the user with the mouse or keyboard. They will treat the lower and upper values of an adjustment as a range within which the user can manipulate the adjustment's value. By default, they will only modify the value of an adjustment.
The other group includes the Viewport widget and the ScrolledWindow widget. All of these widgets use pixel values for their adjustments. These are also typically adjusted indirectly using scrollbars. While all widgets which use adjustments can either create their own adjustments or use ones you supply, you'll generally want to let this particular category of widgets create its own adjustments.
If you share an adjustment object between a Scrollbar and a TextView widget, manipulating the scrollbar will automagically adjust the TextView widget. You can set it up like this:

// creates its own adjustments
Gtk::TextView textview;
// uses the newly-created adjustment for the scrollbar as well
Gtk::Scrollbar vscrollbar (textview.get_vadjustment(), Gtk::ORIENTATION_VERTICAL);

Adjustment Internals
OK, you say, that's nice, but what if I want to create my own handlers to respond when the user adjusts a Range widget or a SpinButton. To access the value of a Gtk::Adjustment, you can use the get_value() and set_value() methods:
As mentioned earlier, Gtk::Adjustment can emit signals. This is, of course, how updates happen automatically when you share an Adjustment object between a Scrollbar and another adjustable widget; all adjustable widgets connect signal handlers to their adjustment's value_changed signal, as can your program.
So, for example, if you have a Scale widget, and you want to change the rotation of a picture whenever its value changes, you would create a signal handler like this:

void cb_rotate_picture (MyPicture* picture)
{
  picture->set_rotation(adj->get_value());
...

and connect it to the scale widget's adjustment like this:

adj->signal_value_changed().connect(sigc::bind<MyPicture*>(sigc::mem_fun(*this,
    &cb_rotate_picture), picture));

What if a widget reconfigures the upper or lower fields of its Adjustment, such as when a user adds more text to a text widget? In this case, it emits the changed signal.
Range widgets typically connect a handler to this signal, which changes their appearance to reflect the change - for example, the size of the slider in a scrollbar will grow or shrink in inverse proportion to the difference between the lower and upper values of its Adjustment.
You probably won't ever need to attach a handler to this signal, unless you're writing a new type of range widget.

adjustment->signal_changed();