|« Main Page | Index|
It is unlikely that you will ever need to use the Viewport widget directly. You are much more likely to use the ScrolledWindow widget which itself uses the Viewport. A viewport widget allows you to place a larger widget within it such that you can view a part of it at a time. It uses Adjustment widgets to define the area that is currently in view.
A Viewport can be created with one of the following constructors:
The first constructor creates its own default Adjustments. The second constructor lets you specify the horizontal and vertical Adjustments that the Viewport should use.
Viewport(Gtk::Adjustment *hadjustment, Gtk::Adjustment *vadjustment);
You can set and get the adjustments after the viewport has been created using the following four methods:
The 'type' parameter can be one of the values from the Gtk::ShadowType enum: