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: TranslatorListWhich translator to use for each variable
channels: ChannelsChannels for messages generated by other threads
progress_tracker: Option<LoadProgress>Tracks progress of file/variable loading operations.
command_prompt: CommandPromptBuffer 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: u64Monotonically 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: boolInvalidate 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: boolImplementations§
Source§impl SystemState
impl SystemState
Sourcepub(crate) fn handle_batch_commands(&mut self)
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
Sourcepub(crate) fn can_start_batch_command(&self) -> bool
pub(crate) fn can_start_batch_command(&self) -> bool
Returns whether it is OK to start a new batch command.
pub fn add_batch_commands<I: IntoIterator<Item = String>>( &mut self, commands: I, )
pub fn add_batch_messages<I: IntoIterator<Item = Message>>( &mut self, messages: I, )
pub fn add_batch_message(&mut self, msg: Message)
fn parse_batch_commands<I: IntoIterator<Item = String>>( &mut self, cmds: I, ) -> Vec<Message>
pub(crate) fn load_commands_from_url(&mut self, url: String)
Source§impl SystemState
impl SystemState
pub(crate) fn draw_performance_graph( &self, ctx: &Context, msgs: &mut Vec<Message>, )
Source§impl SystemState
impl SystemState
Sourcepub(crate) fn get_clock_hightlight_data(
&self,
clock_edges_by_clock: Vec<(usize, Vec<f32>)>,
) -> ClockHighlightData
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
impl SystemState
fn sorted_drawing_infos(waves: &WaveData) -> Vec<&ItemDrawingInfo>
pub fn invalidate_draw_commands(&mut self)
pub fn generate_draw_commands( &self, cfg: &DrawConfig, msgs: &mut Vec<Message>, viewport_idx: usize, )
fn generate_wave_draw_commands( &self, waves: &WaveData, cfg: &DrawConfig, msgs: &mut Vec<Message>, viewport_idx: usize, ) -> Option<CachedDrawData>
fn generate_transaction_draw_commands( &self, waves: &WaveData, cfg: &DrawConfig, msgs: &mut Vec<Message>, viewport_idx: usize, ) -> Option<CachedDrawData>
pub fn transform_pos( &self, to_screen: RectTransform, p: Pos2, default_timeline_height: f32, consider_timeline: bool, ) -> Pos2
pub fn get_annotation_offset(&self, default_timeline_height: f32) -> f32
pub fn draw_items( &mut self, ui: &mut Ui, msgs: &mut Vec<Message>, viewport_idx: usize, )
fn draw_wave_data( &self, waves: &WaveData, draw_data: &CachedWaveDrawData, sorted_drawing_infos: &[&ItemDrawingInfo], ctx: &mut DrawingContext<'_>, )
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<'_>, )
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, )
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<'_>, )
fn draw_event( &self, (x, prev_region): &(f32, DrawnRegion), color: Color32, offset: f32, height_scaling_factor: f32, ctx: &mut DrawingContext<'_>, )
Sourcefn draw_arrow(
&self,
start: Pos2,
end: Pos2,
ctx: &DrawingContext<'_>,
stroke: &PathStroke,
)
fn draw_arrow( &self, start: Pos2, end: Pos2, ctx: &DrawingContext<'_>, stroke: &PathStroke, )
Draws a curvy arrow from start to end.
Sourcefn draw_arrowheads(
&self,
vec_start: Pos2,
vec_tip: Pos2,
ctx: &DrawingContext<'_>,
stroke: &PathStroke,
)
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.
Sourcepub fn snap_to_edge(
&self,
pointer_pos_canvas: Option<Pos2>,
waves: &WaveData,
frame_width: f32,
viewport_idx: usize,
) -> Option<BigInt>
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§impl SystemState
impl SystemState
pub(crate) fn file_dialog_open<F>( &mut self, title: &'static str, filter: (String, Vec<String>), messages: F, )
pub(crate) fn file_dialog_save<F, Fut>( &mut self, title: &'static str, filter: (String, Vec<String>), default_file_name: Option<String>, messages: F, )
pub(crate) fn open_file_dialog(&mut self, mode: OpenMode)
pub(crate) fn open_command_file_dialog(&mut self)
Source§impl SystemState
impl SystemState
pub fn draw_frame_buffer_window( &mut self, ctx: &Context, msgs: &mut Vec<Message>, )
fn draw_array_index_range(&mut self, ui: &mut Ui)
fn selected_variable_for_frame_buffer( &mut self, ) -> Option<(Arc<[bool]>, FrameBufferContentCacheKey, String)>
Source§impl SystemState
impl SystemState
pub fn help_message(&self, ui: &mut Ui)
Source§impl SystemState
impl SystemState
Sourcepub fn separate(&mut self, ui: &mut Ui, msgs: &mut Vec<Message>)
pub fn separate(&mut self, ui: &mut Ui, msgs: &mut Vec<Message>)
Scopes and variables in two separate lists
fn draw_variable_list_header(&self, ui: &mut Ui)
fn draw_variables(&mut self, msgs: &mut Vec<Message>, ui: &mut Ui)
fn draw_parameters( &self, msgs: &mut Vec<Message>, wave_container: &WaveContainer, parameters: &[VariableRef], ui: &mut Ui, )
Sourcepub fn tree(&mut self, ui: &mut Ui, msgs: &mut Vec<Message>)
pub fn tree(&mut self, ui: &mut Ui, msgs: &mut Vec<Message>)
Scopes and variables in a joint tree.
Sourcepub fn variable_list(&mut self, ui: &mut Ui, msgs: &mut Vec<Message>)
pub fn variable_list(&mut self, ui: &mut Ui, msgs: &mut Vec<Message>)
List with all variables.
fn make_all_variable_cache_key( &self, cache_generation: u64, wave_source: &WaveSource, ) -> AllVariableCacheKey
fn draw_all_variables(&mut self, msgs: &mut Vec<Message>, ui: &mut Ui)
fn draw_all_scopes( &self, msgs: &mut Vec<Message>, wave: &WaveData, draw_variables: bool, ui: &mut Ui, )
fn add_scope_selectable_label( &self, msgs: &mut Vec<Message>, wave: &WaveData, scope: &ScopeRef, ui: &mut Ui, scroll_to_label: bool, )
fn draw_selectable_child_or_orphan_scope( &self, msgs: &mut Vec<Message>, wave: &WaveData, scope: &ScopeRef, draw_variables: bool, ui: &mut Ui, )
fn draw_root_scope_view( &self, msgs: &mut Vec<Message>, wave: &WaveData, root_scope: &ScopeRef, draw_variables: bool, ui: &mut Ui, )
fn filter_and_draw_variable_list( &self, msgs: &mut Vec<Message>, wave_container: &WaveContainer, ui: &mut Ui, variables: &[VariableRef], row_range: Option<&Range<usize>>, )
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, )
fn build_variable_rows( &self, wave_container: &WaveContainer, variables: &[VariableRef], ) -> Vec<VariableListRow>
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, )
fn should_open_header_and_scroll_to( &self, scope: &ScopeRef, ) -> Option<(bool, bool)>
Source§impl SystemState
impl SystemState
Source§impl SystemState
impl SystemState
pub fn draw_log_window(&self, ctx: &Context, msgs: &mut Vec<Message>)
Source§impl SystemState
impl SystemState
pub fn draw_marker_window( &self, waves: &WaveData, ctx: &Context, msgs: &mut Vec<Message>, )
pub fn draw_marker_boxes( &self, waves: &WaveData, ctx: &mut DrawingContext<'_>, viewport: &Viewport, y_zero: f32, )
Source§impl SystemState
impl SystemState
Source§impl SystemState
impl SystemState
fn clamp_y( &self, pos: Pos2, max_y: f32, snap_y: bool, waves: &WaveData, ctx: &mut DrawingContext<'_>, anchor: Anchor, y_offset: f32, ) -> Pos2
Sourcepub(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,
)
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.
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, )
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, )
fn draw_gesture_rectangle( &self, start_location: Pos2, waves: &WaveData, ui: &Context, current_location: Pos2, ctx: &mut DrawingContext<'_>, y_offset: f32, )
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, )
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, )
Sourcefn draw_gesture_line(
&self,
start: Pos2,
end: Pos2,
text: &str,
active: bool,
ctx: &mut DrawingContext<'_>,
)
fn draw_gesture_line( &self, start: Pos2, end: Pos2, text: &str, active: bool, ctx: &mut DrawingContext<'_>, )
Draw the line used by most mouse gestures.
fn draw_arrow_line( &self, start: Pos2, end: Pos2, text: &str, active: bool, ctx: &mut DrawingContext<'_>, )
Sourcefn draw_zoom_in_gesture(
&self,
start_location: Pos2,
current_location: Pos2,
response: &Response,
ctx: &mut DrawingContext<'_>,
waves: &WaveData,
viewport_idx: usize,
measure: bool,
)
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.
Sourcepub(crate) fn mouse_gesture_help(&self, ctx: &Context, msgs: &mut Vec<Message>)
pub(crate) fn mouse_gesture_help(&self, ctx: &Context, msgs: &mut Vec<Message>)
Draw the mouse gesture help window.
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
impl SystemState
Source§impl SystemState
impl SystemState
pub(crate) fn draw_surver_file_window( &self, ctx: &Context, msgs: &mut Vec<Message>, )
Source§impl SystemState
impl SystemState
pub fn with_params(self, args: StartupParams) -> Self
pub fn wcp(&mut self)
pub(crate) fn get_scope( &mut self, scope: ScopeRef, recursive: bool, ) -> Vec<VariableRef> ⓘ
pub(crate) fn on_waves_loaded( &mut self, filename: WaveSource, format: WaveFormat, new_waves: Box<WaveContainer>, load_options: LoadOptions, )
pub(crate) fn on_transaction_streams_loaded( &mut self, filename: WaveSource, format: WaveFormat, new_ftr: TransactionContainer, _loaded_options: LoadOptions, )
fn record_file_history(&mut self, source: &WaveSource)
pub(crate) fn push_async_messages(&mut self, msgs: &mut Vec<Message>)
pub fn get_visuals(&self) -> Visuals
pub(crate) fn load_state( &mut self, loaded_state: Box<UserState>, path: Option<PathBuf>, )
Sourcepub fn waves_fully_loaded(&self) -> bool
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.
Sourcepub fn analog_caches_ready(&self) -> bool
pub fn analog_caches_ready(&self) -> bool
Returns true if no analog caches are currently being built
Sourcepub(crate) fn current_canvas_state(
waves: &WaveData,
message: String,
) -> CanvasState
pub(crate) fn current_canvas_state( waves: &WaveData, message: String, ) -> CanvasState
Returns the current canvas state
Sourcepub(crate) fn save_current_canvas(&mut self, message: String)
pub(crate) fn save_current_canvas(&mut self, message: String)
Push the current canvas state to the undo stack
pub(crate) fn start_wcp_server( &mut self, address: Option<String>, initiate: bool, )
pub(crate) fn stop_wcp_server(&mut self)
Source§impl SystemState
impl SystemState
Sourcefn default_state_file_name(&self) -> String
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.
Sourcepub(crate) fn load_state_file(&mut self, path: Option<PathBuf>)
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.
Sourcepub(crate) fn save_state_file(&mut self, path: Option<PathBuf>)
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.
Sourcepub(crate) fn encode_state(&self) -> Option<String>
pub(crate) fn encode_state(&self) -> Option<String>
Serializes the current user state into pretty-printed RON.
Sourcepub(crate) fn load_state_from_bytes(&mut self, bytes: Vec<u8>)
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
impl SystemState
pub fn get_item_text_color(&self, item: &DisplayedItem) -> Color32
pub fn show_statusbar(&self) -> bool
pub fn show_toolbar(&self) -> bool
pub fn show_overview(&self) -> bool
pub fn show_hierarchy(&self) -> bool
pub fn show_tooltip(&self) -> bool
pub fn show_scope_tooltip(&self) -> bool
pub fn show_ticks(&self) -> bool
pub fn show_variable_indices(&self) -> bool
pub fn show_variable_direction(&self) -> bool
pub fn ui_zoom_factor(&self) -> f32
pub fn show_empty_scopes(&self) -> bool
pub fn show_hierarchy_icons(&self) -> bool
pub fn show_default_timeline(&self) -> bool
pub fn highlight_focused(&self) -> bool
pub fn fill_high_values(&self) -> bool
pub fn animation_enabled(&self) -> bool
pub fn show_divider_text(&self) -> bool
Sourcepub fn do_measure(&self, modifiers: &Modifiers) -> bool
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.
pub fn arrow_key_bindings(&self) -> ArrowKeyBindings
pub fn clock_highlight_type(&self) -> ClockHighlightType
pub fn hierarchy_style(&self) -> HierarchyStyle
pub fn autoreload_files(&self) -> AutoLoad
pub fn autoload_sibling_state_files(&self) -> AutoLoad
pub fn parameter_display_location(&self) -> ParameterDisplayLocation
pub fn use_dinotrace_style(&self) -> bool
pub fn transition_value(&self) -> TransitionValue
pub fn align_names_right(&self) -> bool
Source§impl SystemState
impl SystemState
pub(crate) fn add_statusbar_panel( &self, ui: &mut Ui, waves: Option<&WaveData>, msgs: &mut Vec<Message>, )
fn draw_statusbar( &self, ui: &mut Ui, waves: Option<&WaveData>, msgs: &mut Vec<Message>, )
Sourcefn draw_statusbar_left(&self, ui: &mut Ui, waves: Option<&WaveData>)
fn draw_statusbar_left(&self, ui: &mut Ui, waves: Option<&WaveData>)
Draw left-aligned status bar elements: wave source and generation date
Source§impl SystemState
impl SystemState
pub fn new() -> Result<SystemState>
fn new_inner(force_default_config: bool) -> Result<SystemState>
Source§impl SystemState
impl SystemState
pub(crate) fn get_time_format(&self) -> TimeFormat
pub(crate) fn get_ticks_for_viewport_idx( &self, waves: &WaveData, viewport_idx: usize, cfg: &DrawConfig, ) -> Vec<(String, f32, i64)>
pub(crate) fn get_ticks_for_viewport( &self, waves: &WaveData, viewport: &Viewport, cfg: &DrawConfig, ) -> Vec<(String, f32, i64)>
Source§impl SystemState
impl SystemState
Sourcepub(crate) fn add_toolbar_panel(&self, ui: &mut Ui, msgs: &mut Vec<Message>)
pub(crate) fn add_toolbar_panel(&self, ui: &mut Ui, msgs: &mut Vec<Message>)
Add panel and draw toolbar.
fn simulation_status_toolbar(&self, ui: &mut Ui, msgs: &mut Vec<Message>)
fn draw_toolbar(&self, ui: &mut Ui, msgs: &mut Vec<Message>)
Source§impl SystemState
impl SystemState
Source§impl SystemState
impl SystemState
pub(crate) fn draw_variable_filter_edit( &mut self, ui: &mut Ui, msgs: &mut Vec<Message>, full_path: bool, )
fn add_filtered_variables(&mut self, msgs: &mut Vec<Message>, full_path: bool)
pub fn variable_cmp( &self, a: &VariableRef, b: &VariableRef, wave_container: Option<&WaveContainer>, ) -> Ordering
pub(crate) fn filtered_variables( &self, variables: &[VariableRef], full_path: bool, ) -> Vec<VariableRef> ⓘ
Sourcepub(crate) fn filtered_variables_unsorted(
&self,
variables: &[VariableRef],
full_path: bool,
) -> Vec<VariableRef> ⓘ
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
impl SystemState
pub(crate) fn draw( &mut self, ui: &mut Ui, window_size: Option<Vec2>, ) -> Vec<Message>
fn draw_load_url(&self, ui: &mut Ui, msgs: &mut Vec<Message>)
pub fn handle_pointer_in_ui(&self, ui: &mut Ui, msgs: &mut Vec<Message>)
Sourcefn add_padding_for_last_item(
ui: &mut Ui,
last_info: Option<&ItemDrawingInfo>,
line_height: f32,
)
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.
fn bottom_most_item<'a>( infos: impl IntoIterator<Item = &'a ItemDrawingInfo>, ) -> Option<&'a ItemDrawingInfo>
fn item_text_margin(ui: &Ui) -> Vec2
fn clamp_rect_to_bounds(rect: Rect, bounds: Option<(f32, f32)>) -> Rect
fn enforce_stable_row_widget_expansion(ui: &mut Ui)
fn desired_item_row_height(&self, displayed_item: &DisplayedItem) -> f32
fn variable_visible_height( &self, ui: &Ui, displayed_item: &DisplayedItem, field: &FieldRef, info: &VariableInfo, levels_to_force_expand: Option<usize>, ) -> f32
fn draw_item_focus_list(&self, ui: &mut Ui)
fn hierarchy_icon( &self, ui: &mut Ui, has_children: bool, unfolded: bool, alignment: Align, ) -> Response
fn draw_item_list(&mut self, msgs: &mut Vec<Message>, ui: &mut Ui)
fn get_name_alignment(&self) -> Align
fn draw_drag_source( &self, msgs: &mut Vec<Message>, vidx: VisibleItemIndex, item_response: &Response, modifiers: Modifiers, )
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
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
fn draw_drag_target( &self, msgs: &mut Vec<Message>, vidx: VisibleItemIndex, expanded_rect: Rect, content_rect: Rect, ui: &mut Ui, last: bool, )
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
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
fn item_is_focused(&self, vidx: VisibleItemIndex) -> bool
fn item_is_selected(&self, id: DisplayedItemRef) -> bool
fn draw_var_values(&self, ui: &mut Ui, msgs: &mut Vec<Message>)
pub fn get_variable_value( &self, waves: &WaveData, displayed_field_ref: &DisplayedFieldRef, ucursor: Option<&BigUint>, ) -> Option<String>
fn translate_query_result( &self, displayed_field_ref: &DisplayedFieldRef, displayed_variable: &DisplayedVariable, translator: &dyn Translator<VarId, ScopeId, Message>, meta: VariableMeta, val: VariableValue, ) -> Option<String>
pub fn get_variable_name_info( &self, var: &VariableRef, meta: Option<&VariableMeta>, ) -> Option<VariableNameInfo>
pub fn draw_background( &self, drawing_info: &ItemDrawingInfo, ctx: &DrawingContext<'_>, background_color: Color32, )
pub fn get_background_color( &self, waves: &WaveData, vidx: VisibleItemIndex, item_count: usize, ) -> Color32
fn get_default_alternating_background_color(&self, item_count: usize) -> Color32
Sourcepub fn draw_default_timeline(
&self,
waves: &WaveData,
ctx: &DrawingContext<'_>,
viewport_idx: usize,
)
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
impl SystemState
pub fn load_from_file( &mut self, filename: Utf8PathBuf, load_options: LoadOptions, ) -> Result<()>
pub fn load_from_bytes( &mut self, source: WaveSource, bytes: Vec<u8>, load_options: LoadOptions, )
pub fn load_wave_from_file( &mut self, filename: Utf8PathBuf, load_options: LoadOptions, ) -> Result<()>
pub fn load_from_data( &mut self, data: Vec<u8>, load_options: LoadOptions, ) -> Result<()>
pub fn load_from_dropped(&mut self, file: DroppedFile) -> Result<()>
pub fn load_wave_from_url( &mut self, url: String, load_options: LoadOptions, force_switch: bool, file_index: Option<usize>, )
pub fn load_transactions_from_file( &mut self, filename: Utf8PathBuf, load_options: LoadOptions, ) -> Result<()>
pub fn load_transactions_from_bytes( &mut self, source: WaveSource, bytes: Vec<u8>, load_options: LoadOptions, )
Sourcepub fn server_status_to_progress(
&mut self,
server: &str,
file_info: &SurverFileInfo,
)
pub fn server_status_to_progress( &mut self, server: &str, file_info: &SurverFileInfo, )
uses the server status in order to display a loading bar
pub fn connect_to_cxxrtl(&mut self, kind: CxxrtlKind, keep_variables: bool)
pub fn load_wave_from_bytes( &mut self, source: WaveSource, bytes: Vec<u8>, load_options: LoadOptions, )
fn get_thread_pool() -> Option<ThreadPool>
pub fn load_wave_body<R: BufRead + Seek + Sync + Send + 'static>( &mut self, source: WaveSource, cont: ReadBodyContinuation<R>, body_len: u64, hierarchy: Arc<Hierarchy>, )
pub fn load_variables(&mut self, cmd: LoadSignalsCmd)
Source§impl SystemState
impl SystemState
pub fn handle_wcp_commands(&mut self)
fn handle_wcp_cs_message(&mut self, message: &WcpCSMessage)
fn send_greeting(&self)
fn send_response(&self, result: WcpResponse)
fn send_error(&self, error: &str, arguments: Vec<String>, message: &str)
fn get_displayed_items(&self, waves: &WaveData) -> Vec<DisplayedItemRef>
Source§impl SystemState
impl SystemState
pub fn update(&mut self, message: Message) -> Option<()>
pub(crate) fn annotation_id(&mut self) -> Id
pub fn add_scope_as_group( &mut self, scope: &ScopeRef, pos: TargetPosition, recursive: bool, variable_name_type: Option<VariableNameType>, ) -> TargetPosition
pub(crate) fn handle_variable_clipboard_operation<F>( &self, vidx: MessageTarget<VisibleItemIndex>, get_text: F, )
Trait Implementations§
Source§impl App for SystemState
impl App for SystemState
Source§fn ui(&mut self, ui: &mut Ui, frame: &mut Frame)
fn ui(&mut self, ui: &mut Ui, frame: &mut Frame)
Source§fn logic(&mut self, ctx: &Context, frame: &mut Frame)
fn logic(&mut self, ctx: &Context, frame: &mut Frame)
Self::ui,
and additionally also called when the UI is hidden, but egui::Context::request_repaint was called. Read moreSource§fn update(&mut self, ctx: &Context, frame: &mut Frame)
fn update(&mut self, ctx: &Context, frame: &mut Frame)
Use Self::ui instead
Source§fn save(&mut self, _storage: &mut dyn Storage)
fn save(&mut self, _storage: &mut dyn Storage)
Source§fn on_exit(&mut self, _gl: Option<&Context>)
fn on_exit(&mut self, _gl: Option<&Context>)
Self::save. Read moreSource§fn auto_save_interval(&self) -> Duration
fn auto_save_interval(&self) -> Duration
Self::saveSource§fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
gl.clearColor. Read moreSource§fn persist_egui_memory(&self) -> bool
fn persist_egui_memory(&self) -> bool
Source§fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)
fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)
Self::update. Read moreSource§impl From<UserState> for SystemState
impl From<UserState> for SystemState
Source§fn from(serializable_state: UserState) -> SystemState
fn from(serializable_state: UserState) -> SystemState
Auto Trait Implementations§
impl !Freeze for SystemState
impl !RefUnwindSafe for SystemState
impl !Send for SystemState
impl !Sync for SystemState
impl Unpin for SystemState
impl UnsafeUnpin for SystemState
impl !UnwindSafe for SystemState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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