Skip to main content

SystemState

Struct SystemState 

Source
pub struct SystemState {
Show 46 fields pub user: UserState, pub(crate) file_history: FileHistory, pub(crate) translators: TranslatorList, pub channels: Channels, pub(crate) progress_tracker: Option<LoadProgress>, pub(crate) command_prompt: CommandPrompt, pub(crate) context: Option<Arc<Context>>, pub(crate) batch_messages: VecDeque<Message>, pub(crate) batch_messages_completed: bool, pub(crate) wcp_server_thread: Option<JoinHandle<()>>, pub(crate) wcp_server_address: Option<String>, pub(crate) wcp_stop_signal: Arc<AtomicBool>, pub(crate) wcp_running_signal: Arc<AtomicBool>, pub(crate) wcp_greeted_signal: Arc<AtomicBool>, pub(crate) wcp_client_capabilities: WcpClientCapabilities, pub(crate) draw_data: RefCell<Vec<Option<CachedDrawData>>>, pub(crate) variable_name_info_cache: RefCell<HashMap<VariableRef, Option<VariableNameInfo>>>, pub(crate) translator_generation: u64, pub(crate) all_variable_rows_cache: Option<(AllVariableCacheKey, Rc<Vec<VariableListRow>>)>, pub(crate) gesture_start_location: Option<Pos2>, pub(crate) gesture_start_time: Option<BigInt>, pub(crate) measure_start_location: Option<Pos2>, pub(crate) annotation_kind: Option<AnnotationKind>, pub(crate) url: RefCell<String>, pub(crate) command_prompt_text: RefCell<String>, pub(crate) last_canvas_rect: RefCell<Option<Rect>>, pub(crate) surver_selected_file: RefCell<Option<usize>>, pub(crate) surver_load_options: RefCell<LoadOptions>, pub(crate) items_to_expand: RefCell<Vec<(DisplayedItemRef, usize)>>, pub(crate) char_to_add_to_prompt: RefCell<Option<char>>, pub scope_ref_to_expand: RefCell<Option<ScopeExpandType>>, pub(crate) time_widget: RefCell<TimeInputState>, pub(crate) time_edit_focused: bool, pub(crate) request_time_edit_focus: bool, pub(crate) frame_buffer_content: Option<FrameBufferContent>, pub(crate) frame_buffer_array_cache: Option<FrameBufferArrayCache>, pub(crate) frame_buffer_pixel_cache: Option<FrameBufferPixelCache>, pub(crate) continuous_redraw: bool, pub(crate) rendering_cpu_times: VecDeque<f32>, pub(crate) timing: RefCell<Timing>, pub(crate) undo_stack: Vec<CanvasState>, pub(crate) redo_stack: Vec<CanvasState>, pub(crate) url_callback: Option<Box<dyn Fn(String) -> Message + Send + 'static>>, pub(crate) expand_parameter_section: bool, pub(crate) annotation_id_source: u64, pub(crate) click_handled: bool,
}

Fields§

§user: UserState§file_history: FileHistory§translators: TranslatorList

Which translator to use for each variable

§channels: Channels

Channels for messages generated by other threads

§progress_tracker: Option<LoadProgress>

Tracks progress of file/variable loading operations.

§command_prompt: CommandPrompt

Buffer for the command input

§context: Option<Arc<Context>>

The context to egui, we need this to change the visual settings when the config is reloaded

§batch_messages: VecDeque<Message>

List of batch messages which will executed as soon as possible

§batch_messages_completed: bool§wcp_server_thread: Option<JoinHandle<()>>

The WCP server

§wcp_server_address: Option<String>§wcp_stop_signal: Arc<AtomicBool>§wcp_running_signal: Arc<AtomicBool>§wcp_greeted_signal: Arc<AtomicBool>§wcp_client_capabilities: WcpClientCapabilities§draw_data: RefCell<Vec<Option<CachedDrawData>>>

The draw commands for every variable currently selected

§variable_name_info_cache: RefCell<HashMap<VariableRef, Option<VariableNameInfo>>>§translator_generation: u64

Monotonically increasing counter incremented when translators reload, to invalidate the all_variable_rows_cache when name info changes without a waveform reload.

§all_variable_rows_cache: Option<(AllVariableCacheKey, Rc<Vec<VariableListRow>>)>

Cached result of build_variable_rows for draw_all_variables; rebuilt only when the key changes (filter settings, wave data, or translator state).

§gesture_start_location: Option<Pos2>§gesture_start_time: Option<BigInt>§measure_start_location: Option<Pos2>§annotation_kind: Option<AnnotationKind>§url: RefCell<String>§command_prompt_text: RefCell<String>§last_canvas_rect: RefCell<Option<Rect>>§surver_selected_file: RefCell<Option<usize>>§surver_load_options: RefCell<LoadOptions>§items_to_expand: RefCell<Vec<(DisplayedItemRef, usize)>>

These items should be expanded into subfields in the next frame. Cleared after each frame

§char_to_add_to_prompt: RefCell<Option<char>>

Character to add to the command prompt if it is visible. This is only needed for presentations at them moment.

§scope_ref_to_expand: RefCell<Option<ScopeExpandType>>§time_widget: RefCell<TimeInputState>§time_edit_focused: bool§request_time_edit_focus: bool§frame_buffer_content: Option<FrameBufferContent>§frame_buffer_array_cache: Option<FrameBufferArrayCache>§frame_buffer_pixel_cache: Option<FrameBufferPixelCache>§continuous_redraw: bool

Invalidate draw commands every frame to make performance comparison easier

§rendering_cpu_times: VecDeque<f32>§timing: RefCell<Timing>§undo_stack: Vec<CanvasState>§redo_stack: Vec<CanvasState>§url_callback: Option<Box<dyn Fn(String) -> Message + Send + 'static>>§expand_parameter_section: bool§annotation_id_source: u64§click_handled: bool

Implementations§

Source§

impl SystemState

Source

pub(crate) fn handle_batch_commands(&mut self)

After user messages are addressed, we try to execute batch commands as they are ready to run

Source

pub(crate) fn can_start_batch_command(&self) -> bool

Returns whether it is OK to start a new batch command.

Source

pub fn add_batch_commands<I: IntoIterator<Item = String>>( &mut self, commands: I, )

Source

pub fn add_batch_messages<I: IntoIterator<Item = Message>>( &mut self, messages: I, )

Source

pub fn add_batch_message(&mut self, msg: Message)

Source

fn parse_batch_commands<I: IntoIterator<Item = String>>( &mut self, cmds: I, ) -> Vec<Message>

Source

pub(crate) fn load_commands_from_url(&mut self, url: String)

Source§

impl SystemState

Source

pub(crate) fn draw_performance_graph( &self, ctx: &Context, msgs: &mut Vec<Message>, )

Source§

impl SystemState

Source

pub(crate) fn get_clock_hightlight_data( &self, clock_edges_by_clock: Vec<(usize, Vec<f32>)>, ) -> ClockHighlightData

Builds cached clock-highlight data for the active highlight mode.

The input uses sparse clock indices so color assignment remains stable relative to original clock order, and active_clock_count is stored for fast rendering decisions.

Source§

impl SystemState

Source

fn sorted_drawing_infos(waves: &WaveData) -> Vec<&ItemDrawingInfo>

Source

pub fn invalidate_draw_commands(&mut self)

Source

pub fn generate_draw_commands( &self, cfg: &DrawConfig, msgs: &mut Vec<Message>, viewport_idx: usize, )

Source

fn generate_wave_draw_commands( &self, waves: &WaveData, cfg: &DrawConfig, msgs: &mut Vec<Message>, viewport_idx: usize, ) -> Option<CachedDrawData>

Source

fn generate_transaction_draw_commands( &self, waves: &WaveData, cfg: &DrawConfig, msgs: &mut Vec<Message>, viewport_idx: usize, ) -> Option<CachedDrawData>

Source

pub fn transform_pos( &self, to_screen: RectTransform, p: Pos2, default_timeline_height: f32, consider_timeline: bool, ) -> Pos2

Source

pub fn get_annotation_offset(&self, default_timeline_height: f32) -> f32

Source

pub fn draw_items( &mut self, ui: &mut Ui, msgs: &mut Vec<Message>, viewport_idx: usize, )

Source

fn draw_wave_data( &self, waves: &WaveData, draw_data: &CachedWaveDrawData, sorted_drawing_infos: &[&ItemDrawingInfo], ctx: &mut DrawingContext<'_>, )

Source

fn draw_transaction_data( &self, waves: &WaveData, draw_data: &CachedTransactionDrawData, viewport_idx: usize, ui: &mut Ui, msgs: &mut Vec<Message>, sorted_drawing_infos: &[&ItemDrawingInfo], ctx: &mut DrawingContext<'_>, )

Source

fn draw_region( &self, ((old_x, prev_region), (new_x, _)): (&(f32, DrawnRegion), &(f32, DrawnRegion)), user_color: Color32, offset: f32, height_scaling_factor: f32, ctx: &mut DrawingContext<'_>, text_color: Color32, )

Source

fn draw_bool_transition( &self, ((old_x, prev_region), (new_x, new_region)): (&(f32, DrawnRegion), &(f32, DrawnRegion)), force_anti_alias: bool, color: Color32, offset: f32, height_scaling_factor: f32, draw_clock_marker: bool, draw_background: bool, ctx: &mut DrawingContext<'_>, )

Source

fn draw_event( &self, (x, prev_region): &(f32, DrawnRegion), color: Color32, offset: f32, height_scaling_factor: f32, ctx: &mut DrawingContext<'_>, )

Source

fn draw_arrow( &self, start: Pos2, end: Pos2, ctx: &DrawingContext<'_>, stroke: &PathStroke, )

Draws a curvy arrow from start to end.

Source

fn draw_arrowheads( &self, vec_start: Pos2, vec_tip: Pos2, ctx: &DrawingContext<'_>, stroke: &PathStroke, )

Draws arrowheads for the vector going from vec_start to vec_tip. The angle has to be in degrees.

Source

fn handle_canvas_context_menu( &self, response: &Response, waves: &WaveData, to_screen: RectTransform, ctx: &mut DrawingContext<'_>, msgs: &mut Vec<Message>, viewport_idx: usize, )

Source

pub fn snap_to_edge( &self, pointer_pos_canvas: Option<Pos2>, waves: &WaveData, frame_width: f32, viewport_idx: usize, ) -> Option<BigInt>

Takes a pointer pos in the canvas and returns a position that is snapped to transitions if the cursor is close enough to any transition. If the cursor is on the canvas and no transitions are close enough for snapping, the raw point will be returned. If the cursor is off the canvas, None is returned

Source

pub fn draw_line( &self, time: &BigInt, ctx: &mut DrawingContext<'_>, viewport_idx: usize, waves: &WaveData, )

Draw a vertical line at the given time position. Used for context menu.

Source§

impl SystemState

Source

pub(crate) fn file_dialog_open<F>( &mut self, title: &'static str, filter: (String, Vec<String>), messages: F, )
where F: FnOnce(PathBuf) -> Vec<Message> + Send + 'static,

Source

pub(crate) fn file_dialog_save<F, Fut>( &mut self, title: &'static str, filter: (String, Vec<String>), default_file_name: Option<String>, messages: F, )
where F: FnOnce(FileHandle) -> Fut + Send + 'static, Fut: Future<Output = Vec<Message>> + Send + 'static,

Source

pub(crate) fn open_file_dialog(&mut self, mode: OpenMode)

Source

pub(crate) fn open_command_file_dialog(&mut self)

Source§

impl SystemState

Source§

impl SystemState

Source

pub fn help_message(&self, ui: &mut Ui)

Source§

impl SystemState

Source

pub fn separate(&mut self, ui: &mut Ui, msgs: &mut Vec<Message>)

Scopes and variables in two separate lists

Source

fn draw_variable_list_header(&self, ui: &mut Ui)

Source

fn draw_variables(&mut self, msgs: &mut Vec<Message>, ui: &mut Ui)

Source

fn draw_parameters( &self, msgs: &mut Vec<Message>, wave_container: &WaveContainer, parameters: &[VariableRef], ui: &mut Ui, )

Source

pub fn tree(&mut self, ui: &mut Ui, msgs: &mut Vec<Message>)

Scopes and variables in a joint tree.

Source

pub fn variable_list(&mut self, ui: &mut Ui, msgs: &mut Vec<Message>)

List with all variables.

Source

fn make_all_variable_cache_key( &self, cache_generation: u64, wave_source: &WaveSource, ) -> AllVariableCacheKey

Source

fn draw_all_variables(&mut self, msgs: &mut Vec<Message>, ui: &mut Ui)

Source

fn draw_all_scopes( &self, msgs: &mut Vec<Message>, wave: &WaveData, draw_variables: bool, ui: &mut Ui, )

Source

fn add_scope_selectable_label( &self, msgs: &mut Vec<Message>, wave: &WaveData, scope: &ScopeRef, ui: &mut Ui, scroll_to_label: bool, )

Source

fn draw_selectable_child_or_orphan_scope( &self, msgs: &mut Vec<Message>, wave: &WaveData, scope: &ScopeRef, draw_variables: bool, ui: &mut Ui, )

Source

fn draw_root_scope_view( &self, msgs: &mut Vec<Message>, wave: &WaveData, root_scope: &ScopeRef, draw_variables: bool, ui: &mut Ui, )

Source

fn filter_and_draw_variable_list( &self, msgs: &mut Vec<Message>, wave_container: &WaveContainer, ui: &mut Ui, variables: &[VariableRef], row_range: Option<&Range<usize>>, )

Source

fn draw_variable_list( &self, msgs: &mut Vec<Message>, wave_container: &WaveContainer, ui: &mut Ui, variables: &[VariableRef], row_range: Option<&Range<usize>>, display_full_path: bool, )

Source

fn build_variable_rows( &self, wave_container: &WaveContainer, variables: &[VariableRef], ) -> Vec<VariableListRow>

Source

fn draw_variable_rows( &self, msgs: &mut Vec<Message>, wave_container: &WaveContainer, ui: &mut Ui, variable_rows: &[VariableListRow], row_range: Option<&Range<usize>>, display_full_path: bool, )

Source

fn should_open_header_and_scroll_to( &self, scope: &ScopeRef, ) -> Option<(bool, bool)>

Source§

impl SystemState

Source

pub fn handle_pressed_keys(&self, ctx: &Context, msgs: &mut Vec<Message>)

Source

pub fn get_count(&self) -> usize

Source§

impl SystemState

Source

pub fn draw_log_window(&self, ctx: &Context, msgs: &mut Vec<Message>)

Source§

impl SystemState

Source

pub fn draw_marker_window( &self, waves: &WaveData, ctx: &Context, msgs: &mut Vec<Message>, )

Source

pub fn draw_marker_boxes( &self, waves: &WaveData, ctx: &mut DrawingContext<'_>, viewport: &Viewport, y_zero: f32, )

Source§

impl SystemState

Source

pub fn add_menu_panel(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

pub fn menu_contents(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

pub fn hierarchy_menu(&self, msgs: &mut Vec<Message>, ui: &mut Ui)

Source

pub fn item_context_menu( &self, path: Option<&FieldRef>, msgs: &mut Vec<Message>, ui: &mut Ui, vidx: VisibleItemIndex, show_reset_name: bool, group_target: MessageTarget<VisibleItemIndex>, )

Source

fn analog_submenu( ui: &mut Ui, msgs: &mut Vec<Message>, variable: &DisplayedVariable, group_target: MessageTarget<VisibleItemIndex>, type_limits_available: bool, )

Source

fn add_format_menu( &self, clicked_field_ref: &DisplayedFieldRef, clicked_item: &DisplayedItem, path: &FieldRef, msgs: &mut Vec<Message>, ui: &mut Ui, group_target: MessageTarget<VisibleItemIndex>, )

Source§

impl SystemState

Source

fn clamp_y( &self, pos: Pos2, max_y: f32, snap_y: bool, waves: &WaveData, ctx: &mut DrawingContext<'_>, anchor: Anchor, y_offset: f32, ) -> Pos2

Source

pub(crate) fn draw_mouse_gesture_widget( &self, egui_ctx: &Context, waves: &WaveData, pointer_pos_canvas: Option<Pos2>, response: &Response, msgs: &mut Vec<Message>, ctx: &mut DrawingContext<'_>, viewport_idx: usize, y_offset: f32, )

Draw the mouse gesture widget, i.e., the line(s) and text showing which gesture is being drawn.

Source

fn stop_dragging( &self, pointer_pos_canvas: Option<Pos2>, start_location: Pos2, msgs: &mut Vec<Message>, viewport_idx: usize, waves: &WaveData, frame_width: f32, ctx: &mut DrawingContext<'_>, ui: &Context, y_offset: f32, )

Source

fn start_dragging( &self, pointer_pos_canvas: Option<Pos2>, start_location: Pos2, ctx: &mut DrawingContext<'_>, ui: &Context, response: &Response, waves: &WaveData, viewport_idx: usize, y_offset: f32, )

Source

fn draw_gesture_rectangle( &self, start_location: Pos2, waves: &WaveData, ui: &Context, current_location: Pos2, ctx: &mut DrawingContext<'_>, y_offset: f32, )

Source

fn create_rectangle( &self, end_location: Pos2, start_location: Pos2, msgs: &mut Vec<Message>, viewport_idx: usize, waves: &WaveData, num_timestamps: &BigInt, frame_width: f32, ctx: &mut DrawingContext<'_>, ui: &Context, y_offset: f32, )

Source

fn create_arrow( &self, end_location: Pos2, start_location: Pos2, msgs: &mut Vec<Message>, viewport_idx: usize, waves: &WaveData, num_timestamps: &BigInt, frame_width: f32, ctx: &mut DrawingContext<'_>, offset: f32, )

Source

fn draw_gesture_line( &self, start: Pos2, end: Pos2, text: &str, active: bool, ctx: &mut DrawingContext<'_>, )

Draw the line used by most mouse gestures.

Source

fn draw_arrow_line( &self, start: Pos2, end: Pos2, text: &str, active: bool, ctx: &mut DrawingContext<'_>, )

Source

fn draw_zoom_in_gesture( &self, start_location: Pos2, current_location: Pos2, response: &Response, ctx: &mut DrawingContext<'_>, waves: &WaveData, viewport_idx: usize, measure: bool, )

Draw the lines used for the zoom-in gesture.

Source

pub(crate) fn mouse_gesture_help(&self, ctx: &Context, msgs: &mut Vec<Message>)

Draw the mouse gesture help window.

Source

pub(crate) fn draw_measure_widget( &self, egui_ctx: &Context, waves: &WaveData, pointer_pos_canvas: Option<Pos2>, response: &Response, msgs: &mut Vec<Message>, ctx: &mut DrawingContext<'_>, viewport_idx: usize, )

Source§

impl SystemState

Source

pub(crate) fn add_overview_panel( &self, ui: &mut Ui, waves: &WaveData, msgs: &mut Vec<Message>, )

Source

fn draw_overview(&self, ui: &mut Ui, waves: &WaveData, msgs: &mut Vec<Message>)

Source§

impl SystemState

Source

pub(crate) fn draw_surver_file_window( &self, ctx: &Context, msgs: &mut Vec<Message>, )

Source§

impl SystemState

Source

pub fn with_params(self, args: StartupParams) -> Self

Source

pub fn wcp(&mut self)

Source

pub(crate) fn get_scope( &mut self, scope: ScopeRef, recursive: bool, ) -> Vec<VariableRef>

Source

pub(crate) fn on_waves_loaded( &mut self, filename: WaveSource, format: WaveFormat, new_waves: Box<WaveContainer>, load_options: LoadOptions, )

Source

pub(crate) fn on_transaction_streams_loaded( &mut self, filename: WaveSource, format: WaveFormat, new_ftr: TransactionContainer, _loaded_options: LoadOptions, )

Source

fn record_file_history(&mut self, source: &WaveSource)

Source

pub(crate) fn push_async_messages(&mut self, msgs: &mut Vec<Message>)

Source

pub fn get_visuals(&self) -> Visuals

Source

pub(crate) fn load_state( &mut self, loaded_state: Box<UserState>, path: Option<PathBuf>, )

Source

pub fn waves_fully_loaded(&self) -> bool

Returns true if the waveform and all requested signals have been loaded. Used for testing to make sure the GUI is at its final state before taking a snapshot.

Source

pub fn analog_caches_ready(&self) -> bool

Returns true if no analog caches are currently being built

Source

pub(crate) fn current_canvas_state( waves: &WaveData, message: String, ) -> CanvasState

Returns the current canvas state

Source

pub(crate) fn save_current_canvas(&mut self, message: String)

Push the current canvas state to the undo stack

Source

pub(crate) fn start_wcp_server( &mut self, address: Option<String>, initiate: bool, )

Source

pub(crate) fn stop_wcp_server(&mut self)

Source§

impl SystemState

Source

fn default_state_file_name(&self) -> String

Builds the suggested state-file name used by save dialogs.

Uses the loaded wave source stem when available and falls back to surfer_state.surf.ron semantics when no stable stem can be derived.

Source

pub(crate) fn load_state_file(&mut self, path: Option<PathBuf>)

Loads a state file from disk on native builds.

When path is None, this opens a file picker and loads the selected file.

Source

pub(crate) fn save_state_file(&mut self, path: Option<PathBuf>)

Saves the current state to disk on native builds.

When path is None, this opens a save dialog with a suggested filename.

Source

pub(crate) fn encode_state(&self) -> Option<String>

Serializes the current user state into pretty-printed RON.

Source

pub(crate) fn load_state_from_bytes(&mut self, bytes: Vec<u8>)

Decodes RON bytes and enqueues a LoadState message on success.

Source§

impl SystemState

Source

pub fn get_item_text_color(&self, item: &DisplayedItem) -> Color32

Source

pub fn show_statusbar(&self) -> bool

Source

pub fn show_toolbar(&self) -> bool

Source

pub fn show_overview(&self) -> bool

Source

pub fn show_hierarchy(&self) -> bool

Source

pub fn show_tooltip(&self) -> bool

Source

pub fn show_scope_tooltip(&self) -> bool

Source

pub fn show_ticks(&self) -> bool

Source

pub fn show_menu(&self) -> bool

Source

pub fn show_variable_indices(&self) -> bool

Source

pub fn show_variable_direction(&self) -> bool

Source

pub fn ui_zoom_factor(&self) -> f32

Source

pub fn show_empty_scopes(&self) -> bool

Source

pub fn show_hierarchy_icons(&self) -> bool

Source

pub fn show_default_timeline(&self) -> bool

Source

pub fn highlight_focused(&self) -> bool

Source

pub fn fill_high_values(&self) -> bool

Source

pub fn animation_enabled(&self) -> bool

Source

pub fn show_divider_text(&self) -> bool

Source

pub fn primary_button_drag_behavior(&self) -> PrimaryMouseDrag

Source

pub fn do_measure(&self, modifiers: &Modifiers) -> bool

Return true if the combination of primary_button_drag_behavior and modifiers results in a measure, false otherwise.

Source

pub fn arrow_key_bindings(&self) -> ArrowKeyBindings

Source

pub fn clock_highlight_type(&self) -> ClockHighlightType

Source

pub fn hierarchy_style(&self) -> HierarchyStyle

Source

pub fn autoreload_files(&self) -> AutoLoad

Source

pub fn autoload_sibling_state_files(&self) -> AutoLoad

Source

pub fn parameter_display_location(&self) -> ParameterDisplayLocation

Source

pub fn use_dinotrace_style(&self) -> bool

Source

pub fn transition_value(&self) -> TransitionValue

Source

pub fn align_names_right(&self) -> bool

Source§

impl SystemState

Source

pub(crate) fn add_statusbar_panel( &self, ui: &mut Ui, waves: Option<&WaveData>, msgs: &mut Vec<Message>, )

Source

fn draw_statusbar( &self, ui: &mut Ui, waves: Option<&WaveData>, msgs: &mut Vec<Message>, )

Source

fn draw_statusbar_left(&self, ui: &mut Ui, waves: Option<&WaveData>)

Draw left-aligned status bar elements: wave source and generation date

Source

fn draw_statusbar_right( &self, ui: &mut Ui, waves: Option<&WaveData>, msgs: &mut Vec<Message>, )

Draw right-aligned status bar elements: cursor time, undo info, and count

Source§

impl SystemState

Source

pub fn new() -> Result<SystemState>

Source

fn new_inner(force_default_config: bool) -> Result<SystemState>

Source§

impl SystemState

Source

pub(crate) fn get_time_format(&self) -> TimeFormat

Source

pub(crate) fn get_ticks_for_viewport_idx( &self, waves: &WaveData, viewport_idx: usize, cfg: &DrawConfig, ) -> Vec<(String, f32, i64)>

Source

pub(crate) fn get_ticks_for_viewport( &self, waves: &WaveData, viewport: &Viewport, cfg: &DrawConfig, ) -> Vec<(String, f32, i64)>

Source§

impl SystemState

Source

pub(crate) fn add_toolbar_panel(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Add panel and draw toolbar.

Source

fn simulation_status_toolbar(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

fn draw_toolbar(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source§

impl SystemState

Source

pub fn draw_transaction_detail_panel( &self, ui: &mut Ui, max_width: f32, msgs: &mut Vec<Message>, )

Source§

impl SystemState

Source

pub(crate) fn draw_variable_filter_edit( &mut self, ui: &mut Ui, msgs: &mut Vec<Message>, full_path: bool, )

Source

fn add_filtered_variables(&mut self, msgs: &mut Vec<Message>, full_path: bool)

Source

fn variable_filter_type_menu(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

pub fn variable_cmp( &self, a: &VariableRef, b: &VariableRef, wave_container: Option<&WaveContainer>, ) -> Ordering

Source

pub(crate) fn filtered_variables( &self, variables: &[VariableRef], full_path: bool, ) -> Vec<VariableRef>

Source

pub(crate) fn filtered_variables_unsorted( &self, variables: &[VariableRef], full_path: bool, ) -> Vec<VariableRef>

Like filtered_variables but skips sorting — use when the caller will sort the result itself (e.g. build_variable_rows).

Source§

impl SystemState

Source

pub(crate) fn draw( &mut self, ui: &mut Ui, window_size: Option<Vec2>, ) -> Vec<Message>

Source

fn draw_load_url(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

pub fn handle_pointer_in_ui(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

fn add_padding_for_last_item( ui: &mut Ui, last_info: Option<&ItemDrawingInfo>, line_height: f32, )

Add bottom padding so the last item isn’t clipped or covered by the scrollbar.

Source

fn bottom_most_item<'a>( infos: impl IntoIterator<Item = &'a ItemDrawingInfo>, ) -> Option<&'a ItemDrawingInfo>

Source

fn item_text_margin(ui: &Ui) -> Vec2

Source

fn clamp_rect_to_bounds(rect: Rect, bounds: Option<(f32, f32)>) -> Rect

Source

fn enforce_stable_row_widget_expansion(ui: &mut Ui)

Source

fn desired_item_row_height(&self, displayed_item: &DisplayedItem) -> f32

Source

fn variable_visible_height( &self, ui: &Ui, displayed_item: &DisplayedItem, field: &FieldRef, info: &VariableInfo, levels_to_force_expand: Option<usize>, ) -> f32

Source

fn draw_item_focus_list(&self, ui: &mut Ui)

Source

fn hierarchy_icon( &self, ui: &mut Ui, has_children: bool, unfolded: bool, alignment: Align, ) -> Response

Source

fn draw_item_list(&mut self, msgs: &mut Vec<Message>, ui: &mut Ui)

Source

fn get_name_alignment(&self) -> Align

Source

fn draw_drag_source( &self, msgs: &mut Vec<Message>, vidx: VisibleItemIndex, item_response: &Response, modifiers: Modifiers, )

Source

fn draw_variable_label( &self, vidx: VisibleItemIndex, displayed_item: &DisplayedItem, displayed_id: DisplayedItemRef, field: FieldRef, msgs: &mut Vec<Message>, ui: &mut Ui, meta: Option<&VariableMeta>, background_color: Color32, ) -> Response

Source

fn draw_variable( &self, msgs: &mut Vec<Message>, vidx: VisibleItemIndex, displayed_item: &DisplayedItem, displayed_id: DisplayedItemRef, field: FieldRef, drawing_infos: &mut Vec<ItemDrawingInfo>, info: &VariableInfo, ui: &mut Ui, levels_to_force_expand: Option<usize>, alignment: Align, background_color: Color32, ) -> Rect

Source

fn draw_drag_target( &self, msgs: &mut Vec<Message>, vidx: VisibleItemIndex, expanded_rect: Rect, content_rect: Rect, ui: &mut Ui, last: bool, )

Source

fn draw_item_label( &self, vidx: VisibleItemIndex, displayed_id: DisplayedItemRef, displayed_item: &DisplayedItem, field: Option<&FieldRef>, msgs: &mut Vec<Message>, ui: &mut Ui, meta: Option<&VariableMeta>, background_color: Color32, ) -> Response

Source

fn draw_plain_item( &self, msgs: &mut Vec<Message>, vidx: VisibleItemIndex, displayed_id: DisplayedItemRef, displayed_item: &DisplayedItem, drawing_infos: &mut Vec<ItemDrawingInfo>, ui: &mut Ui, background_color: Color32, ) -> Rect

Source

fn item_is_focused(&self, vidx: VisibleItemIndex) -> bool

Source

fn item_is_selected(&self, id: DisplayedItemRef) -> bool

Source

fn draw_var_values(&self, ui: &mut Ui, msgs: &mut Vec<Message>)

Source

pub fn get_variable_value( &self, waves: &WaveData, displayed_field_ref: &DisplayedFieldRef, ucursor: Option<&BigUint>, ) -> Option<String>

Source

fn translate_query_result( &self, displayed_field_ref: &DisplayedFieldRef, displayed_variable: &DisplayedVariable, translator: &dyn Translator<VarId, ScopeId, Message>, meta: VariableMeta, val: VariableValue, ) -> Option<String>

Source

pub fn get_variable_name_info( &self, var: &VariableRef, meta: Option<&VariableMeta>, ) -> Option<VariableNameInfo>

Source

pub fn draw_background( &self, drawing_info: &ItemDrawingInfo, ctx: &DrawingContext<'_>, background_color: Color32, )

Source

pub fn get_background_color( &self, waves: &WaveData, vidx: VisibleItemIndex, item_count: usize, ) -> Color32

Source

fn get_default_alternating_background_color(&self, item_count: usize) -> Color32

Source

pub fn draw_default_timeline( &self, waves: &WaveData, ctx: &DrawingContext<'_>, viewport_idx: usize, )

Draw the default timeline at the top of the canvas

Source§

impl SystemState

Source

pub fn load_from_file( &mut self, filename: Utf8PathBuf, load_options: LoadOptions, ) -> Result<()>

Source

pub fn load_from_bytes( &mut self, source: WaveSource, bytes: Vec<u8>, load_options: LoadOptions, )

Source

pub fn load_wave_from_file( &mut self, filename: Utf8PathBuf, load_options: LoadOptions, ) -> Result<()>

Source

pub fn load_from_data( &mut self, data: Vec<u8>, load_options: LoadOptions, ) -> Result<()>

Source

pub fn load_from_dropped(&mut self, file: DroppedFile) -> Result<()>

Source

pub fn load_wave_from_url( &mut self, url: String, load_options: LoadOptions, force_switch: bool, file_index: Option<usize>, )

Source

pub fn load_transactions_from_file( &mut self, filename: Utf8PathBuf, load_options: LoadOptions, ) -> Result<()>

Source

pub fn load_transactions_from_bytes( &mut self, source: WaveSource, bytes: Vec<u8>, load_options: LoadOptions, )

Source

pub fn server_status_to_progress( &mut self, server: &str, file_info: &SurverFileInfo, )

uses the server status in order to display a loading bar

Source

pub fn connect_to_cxxrtl(&mut self, kind: CxxrtlKind, keep_variables: bool)

Source

pub fn load_wave_from_bytes( &mut self, source: WaveSource, bytes: Vec<u8>, load_options: LoadOptions, )

Source

fn get_thread_pool() -> Option<ThreadPool>

Source

pub fn load_wave_body<R: BufRead + Seek + Sync + Send + 'static>( &mut self, source: WaveSource, cont: ReadBodyContinuation<R>, body_len: u64, hierarchy: Arc<Hierarchy>, )

Source

pub fn load_variables(&mut self, cmd: LoadSignalsCmd)

Source§

impl SystemState

Source

pub fn handle_wcp_commands(&mut self)

Source

fn handle_wcp_cs_message(&mut self, message: &WcpCSMessage)

Source

fn send_greeting(&self)

Source

fn send_response(&self, result: WcpResponse)

Source

fn send_error(&self, error: &str, arguments: Vec<String>, message: &str)

Source

fn get_displayed_items(&self, waves: &WaveData) -> Vec<DisplayedItemRef>

Source§

impl SystemState

Source

pub fn update(&mut self, message: Message) -> Option<()>

Source

pub(crate) fn annotation_id(&mut self) -> Id

Source

pub fn add_scope_as_group( &mut self, scope: &ScopeRef, pos: TargetPosition, recursive: bool, variable_name_type: Option<VariableNameType>, ) -> TargetPosition

Source

pub(crate) fn handle_variable_clipboard_operation<F>( &self, vidx: MessageTarget<VisibleItemIndex>, get_text: F, )

Trait Implementations§

Source§

impl App for SystemState

Source§

fn ui(&mut self, ui: &mut Ui, frame: &mut Frame)

Called each time the UI needs repainting, which may be many times per second. Read more
Source§

fn logic(&mut self, ctx: &Context, frame: &mut Frame)

Called once before each call to Self::ui, and additionally also called when the UI is hidden, but egui::Context::request_repaint was called. Read more
Source§

fn update(&mut self, ctx: &Context, frame: &mut Frame)

👎Deprecated:

Use Self::ui instead

Called each time the UI needs repainting, which may be many times per second. Read more
Source§

fn save(&mut self, _storage: &mut dyn Storage)

Called on shutdown, and perhaps at regular intervals. Allows you to save state. Read more
Source§

fn on_exit(&mut self, _gl: Option<&Context>)

Called once on shutdown, after Self::save. Read more
Source§

fn auto_save_interval(&self) -> Duration

Time between automatic calls to Self::save
Source§

fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]

Background color values for the app, e.g. what is sent to gl.clearColor. Read more
Source§

fn persist_egui_memory(&self) -> bool

Controls whether or not the egui memory (window positions etc) will be persisted (only if the “persistence” feature is enabled).
Source§

fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)

A hook for manipulating or filtering raw input before it is processed by Self::update. Read more
Source§

impl From<UserState> for SystemState

Source§

fn from(serializable_state: UserState) -> SystemState

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GetSetFdFlags for T

Source§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
Source§

fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>
where T: AsFilelike,

Create a new SetFdFlags value for use with set_fd_flags. Read more
Source§

fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>
where T: AsFilelike,

Set the “status” flags for the self file descriptor. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Pointer = u32

Source§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(value: T, _simd: S) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more