Carousel
Object Hierarchy:
Description:
[
CCode ( type_id =
"hdy_carousel_get_type ()" ) ]
[
Version ( since =
"1.0" ) ]
public class Carousel :
EventBox,
Implementor,
Buildable,
Orientable,
Swipeable
A paginated scrolling widget.
The `HdyCarousel` widget can be used to display a set of pages with swipe-based navigation between them.
[class@CarouselIndicatorDots] and [class@CarouselIndicatorLines] can be used to provide page indicators for `HdyCarousel`.
CSS nodes
`HdyCarousel` has a single CSS node with name `carousel`.
Content:
Properties:
- public bool allow_long_swipes { get; set; }
Whether to allow swiping for more than one page at a time.
- public bool allow_mouse_drag { get; set; }
Sets whether the [class@Carousel] can be dragged with mouse pointer.
- public bool allow_scroll_wheel { get; set; }
Whether the widget will respond to scroll wheel events.
- public uint animation_duration { get; set; }
Animation duration used by [method@Carousel.
- public bool interactive { get; set; }
Whether the carousel can be navigated.
- public uint n_pages { get; }
The number of pages in a [class@Carousel].
- public double position { get; }
Current scrolling position, unitless.
- public uint reveal_duration { get; set; }
Page reveal duration, in milliseconds.
- public uint spacing { get; set; }
Spacing between pages in pixels.
Creation methods:
Methods:
- public bool get_allow_long_swipes ()
Gets whether to allow swiping for more than one page at a time.
- public bool get_allow_mouse_drag ()
Sets whether this can be dragged
with mouse pointer.
- public bool get_allow_scroll_wheel ()
Gets whether this will respond to
scroll wheel events.
- public uint get_animation_duration ()
Gets animation duration used by [method@Carousel.
- public bool get_interactive ()
Gets whether this can be navigated.
- public uint get_n_pages ()
Gets the number of pages in this.
- public double get_position ()
Gets current scroll position in this
.
- public uint get_reveal_duration ()
Gets duration of the animation used when adding or removing pages, in
milliseconds.
- public uint get_spacing ()
Gets spacing between pages in pixels.
- public void insert (Widget child, int position)
Inserts child
into this
at position position
.
- public void prepend (Widget child)
Prepends child
to this.
- public void reorder (Widget child, int position)
Moves child
into position position
.
- public void scroll_to (Widget widget)
Scrolls to widget
position with an animation.
- public void scroll_to_full (Widget widget, int64 duration)
Scrolls to widget
position with an animation.
- public void set_allow_long_swipes (bool allow_long_swipes)
Sets whether to allow swiping for more than one page at a time.
- public void set_allow_mouse_drag (bool allow_mouse_drag)
Sets whether this can be dragged
with mouse pointer.
- public void set_allow_scroll_wheel (bool allow_scroll_wheel)
Sets whether this will respond to
scroll wheel events.
- public void set_animation_duration (uint duration)
Sets animation duration used by [method@Carousel.
- public void set_interactive (bool interactive)
Sets whether this can be navigated.
- public void set_reveal_duration (uint reveal_duration)
Sets duration of the animation used when adding or removing pages, in
milliseconds.
- public void set_spacing (uint spacing)
Sets spacing between pages in pixels.
Signals:
Inherited Members:
All known members inherited from class Gtk.EventBox
- above_child
- get_above_child
- get_visible_window
- set_above_child
- set_visible_window
- visible_window
All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Container
- @foreach
- add
- add_with_properties
- border_width
- check_resize
- child
- child_get
- child_get_property
- child_get_valist
- child_notify
- child_notify_by_pspec
- child_set
- child_set_property
- child_set_valist
- child_type
- class_find_child_property
- class_list_child_properties
- composite_name
- find_child_property
- forall
- forall_internal
- get_border_width
- get_child_property
- get_children
- get_focus_chain
- get_focus_child
- get_focus_hadjustment
- get_focus_vadjustment
- get_path_for_child
- get_resize_mode
- handle_border_width
- install_child_properties
- install_child_property
- list_child_properties
- propagate_draw
- remove
- resize_children
- resize_mode
- set_border_width
- set_child_property
- set_focus_chain
- set_focus_child
- set_focus_hadjustment
- set_focus_vadjustment
- set_reallocate_redraws
- set_resize_mode
- unset_focus_chain
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Buildable
- add_child
- construct_child
- custom_finished
- custom_tag_end
- custom_tag_start
- get_internal_child
- get_name
- parser_finished
- set_buildable_property
- set_name
All known members inherited from interface Gtk.Orientable
All known members inherited from interface Hdy.Swipeable