[][src]Crate druid

Simple data-oriented GUI.

Re-exports

pub use druid_shell::kurbo;
pub use druid_shell::piet;
pub use lens::Lens;
pub use lens::LensExt;
pub use lens::LensWrap;
pub use widget::Widget;

Modules

commands

Commands with special meaning, defined by druid.

lens

Support for lenses, a way of focusing on subfields of data.

platform_menus

Pre-configured, platform appropriate menus and menu items.

theme

Theme keys and initial values.

widget

Common widgets.

Macros

lens

Construct a lens accessing a type's field

Structs

Affine

A 2D affine transform.

AppLauncher

Handles initial setup of an application, and starts the runloop.

Application

The top level application object.

BoxConstraints

Constraints for layout.

Clipboard

A handle to the system clipboard.

ClipboardFormat

Data coupled with a type identifier.

Command

An arbitrary command.

ContextMenu

A menu displayed as a pop-over.

DelegateCtx

A context passed in to AppDelegate functions.

DruidHandler

The struct implements the druid-shell WinHandler trait.

Env

An environment passed down through all widget traversals.

EventCtx

A mutable context provided to event handling methods of widgets.

FileDialogOptions

Options for file dialogs.

FileInfo

Information about a file to be opened or saved.

FileSpec

A description of a filetype, for specifiying allowed types in a file dialog.

HotKey

A description of a keyboard shortcut.

Insets

Insets from the edges of a rectangle.

Key

A typed key.

KeyEvent

A keyboard event, generated on every key press and key release.

KeyModifiers

Keyboard modifier state, provided for events.

LayoutCtx

A context provided to layout handling methods of widgets.

LinearGradient

A description of a linear gradient in the unit rect, which can be resolved to a fixed gradient.

LocalizedString

A string that can be localized based on the current locale.

MenuDesc

A platform-agnostic description of an application, window, or context menu.

MenuItem

A normal menu item.

MouseEvent

The state of the mouse for a click, mouse-up, or move event.

PaintCtx

A context passed to paint methods of widgets.

Point

A 2d point.

RadialGradient

A description of a radial gradient in the unit rect, which can be resolved to a fixed gradient.

Rect

A rectangle.

Selector

An identifier for a particular command.

Size

A 2d size.

TimerToken

A token that uniquely identifies a running timer.

UnitPoint

A representation of a point relative to a unit rectangle.

UpdateCtx

A mutable context provided to data update methods of widgets.

Vec2

A 2D vector.

WheelEvent

A mouse wheel event.

WidgetPod

A container for one widget in the hierarchy.

Window

Per-window state not owned by user code.

WindowDesc

A description of a window to be instantiated.

WindowHandle

A handle to a platform window object.

WindowId

A unique identifier for a window.

Enums

Color

A datatype representing color.

Cursor

Mouse cursors.

Event

An event, propagated downwards during event flow.

KeyCode

A platform-independent key identifier.

LifeCycle

Application life cycle events.

MouseButton

An indicator of which mouse button was pressed.

PaintBrush

A color or a gradient.

PlatformError

Error codes. At the moment, this is little more than HRESULT, but that might change.

RawMods

A representation of the active modifier keys.

SysMods

A platform-agnostic representation of keyboard modifiers, for command handling.

Value

A dynamic type representing all values that can be stored in an environment.

Traits

AppDelegate

A type that provides hooks for handling and modifying top-level events.

Data

A trait used to represent value types.

RenderContext

The main trait for rendering graphics.

WinCtx

A context supplied to most WinHandler methods.

Type Definitions

BoxedWidget

Convenience type for dynamic boxed widget.

FormatId

A type identifer for the system clipboard.

Text

The platform text factory, reexported from piet.

Derive Macros

Data
Lens