[][src]Trait gtk::ScrolledWindowExt

pub trait ScrolledWindowExt: 'static {
    fn get_capture_button_press(&self) -> bool;
fn get_hadjustment(&self) -> Option<Adjustment>;
fn get_hscrollbar(&self) -> Option<Widget>;
fn get_kinetic_scrolling(&self) -> bool;
fn get_max_content_height(&self) -> i32;
fn get_max_content_width(&self) -> i32;
fn get_min_content_height(&self) -> i32;
fn get_min_content_width(&self) -> i32;
fn get_overlay_scrolling(&self) -> bool;
fn get_placement(&self) -> CornerType;
fn get_policy(&self) -> (PolicyType, PolicyType);
fn get_propagate_natural_height(&self) -> bool;
fn get_propagate_natural_width(&self) -> bool;
fn get_shadow_type(&self) -> ShadowType;
fn get_vadjustment(&self) -> Option<Adjustment>;
fn get_vscrollbar(&self) -> Option<Widget>;
fn set_capture_button_press(&self, capture_button_press: bool);
fn set_hadjustment<P: IsA<Adjustment>>(&self, hadjustment: Option<&P>);
fn set_kinetic_scrolling(&self, kinetic_scrolling: bool);
fn set_max_content_height(&self, height: i32);
fn set_max_content_width(&self, width: i32);
fn set_min_content_height(&self, height: i32);
fn set_min_content_width(&self, width: i32);
fn set_overlay_scrolling(&self, overlay_scrolling: bool);
fn set_placement(&self, window_placement: CornerType);
fn set_policy(
        &self,
        hscrollbar_policy: PolicyType,
        vscrollbar_policy: PolicyType
    );
fn set_propagate_natural_height(&self, propagate: bool);
fn set_propagate_natural_width(&self, propagate: bool);
fn set_shadow_type(&self, type_: ShadowType);
fn set_vadjustment<P: IsA<Adjustment>>(&self, vadjustment: Option<&P>);
fn unset_placement(&self);
fn get_property_hscrollbar_policy(&self) -> PolicyType;
fn set_property_hscrollbar_policy(&self, hscrollbar_policy: PolicyType);
fn get_property_vscrollbar_policy(&self) -> PolicyType;
fn set_property_vscrollbar_policy(&self, vscrollbar_policy: PolicyType);
fn get_property_window_placement(&self) -> CornerType;
fn set_property_window_placement(&self, window_placement: CornerType);
fn connect_edge_overshot<F: Fn(&Self, PositionType) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_edge_reached<F: Fn(&Self, PositionType) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_move_focus_out<F: Fn(&Self, DirectionType) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn emit_move_focus_out(&self, direction_type: DirectionType);
fn connect_scroll_child<F: Fn(&Self, ScrollType, bool) -> bool + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn emit_scroll_child(&self, scroll: ScrollType, horizontal: bool) -> bool;
fn connect_property_hadjustment_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_hscrollbar_policy_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_kinetic_scrolling_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_max_content_height_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_max_content_width_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_min_content_height_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_min_content_width_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_overlay_scrolling_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_propagate_natural_height_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_propagate_natural_width_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_shadow_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_vadjustment_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_vscrollbar_policy_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_window_placement_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all ScrolledWindow methods.

Implementors

PlacesSidebar, ScrolledWindow

Required methods

fn get_capture_button_press(&self) -> bool

Return whether button presses are captured during kinetic scrolling. See ScrolledWindowExt::set_capture_button_press.

Returns

true if button presses are captured during kinetic scrolling

fn get_hadjustment(&self) -> Option<Adjustment>

Returns the horizontal scrollbar’s adjustment, used to connect the horizontal scrollbar to the child widget’s horizontal scroll functionality.

Returns

the horizontal Adjustment

fn get_hscrollbar(&self) -> Option<Widget>

Returns the horizontal scrollbar of self.

Returns

the horizontal scrollbar of the scrolled window.

fn get_kinetic_scrolling(&self) -> bool

Returns the specified kinetic scrolling behavior.

Returns

the scrolling behavior flags.

fn get_max_content_height(&self) -> i32

Returns the maximum content height set.

Feature: v3_22

Returns

the maximum content height, or -1

fn get_max_content_width(&self) -> i32

Returns the maximum content width set.

Feature: v3_22

Returns

the maximum content width, or -1

fn get_min_content_height(&self) -> i32

Gets the minimal content height of self, or -1 if not set.

Returns

the minimal content height

fn get_min_content_width(&self) -> i32

Gets the minimum content width of self, or -1 if not set.

Returns

the minimum content width

fn get_overlay_scrolling(&self) -> bool

Returns whether overlay scrolling is enabled for this scrolled window.

Feature: v3_16

Returns

true if overlay scrolling is enabled

fn get_placement(&self) -> CornerType

Gets the placement of the contents with respect to the scrollbars for the scrolled window. See ScrolledWindowExt::set_placement.

Returns

the current placement value.

See also ScrolledWindowExt::set_placement and ScrolledWindowExt::unset_placement.

fn get_policy(&self) -> (PolicyType, PolicyType)

Retrieves the current policy values for the horizontal and vertical scrollbars. See ScrolledWindowExt::set_policy.

hscrollbar_policy

location to store the policy for the horizontal scrollbar, or None

vscrollbar_policy

location to store the policy for the vertical scrollbar, or None

fn get_propagate_natural_height(&self) -> bool

Reports whether the natural height of the child will be calculated and propagated through the scrolled window’s requested natural height.

Feature: v3_22

Returns

whether natural height propagation is enabled.

fn get_propagate_natural_width(&self) -> bool

Reports whether the natural width of the child will be calculated and propagated through the scrolled window’s requested natural width.

Feature: v3_22

Returns

whether natural width propagation is enabled.

fn get_shadow_type(&self) -> ShadowType

Gets the shadow type of the scrolled window. See ScrolledWindowExt::set_shadow_type.

Returns

the current shadow type

fn get_vadjustment(&self) -> Option<Adjustment>

Returns the vertical scrollbar’s adjustment, used to connect the vertical scrollbar to the child widget’s vertical scroll functionality.

Returns

the vertical Adjustment

fn get_vscrollbar(&self) -> Option<Widget>

Returns the vertical scrollbar of self.

Returns

the vertical scrollbar of the scrolled window.

fn set_capture_button_press(&self, capture_button_press: bool)

Changes the behaviour of self with regard to the initial event that possibly starts kinetic scrolling. When capture_button_press is set to true, the event is captured by the scrolled window, and then later replayed if it is meant to go to the child widget.

This should be enabled if any child widgets perform non-reversible actions on Widget::button-press-event. If they don't, and handle additionally handle Widget::grab-broken-event, it might be better to set capture_button_press to false.

This setting only has an effect if kinetic scrolling is enabled.

capture_button_press

true to capture button presses

fn set_hadjustment<P: IsA<Adjustment>>(&self, hadjustment: Option<&P>)

Sets the Adjustment for the horizontal scrollbar.

hadjustment

the Adjustment to use, or None to create a new one

fn set_kinetic_scrolling(&self, kinetic_scrolling: bool)

Turns kinetic scrolling on or off. Kinetic scrolling only applies to devices with source gdk::InputSource::Touchscreen.

kinetic_scrolling

true to enable kinetic scrolling

fn set_max_content_height(&self, height: i32)

Sets the maximum height that self should keep visible. The self will grow up to this height before it starts scrolling the content.

It is a programming error to set the maximum content height to a value smaller than ScrolledWindow:min-content-height.

Feature: v3_22

height

the maximum content height

fn set_max_content_width(&self, width: i32)

Sets the maximum width that self should keep visible. The self will grow up to this width before it starts scrolling the content.

It is a programming error to set the maximum content width to a value smaller than ScrolledWindow:min-content-width.

Feature: v3_22

width

the maximum content width

fn set_min_content_height(&self, height: i32)

Sets the minimum height that self should keep visible. Note that this can and (usually will) be smaller than the minimum size of the content.

It is a programming error to set the minimum content height to a value greater than ScrolledWindow:max-content-height.

height

the minimal content height

fn set_min_content_width(&self, width: i32)

Sets the minimum width that self should keep visible. Note that this can and (usually will) be smaller than the minimum size of the content.

It is a programming error to set the minimum content width to a value greater than ScrolledWindow:max-content-width.

width

the minimal content width

fn set_overlay_scrolling(&self, overlay_scrolling: bool)

Enables or disables overlay scrolling for this scrolled window.

Feature: v3_16

overlay_scrolling

whether to enable overlay scrolling

fn set_placement(&self, window_placement: CornerType)

Sets the placement of the contents with respect to the scrollbars for the scrolled window.

The default is CornerType::TopLeft, meaning the child is in the top left, with the scrollbars underneath and to the right. Other values in CornerType are CornerType::TopRight, CornerType::BottomLeft, and CornerType::BottomRight.

See also ScrolledWindowExt::get_placement and ScrolledWindowExt::unset_placement.

window_placement

position of the child window

fn set_policy(
    &self,
    hscrollbar_policy: PolicyType,
    vscrollbar_policy: PolicyType
)

Sets the scrollbar policy for the horizontal and vertical scrollbars.

The policy determines when the scrollbar should appear; it is a value from the PolicyType enumeration. If PolicyType::Always, the scrollbar is always present; if PolicyType::Never, the scrollbar is never present; if PolicyType::Automatic, the scrollbar is present only if needed (that is, if the slider part of the bar would be smaller than the trough — the display is larger than the page size).

hscrollbar_policy

policy for horizontal bar

vscrollbar_policy

policy for vertical bar

fn set_propagate_natural_height(&self, propagate: bool)

Sets whether the natural height of the child should be calculated and propagated through the scrolled window’s requested natural height.

Feature: v3_22

propagate

whether to propagate natural height

fn set_propagate_natural_width(&self, propagate: bool)

Sets whether the natural width of the child should be calculated and propagated through the scrolled window’s requested natural width.

Feature: v3_22

propagate

whether to propagate natural width

fn set_shadow_type(&self, type_: ShadowType)

Changes the type of shadow drawn around the contents of self.

type_

kind of shadow to draw around scrolled window contents

fn set_vadjustment<P: IsA<Adjustment>>(&self, vadjustment: Option<&P>)

Sets the Adjustment for the vertical scrollbar.

vadjustment

the Adjustment to use, or None to create a new one

fn unset_placement(&self)

Unsets the placement of the contents with respect to the scrollbars for the scrolled window. If no window placement is set for a scrolled window, it defaults to CornerType::TopLeft.

See also ScrolledWindowExt::set_placement and ScrolledWindowExt::get_placement.

fn get_property_hscrollbar_policy(&self) -> PolicyType

fn set_property_hscrollbar_policy(&self, hscrollbar_policy: PolicyType)

fn get_property_vscrollbar_policy(&self) -> PolicyType

fn set_property_vscrollbar_policy(&self, vscrollbar_policy: PolicyType)

fn get_property_window_placement(&self) -> CornerType

fn set_property_window_placement(&self, window_placement: CornerType)

fn connect_edge_overshot<F: Fn(&Self, PositionType) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

The ::edge-overshot signal is emitted whenever user initiated scrolling makes the scrolled window firmly surpass (i.e. with some edge resistance) the lower or upper limits defined by the adjustment in that orientation.

A similar behavior without edge resistance is provided by the ScrolledWindow::edge-reached signal.

Note: The pos argument is LTR/RTL aware, so callers should be aware too if intending to provide behavior on horizontal edges.

Feature: v3_16

pos

edge side that was hit

fn connect_edge_reached<F: Fn(&Self, PositionType) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

The ::edge-reached signal is emitted whenever user-initiated scrolling makes the scrolled window exactly reach the lower or upper limits defined by the adjustment in that orientation.

A similar behavior with edge resistance is provided by the ScrolledWindow::edge-overshot signal.

Note: The pos argument is LTR/RTL aware, so callers should be aware too if intending to provide behavior on horizontal edges.

Feature: v3_16

pos

edge side that was reached

fn connect_move_focus_out<F: Fn(&Self, DirectionType) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

The ::move-focus-out signal is a [keybinding signal][BindingSignal] which gets emitted when focus is moved away from the scrolled window by a keybinding. The Widget::move-focus signal is emitted with direction_type on this scrolled window’s toplevel parent in the container hierarchy. The default bindings for this signal are Ctrl + Tab to move forward and Ctrl + Shift + Tab to move backward.

direction_type

either DirectionType::TabForward or DirectionType::TabBackward

fn emit_move_focus_out(&self, direction_type: DirectionType)

fn connect_scroll_child<F: Fn(&Self, ScrollType, bool) -> bool + 'static>(
    &self,
    f: F
) -> SignalHandlerId

The ::scroll-child signal is a [keybinding signal][BindingSignal] which gets emitted when a keybinding that scrolls is pressed. The horizontal or vertical adjustment is updated which triggers a signal that the scrolled window’s child may listen to and scroll itself.

scroll

a ScrollType describing how much to scroll

horizontal

whether the keybinding scrolls the child horizontally or not

fn emit_scroll_child(&self, scroll: ScrollType, horizontal: bool) -> bool

fn connect_property_hadjustment_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_hscrollbar_policy_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_kinetic_scrolling_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_max_content_height_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_max_content_width_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_min_content_height_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_min_content_width_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_overlay_scrolling_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_propagate_natural_height_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_propagate_natural_width_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_shadow_type_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_vadjustment_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_vscrollbar_policy_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_window_placement_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<ScrolledWindow>> ScrolledWindowExt for O[src]

Loading content...