Module nannou::ui::widget[][src]

Widgets are the core building blocks for every conrod user interface.

This module contains items related to the implementation of the Widget trait. It also re-exports all widgets (and their modules) that are provided by conrod.

Modules

bordered_rectangle

The BorderedRectangle widget and related items.

button

The Button widget and related items.

canvas

The Canvas widget and related items.

collapsible_area

The CollapsibleArea widget and related items.

drop_down_list

The DropDownList and related items.

envelope_editor

The EnvelopeEditor widget and related items.

file_navigator

A widget for navigating through through a file system. Generally inspired by Finder.

graph

A widget for viewing and controlling graph structures.

grid

A widget for displaying a grid of lines across two axes.

id

The widget identifier type used throughout conrod, along with helper types and macros to simplify the process of generating them.

list

A helper widget, useful for instantiating a sequence of widgets in a vertical list.

list_select

A wrapper around the List widget providing the ability to select one or more items.

matrix

A helper widget for laying out child widgets in the form of a grid.

number_dialer

A widget for precision control over any base-10 digit within a given value.

plot_path

A widget for plotting a series of lines using the given function x -> y.

primitive

Primitive widgets are special in that they are built into conrod’s rendering logic.

range_slider

A widget for specifying start and end values for some linear range.

rounded_rectangle

Similar to the Rectangle widget however is drawn with rounded corners.

scroll

Scroll related types and logic.

scrollbar

A widget that allows for manually scrolling via dragging the mouse.

slider

A widget for selecting a single value along some linear range.

tabs

A wrapper around a list of Canvasses that displays them as a list of selectable tabs.

text_box

A widget for displaying and mutating a one-line field of text.

text_edit

A widget for displaying and mutating multi-line text, given as a String.

title_bar

A simple title bar widget that automatically sizes itself to the top of some other widget.

toggle

A button that allows for toggling boolean state.

xy_pad

Used for displaying and controlling a 2D point on a cartesian plane within a given range.

Structs

BorderedRectangle

A filled rectangle widget that may or may not have some border.

Button

A pressable button widget whose reaction is triggered upon release.

Canvas

Canvas is designed to be a “container”-like “parent” widget that simplifies placement of “children” widgets.

Circle

A tiny wrapper around the Oval widget type.

CollapsibleArea

A vertically collapsible area.

CommonBuilder

A struct containing builder data common to all Widget types.

CommonState

A wrapper around state that is common to all Widget types.

CommonStyle

Styling and positioning data that is common between all widget types.

DropDownList

Displays a given Vec<String> as a selectable drop down menu.

EnvelopeEditor

Used for editing a series of 2D Points on a cartesian (X, Y) plane within some given range.

FileNavigator

A widget for navigating and interacting with a file system.

Floating

State necessary for “floating” (pop-up style) widgets.

Graph

A widget used for visualising and manipulating Graph types.

Grid

A widget for displaying a grid of lines across two axes.

Image

A primitive and basic widget for drawing an Image.

KidArea

The area upon which a Widget’s child widgets will be placed.

KidAreaArgs

Arguments to the Widget::kid_area method in a struct to simplify the method signature.

Line

A simple, non-interactive widget for drawing a single straight Line.

List

A helper widget, useful for instantiating a sequence of widgets in a vertical list.

ListSelect

A wrapper around the List widget that handles single and multiple selection logic.

Matrix

Draw a matrix of any rectangular widget type, where the matrix will provide a function with the widget number, it’s rows and cols position, the width and height for the widget and the location at which the widget should be drawn.

NumberDialer

A widget for precision control over any digit within a value.

Oval

A simple, non-interactive widget for drawing a single Oval.

PlotPath

A widget that plots a series of lines using the given function x -> y.

PointPath

A simple, non-interactive widget for drawing a series of lines and/or points.

Polygon

A basic, non-interactive, arbitrary Polygon widget.

PostUpdateCache
PreUpdateCache
RangeSlider

Linear range selection.

Rectangle

A basic, non-interactive rectangle shape widget.

RoundedRectangle

Draws a rectangle with corners rounded via the given radius.

Scrollbar

A widget that allows for scrolling via dragging the mouse.

Slider

Linear value selection.

State

A wrapper around a Widget’s unique Widget::State.

Tabs

A wrapper around a list of Canvasses that displays them as a list of selectable tabs.

Text

Displays some given text centered within a rectangular area.

TextBox

A widget for displaying and mutating a small, one-line field of text, given by the user in the form of a String.

TextEdit

A widget for displaying and mutating multi-line text, given as a String.

TitleBar

A simple title bar widget that automatically sizes itself to the top of some other widget.

Toggle

A pressable widget for toggling the state of a bool.

Triangles

A widget that allows for drawing a list of triangles.

UpdateArgs

Arguments for the Widget::update method in a struct to simplify the method signature.

XYPad

Used for displaying and controlling a 2D point on a cartesian plane within a given range.

Enums

IsOver

Returned by the Widget::is_over method.

MaybeParent

The builder argument for the Widget’s parent.

Traits

Common

A trait implemented by all Widget types.

Style

The necessary bounds for a Widget’s associated Style type.

Widget

A trait to be implemented by all Widget types.

Functions

default_x_dimension

Determines the default Dimension for a Widget.

default_y_dimension

Determines the default Dimension for a Widget.

is_over_rect

The default IsOverFn used if the Widget::is_over method is not overridden.

Type Definitions

Id

Unique widget identifier.

IsOverFn

A function type used to determine whether or not a given point is over a widget.