Crates.io | rsgt |
lib.rs | rsgt |
version | 0.3.5 |
source | src |
created_at | 2023-01-01 12:39:16.730413 |
updated_at | 2023-01-11 13:52:42.581583 |
description | Rust simple GUI Toolkit |
homepage | |
repository | https://github.com/OvertimeCoder/RSGT |
max_upload_size | |
id | 748837 |
size | 99,192 |
RSGT is a simple GUI Library
RSGT's event handling is based on Swing (Java) event handling. (which uses callbacks). In addition, drawing of GUI components uses the GPU (wgpu), allowing for flexible representation.
use rsgt::Size;
use rsgt::event::WindowListener;
use rsgt::rframe::{CloseOperation, RFrameBuilder};
fn main() {
// Apply Visual Style (Windows only)
rsgt::os::enable_visual_style();
// Initialize RFrame
let mut frame = RFrameBuilder::new()
.with_size(Size(1280,720))
.with_title("Show window")
.with_visible(true)
.build()
.unwrap();
// Add window listener(Callback to detect Window events)
frame.add_window_listener(SampleWindowListener {});
// Show window
frame.run();
}
struct SampleWindowListener {}
impl WindowListener for SampleWindowListener {
}
"RSGT" is under MIT LICENSE