11 releases

✓ Uses Rust 2018 edition

new 0.1.11 Feb 14, 2019
0.1.10 Feb 13, 2019
0.1.6 Jan 29, 2019

#28 in #ui

Download history 45/week @ 2019-01-24 6/week @ 2019-01-31 39/week @ 2019-02-07

32 downloads per month

Apache-2.0

64KB
723 lines

rust-pushrod

UI Widget Library for Rust Piston library.

Draws inspiration from Atari GEM, TrollTech Qt, and others.

Build Status

Philosophy

The reason I created this library instead of extending another library was that I wanted to keep these specific design ideas in mind:

  • Maintainable with little effort
  • Easily extensible
  • Easy to use and understand

These design ideas are critical. Keep it simple. Keep it stupid simple.

Prerequisites for Pushrod

Pushrod requires the following minimum versions:

Library Version
piston_window 0.87.0
piston2d-opengl_graphics 0.59.0
gfx_core 0.8.3
gfx_device_gl 0.15.5
rust 2018

Timeline/Plans

View the ROADMAP here

  1. Event Library
    • Callbacks for:
      • Mouse movement
      • Button clicks (with modifiers)
      • Keyboard
  2. Widget Library
    • Base widget (PObject)
      • Base components: size, border size, border color, fill color
      • Events for:
        • Mouse Movement
        • Mouse Enter/Exit
        • Button click (with modifiers)
      • Storage objects for parent/child relationship
        • Z-Order
    • Uniform font renderer use
    • Standard widgets
      • Text
      • Button
      • Widget Container
      • Scroll bar
      • Progress bar
      • Shape/Poly
    • Extended widget set
      • TextEdit
      • Rendered text
      • Tab view
      • Split Pane (Horizontal/Vertical)
      • Video
      • Audio
      • Sprite
      • Drag-and-drop buffer
  3. Layout Managers (possibly separate project)
    • Relative Layout
    • Grid Layout
    • Auto Layout
    • Wrap Layout
  4. Themable Library
    • ONLY ONCE ALL WIDGETS ARE DESIGNED do we do themes.
    • Themes will be handled by the base widget

Runnable Examples

cargo run --example simple_example

This will only test window-related events with mouse interaction: mouse enter, mouse exit, mouse click, mouse pointer move, and mouse scroll.

1. Event Library

See Event Library README

2. Widget Library

See Widget Library README

Dependencies

~5.5MB
~75K SLoC