pub struct RawScrollbarState { /* private fields */ }Expand description
The state for a RawScrollbar widget.
Implementations§
Source§impl RawScrollbarState
impl RawScrollbarState
Sourcepub fn scrollbar_painter<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &App,
) -> Handle<ScrollbarPainter>where
S::Widget: RawScrollbarLeaf,
pub fn scrollbar_painter<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &App,
) -> Handle<ScrollbarPainter>where
S::Widget: RawScrollbarLeaf,
Used to paint the scrollbar.
Can be customized by subclasses to change scrollbar behavior by overriding
RawScrollbarStateLeaf::update_scrollbar_painter.
Sourcepub fn fadeout_animation_controller<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &App,
) -> Handle<AnimationController>where
S::Widget: RawScrollbarLeaf,
pub fn fadeout_animation_controller<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &App,
) -> Handle<AnimationController>where
S::Widget: RawScrollbarLeaf,
The fade animation controller; Dart’s _fadeoutAnimationController.
Sourcepub fn init_state<S: RawScrollbarStateLeaf>(this: Handle<S>, app: &mut App)where
S::Widget: RawScrollbarLeaf,
pub fn init_state<S: RawScrollbarStateLeaf>(this: Handle<S>, app: &mut App)where
S::Widget: RawScrollbarLeaf,
Dart’s initState, which a leaf’s State::init_state calls.
Sourcepub fn did_change_dependencies<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
)where
S::Widget: RawScrollbarLeaf,
pub fn did_change_dependencies<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
)where
S::Widget: RawScrollbarLeaf,
Dart’s didChangeDependencies, which a leaf’s State::did_change_dependencies
calls.
Sourcepub fn update_scrollbar_painter<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
)where
S::Widget: RawScrollbarLeaf,
pub fn update_scrollbar_painter<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
)where
S::Widget: RawScrollbarLeaf,
Dart’s updateScrollbarPainter, which a leaf’s
RawScrollbarStateLeaf::update_scrollbar_painter calls.
Sourcepub fn did_update_widget<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
old_widget: &S::Widget,
)where
S::Widget: RawScrollbarLeaf,
pub fn did_update_widget<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
old_widget: &S::Widget,
)where
S::Widget: RawScrollbarLeaf,
Dart’s didUpdateWidget, which a leaf’s State::did_update_widget calls.
Sourcepub fn handle_thumb_press<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
)where
S::Widget: RawScrollbarLeaf,
pub fn handle_thumb_press<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
)where
S::Widget: RawScrollbarLeaf,
Dart’s handleThumbPress, which a leaf’s
RawScrollbarStateLeaf::handle_thumb_press calls.
Sourcepub fn handle_thumb_press_start<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
local_position: Offset,
)where
S::Widget: RawScrollbarLeaf,
pub fn handle_thumb_press_start<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
local_position: Offset,
)where
S::Widget: RawScrollbarLeaf,
Dart’s handleThumbPressStart, which a leaf’s
RawScrollbarStateLeaf::handle_thumb_press_start calls.
Sourcepub fn handle_thumb_press_update<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
local_position: Offset,
)where
S::Widget: RawScrollbarLeaf,
pub fn handle_thumb_press_update<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
local_position: Offset,
)where
S::Widget: RawScrollbarLeaf,
Dart’s handleThumbPressUpdate, which a leaf’s
RawScrollbarStateLeaf::handle_thumb_press_update calls.
Sourcepub fn handle_thumb_press_end<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
local_position: Offset,
velocity: Velocity,
)where
S::Widget: RawScrollbarLeaf,
pub fn handle_thumb_press_end<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
local_position: Offset,
velocity: Velocity,
)where
S::Widget: RawScrollbarLeaf,
Dart’s handleThumbPressEnd, which a leaf’s
RawScrollbarStateLeaf::handle_thumb_press_end calls.
Sourcepub fn handle_track_tap_down<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
details: TapDownDetails,
)where
S::Widget: RawScrollbarLeaf,
pub fn handle_track_tap_down<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
details: TapDownDetails,
)where
S::Widget: RawScrollbarLeaf,
Dart’s handleTrackTapDown, which a leaf’s
RawScrollbarStateLeaf::handle_track_tap_down calls.
Sourcepub fn is_pointer_over_track<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
position: Offset,
kind: PointerDeviceKind,
) -> boolwhere
S::Widget: RawScrollbarLeaf,
pub fn is_pointer_over_track<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
position: Offset,
kind: PointerDeviceKind,
) -> boolwhere
S::Widget: RawScrollbarLeaf,
Returns true if the provided Offset is located over the track of the scrollbar.
Excludes the scrollbar thumb.
Sourcepub fn is_pointer_over_thumb<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
position: Offset,
kind: PointerDeviceKind,
) -> boolwhere
S::Widget: RawScrollbarLeaf,
pub fn is_pointer_over_thumb<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
position: Offset,
kind: PointerDeviceKind,
) -> boolwhere
S::Widget: RawScrollbarLeaf,
Returns true if the provided Offset is located over the thumb of the scrollbar.
Sourcepub fn is_pointer_over_scrollbar<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
position: Offset,
kind: PointerDeviceKind,
) -> boolwhere
S::Widget: RawScrollbarLeaf,
pub fn is_pointer_over_scrollbar<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
position: Offset,
kind: PointerDeviceKind,
) -> boolwhere
S::Widget: RawScrollbarLeaf,
Returns true if the provided Offset is located over the track or thumb of the
scrollbar.
The hit test area for mouse hovering over the scrollbar is larger than regular hit testing. This is to make it easier to interact with the scrollbar and present it to the mouse for interaction based on proximity.
Sourcepub fn handle_hover<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
event: &PointerHoverEvent,
)where
S::Widget: RawScrollbarLeaf,
pub fn handle_hover<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
event: &PointerHoverEvent,
)where
S::Widget: RawScrollbarLeaf,
Dart’s handleHover, which a leaf’s RawScrollbarStateLeaf::handle_hover calls.
Sourcepub fn handle_hover_exit<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
)where
S::Widget: RawScrollbarLeaf,
pub fn handle_hover_exit<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
)where
S::Widget: RawScrollbarLeaf,
Dart’s handleHoverExit, which a leaf’s
RawScrollbarStateLeaf::handle_hover_exit calls.
Sourcepub fn dispose<S: RawScrollbarStateLeaf>(this: Handle<S>, app: &mut App)where
S::Widget: RawScrollbarLeaf,
pub fn dispose<S: RawScrollbarStateLeaf>(this: Handle<S>, app: &mut App)where
S::Widget: RawScrollbarLeaf,
Dart’s dispose, which a leaf’s State::dispose calls.
Sourcepub fn build<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
_context: BuildContext,
) -> WidgetRefwhere
S::Widget: RawScrollbarLeaf,
pub fn build<S: RawScrollbarStateLeaf>(
this: Handle<S>,
app: &mut App,
_context: BuildContext,
) -> WidgetRefwhere
S::Widget: RawScrollbarLeaf,
Dart’s build, which a leaf’s State::build calls.
Trait Implementations§
Source§impl Debug for RawScrollbarState
impl Debug for RawScrollbarState
Source§impl RawScrollbarStateLeaf for RawScrollbarState
impl RawScrollbarStateLeaf for RawScrollbarState
Source§fn raw_scrollbar_state_data(
self: Handle<Self>,
app: &App,
) -> &RawScrollbarStateData
fn raw_scrollbar_state_data( self: Handle<Self>, app: &App, ) -> &RawScrollbarStateData
Source§fn raw_scrollbar_state_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut RawScrollbarStateData
fn raw_scrollbar_state_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut RawScrollbarStateData
RawScrollbarStateData bag, mutably.Source§fn raw_scrollbar_state_bag(&mut self) -> &mut RawScrollbarStateData
fn raw_scrollbar_state_bag(&mut self) -> &mut RawScrollbarStateData
RawScrollbarStateData bag of a state the framework already holds mutably,
which is what a set_state closure gets.Source§fn show_scrollbar(self: Handle<Self>, app: &mut App) -> bool
fn show_scrollbar(self: Handle<Self>, app: &mut App) -> bool
Source§fn enable_gestures(self: Handle<Self>, app: &mut App) -> bool
fn enable_gestures(self: Handle<Self>, app: &mut App) -> bool
Source§fn update_scrollbar_painter(self: Handle<Self>, app: &mut App)
fn update_scrollbar_painter(self: Handle<Self>, app: &mut App)
scrollbar_painter according to the widget’s
properties and any inherited widgets the painter depends on, like Directionality
and MediaQuery. Read moreSource§fn get_scrollbar_direction(self: Handle<Self>, app: &App) -> Option<Axis>
fn get_scrollbar_direction(self: Handle<Self>, app: &App) -> Option<Axis>
Axis of the child scroll view, or None if we haven’t seen
a scroll metrics notification yet.Source§fn handle_thumb_press(self: Handle<Self>, app: &mut App)
fn handle_thumb_press(self: Handle<Self>, app: &mut App)
Source§fn handle_thumb_press_start(
self: Handle<Self>,
app: &mut App,
local_position: Offset,
)
fn handle_thumb_press_start( self: Handle<Self>, app: &mut App, local_position: Offset, )
Source§fn handle_thumb_press_update(
self: Handle<Self>,
app: &mut App,
local_position: Offset,
)
fn handle_thumb_press_update( self: Handle<Self>, app: &mut App, local_position: Offset, )
Source§fn handle_thumb_press_end(
self: Handle<Self>,
app: &mut App,
local_position: Offset,
velocity: Velocity,
)
fn handle_thumb_press_end( self: Handle<Self>, app: &mut App, local_position: Offset, velocity: Velocity, )
Source§fn handle_track_tap_down(
self: Handle<Self>,
app: &mut App,
details: TapDownDetails,
)
fn handle_track_tap_down( self: Handle<Self>, app: &mut App, details: TapDownDetails, )
Source§fn handle_hover(self: Handle<Self>, app: &mut App, event: &PointerHoverEvent)
fn handle_hover(self: Handle<Self>, app: &mut App, event: &PointerHoverEvent)
Source§impl State for RawScrollbarState
impl State for RawScrollbarState
Source§type Widget = RawScrollbar
type Widget = RawScrollbar
State<T> type argument.Source§fn state_data(self: Handle<Self>, app: &App) -> &StateData<Self::Widget>
fn state_data(self: Handle<Self>, app: &App) -> &StateData<Self::Widget>
state
(state_accessors!).Source§fn state_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut StateData<Self::Widget>
fn state_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut StateData<Self::Widget>
state_data.Source§fn init_state(self: Handle<Self>, app: &mut App)
fn init_state(self: Handle<Self>, app: &mut App)
Source§fn did_change_dependencies(self: Handle<Self>, app: &mut App)
fn did_change_dependencies(self: Handle<Self>, app: &mut App)
Source§fn did_update_widget(
self: Handle<Self>,
app: &mut App,
old_widget: &RawScrollbar,
)
fn did_update_widget( self: Handle<Self>, app: &mut App, old_widget: &RawScrollbar, )
Source§fn dispose(self: Handle<Self>, app: &mut App)
fn dispose(self: Handle<Self>, app: &mut App)
Source§fn activate(self: Handle<Self>, app: &mut App)
fn activate(self: Handle<Self>, app: &mut App)
deactivate. Read moreSource§fn build(self: Handle<Self>, app: &mut App, context: BuildContext) -> WidgetRef
fn build(self: Handle<Self>, app: &mut App, context: BuildContext) -> WidgetRef
Source§fn widget(self: Handle<Self>, app: &App) -> &Self::Widget
fn widget(self: Handle<Self>, app: &App) -> &Self::Widget
Source§fn context(self: Handle<Self>, app: &App) -> BuildContext
fn context(self: Handle<Self>, app: &App) -> BuildContext
Source§fn set_state(self: Handle<Self>, app: &mut App, f: impl FnOnce(&mut Self))
fn set_state(self: Handle<Self>, app: &mut App, f: impl FnOnce(&mut Self))
Source§fn deactivate(self: Handle<Self>, app: &mut App)
fn deactivate(self: Handle<Self>, app: &mut App)
Source§fn debug_fill_properties(
self: Handle<Self>,
app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( self: Handle<Self>, app: &App, properties: &mut DiagnosticPropertiesBuilder, )
debugFillProperties: the properties this state shows where its element’s dump
names it (state: ScrollableState#1a2b3(offset: 0.0)), after the lifecycle and mounting
properties State’s base adds, which the framework adds first.Source§impl TickerProviderObject for RawScrollbarState
impl TickerProviderObject for RawScrollbarState
Source§fn create_ticker(
self: Handle<Self>,
app: &mut App,
on_tick: TickerCallback,
) -> Ref<Ticker>
fn create_ticker( self: Handle<Self>, app: &mut App, on_tick: TickerCallback, ) -> Ref<Ticker>
Source§impl TickerProviderStateMixin for RawScrollbarState
impl TickerProviderStateMixin for RawScrollbarState
Source§fn ticker_provider_data(
self: Handle<Self>,
app: &App,
) -> &TickerProviderStateMixinData
fn ticker_provider_data( self: Handle<Self>, app: &App, ) -> &TickerProviderStateMixinData
Source§fn ticker_provider_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut TickerProviderStateMixinData
fn ticker_provider_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut TickerProviderStateMixinData
ticker_provider_data.Source§fn debug_fill_properties(
self: Handle<Self>,
app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( self: Handle<Self>, app: &App, properties: &mut DiagnosticPropertiesBuilder, )
TickerProviderStateMixin.debugFillProperties, which a state’s own body calls
where Dart’s mixin adds its line.Source§fn create_ticker(
self: Handle<Self>,
app: &mut App,
on_tick: TickerCallback,
) -> Ref<Ticker>
fn create_ticker( self: Handle<Self>, app: &mut App, on_tick: TickerCallback, ) -> Ref<Ticker>
TickerProvider::create_ticker: creates a ticker with the given callback.