[][src]Struct rt_graph::Graph

pub struct Graph { /* fields omitted */ }

A GTK widget that draws a graph.

Graph contains no controls to navigate it, you are expected to provide your own controls using the methods and signals it provides. Or you can use GraphWithControls that comes with a set of controls.

Implementations

impl Graph[src]

pub fn build_ui<C>(config: Config, container: &C, gdk_window: &Window) -> Graph where
    C: IsA<Container> + IsA<Widget>, 
[src]

Build and show a Graph widget in the target gtk::Container.

pub fn show(&self)[src]

Show the graph.

pub fn hide(&self)[src]

Hide the graph.

pub fn width(&self) -> u32[src]

Return the width of the graph

pub fn height(&self) -> u32[src]

Return the height of the graph

pub fn base_zoom_x(&self) -> f64[src]

Return the initial and maximally zoomed out zoom level, in units of time per x pixel.

pub fn max_zoom_x(&self) -> f64[src]

Return the maximally zoomed in zoom level, in units of time per x pixel.

pub fn view(&self) -> View[src]

Return a description of the current view

pub fn last_t(&self) -> Time[src]

Return the most recent time value.

pub fn first_t(&self) -> Time[src]

Return the longest ago time value that is still stored. Note that the oldest data is discarded to keep memory usage bounded.

pub fn set_zoom_x(&self, new_zoom_x: f64)[src]

Change the zoom level on the graph.

Any value you pass in will be clamped between base_zoom_x and max_zoom_x.

pub fn set_follow(&self)[src]

Sets the graph to follow the latest data.

pub fn scroll(&self, new_val: f64)[src]

Scrolls the graph to view a certain time value.

pub fn view_observable(&mut self) -> RefMut<'_, ReadHalf<View>>[src]

Return an observable that lets you track the current View, which describes what is currently showing on the graph.

pub fn drawing_area(&self) -> DrawingArea[src]

Returns the DrawingArea gtk widget the graph is drawn on, so you can connect to its signals.

pub fn drawing_area_pos_to_point(&self, x: f64, _y: f64) -> Option<Point>[src]

Maps a position on drawing_area to the data point that is currently drawn there. Useful for handling clicks on the graph.

Returns None if no appropriate point can be found, for example if the data point for a scroll position has already been discarded.

Auto Trait Implementations

impl !RefUnwindSafe for Graph

impl !Send for Graph

impl !Sync for Graph

impl Unpin for Graph

impl !UnwindSafe for Graph

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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