[−][src]Crate druid
Simple data-oriented GUI.
Re-exports
pub use druid_shell::kurbo; |
pub use druid_shell::piet; |
pub use env::Env; |
pub use env::Key; |
pub use env::Value; |
Modules
app | Window building and app lifecycle. |
argvalue | |
data | Traits for handling value types. |
env | An environment which is passed downward into the widget tree. |
event | Events. |
localization | Localization handling. |
mouse | The mousey bits |
widget | Common widgets. |
win_handler | The implementation of the WinHandler trait (druid-shell integration). |
window | Management of multiple windows. |
windowbox |
|
Structs
Affine | A 2D affine transform. |
AppLauncher | Handles initial setup of an application, and starts the runloop. |
AppState | State shared by all windows in the UI. |
BaseState | Generic state for all widgets in the hierarchy. |
BoxConstraints | Constraints for layout. |
DruidContext | |
DruidHandler | The struct implements the druid-shell |
EventCtx | A mutable context provided to event handling methods of widgets. |
LayoutCtx | A context provided to layout handling methods of widgets. |
LocalizedString | A string that can be localized based on the current locale. |
MouseEvent | The state of the mouse for a click, mouse-up, or move event. |
PaintCtx | A context passed to paint methods of widgets. |
PlatformWindowHandle | |
PlatformWindowState | |
Point | A 2d point. |
Rect | A rectangle. |
Region | A region of a widget, generally used to describe what needs to be drawn. |
Size | A 2d size. |
UpdateCtx | A mutable context provided to data update methods of widgets. |
WidgetBox | Boxed version of a |
WidgetPod | A container for one widget in the hierarchy. |
Window | Per-window state not owned by user code. |
WindowBox | Boxed version of a |
WindowDesc | A function that can create a widget. A description of a window to be instantiated. |
WindowHandle | A handle to a platform window object. |
WindowId | A unique identifier for a window. |
Enums
Event | An event, propagated downwards during event flow. |
MouseButton | An indicator of which mouse button was pressed. |
WidgetType | Enum to store each |
WindowType | Enum to store each |
Constants
MAX_WIDGETS | Max number of |
MAX_WINDOWS | Max number of Windows supported. i=0 is not used, so MAX_WINDOWS should be 1 more than max number of Windows. |
Traits
Data | A trait used to represent value types. |
GlobalWidgets | Specialised Trait for handling static |
GlobalWindows | Specialised Trait for handling static Windows, Window Handlers and Application Data on embedded platforms |
Shape | A generic trait for open and closed shapes. |
Widget | The trait implemented by all widgets. |
WinCtx | A context supplied to most |
Functions
draw_to_display | Draw the item to the display |
set_display_pixels | Draw the pixel colours to the display at the window from (sx,sy) to (ex,ey) |
show_touch | Display the touched (X, Y) coordinates |
start_display | Initialise the display controller |
Type Definitions
Text | The platform text factory, reexported from piet. |
WidgetId | Widgets are identified by an 8-bit ID |
WindowIdType | Windows are identified by an 8-bit ID |
Derive Macros
Data |