Viewport

Description The GtkViewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities. Use GtkViewport to scroll child widgets such as GtkTable, GtkBox, and so on. If a widget has native scrolling abilities, such as GtkTextView, GtkTreeView or GtkIconview, it can be added to a GtkScrolledWindow with gtk_container_add(). If a widget does not, you must first add the widget to a GtkViewport, then add the viewport to the scrolled window. The convenience function gtk_scrolled_window_add_with_viewport() does exactly this, so you can ignore the presence of the viewport.

Constructors

this
this(GtkViewport* gtkViewport)

Sets our main struct and passes it to the parent class

this
this(Adjustment hadjustment, Adjustment vadjustment)

Creates a new GtkViewport with the given adjustments.

Members

Functions

addOnSetScrollAdjustments
void addOnSetScrollAdjustments(void delegate(Adjustment, Adjustment, Viewport) dlg, ConnectFlags connectFlags)

Set the scroll adjustments for the viewport. Usually scrolled containers like GtkScrolledWindow will emit this signal to connect two instances of GtkScrollbar to the scroll directions of the GtkViewport. See Also GtkScrolledWindow, GtkAdjustment

getBinWindow
Window getBinWindow()

Gets the bin window of the GtkViewport. Since 2.20

getHadjustment
Adjustment getHadjustment()

Returns the horizontal adjustment of the viewport.

getShadowType
GtkShadowType getShadowType()

Gets the shadow type of the GtkViewport. See gtk_viewport_set_shadow_type().

getStruct
void* getStruct()

the main Gtk struct as a void*

getVadjustment
Adjustment getVadjustment()

Returns the vertical adjustment of the viewport.

getViewWindow
Window getViewWindow()

Gets the view window of the GtkViewport. Since 2.22

getViewportStruct
GtkViewport* getViewportStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
setHadjustment
void setHadjustment(Adjustment adjustment)

Sets the horizontal adjustment of the viewport.

setShadowType
void setShadowType(GtkShadowType type)

Sets the shadow type of the viewport.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
setVadjustment
void setVadjustment(Adjustment adjustment)

Sets the vertical adjustment of the viewport.

Static functions

callBackSetScrollAdjustments
void callBackSetScrollAdjustments(GtkViewport* horizontalStruct, GtkAdjustment* vertical, GtkAdjustment* arg2, Viewport _viewport)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

connectedSignals
int[string] connectedSignals;
gtkViewport
GtkViewport* gtkViewport;

the main Gtk struct

onSetScrollAdjustmentsListeners
void delegate(Adjustment, Adjustment, Viewport)[] onSetScrollAdjustmentsListeners;
Undocumented in source.

Inherited Members

From Bin

gtkBin
GtkBin* gtkBin;

the main Gtk struct

getBinStruct
GtkBin* getBinStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getChild
Widget getChild()

Gets the child of the GtkBin, or NULL if the bin contains no child widget. The returned widget does not have a reference added, so you do not need to unref it.

Meta