org.gnome.gtk

## Class Viewport

- Object
- - org.freedesktop.bindings.Pointer
  - - org.freedesktop.bindings.Proxy
    - - org.gnome.glib.Object
      - - org.gnome.gtk.Widget
        - - org.gnome.gtk.Container
          - - org.gnome.gtk.Bin
            - - org.gnome.gtk.Viewport

-     public class Viewport
      extends Bin

  An adapter that allows a large Widget to only have a limited view be presented. Specifically, Viewports are for scrolling. Generally you don't need to create one of these yourself; you can add your Widget to a ScrolledWindow in one step with `addWithViewport()`.
  Since:
    4.0.8
  Author:
    Andrew Cowie

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.gnome.gtk.Widget

      `Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Viewport(Adjustment hadjustment, Adjustment vadjustment)` Construct a Viewport, specifying the Adjustment objects used to control the panning.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Adjustment` | `getHAdjustment()` Get the Adjustment that is being used to drive the horizontal extent of the region of the child Widget being shown.
    `ShadowType` | `getShadowType()` Get the decorationc currently set for this Viewport.
    `Adjustment` | `getVAdjustment()` Get the Adjustment that is being used to drive the vertical extent of the region of the child Widget being shown.
    `void` | `setShadowType(ShadowType type)` Set the type of decoration you want around the Viewport.

    - ### Methods inherited from class org.gnome.gtk.Bin

      `getChild`

    - ### Methods inherited from class org.gnome.gtk.Container

      `add, getChildren, remove, setBorderWidth`

    - ### Methods inherited from class org.gnome.gtk.Widget

      `activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll`

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Viewport

          public Viewport(Adjustment hadjustment,
                  Adjustment vadjustment)

      Construct a Viewport, specifying the Adjustment objects used to control the panning. If you're adding your child Widget to a ScrolledWindow, use its `addWithViewport()` instead of constructing a Viewport manually.
      Since:
        4.0.8

  - ### Method Detail

    - #### getHAdjustment

          public Adjustment getHAdjustment()

      Get the Adjustment that is being used to drive the horizontal extent of the region of the child Widget being shown.
      Since:
        4.0.8

    - #### getShadowType

          public ShadowType getShadowType()

      Get the decorationc currently set for this Viewport.
      Since:
        4.0.15

    - #### getVAdjustment

          public Adjustment getVAdjustment()

      Get the Adjustment that is being used to drive the vertical extent of the region of the child Widget being shown.
      Since:
        4.0.8

    - #### setShadowType

          public void setShadowType(ShadowType type)

      Set the type of decoration you want around the Viewport.

      The default value is `IN`. This is quite unheplful, since you're usually using these transparently care of ScrolledWindow's `addWithViewport()` and ScrolledWindow's also have a ShadowType setting. So, as a convenience, if you created this Viewport that way, it will set this Viewport's ShadowType to `NONE` to hide it, and you can just use a single call to ScrolledWindow's `setShadowType()` on the local variable of that type you'll already have.

      Since:
        4.0.15