abletk/src/main.rs

30 lines
975 B
Rust
Raw Normal View History

2022-04-16 17:25:56 +00:00
/*
* Copyright (C) 2022 Umut İnan Erdoğan <umutinanerdogan@pm.me>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
2022-04-16 17:18:23 +00:00
use abletk::plugin::QuitPlugin;
use abletk::prelude::*;
#[launch]
fn launch() -> _ {
Application::new()
.apply_plugin(QuitPlugin)
2022-04-21 14:59:16 +00:00
.add_window(Window::builder(
Row::new()
2022-04-28 08:45:33 +00:00
.add(Label::new("Hello, ")
.color(rgb!(0xFF00FFFF)))
2022-04-28 08:45:33 +00:00
.add(Column::new()
.add(Label::new("World!"))
2022-05-01 15:24:13 +00:00
.add(Label::new("AbleTK!")))
.add(Label::new("this is a label! jjjjyyy")
2022-05-08 18:05:46 +00:00
.bg_color(rgb!(0xFF0000FF)))
.padding_left(10))
2022-05-22 09:52:26 +00:00
.on_event(WindowEvent::Resized, |_, window| {
println!("window resized: {:?}", window.size())
2022-05-01 15:24:13 +00:00
}))
2022-04-16 17:18:23 +00:00
}