mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
24 lines
448 B
Rust
24 lines
448 B
Rust
use gtk::prelude::BoxExt;
|
|
|
|
pub struct Label {
|
|
gtk: gtk::Box,
|
|
}
|
|
|
|
impl Label {
|
|
// Construct new object
|
|
pub fn new(pin: >k::Image, title: >k::Label) -> Label {
|
|
let gtk = gtk::Box::builder()
|
|
.orientation(gtk::Orientation::Horizontal)
|
|
.build();
|
|
|
|
gtk.append(pin);
|
|
gtk.append(title);
|
|
|
|
Self { gtk }
|
|
}
|
|
|
|
// Getters
|
|
pub fn gtk(&self) -> >k::Box {
|
|
&self.gtk
|
|
}
|
|
}
|