1 unstable release
Uses new Rust 2024
new 0.1.2 | Apr 2, 2025 |
---|
#58 in #accessibility
45 downloads per month
Used in 124 crates
(13 directly)
2MB
16K
SLoC
Aloe ListBox
Aloe ListBox is a Rust crate that facilitates the creation and management of a sophisticated GUI list box, drawing extensively on graphical user interface paradigms. It is engineered to provide fine-grained control over list items, including selection, event handling, and rendering.
Features
-
Customizable Appearance: Utilize
ListBoxColourIds
to customize the color of list components viaComponent::setColour
orLookAndFeel::setColour
. -
Dynamic Row Management: Embed flexible row update mechanisms and track dynamic content changes using
ListBoxModel
. -
Extensive Event Handling: A suite of traits (
ListBoxItemClicked
,ListBoxItemDoubleClicked
,BackgroundClicked
, etc.) for handling mouse interactions, keyboard entries, and item selections. -
Accessibility Support: Supports comprehensive accessibility features using
RowAccessibilityHandler
, ensuring compliance with accessibility standards. -
Snapshot Capabilities: Capture images of list rows through
CreateSnapshotOfRows
for enhanced integration with drag-and-drop interfaces. -
Scroll and View Management: Navigate smoothly across list items with efficient scroll handling leveraging
ListViewport
.
Usage
Add the following to your Cargo.toml
:
[dependencies]
aloe-listbox = "0.1.0"
Define your own structs implementing traits like ListBoxModelInterface
, GetNumRows
, and use ListBox
for rendering lists in your GUI application.
use aloe_listbox::{ListBox, ListBoxModel, ListBoxModelInterface};
#[derive(Default)]
struct MyListModel;
impl ListBoxModelInterface for MyListModel {
// Implement necessary traits
}
fn main() {
let model = MyListModel::default();
let mut listbox = ListBox::new(String::from("my_list"), &model);
// Configure listbox and integrate into your UI system
}
Contributions
Contributions to further enhance this crate, particularly in expanding its event handling capabilities and flexibility, are welcome through the GitHub repository.
Note: This README.md file was generated by an AI model and may not be 100% accurate; however, it should be pretty good.
This crate is a translation of the JUCE module.
JUCE is a c++ software framework for developing high performance audio applications.
Usage falls under the GPLv3 as well as the JUCE commercial license.
See github.com/juce-framework/JUCE and the JUCE license page for details.
This crate is in the process of being translated from c++ to rust. For progress updates, please see the workspacer rust project. designed specifically for rust projects.
Dependencies
~25–38MB
~595K SLoC