Package: gtk
Class gtk:scrolled-window
Superclassesgtk:widget, gobject:initially-unowned, gtk:accessible, gtk:buildable, gtk:constraint-target, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails The gtk:scrolled-window widget is a container that accepts a single
child widget, makes that child scrollable using either internally added
scrollbars or externally associated adjustments, and optionally draws a
frame around the child. ![]() Widgets with native scrolling support, that is, those whose classes implement the gtk:scrollable interface, are added directly. For other types of widgets, the gtk:viewport class acts as an adaptor, giving scrollability to other widgets. The gtk:scrolled-window-child function intelligently accounts for whether or not the added child is a gtk:scrollable widget. If it is not, then it wraps the child in a gtk:viewport widget. Therefore, you can just add any child widget and not worry about the details. If the gtk:scrolled-window-child function has added a gtk:viewport widget for you, you can remove both your added child widget from the gtk:viewport widget, and the gtk:viewport widget from the gtk:scrolled-window widget, like this: (let ((window (make-instance 'gtk:scrolled-window)) (child (make-instance 'gtk:button)))Unless the hscrollbar-policy and vscrollbar-policy properties are :never or :external, the gtk:scrolled-window widget adds internal gtk:scrollbar widgets around its child. The scroll position of the child, and if applicable the scrollbars, is controlled by the hadjustment and vadjustment properties that are associated with the gtk:scrolled-window widget. See the docs on the gtk:scrollbar widget for the details, but note that the step-increment and page-increment properties are only effective if the policy causes scrollbars to be present. If a gtk:scrolled-window widget does not behave quite as you would like, or does not have exactly the right layout, it is very possible to set up your own scrolling with the gtk:scrollbar widget and for example a gtk:grid widget. Touch supportThe gtk:scrolled-window widget has built-in support for touch devices. When a touchscreen is used, swiping will move the scrolled window, and will expose 'kinetic' behavior. This can be turned off with the kinetic-scrolling property if it is undesired.The gtk:scrolled-window widget also displays visual 'overshoot' indication when the content is pulled beyond the end, and this situation can be captured with the "edge-overshot" signal. If no mouse device is present, the scrollbars will overlayed as narrow, auto-hiding indicators over the content. If traditional scrollbars are desired although no mouse is present, this behaviour can be turned off with the overlay-scrolling property. CSS nodesThe gtk:scrolled-window implementation also sets the .left, .right, .top, .bottom positional style classes and .overlay-indicator, .dragging, .hovering style classes related to overlay scrolling on its scrollbars. If both scrollbars are visible, the area where they meet is drawn with a subnode named junction. Signal DetailsThe "edge-overshot" signallambda (window pos) :run-last
The "edge-reached" signallambda (window pos) :run-last
The "move-focus-out" signallambda (window direction) :action
The "scroll-child" signallambda (window scroll horizontal) :action
| Returned bySlot Access FunctionsInherited Slot Access FunctionsSee also |
2024-7-5