pub struct GraphView<T>where
T: GraphNode + 'static,{ /* private fields */ }Implementations§
Source§impl<T> GraphView<T>where
T: GraphNode,
impl<T> GraphView<T>where
T: GraphNode,
Sourcepub fn new(layout: Layout, flags: Flags) -> Self
pub fn new(layout: Layout, flags: Flags) -> Self
Creates a new GraphView control with the specified layout and flags.
§Parameters
layout: The layout configuration for positioning and sizing the GraphViewflags: Combination of initialization flags that control the GraphView behavior:Flags::ScrollBars: Enables scroll bars for navigating large graphsFlags::SearchBar: Enables a search bar for finding nodesFlags::MultiSelect: Enables multi-selection UI (checkbox column and related behavior)
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let mut graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:50,h:30"),
graphview::Flags::ScrollBars | graphview::Flags::SearchBar
);Sourcepub fn set_background(&mut self, backgroud_char: Character)
pub fn set_background(&mut self, backgroud_char: Character)
Sets the background of the GraphView to the specified character.
This method allows you to customize the background appearance of the GraphView. The background character will be used to fill the entire control area before drawing the graph nodes and edges.
§Parameters
backgroud_char: The character to use as background, including its color and formatting
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let mut graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:30,h:10"),
graphview::Flags::ScrollBars
);
graph_view.set_background(Character::new('·', Color::Gray, Color::Black, CharFlags::None));Sourcepub fn clear_background(&mut self)
pub fn clear_background(&mut self)
Clears the background character of the GraphView.
This method removes any previously set background character and resets the GraphView to use transparent foreground and background colors, allowing the default theme background to show through.
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let mut graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:30,h:10"),
graphview::Flags::None
);
graph_view.set_background(Character::new('*', Color::White, Color::Black, CharFlags::None));
graph_view.clear_background(); // Removes the background characterSourcepub fn set_graph(&mut self, graph: Graph<T>)
pub fn set_graph(&mut self, graph: Graph<T>)
Sets the graph data to be displayed in the GraphView.
This method replaces the current graph with a new one, updates the rendering options, and automatically arranges the nodes using the current arrangement method.
§Parameters
graph: The graph containing nodes and edges to be displayed
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let mut graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:50,h:30"),
graphview::Flags::ScrollBars
);
let nodes = &["A", "B", "C", "D", "E"];
let edges = &[(0, 1), (0, 2), (1, 3), (2, 4)];
let graph = graphview::Graph::with_slices(nodes, edges, true);
graph_view.set_graph(graph);Sourcepub fn set_edge_routing(&mut self, routing: EdgeRouting)
pub fn set_edge_routing(&mut self, routing: EdgeRouting)
Sets the edge routing method for drawing connections between nodes.
This method determines how edges are drawn between nodes in the graph.
§Parameters
routing: The routing method to use:EdgeRouting::Direct: Draw edges as straight lines between nodesEdgeRouting::Orthogonal: Draw edges as orthogonal (right-angled) lines
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let mut graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:50,h:30"),
graphview::Flags::ScrollBars
);
graph_view.set_edge_routing(graphview::EdgeRouting::Orthogonal);Sourcepub fn set_edge_line_type(&mut self, line_type: LineType)
pub fn set_edge_line_type(&mut self, line_type: LineType)
Sets the line type used for drawing edges between nodes.
This method controls the visual style of the lines used to draw edges. Different line types provide different visual appearances.
§Parameters
line_type: The line style to use:LineType::Single: Single lines with Unicode box-drawing charactersLineType::Double: Double lines with Unicode box-drawing charactersLineType::SingleThick: Thick single linesLineType::Border: Border-style thick linesLineType::Ascii: ASCII characters (‘+’, ‘-’, ‘|’)LineType::AsciiRound: ASCII with rounded cornersLineType::SingleRound: Unicode single lines with rounded cornersLineType::Braille: Double lines using Braille characters
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let mut graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:50,h:30"),
graphview::Flags::ScrollBars
);
graph_view.set_edge_line_type(LineType::Double);Sourcepub fn enable_edge_highlighting(&mut self, incoming: bool, outgoing: bool)
pub fn enable_edge_highlighting(&mut self, incoming: bool, outgoing: bool)
Enables or disables edge highlighting for the currently selected node.
When edge highlighting is enabled, edges connected to the currently selected node will be visually highlighted to make the connections more apparent.
§Parameters
incoming: Whether to highlight edges pointing to the current nodeoutgoing: Whether to highlight edges originating from the current node
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let mut graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:50,h:30"),
graphview::Flags::ScrollBars
);
// Highlight both incoming and outgoing edges
graph_view.enable_edge_highlighting(true, true);
// Only highlight outgoing edges
graph_view.enable_edge_highlighting(false, true);Sourcepub fn enable_arrow_heads(&mut self, enabled: bool)
pub fn enable_arrow_heads(&mut self, enabled: bool)
Enables or disables arrow heads on directed edges.
When enabled, directed edges will display arrow heads to indicate the direction of the connection between nodes.
§Parameters
enabled: Whether to show arrow heads on directed edges
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let mut graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:50,h:30"),
graphview::Flags::ScrollBars
);
graph_view.enable_arrow_heads(true);Sourcepub fn arrange_nodes(&mut self, method: ArrangeMethod)
pub fn arrange_nodes(&mut self, method: ArrangeMethod)
Arranges the nodes in the graph using the specified layout algorithm.
This method automatically positions all nodes in the graph according to the chosen arrangement algorithm. The graph will be resized and repainted after the arrangement is complete.
§Parameters
method: The arrangement algorithm to use:ArrangeMethod::None: No automatic arrangement (manual positioning)ArrangeMethod::Grid: Arrange nodes in a regular grid with spacingArrangeMethod::GridPacked: Arrange nodes in a compact gridArrangeMethod::Circular: Arrange nodes in a circular patternArrangeMethod::Hierarchical: Arrange nodes in hierarchical layers with spacingArrangeMethod::HierarchicalPacked: Arrange nodes in compact hierarchical layersArrangeMethod::ForceDirected: Use force-directed algorithm for natural positioning
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let mut graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:50,h:30"),
graphview::Flags::ScrollBars
);
// Arrange nodes in a hierarchical layout
graph_view.arrange_nodes(graphview::ArrangeMethod::Hierarchical);
// Use force-directed layout for organic appearance
graph_view.arrange_nodes(graphview::ArrangeMethod::ForceDirected);Sourcepub fn graph(&self) -> &Graph<T>
pub fn graph(&self) -> &Graph<T>
Returns an immutable reference to the underlying graph data.
This method provides read-only access to the graph structure, allowing you to query nodes, edges, and other graph properties.
§Returns
A reference to the Graph<T> containing all nodes and edges
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:50,h:30"),
graphview::Flags::ScrollBars
);
let graph = graph_view.graph();
if let Some(node) = graph.current_node() {
// do something with the current node
}Sourcepub fn modify_graph<F>(&mut self, f: F)where
F: FnOnce(&mut EditableGraph<'_, T>),
pub fn modify_graph<F>(&mut self, f: F)where
F: FnOnce(&mut EditableGraph<'_, T>),
Performs an in-place edit to the graph structure.
This method allows you to modify the graph’s nodes, edges, and current selection in a single atomic operation. The changes are tracked and applied to the graph, triggering a repaint and resize if necessary.
§Parameters
f: A closure that takes anEditableGraphreference and performs the desired edits.
§Example
use appcui::prelude::*;
type MyNode = &'static str; // or any other type that implements the GraphNode trait
let mut graph_view: GraphView<MyNode> = GraphView::new(
layout!("x:1,y:1,w:50,h:30"),
graphview::Flags::ScrollBars
);
graph_view.modify_graph(|g| {
let mut node = g.node(0).unwrap();
node.set_value("New Value");
});Sourcepub fn selected_count(&self) -> usize
pub fn selected_count(&self) -> usize
Returns the number of selected nodes in the graph.
Methods from Deref<Target = ControlBase>§
Sourcepub fn client_size(&self) -> Size
pub fn client_size(&self) -> Size
Returns the client size of a control. In most cases it is the same as the size returned the method .get_size(). However, if the control has margins (for example in case of a Window) this size will be smaller.
Sourcepub fn set_size(&mut self, width: u16, height: u16)
pub fn set_size(&mut self, width: u16, height: u16)
Sets the new size for a control (to a specified size given by parameters width and height). Keep in mind that this method will change the existing layout to an a layout based on top-left corner (given by controls x and y coordonates) and the new provided size. Any dock or alignment properties will be removed.
This method has no effect on a Desktop control.
Sourcepub fn position(&self) -> Point
pub fn position(&self) -> Point
Returns the relatove position (x,y) of the current control to its parent.
Sourcepub fn set_position(&mut self, x: i32, y: i32)
pub fn set_position(&mut self, x: i32, y: i32)
Sets the new position for a control (to a specified coordonate given by parameters x and y). Keep in mind that this method will change the existing layout to an a layout based on top-left corner (given by coordonates x and y) and the controls current width and height. Any dock or alignment properties will be removed.
This method has no effect on a Desktop control.
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Sets the enabled state of a control. This method has no effect on a Desktop or a Window control that will always be enabled.
Sourcepub fn set_visible(&mut self, visible: bool)
pub fn set_visible(&mut self, visible: bool)
Can be used to make a control visible or not. This method has no effect on the Desktop control that will always be visible.
§Examples
use appcui::prelude::*;
let mut button = button!("'Click me',x:1,y:1,w:15");
button.set_visible(false); // this will hide the buttonpub fn set_components_toolbar_margins(&mut self, left: u8, top: u8)
pub fn expanded_size(&self) -> Size
Sourcepub fn request_focus(&mut self) -> bool
pub fn request_focus(&mut self) -> bool
A control can use this method to request focus
pub fn timer(&mut self) -> Option<&mut Timer>
Sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Returns true if the current control is visible or false otherwise
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns true if the current control is enabled or false otherwise
Sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Returns true if the current control is active (enabled and visible at the same time) or false otherwise
Sourcepub fn can_receive_input(&self) -> bool
pub fn can_receive_input(&self) -> bool
Returns true if the current control can receive focus or false otherwise. If the control is not visible or it is disable this function will return false.
Sourcepub fn has_focus(&self) -> bool
pub fn has_focus(&self) -> bool
Returns true if the current control has the focus or false otherwise
Sourcepub fn is_mouse_over(&self) -> bool
pub fn is_mouse_over(&self) -> bool
Returns true if the mouse cursor is over the current control or false otherwise
Sourcepub fn set_size_bounds(
&mut self,
min_width: u16,
min_height: u16,
max_width: u16,
max_height: u16,
)
pub fn set_size_bounds( &mut self, min_width: u16, min_height: u16, max_width: u16, max_height: u16, )
Sets the bounds (minim and maxim sized allowed for a control). If the size of a control is outside its bounds, its size will be adjusted automatically. This method has no effect on a Desktop control.
Sourcepub fn set_hotkey<T>(&mut self, hotkey: T)
pub fn set_hotkey<T>(&mut self, hotkey: T)
Sets the hot-key associated with a control. Use Key::None to clear an existing hotkey
pub fn raise_custom_event(&self, class_hash: u64, event_id: u32)
pub fn request_update(&self)
pub fn appbar(&mut self) -> &mut AppBar
pub fn theme(&self) -> &Theme
Sourcepub fn update_layout(&mut self, layout: Layout)
pub fn update_layout(&mut self, layout: Layout)
Updates the layout of the current control
Trait Implementations§
Source§impl<T> AccordionEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> AccordionEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_panel_changed( &mut self, _handle: Handle<Accordion>, _new_panel_index: u32, _old_panel_index: u32, ) -> EventProcessStatus
Source§impl<T> AppBarEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> AppBarEvents for GraphView<T>where
T: GraphNode + 'static,
Source§fn on_update(&self, _appbar: &mut AppBar)
fn on_update(&self, _appbar: &mut AppBar)
Source§impl<T> ButtonEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> ButtonEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_pressed(&mut self, _handle: Handle<Button>) -> EventProcessStatus
Source§impl<T> CharPickerEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> CharPickerEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_char_changed( &mut self, _handle: Handle<CharPicker>, _code: Option<char>, ) -> EventProcessStatus
Source§impl<T> CheckBoxEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> CheckBoxEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_status_changed( &mut self, _handle: Handle<CheckBox>, _checked: bool, ) -> EventProcessStatus
Source§impl<T> ColorPickerEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> ColorPickerEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_color_changed( &mut self, _handle: Handle<ColorPicker>, _color: Color, ) -> EventProcessStatus
Source§impl<T> ComboBoxEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> ComboBoxEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_selection_changed( &mut self, _handle: Handle<ComboBox>, ) -> EventProcessStatus
impl<T> Control for GraphView<T>where
T: GraphNode + 'static,
Source§impl<T> CustomEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> CustomEvents for GraphView<T>where
T: GraphNode + 'static,
Source§impl<T> DatePickerEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> DatePickerEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_date_changed( &mut self, _handle: Handle<DatePicker>, _date: NaiveDate, ) -> EventProcessStatus
Source§impl<T> DesktopEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> DesktopEvents for GraphView<T>where
T: GraphNode + 'static,
Source§impl<T> GenericBackgroundTaskEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> GenericBackgroundTaskEvents for GraphView<T>where
T: GraphNode + 'static,
Source§impl<T> GenericCommandBarEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> GenericCommandBarEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_update_commandbar(&self, _commandbar: &mut CommandBar)
fn on_event(&mut self, _command_id: u32)
Source§impl<T> GenericDropDownListEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> GenericDropDownListEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
Source§impl<T> GenericGraphViewEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> GenericGraphViewEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_current_node_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
fn on_node_action( &mut self, _handle: Handle<()>, _type_id: TypeId, _node_index: usize, ) -> EventProcessStatus
fn on_request_new_node( &mut self, _handle: Handle<()>, _type_id: TypeId, _p: Point, ) -> EventProcessStatus
fn on_request_new_edge( &mut self, _handle: Handle<()>, _type_id: TypeId, _from: u32, _to: u32, ) -> EventProcessStatus
fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
Source§impl<T> GenericListViewEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> GenericListViewEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_current_item_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
fn on_group_collapsed( &mut self, _handle: Handle<()>, _type_id: TypeId, _group: Group, ) -> EventProcessStatus
fn on_group_expanded( &mut self, _handle: Handle<()>, _type_id: TypeId, _group: Group, ) -> EventProcessStatus
fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
fn on_item_action( &mut self, _handle: Handle<()>, _type_id: TypeId, _index: usize, ) -> EventProcessStatus
Source§impl<T> GenericMenuEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> GenericMenuEvents for GraphView<T>where
T: GraphNode + 'static,
Source§fn on_command(
&mut self,
_menu: Handle<Menu>,
_item: Handle<Command>,
_command: u32,
)
fn on_command( &mut self, _menu: Handle<Menu>, _item: Handle<Command>, _command: u32, )
Source§impl<T> GenericNumericSelectorEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> GenericNumericSelectorEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_value_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
Source§impl<T> GenericSelectorEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> GenericSelectorEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
Source§impl<T> GenericTreeViewEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> GenericTreeViewEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_current_item_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, _current_item: Handle<()>, ) -> EventProcessStatus
fn on_item_collapsed( &mut self, _handle: Handle<()>, _type_id: TypeId, _item: Handle<()>, _recursive: bool, ) -> EventProcessStatus
fn on_item_expanded( &mut self, _handle: Handle<()>, _type_id: TypeId, _item: Handle<()>, _recursive: bool, ) -> EventProcessStatus
fn on_selection_changed( &mut self, _handle: Handle<()>, _type_id: TypeId, ) -> EventProcessStatus
fn on_item_action( &mut self, _handle: Handle<()>, _type_id: TypeId, _current_item: Handle<()>, ) -> EventProcessStatus
Source§impl<T> KeySelectorEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> KeySelectorEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_key_changed( &mut self, _handle: Handle<KeySelector>, _new_key: Key, _old_key: Key, ) -> EventProcessStatus
Source§impl<T> ListBoxEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> ListBoxEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_current_item_changed( &mut self, _handle: Handle<ListBox>, _index: usize, ) -> EventProcessStatus
fn on_item_checked( &mut self, _handle: Handle<ListBox>, _index: usize, _checked: bool, ) -> EventProcessStatus
Source§impl<T> MarkdownEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> MarkdownEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_external_link( &mut self, _handle: Handle<Markdown>, _link: &str, ) -> EventProcessStatus
impl<T> NotDesktop for GraphView<T>where
T: GraphNode + 'static,
impl<T> NotWindow for GraphView<T>where
T: GraphNode + 'static,
Source§impl<T> OnDefaultAction for GraphView<T>where
T: GraphNode + 'static,
impl<T> OnDefaultAction for GraphView<T>where
T: GraphNode + 'static,
fn on_default_action(&mut self)
Source§impl<T> OnKeyPressed for GraphView<T>where
T: GraphNode,
impl<T> OnKeyPressed for GraphView<T>where
T: GraphNode,
fn on_key_pressed(&mut self, key: Key, character: char) -> EventProcessStatus
Source§impl<T> OnMouseEvent for GraphView<T>where
T: GraphNode,
impl<T> OnMouseEvent for GraphView<T>where
T: GraphNode,
fn on_mouse_event(&mut self, event: &MouseEvent) -> EventProcessStatus
Source§impl<T> OnSiblingSelected for GraphView<T>where
T: GraphNode + 'static,
impl<T> OnSiblingSelected for GraphView<T>where
T: GraphNode + 'static,
fn on_sibling_selected(&mut self, _handle: Handle<()>)
Source§impl<T> OnThemeChanged for GraphView<T>where
T: GraphNode + 'static,
impl<T> OnThemeChanged for GraphView<T>where
T: GraphNode + 'static,
fn on_theme_changed(&mut self, _theme: &Theme)
Source§impl<T> OnWindowRegistered for GraphView<T>where
T: GraphNode + 'static,
impl<T> OnWindowRegistered for GraphView<T>where
T: GraphNode + 'static,
fn on_registered(&mut self)
Source§impl<T> PasswordEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> PasswordEvents for GraphView<T>where
T: GraphNode + 'static,
Source§impl<T> PathFinderEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> PathFinderEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_path_updated(&mut self, _handle: Handle<PathFinder>) -> EventProcessStatus
Source§impl<T> RadioBoxEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> RadioBoxEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_selected(&mut self, _handle: Handle<RadioBox>) -> EventProcessStatus
Source§impl<T> RichTextFieldEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> RichTextFieldEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_validate( &mut self, _handle: Handle<RichTextField>, _text: &str, ) -> EventProcessStatus
fn on_text_changed( &mut self, _handle: Handle<RichTextField>, ) -> EventProcessStatus
Source§impl<T> TabEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> TabEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_tab_changed( &mut self, _handle: Handle<Tab>, _new_tab_index: u32, _old_tabl_index: u32, ) -> EventProcessStatus
Source§impl<T> TextFieldEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> TextFieldEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_validate( &mut self, _handle: Handle<TextField>, _text: &str, ) -> EventProcessStatus
fn on_text_changed(&mut self, _handle: Handle<TextField>) -> EventProcessStatus
Source§impl<T> ThreeStateBoxEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> ThreeStateBoxEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_status_changed( &mut self, _handle: Handle<ThreeStateBox>, _state: State, ) -> EventProcessStatus
Source§impl<T> TimePickerEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> TimePickerEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_time_changed( &mut self, _handle: Handle<TimePicker>, _time: NaiveTime, ) -> EventProcessStatus
Source§impl<T> TimerEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> TimerEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_start(&mut self) -> EventProcessStatus
fn on_resume(&mut self, _ticks: u64) -> EventProcessStatus
fn on_pause(&mut self, _ticks: u64) -> EventProcessStatus
fn on_update(&mut self, _ticks: u64) -> EventProcessStatus
Source§impl<T> ToggleButtonEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> ToggleButtonEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_selection_changed( &mut self, _handle: Handle<ToggleButton>, _selected: bool, ) -> EventProcessStatus
Source§impl<T> ToolBarEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> ToolBarEvents for GraphView<T>where
T: GraphNode + 'static,
Source§fn on_checkbox_clicked(
&mut self,
_handle: Handle<CheckBox>,
_checked: bool,
) -> EventProcessStatus
fn on_checkbox_clicked( &mut self, _handle: Handle<CheckBox>, _checked: bool, ) -> EventProcessStatus
Source§fn on_choice_selected(
&mut self,
_handle: Handle<SingleChoice>,
) -> EventProcessStatus
fn on_choice_selected( &mut self, _handle: Handle<SingleChoice>, ) -> EventProcessStatus
Source§impl<T> WindowEvents for GraphView<T>where
T: GraphNode + 'static,
impl<T> WindowEvents for GraphView<T>where
T: GraphNode + 'static,
fn on_layout_changed(&mut self, _old_layout: Rect, _new_layout: Rect)
Source§fn on_activate(&mut self)
fn on_activate(&mut self)
Source§fn on_deactivate(&mut self)
fn on_deactivate(&mut self)
Source§fn on_accept(&mut self)
fn on_accept(&mut self)
.exit_with(...) method to exit.
for a regular (non-modal) window this callback is never called)Source§fn on_cancel(&mut self) -> ActionRequest
fn on_cancel(&mut self) -> ActionRequest
Auto Trait Implementations§
impl<T> Freeze for GraphView<T>
impl<T> RefUnwindSafe for GraphView<T>where
T: RefUnwindSafe,
impl<T> Send for GraphView<T>where
T: Send,
impl<T> Sync for GraphView<T>where
T: Sync,
impl<T> Unpin for GraphView<T>where
T: Unpin,
impl<T> UnsafeUnpin for GraphView<T>
impl<T> UnwindSafe for GraphView<T>where
T: UnwindSafe,
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.