org.gnome.gtk
Class Viewport
Object
org.freedesktop.bindings.Pointer
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.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 classes/interfaces inherited from class org.gnome.gtk.Widget |
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.EnterNotifyEvent, Widget.ExposeEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.UnmapEvent, Widget.VisibilityNotifyEvent |
|
Constructor Summary |
Viewport(Adjustment hadjustment,
Adjustment vadjustment)
Construct a Viewport, specifying the Adjustment objects used to control
the panning. |
|
Method Summary |
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.Widget |
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getRequisition, getSensitive, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, modifyBackground, modifyBase, modifyFont, modifyText, queueDraw, queueDrawArea, realize, setCanDefault, setCanFocus, setColormap, setEvents, 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 |
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
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