MCPcopy Create free account

hub / github.com/5ocworkshop/ratatui-notifications / functions

Functions445 in github.com/5ocworkshop/ratatui-notifications

↓ 122 callersMethodbuild
Builds the notification, validating content size. # Returns `Ok(Notification)` if validation passes `Err(NotificationError::ContentTooLarge)` if con
src/notifications/classes/cls_notification.rs:481
↓ 59 callersMethodadd
Adds a notification and returns its unique ID. If max_concurrent limit is reached for the notification's anchor, applies the configured overflow beha
src/notifications/orc_manager.rs:133
↓ 54 callersMethodanchor
Returns the notification's anchor position.
src/notifications/classes/cls_notification.rs:138
↓ 53 callersMethodborder_type
Returns the border type.
src/notifications/classes/cls_notification.rs:193
↓ 50 callersMethodtitle
Returns the notification's title, if set.
src/notifications/classes/cls_notification.rs:128
↓ 37 callersFunctioncalculate_rect
Calculate the final rectangular area for a notification. Given an anchor point, anchor position, dimensions, frame area, and exterior padding, this f
src/notifications/functions/fnc_calculate_rect.rs:42
↓ 37 callersFunctiongenerate_code
Generates Rust code to recreate the given notification configuration. Only includes non-default values in the output to keep code minimal. The genera
src/notifications/functions/fnc_generate_code.rs:39
↓ 37 callersMethodlevel
Returns the notification's severity level.
src/notifications/classes/cls_notification.rs:133
↓ 30 callersMethodadd_log
(&mut self, message: impl Into<String>)
examples/demo.rs:109
↓ 28 callersMethodtiming
Sets the animation timings. # Arguments `slide_in` - Duration for slide-in animation `dwell` - Duration notification remains visible `slide_out` - D
src/notifications/classes/cls_notification.rs:352
↓ 23 callersFunctioncreate_test_notification
Helper to create a simple notification for testing
tests/test_orc_manager.rs:14
↓ 22 callersFunctioninterpolate_color
Interpolates between two colors using eased RGB lerp if possible, otherwise snaps at midpoint. # Arguments `from` - The starting color `to` - The en
src/notifications/functions/fnc_fade_interpolate_color.rs:37
↓ 21 callersFunctionresolve_styles
Resolves the final styles for block, border, and title based on level and custom overrides. # Arguments `level` - Optional notification level that d
src/notifications/functions/fnc_resolve_styles.rs:41
↓ 19 callersFunctioncalculate_anchor_position
Calculate the anchor position within a frame area. Given an anchor point and a frame area, this function returns the exact position (x, y) that corre
src/notifications/functions/fnc_calculate_anchor_position.rs:34
↓ 18 callersMethodtick
Updates all notification animations. Call this once per frame with the elapsed time since the last update. # Arguments `delta` - Time elapsed since
src/notifications/orc_manager.rs:214
↓ 17 callersMethodanimation
Returns the notification's animation type.
src/notifications/classes/cls_notification.rs:143
↓ 17 callersMethodinterpolate_frame_foreground
( &self, base_fg: Option<Color>, _phase: AnimationPhase, _prog
tests/notifications/traits/test_animation_handler.rs:34
↓ 17 callersMethodslide_direction
Returns the notification's slide direction.
src/notifications/classes/cls_notification.rs:148
↓ 15 callersMethodborder_style
Sets border style. # Arguments `style` - Border style
src/notifications/classes/cls_notification.rs:416
↓ 15 callersFunctioncreate_test_notification
(animation: Animation)
tests/notifications/functions/test_fnc_update_states.rs:14
↓ 15 callersMethodmax_size
Sets maximum size constraints. # Arguments `width` - Maximum width constraint `height` - Maximum height constraint
src/notifications/classes/cls_notification.rs:375
↓ 14 callersMethodpadding
Returns the inner padding.
src/notifications/classes/cls_notification.rs:183
↓ 13 callersFunctionslide_offscreen_position
Calculates the default off-screen starting/ending coordinates for sliding. This function determines where the notification should start (when sliding
src/notifications/functions/fnc_slide_offscreen_position.rs:43
↓ 12 callersMethodauto_dismiss
Returns the auto-dismiss configuration.
src/notifications/classes/cls_notification.rs:168
↓ 12 callersFunctioncreate_test_notification
()
src/notifications/classes/cls_notification_state.rs:406
↓ 12 callersMethodwith_created_at
(mut self, created_at: Instant)
tests/test_orc_stacking.rs:35
↓ 11 callersFunctioncalculate_size
Calculates the size of a notification based on its content and constraints. This function determines the width and height needed to display a notific
src/notifications/functions/fnc_calculate_size.rs:38
↓ 11 callersMethodfade
Enables or disables fade effect. # Arguments `enable` - Whether to apply fade effect during animation
src/notifications/classes/cls_notification.rs:466
↓ 11 callersMethodinterpolate_content_foreground
( &self, _base_fg: Option<Color>, phase: AnimationPhase, progr
tests/notifications/traits/test_animation_handler.rs:43
↓ 11 callersMethodmax_concurrent
Sets the maximum number of concurrent notifications per anchor. # Arguments `max` - Maximum concurrent notifications (None = unlimited) # Example ``
src/notifications/orc_manager.rs:91
↓ 9 callersFunctioncalculate_stacking_positions
Calculate stacking positions for notifications at a given anchor. This function implements the core stacking algorithm: 1. Filters to visible notific
src/notifications/orc_stacking.rs:63
↓ 9 callersMethoddemo_position
(&mut self, anchor: Anchor)
examples/demo.rs:131
↓ 9 callersMethodoverflow
Sets the overflow behavior when max_concurrent is reached. # Arguments `behavior` - Overflow behavior (DiscardOldest or DiscardNewest) # Example ```
src/notifications/orc_manager.rs:108
↓ 9 callersFunctionslide_calculate_rect
( full_rect: Rect, frame_area: Rect, progress: f32, phase: AnimationPhase, anchor: Anchor,
src/notifications/functions/fnc_slide_calculate_rect.rs:54
↓ 8 callersMethodentry_position
Sets custom entry position. # Arguments `position` - Custom position for notification entry
src/notifications/classes/cls_notification.rs:446
↓ 8 callersMethodexit_position
Sets custom exit position. # Arguments `position` - Custom position for notification exit
src/notifications/classes/cls_notification.rs:456
↓ 8 callersMethodmargin
Sets exterior margin. # Arguments `margin` - Margin from screen edge
src/notifications/classes/cls_notification.rs:396
↓ 8 callersFunctionslide_apply_border_effect
( block: Block<'a>, anchor: Anchor, slide_direction_cfg: SlideDirection, progress: f32, ph
src/notifications/functions/fnc_slide_apply_border_effect.rs:64
↓ 8 callersMethodstyle
Sets block style. # Arguments `style` - Overall block style
src/notifications/classes/cls_notification.rs:406
↓ 7 callersFunctionget_level_icon
Returns the icon string for a given notification level. # Arguments `level` - Optional notification level # Returns `Some(&'static str)` - The ico
src/notifications/functions/fnc_get_level_icon.rs:36
↓ 7 callersFunctionlerp
(start: f32, end: f32, t: f32)
src/shared_utils/math/fnc_lerp.rs:26
↓ 4 callersMethoddemo_specific_slide
(&mut self, anchor: Anchor, direction: SlideDirection)
examples/demo.rs:454
↓ 4 callersMethodmax_height
Returns the maximum height constraint.
src/notifications/classes/cls_notification.rs:178
↓ 4 callersMethodnext_demo_content
(&mut self, items: &[T])
examples/demo.rs:121
↓ 4 callersMethodrender
Renders all active notifications to the frame. # Arguments `frame` - The frame to render to `area` - The area to render within # Example ```no_run u
src/notifications/orc_manager.rs:261
↓ 4 callersMethodtitle_style
Sets title style. # Arguments `style` - Title text style
src/notifications/classes/cls_notification.rs:426
↓ 3 callersMethodcalculate_rect
(&self, state: &MockNotificationState, frame_area: Rect)
tests/notifications/traits/test_animation_handler.rs:71
↓ 3 callersFunctionformat_timing
Formats a Timing value as Rust code.
src/notifications/functions/fnc_generate_code.rs:166
↓ 3 callersMethodmax_width
Returns the maximum width constraint.
src/notifications/classes/cls_notification.rs:173
↓ 3 callersFunctionresolve_slide_direction
Resolves the actual slide direction based on config and anchor. When `SlideDirection::Default` is specified, this function determines the appropriate
src/notifications/functions/fnc_slide_resolve_direction.rs:42
↓ 2 callersFunctioncolor_to_rgb
(color: Option<Color>)
src/shared_utils/math/fnc_color_to_rgb.rs:31
↓ 2 callersMethodcontent
Returns the notification's content text.
src/notifications/classes/cls_notification.rs:123
↓ 2 callersMethodcurrent_phase
(&self)
src/notifications/classes/cls_notification_state.rs:226
↓ 2 callersMethoddwell_timing
Returns the dwell timing configuration.
src/notifications/classes/cls_notification.rs:158
↓ 2 callersFunctionescape_string
Escapes a string for use in Rust code.
src/notifications/functions/fnc_generate_code.rs:157
↓ 2 callersMethodfade_effect
Returns whether fade effect is enabled.
src/notifications/classes/cls_notification.rs:208
↓ 2 callersMethodremove
Removes a notification by ID. # Arguments `id` - The notification ID to remove # Returns `true` - If the notification existed and was removed `false
src/notifications/orc_manager.rs:171
↓ 2 callersMethodslide_in_timing
Returns the slide-in timing configuration.
src/notifications/classes/cls_notification.rs:153
↓ 2 callersMethodslide_out_timing
Returns the slide-out timing configuration.
src/notifications/classes/cls_notification.rs:163
↓ 2 callersMethodupdate
Updates the notification state based on elapsed time. Advances animation phases and progress based on timing configuration. Entry/exit animations use
src/notifications/classes/cls_notification_state.rs:143
↓ 1 callersFunctionaccepts_animation_handler
This test verifies that the trait compiles with the expected signatures
tests/notifications/traits/test_animation_handler.rs:169
↓ 1 callersMethodanimation_progress
(&self)
src/notifications/classes/cls_notification_state.rs:273
↓ 1 callersMethodapply_animation_block_effect
( &self, block: ratatui::widgets::Block<'a>, frame_area: ratatui::prelude::Rect,
src/notifications/classes/cls_notification_state.rs:332
↓ 1 callersMethodapply_block_effect
( &self, block: Block<'a>, _state: &MockNotificationState, _fr
tests/notifications/traits/test_animation_handler.rs:24
↓ 1 callersFunctionapply_fade_if_needed
Helper to apply fade effect if needed
src/notifications/orc_render.rs:157
↓ 1 callersMethodblock_style
(&self)
src/notifications/classes/cls_notification_state.rs:277
↓ 1 callersMethodcalculate_animation_rect
(&self, frame_area: ratatui::prelude::Rect)
src/notifications/classes/cls_notification_state.rs:297
↓ 1 callersMethodcalculate_content_size
(&self, frame_area: ratatui::prelude::Rect)
src/notifications/classes/cls_notification_state.rs:242
↓ 1 callersMethodclear
Removes all notifications. # Example ```no_run use ratatui_notifications::notifications::Notifications; let mut manager = Notifications::new(); // .
src/notifications/orc_manager.rs:194
↓ 1 callersMethodcreated_at
(&self)
src/notifications/classes/cls_notification_state.rs:230
↓ 1 callersMethodcustom_entry_position
Returns the custom entry position.
src/notifications/classes/cls_notification.rs:198
↓ 1 callersMethodcustom_exit_position
Returns the custom exit position.
src/notifications/classes/cls_notification.rs:203
↓ 1 callersMethodcycle_border
(&mut self)
examples/demo.rs:573
↓ 1 callersMethoddemo_all_levels
(&mut self)
examples/demo.rs:370
↓ 1 callersMethoddemo_combined_effects
(&mut self)
examples/demo.rs:423
↓ 1 callersMethoddemo_custom_path
(&mut self)
examples/demo.rs:490
↓ 1 callersMethoddemo_error
(&mut self)
examples/demo.rs:337
↓ 1 callersMethoddemo_expand
(&mut self)
examples/demo.rs:193
↓ 1 callersMethoddemo_fade
(&mut self)
examples/demo.rs:218
↓ 1 callersMethoddemo_file_path
(&mut self)
examples/demo.rs:252
↓ 1 callersMethoddemo_overflow
(&mut self)
examples/demo.rs:541
↓ 1 callersMethoddemo_slide_directions
(&mut self)
examples/demo.rs:162
↓ 1 callersMethoddemo_stacking
(&mut self)
examples/demo.rs:400
↓ 1 callersMethoddemo_success
(&mut self)
examples/demo.rs:281
↓ 1 callersMethoddemo_warning
(&mut self)
examples/demo.rs:310
↓ 1 callersFunctionease_in_quad
(t: f32)
src/shared_utils/math/fnc_ease_in_quad.rs:26
↓ 1 callersFunctionease_out_quad
(t: f32)
src/shared_utils/math/fnc_ease_out_quad.rs:26
↓ 1 callersMethodenforce_limit
Enforces max_concurrent limit for the given anchor. Removes oldest or newest notification as needed based on overflow behavior.
src/notifications/orc_manager.rs:268
↓ 1 callersMethodexterior_margin
Returns the exterior margin.
src/notifications/classes/cls_notification.rs:188
↓ 1 callersMethodexterior_padding
(&self)
src/notifications/classes/cls_notification_state.rs:238
↓ 1 callersFunctionfind_available_filename
Find an available filename by incrementing a counter if the file exists. Returns "notification_example.rs", "notification_example_1.rs", etc.
examples/cookbook.rs:35
↓ 1 callersFunctionfind_available_filename
Find an available filename by incrementing a counter if the file exists. Returns "notification_example.rs", "notification_example_1.rs", etc.
examples/demo.rs:31
↓ 1 callersMethodfind_newest_at_anchor
Finds the newest notification at the given anchor.
src/notifications/orc_manager.rs:303
↓ 1 callersMethodfind_oldest_at_anchor
Finds the oldest notification at the given anchor.
src/notifications/orc_manager.rs:289
↓ 1 callersFunctionformat_duration_as_timing
Formats a Duration as Timing::Fixed code.
src/notifications/functions/fnc_generate_code.rs:174
↓ 1 callersMethodfull_rect
(&self)
src/notifications/classes/cls_notification_state.rs:234
↓ 1 callersFunctionget_border_set
Helper to get border set from border type
src/notifications/orc_render.rs:213
↓ 1 callersMethodinterpolate_content_foreground
Calculates the interpolated foreground color for content text (White <-> Black). # Arguments `_base_fg` - The base foreground color (ignored for con
src/notifications/functions/fnc_fade_interpolate_color.rs:129
↓ 1 callersMethodinterpolate_frame_foreground
Calculates the interpolated foreground color for frame elements (borders, titles). # Arguments `base_fg` - The base foreground color `phase` - The c
src/notifications/functions/fnc_fade_interpolate_color.rs:99
↓ 1 callersMethodon_tick
(&mut self)
examples/cookbook.rs:296
next →1–100 of 445, ranked by callers