Expand description
§Rust Constructor V2
A cross-platform GUI framework built on egui, the simplest way to develop GUI projects with Rust
基于egui构建的跨平台GUI框架, 用Rust开发GUI项目最简单的方式
§Overview 概述
Rust Constructor is a fully functional GUI framework that leverages the power of egui to provide
a simple and intuitive instrument for building cross-platform applications.
Rust Constructor是一个功能全面的GUI框架,它利用了egui的强大功能,为构建跨平台应用程序提供了一个简单直观的工具。
§Quick Start 快速入门
pub struct RcApp {
pub inner: rust_constructor::app::App,
}
impl eframe::App for RcApp {
fn update(&mut self, ctx: &egui::Context, _: &mut eframe::Frame) {
egui::CentralPanel::default().show(ctx, |ui| {
ui.label("Hello world");
});
}
}
eframe::run_native(
"Example App",
eframe::NativeOptions::default(),
Box::new(|_| {
Ok(Box::new(RcApp {
inner: rust_constructor::app::App::default(),
}))
}),
)
.unwrap();§Documentation 文档
- Rust Constructor Guide
- GitHub Repository
- Binder 必达 - Other projects from our organization 我们组织的其他项目
Modules§
- advance_
front - This file contains advanced front-end resources, which can be used to handle complex tasks.
- app
- Main application struct containing all GUI resources and state management.
- background
- This file contains backend resources, which can store some key data and be called upon when needed.
- basic_
front - This file contains basic front resources. Basic front resources can be used independently or to create advanced front-end resources.
Structs§
- Basic
Front Resource Config - Config for basic front resources.
- Display
Info - Display config for resources, controlling visibility and rendering behavior.
- Position
Size Config - Config for positioning and sizing resources in a flexible grid system.
- Rust
Constructor Error - Error type for Rust Constructor framework.
- Rust
Constructor Id - Unique identifier for Rust Constructor resources.
- Rust
Constructor Resource Box - Container for Rust Constructor resources with type-erased storage.
- Timer
- Timer for tracking application and page runtimes.
Enums§
- Border
Kind - Defines the placement of borders relative to the element’s bounds.
- Horizontal
Align - Horizontal alignment options for UI elements.
- List
Info Method - Methods for displaying list information.
- Render
Config - Config for rendering.
- Request
Method - The lookup method for requesting resources to skip the rendering queue.
- Request
Type - Types of rendering layer requests.
- Vertical
Align - Vertical alignment options for UI elements.
Traits§
- Basic
Front Resource - Trait for managing basic front resources that are displayed to the user.
- Rust
Constructor Resource - Core trait for managing Rust Constructor resources uniformly.