Struct conrod::EnvelopeEditor [−] [src]

pub struct EnvelopeEditor<'a, E: 'a, F> where E: EnvelopePoint {
    // some fields omitted
}

Used for editing a series of 2D Points on a cartesian (X, Y) plane within some given range. Useful for things such as oscillator/automation envelopes or any value series represented periodically.

Methods

impl<'a, E, F> EnvelopeEditor<'a, E, F> where E: EnvelopePoint

fn point_radius(self, radius: f64) -> EnvelopeEditor<'a, E, F>

Set the radius of the envelope point circle.

fn line_width(self, width: f64) -> EnvelopeEditor<'a, E, F>

Set the width of the envelope lines.

fn value_font_size(self, size: FontSize) -> EnvelopeEditor<'a, E, F>

Set the font size for the displayed values.

fn skew_y(self, skew: f32) -> EnvelopeEditor<'a, E, F>

Set the value skewing for the envelope's y-axis. This is useful for displaying exponential ranges such as frequency.

fn new(env: &'a mut Vec<E>, min_x: E, max_x: E, min_y: E, max_y: E) -> EnvelopeEditor<'a, E, F>

Construct an EnvelopeEditor widget.

fn react(self, reaction: F) -> EnvelopeEditor<'a, E, F>

Set the reaction for the EnvelopeEditor.

fn set<C>(self, ui_id: UiId, ui: &mut Ui<C>) where C: CharacterCache, E: EnvelopePoint, E: Float, E: Float, F: FnMut(&mut Vec<E>, usize)

After building the EnvelopeEditor, use this method to set its current state into the given Ui. It will use this state for rendering the next time ui.draw(graphics) is called.

Trait Implementations

impl<'a, E, F> Colorable for EnvelopeEditor<'a, E, F> where E: EnvelopePoint

fn color(self, color: Color) -> Self

fn rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self

fn rgb(self, r: f32, g: f32, b: f32) -> Self

fn hsla(self, h: f32, s: f32, l: f32, a: f32) -> Self

fn hsl(self, h: f32, s: f32, l: f32) -> Self

impl<'a, E, F> Frameable for EnvelopeEditor<'a, E, F> where E: EnvelopePoint

fn frame(self, width: f64) -> Self

fn frame_color(self, color: Color) -> Self

fn frame_rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self

fn frame_rgb(self, r: f32, g: f32, b: f32) -> Self

fn frame_hsla(self, h: f32, s: f32, l: f32, a: f32) -> Self

fn frame_hsl(self, h: f32, s: f32, l: f32) -> Self

impl<'a, E, F> Labelable<'a> for EnvelopeEditor<'a, E, F> where E: EnvelopePoint

fn label(self, text: &'a str) -> Self

fn label_color(self, color: Color) -> Self

fn label_font_size(self, size: FontSize) -> Self

fn label_rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self

fn label_rgb(self, r: f32, g: f32, b: f32) -> Self

fn label_hsla(self, h: f32, s: f32, l: f32, a: f32) -> Self

fn label_hsl(self, h: f32, s: f32, l: f32) -> Self

fn small_font<C>(self, ui: &Ui<C>) -> Self

fn medium_font<C>(self, ui: &Ui<C>) -> Self

fn large_font<C>(self, ui: &Ui<C>) -> Self

impl<'a, E, F> Positionable for EnvelopeEditor<'a, E, F> where E: EnvelopePoint

fn position(self, pos: Position) -> Self

fn horizontal_align(self, h_align: HorizontalAlign) -> Self

fn vertical_align(self, v_align: VerticalAlign) -> Self

fn point(self, point: Point) -> Self

fn xy(self, x: Scalar, y: Scalar) -> Self

fn relative(self, point: Point) -> Self

fn relative_xy(self, x: Scalar, y: Scalar) -> Self

fn relative_to(self, ui_id: UiId, point: Point) -> Self

fn relative_xy_to(self, ui_id: UiId, x: Scalar, y: Scalar) -> Self

fn down(self, pixels: Scalar) -> Self

fn up(self, pixels: Scalar) -> Self

fn left(self, pixels: Scalar) -> Self

fn right(self, pixels: Scalar) -> Self

fn down_from(self, ui_id: UiId, pixels: Scalar) -> Self

fn up_from(self, ui_id: UiId, pixels: Scalar) -> Self

fn left_from(self, ui_id: UiId, pixels: Scalar) -> Self

fn right_from(self, ui_id: UiId, pixels: Scalar) -> Self

fn align_left(self) -> Self

fn align_middle_x(self) -> Self

fn align_right(self) -> Self

fn align_top(self) -> Self

fn align_middle_y(self) -> Self

fn align_bottom(self) -> Self

fn place(self, place: Place, maybe_id: Option<CanvasId>) -> Self

fn middle_of(self, id: CanvasId) -> Self

fn top_left_of(self, id: CanvasId) -> Self

fn top_right_of(self, id: CanvasId) -> Self

fn bottom_left_of(self, id: CanvasId) -> Self

fn bottom_right_of(self, id: CanvasId) -> Self

fn mid_top_of(self, id: CanvasId) -> Self

fn mid_bottom_of(self, id: CanvasId) -> Self

fn mid_left_of(self, id: CanvasId) -> Self

fn mid_right_of(self, id: CanvasId) -> Self

fn middle(self) -> Self

fn top_left(self) -> Self

fn top_right(self) -> Self

fn bottom_left(self) -> Self

fn bottom_right(self) -> Self

fn mid_top(self) -> Self

fn mid_bottom(self) -> Self

fn mid_left(self) -> Self

fn mid_right(self) -> Self

impl<'a, E, F> Sizeable for EnvelopeEditor<'a, E, F> where E: EnvelopePoint

fn width(self, w: f64) -> Self

fn height(self, h: f64) -> Self

fn dim(self, dim: Dimensions) -> Self

fn dimensions(self, width: Scalar, height: Scalar) -> Self