public class Viewport extends Bin
addWithViewport()
.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 and Description |
---|
Viewport(Adjustment hadjustment,
Adjustment vadjustment)
Construct a Viewport, specifying the Adjustment objects used to control
the panning.
|
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.
|
add, getChildren, remove, setBorderWidth
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
public Viewport(Adjustment hadjustment, Adjustment vadjustment)
addWithViewport()
instead of constructing a Viewport manually.public Adjustment getHAdjustment()
public ShadowType getShadowType()
public Adjustment getVAdjustment()
public void setShadowType(ShadowType type)
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.