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(
|
2022-04-26 16:20:57 +00:00
|
|
|
Row::new()
|
2022-04-28 08:45:33 +00:00
|
|
|
.add(Label::new("Hello, ")
|
2022-04-26 16:20:57 +00:00
|
|
|
.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!")))
|
2022-05-21 12:30:06 +00:00
|
|
|
.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
|
|
|
}
|